[mapserver-commits] r8660 - sandbox/graphics

svn at osgeo.org svn at osgeo.org
Sun Mar 8 11:31:31 EDT 2009


Author: tbonfort
Date: 2009-03-08 11:31:31 -0400 (Sun, 08 Mar 2009)
New Revision: 8660

Modified:
   sandbox/graphics/Makefile.in
   sandbox/graphics/configure
   sandbox/graphics/configure.in
Log:
add configuration option for cairo support


Modified: sandbox/graphics/Makefile.in
===================================================================
--- sandbox/graphics/Makefile.in	2009-03-08 15:31:00 UTC (rev 8659)
+++ sandbox/graphics/Makefile.in	2009-03-08 15:31:31 UTC (rev 8660)
@@ -225,8 +225,9 @@
 ICONV_INC=@ICONV_INC@
 
 CAIRO=@CAIRO_ENABLED@
-CAIRO_LIB=`pkg-config --libs cairo cairo-ft cairo-svg cairo-pdf cairo-png`
-CAIRO_INC=`pkg-config --cflags cairo cairo-ft cairo-svg cairo-pdf cairo-png`
+CAIRO_LIB=@CAIRO_LIB@
+CAIRO_INC=@CAIRO_INC@
+
 #
 # Pick a compiler, etc. Flex and bison are only required if you need to modify the mapserver lexer (maplexer.l) or expression parser (mapparser.y).
 #
@@ -249,7 +250,7 @@
 XTRALIBS= @XTRALIBS@
 RUNPATHS= @RPATHS@
 
-DEFINES = -DUSE_CAIRO $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) @ALL_ENABLED@ $(FRIBIDI)
+DEFINES = $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) @ALL_ENABLED@ $(FRIBIDI)
 
 INCLUDES = $(REGEX_INC) $(PNG_INC) $(GD_INC) $(AGG_INC) $(OGL_INC) $(FTGL_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC) \
         $(SDE_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \

Modified: sandbox/graphics/configure
===================================================================
--- sandbox/graphics/configure	2009-03-08 15:31:00 UTC (rev 8659)
+++ sandbox/graphics/configure	2009-03-08 15:31:31 UTC (rev 8660)
@@ -759,6 +759,9 @@
 FRIBIDI_ENABLED
 FRIBIDI_INC
 FRIBIDI_LIB
+CAIRO_ENABLED
+CAIRO_INC
+CAIRO_LIB
 FASTCGI_ENABLED
 FASTCGI_INC
 FASTCGI_LIB
@@ -1374,16 +1377,18 @@
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-ignore-missing-data   Ignore missing data file errors at runtime
-  --disable-ignore-missing-data  Report all missing data files (enabled by
-                                 default).
+  --enable-ignore-missing-data
+                          Ignore missing data file errors at runtime
+  --disable-ignore-missing-data
+                          Report all missing data files (enabled by default).
   --enable-point-z-m      Use point Z and M parameters (disabled by default).
   --disable-point-z-m     Disable support for point Z and M parameters.
   --disable-fast-nint     Use safe MS_NINT with reliable rounding
   --enable-debug          Include "-g" in CFLAGS for debugging.
   --disable-debug         Do not include "-g" in CFLAGS (the default).
   --enable-gcov           Enable source code coverage testing using gcov
-  --enable-perlv-ld-detect (applies to --with-php only)
+  --enable-perlv-ld-detect
+                          (applies to --with-php only)
                           Use perl -V output to figure the command to use to
                           link php_mapscript.so.  Try this only if the default
                           internal macro didn't work.
@@ -1394,7 +1399,8 @@
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pkg-config[=PATH]      Include pkg-config support (PATH is path to pkg-config)
+  --with-pkg-config[=PATH]
+                          Include pkg-config support (PATH is path to pkg-config)
   --with-freetype=DIR     GD: Specify where FreeType 2.x is installed (DIR is
                               path to freetype-config program or install dir).
   --with-zlib=DIR         GD,SVG: Specify where zlib is installed (DIR is path
@@ -1406,21 +1412,22 @@
                               libXpm install prefix).
   --with-libiconv=DIR     Specify where libiconv is installed (DIR is path
                           to libiconv install dir (prefix)).
-  --with-gd[=[static,]DIR] Specify which version of GD to use (DIR is GD's
+  --with-gd[=[static,]DIR]
+                          Specify which version of GD to use (DIR is GD's
                           install dir).
   --without-pdf           Disable PDF support.
   --with-pdf[=DIR]        Include PDF support (DIR is PDFlib's install dir).
-  --with-ftgl[=DIR]        Include OpenGl support (DIR is OpenGL's install dir).
-  --with-opengl[=DIR]        Include OpenGl support (DIR is OpenGL's install dir).
+  --with-ftgl[=DIR]       Include OpenGl support (DIR is OpenGL's install dir).
+  --with-opengl[=DIR]     Include OpenGl support (DIR is OpenGL's install dir).
   --with-agg[=DIR]        Include AGG support (DIR is AGG's install dir).
-  --with-experimental-png       Include experimental palette support for rgba png.
+  --with-experimental-png Include experimental palette support for rgba png.
   --without-eppl          Disable EPPL7 support.
   --with-eppl             Include EPPL7 support.
   --with-proj[=DIR]       Include PROJ.4 support (DIR is PROJ.4's install dir).
   --with-threads[=linkopt]Include thread safe support
   --with-sde[=DIR]        Include ESRI SDE support (DIR is SDE's install dir).
-  --with-sde-version[=VERSION NUMBER]  Set ESRI SDE version number (Default
-                          is 91).
+  --with-sde-version[=VERSION NUMBER]
+                          Set ESRI SDE version number (Default is 91).
   --with-geos[=PATH]      Include GEOS support (PATH is path to geos-config)
   --with-ogr[=PATH]       Include OGR support (PATH is path to gdal-config).
   --with-gdal[=PATH]      Include GDAL support (PATH is path to gdal-config)
@@ -1428,7 +1435,8 @@
   --with-tiff[=DIR]       Include TIFF support (DIR is LibTIFF's install dir).
   --with-postgis[=ARG]    Include PostGIS Support (ARG=yes/path to pg_config)
   --with-mygis[=ARG]      Include MyGIS Support (ARG=yes/path to mysql_config)
-  --with-oraclespatial[=ARG] Include OracleSpatial Support (ARG=yes/path to
+  --with-oraclespatial[=ARG]
+                          Include OracleSpatial Support (ARG=yes/path to
                           Oracle home)
   --with-ming[=DIR]       Include MING/Flash Support (DIR=path to Ming
                           directory)
@@ -1443,8 +1451,10 @@
                           OGR required).
   --with-curl-config=PATH Specify path to curl-config.
   --with-xml2-config=PATH Specify path to xml2-config.
-  --with-fribidi-config[=ARG] Include FriBidi Support (ARG=yes/path to
+  --with-fribidi-config[=ARG]
+                          Include FriBidi Support (ARG=yes/path to
                           fribidi-config or fribidi.pc)
+  --with-cairo[=ARG]      Include Cairo Support (ARG=yes/path to cairo.pc)
   --with-fastcgi=path     Enable FastCGI, point to installed tree.
   --with-httpd            Specify path to 'httpd' executable.
   --with-warnings[=flags] Enable strict warnings (or user defined warnings)
@@ -12412,6 +12422,71 @@
 ALL_LIB="$FRIBIDI_LIB $ALL_LIB"
 
 
+
+{ echo "$as_me:$LINENO: checking if Cairo support requested" >&5
+echo $ECHO_N "checking if Cairo support requested... $ECHO_C" >&6; }
+
+
+# Check whether --with-cairo was given.
+if test "${with_cairo+set}" = set; then
+  withval=$with_cairo;
+fi
+
+
+if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  CAIRO_CONFIG="no"
+
+elif test "$with_cairo" = "yes" ; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  if test "$PKG_CONFIG" != "no" ; then
+     { echo "$as_me:$LINENO: checking for cairo pkg-config path" >&5
+echo $ECHO_N "checking for cairo pkg-config path... $ECHO_C" >&6; }
+     `$PKG_CONFIG --silence-errors -- cairo cairo-ft cairo-svg cairo-pdf cairo-png >> /dev/null`
+     if test $? -eq 0 ; then
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+        CAIRO_CONFIG="cairo cairo-ft cairo-svg cairo-pdf cairo-png"
+     else
+       { { echo "$as_me:$LINENO: error: cairo support requested, but not found.Try installing the cairo development headers" >&5
+echo "$as_me: error: cairo support requested, but not found.Try installing the cairo development headers" >&2;}
+   { (exit 1); exit 1; }; }
+     fi
+  else
+    { { echo "$as_me:$LINENO: error: pkg-config required for cairo support, try using --with-pkg-config=PATH" >&5
+echo "$as_me: error: pkg-config required for cairo support, try using --with-pkg-config=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  CAIRO_CONFIG=$with_cairo_config
+fi
+
+if test "$CAIRO_CONFIG" = "no" ; then
+  CAIRO_ENABLED=
+  CAIRO_INC=
+  CAIRO_LIB=
+else
+  { echo "$as_me:$LINENO: result: yes, pkg-config defaults, or user supplied path to cairo.pc" >&5
+echo "${ECHO_T}yes, pkg-config defaults, or user supplied path to cairo.pc" >&6; }
+  CAIRO_ENABLED="-DUSE_CAIRO"
+  CAIRO_LIB=`$PKG_CONFIG --libs $CAIRO_CONFIG`
+  CAIRO_INC=`$PKG_CONFIG --cflags $CAIRO_CONFIG`
+fi
+
+CAIRO_ENABLED=$CAIRO_ENABLED
+
+CAIRO_INC=$CAIRO_INC
+
+CAIRO_LIB=$CAIRO_LIB
+
+
+ALL_ENABLED="$CAIRO_ENABLED $ALL_ENABLED"
+ALL_INC="$CAIRO_INC $ALL_INC"
+ALL_LIB="$CAIRO_LIB $ALL_LIB"
+
+
 { echo "$as_me:$LINENO: checking FastCGI support" >&5
 echo $ECHO_N "checking FastCGI support... $ECHO_C" >&6; }
 
@@ -14325,6 +14400,9 @@
 FRIBIDI_ENABLED!$FRIBIDI_ENABLED$ac_delim
 FRIBIDI_INC!$FRIBIDI_INC$ac_delim
 FRIBIDI_LIB!$FRIBIDI_LIB$ac_delim
+CAIRO_ENABLED!$CAIRO_ENABLED$ac_delim
+CAIRO_INC!$CAIRO_INC$ac_delim
+CAIRO_LIB!$CAIRO_LIB$ac_delim
 FASTCGI_ENABLED!$FASTCGI_ENABLED$ac_delim
 FASTCGI_INC!$FASTCGI_INC$ac_delim
 FASTCGI_LIB!$FASTCGI_LIB$ac_delim
@@ -14359,7 +14437,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 84; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -14725,6 +14803,8 @@
 echo "${ECHO_T}  AGG support:               ${AGG_ENABLED}" >&6; }
 { echo "$as_me:$LINENO: result:   AGG Freetype support:      ${AGG_FT_LIB}${AGG_FT_OBJ}" >&5
 echo "${ECHO_T}  AGG Freetype support:      ${AGG_FT_LIB}${AGG_FT_OBJ}" >&6; }
+{ echo "$as_me:$LINENO: result:   Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&5
+echo "${ECHO_T}  Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&6; }
 { echo "$as_me:$LINENO: result:   Ming(flash) support:       ${MING_ENABLED}" >&5
 echo "${ECHO_T}  Ming(flash) support:       ${MING_ENABLED}" >&6; }
 { echo "$as_me:$LINENO: result:   PDFLib support:            ${PDF_ENABLED}" >&5

Modified: sandbox/graphics/configure.in
===================================================================
--- sandbox/graphics/configure.in	2009-03-08 15:31:00 UTC (rev 8659)
+++ sandbox/graphics/configure.in	2009-03-08 15:31:31 UTC (rev 8660)
@@ -87,7 +87,8 @@
 AC_MSG_CHECKING(if pkg-config path is provided)
 
 AC_ARG_WITH(pkg-config,
-[  --with-pkg-config[[=PATH]]      Include pkg-config support (PATH is path to pkg-config)],,)
+[  --with-pkg-config[[=PATH]]
+                          Include pkg-config support (PATH is path to pkg-config)],,)
 
 if test -n "$with_pkg_config" -a "$with_pkg_config" != "no" ; then
 
@@ -523,7 +524,8 @@
 
 AC_CHECKING(for GD 2.0.16 or higher)
 AC_ARG_WITH(gd,
-[  --with-gd[[=[static,]DIR]] Specify which version of GD to use (DIR is GD's
+[  --with-gd[[=[static,]DIR]]
+                          Specify which version of GD to use (DIR is GD's
                           install dir).],,)
 
 if test "$with_gd" = "no" ; then
@@ -821,7 +823,7 @@
 
 AC_MSG_CHECKING(if FTGL support requested)
 AC_ARG_WITH(ftgl,
-[  --with-ftgl[[=DIR]]        Include OpenGl support (DIR is OpenGL's install dir).],,)
+[  --with-ftgl[[=DIR]]       Include OpenGl support (DIR is OpenGL's install dir).],,)
 
 if test "$with_ftgl" = "yes" ; then
   with_ftgl="/usr"
@@ -876,7 +878,7 @@
 
 AC_MSG_CHECKING(if OGL support requested)
 AC_ARG_WITH(ogl,
-[  --with-opengl[[=DIR]]        Include OpenGl support (DIR is OpenGL's install dir).],,)
+[  --with-opengl[[=DIR]]     Include OpenGl support (DIR is OpenGL's install dir).],,)
 
 if test "$with_opengl" = "yes" ; then
 
@@ -1031,7 +1033,7 @@
 
 AC_MSG_CHECKING(if RGBA palette png support requested)
 AC_ARG_WITH(experimental-png,
-[  --with-experimental-png       Include experimental palette support for rgba png.],,)
+[  --with-experimental-png Include experimental palette support for rgba png.],,)
 
 if test -z "$with_experimental_png" -o "$with_experimental_png" = "no" ; then
   AC_MSG_RESULT([no])
@@ -1217,8 +1219,8 @@
 [  --with-sde[[=DIR]]        Include ESRI SDE support (DIR is SDE's install dir).],,)
 
 AC_ARG_WITH(sde-version,
-[  --with-sde-version[[=VERSION NUMBER]]  Set ESRI SDE version number (Default
-                          is 91).],SDE_VERSION=$with_sde_version,SDE_VERSION=91)
+[  --with-sde-version[[=VERSION NUMBER]]
+                          Set ESRI SDE version number (Default is 91).],SDE_VERSION=$with_sde_version,SDE_VERSION=91)
 
 if test -z "$SDE_VERSION" -o `expr "$SDE_VERSION" \>\= 92` = 1; then
 SDE_VERSION=""
@@ -1652,7 +1654,8 @@
 
 AC_MSG_CHECKING(if OracleSpatial support requested)
 AC_ARG_WITH(oraclespatial,
-[  --with-oraclespatial[[=ARG]] Include OracleSpatial Support (ARG=yes/path to
+[  --with-oraclespatial[[=ARG]]
+                          Include OracleSpatial Support (ARG=yes/path to
                           Oracle home)],,)
 
 if test "$with_oraclespatial" = "no" -o "$with_oraclespatial" = ""; then
@@ -2050,7 +2053,8 @@
 AC_MSG_CHECKING(if FriBidi support requested)
 
 AC_ARG_WITH(fribidi-config,
-[  --with-fribidi-config[[=ARG]] Include FriBidi Support (ARG=yes/path to 
+[  --with-fribidi-config[[=ARG]]
+                          Include FriBidi Support (ARG=yes/path to 
                           fribidi-config or fribidi.pc)],,)
 
 if test "$with_fribidi_config" = "no" -o "$with_fribidi_config" = "" ; then
@@ -2107,6 +2111,57 @@
 ALL_LIB="$FRIBIDI_LIB $ALL_LIB"
 
 
+dnl ---------------------------------------------------------------------------
+dnl Look for Cairo if requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if Cairo support requested)
+
+AC_ARG_WITH(cairo,
+[  --with-cairo[[=ARG]]      Include Cairo Support (ARG=yes/path to cairo.pc)],,)
+
+if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then
+  AC_MSG_RESULT(no)
+  CAIRO_CONFIG="no"
+
+elif test "$with_cairo" = "yes" ; then
+  AC_MSG_RESULT(yes)
+  if test "$PKG_CONFIG" != "no" ; then 
+     AC_MSG_CHECKING(for cairo pkg-config path)
+     `$PKG_CONFIG --silence-errors -- cairo cairo-ft cairo-svg cairo-pdf cairo-png >> /dev/null`
+     if test $? -eq 0 ; then
+        AC_MSG_RESULT(yes)
+        CAIRO_CONFIG="cairo cairo-ft cairo-svg cairo-pdf cairo-png"
+     else
+       AC_MSG_ERROR([cairo support requested, but not found.Try installing the cairo development headers])
+     fi
+  else
+    AC_MSG_ERROR([pkg-config required for cairo support, try using --with-pkg-config=PATH])
+  fi 
+else
+  CAIRO_CONFIG=$with_cairo_config
+fi
+
+if test "$CAIRO_CONFIG" = "no" ; then 
+  CAIRO_ENABLED=
+  CAIRO_INC=
+  CAIRO_LIB=
+else
+  AC_MSG_RESULT([yes, pkg-config defaults, or user supplied path to cairo.pc])
+  CAIRO_ENABLED="-DUSE_CAIRO"
+  CAIRO_LIB=`$PKG_CONFIG --libs $CAIRO_CONFIG`
+  CAIRO_INC=`$PKG_CONFIG --cflags $CAIRO_CONFIG`
+fi
+
+AC_SUBST(CAIRO_ENABLED,$CAIRO_ENABLED)
+AC_SUBST(CAIRO_INC,$CAIRO_INC)
+AC_SUBST(CAIRO_LIB,$CAIRO_LIB)
+
+ALL_ENABLED="$CAIRO_ENABLED $ALL_ENABLED"
+ALL_INC="$CAIRO_INC $ALL_INC"
+ALL_LIB="$CAIRO_LIB $ALL_LIB"
+
+
 dnl ---------------------------------------------------------------------
 dnl Support for FastCGI enabled builds.
 dnl ---------------------------------------------------------------------
@@ -2220,9 +2275,10 @@
 dnl ---------------------------------------------------------------------
 
 AC_ARG_ENABLE(ignore-missing-data,
-[  --enable-ignore-missing-data   Ignore missing data file errors at runtime
-  --disable-ignore-missing-data  Report all missing data files (enabled by 
-                                 default).],,)
+[  --enable-ignore-missing-data
+                          Ignore missing data file errors at runtime
+  --disable-ignore-missing-data
+                          Report all missing data files (enabled by default).],,)
 if test "$enable_ignore_missing_data" = "yes" ; then
 
   IGNORE_MISSING_DATA="-DIGNORE_MISSING_DATA"
@@ -2362,7 +2418,8 @@
                           module.],,)
 
 AC_ARG_ENABLE(internal-ld-detect,
-[  --enable-perlv-ld-detect (applies to --with-php only) 
+[  --enable-perlv-ld-detect
+                          (applies to --with-php only) 
                           Use perl -V output to figure the command to use to 
                           link php_mapscript.so.  Try this only if the default
                           internal macro didn't work.],,)
@@ -2675,6 +2732,7 @@
 AC_MSG_RESULT([  iconv support:             ${ICONV_ENABLED}])
 AC_MSG_RESULT([  AGG support:               ${AGG_ENABLED}])
 AC_MSG_RESULT([  AGG Freetype support:      ${AGG_FT_LIB}${AGG_FT_OBJ}])
+AC_MSG_RESULT([  Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}])
 AC_MSG_RESULT([  Ming(flash) support:       ${MING_ENABLED}])
 AC_MSG_RESULT([  PDFLib support:            ${PDF_ENABLED}])
 AC_MSG_RESULT()



More information about the mapserver-commits mailing list