# Required initializer AC_INIT(Makefile.inc.in) # don't let AC_PROG_CC force "-g -O2" : ${CFLAGS="-Wall"} LT_INIT AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL dnl --------------------------------------------------------------------- dnl Checks for header files. dnl --------------------------------------------------------------------- AC_HEADER_STDC dnl --------------------------------------------------------------------- dnl Add -fPIC to compiler flags dnl --------------------------------------------------------------------- CFLAGS="$CFLAGS -fPIC" AC_CHECK_FUNC(symlink,[CFLAGS="$CFLAGS -DHAVE_SYMLINK"]) TARGETS= AC_SUBST(MISC_ENABLED) # macro that is used to parse a --with-apxs parameter AC_DEFUN([APXS_CHECK],[ AC_SUBST(APXS) AC_ARG_WITH( apxs, AC_HELP_STRING([--with-apxs@<:@=PATH@:>@],[Apache 2 apxs tool location]), , [with_apxs="yes"] ) if test "$with_apxs" = "yes"; then AC_PATH_PROG(APXS, apxs2) if test -z "$APXS"; then AC_PATH_PROG(APXS, apxs) fi elif test "$with_apxs" = "no"; then AC_MSG_ERROR(apxs is required and cannot be disabled) else AC_MSG_CHECKING(for apxs usability in $with_apxs) if test -x "$with_apxs"; then APXS=$with_apxs AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_apxs not found or not executable) fi fi if test -z "$APXS"; then AC_MSG_ERROR(apxs utility not found. use --with-apxs to specify its location.) fi AC_SUBST(APXS) APACHE_SBINDIR=`$APXS -q SBINDIR` APACHE_BINDIR=`$APXS -q BINDIR` AC_SUBST(APACHE_SBINDIR) AC_SUBST(APACHE_BINDIR) AC_MSG_CHECKING([for apachectl utility]) APACHECTL= if test -x "$APACHE_SBINDIR/apachectl" ; then APACHECTL="$APACHE_SBINDIR/apachectl" else if test -x "$APACHE_SBINDIR/apache2ctl" ; then APACHECTL="$APACHE_SBINDIR/apache2ctl" else AC_PATH_PROG(APACHECTL,apachectl) if test -z "$APACHECTL"; then AC_PATH_PROG(APACHECTL,apache2ctl) fi fi fi if test -z "$APACHECTL"; then AC_MSG_RESULT([Unable to find apachectl utility, you will not be able to restart and install module with the created Makefile]) else AC_MSG_RESULT([$APACHECTL]) fi AC_SUBST(APACHECTL) AC_SUBST(APXS_INC,-I`$APXS -q INCLUDEDIR`) AC_SUBST(APXS_LIBS,`$APXS -q LIBS`) AC_SUBST(APXS_LDFLAGS,`$APXS -q LDFLAGS`) SBINDIR=`$APXS -q SBINDIR` TARGET=`$APXS -q TARGET` HTTPD="$SBINDIR/$TARGET" AC_SUBST(HTTPD,"$HTTPD") ]) AC_DEFUN([CURL_CHECK],[ AC_SUBST(CURLCONFIG) AC_ARG_WITH(curl_config, AC_HELP_STRING([--with-curl-config], [path to curl-config program]), , [with_curl_config=yes] ) if test "$with_curl_config" = "yes"; then AC_PATH_PROG(CURLCONFIG, curl-config) elif test "$with_curl_config" = "no"; then AC_MSG_ERROR(curl-config is required and cannot be disabled) else AC_MSG_CHECKING(for curl-config usability in $with_curl_config) if test -x "$with_curl_config"; then CURLCONFIG=$with_curl_config AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_curl_config not found or not executable) fi fi if test -z "$CURLCONFIG"; then AC_MSG_ERROR(curl-config utility not found. use --with-curl-config to specify its location.) fi AC_SUBST(CURLCONFIG) AC_SUBST(CURL_CFLAGS,`$CURLCONFIG --cflags`) AC_SUBST(CURL_LIBS,`$CURLCONFIG --libs`) ]) AC_DEFUN([PKGCONFIG_CHECK],[ AC_SUBST(PKGCONFIG) AC_ARG_WITH(pkg-config, AC_HELP_STRING([--with-pkg-config@<:@=PATH@:>@],[path to pkg-config)]), , [with_pkg_config=yes]) if test "$with_pkg_config" = "no"; then AC_MSG_CHECKING(for pkg-config usability) AC_MSG_RESULT(disabled by request) else if test "$with_pkg_config" = "yes" ; then AC_PATH_PROG(PKGCONFIG, pkg-config) else AC_MSG_CHECKING(for pkg-config usability in $with_pkg_config) if test -x "$with_pkg_config"; then PKGCONFIG=$with_pkg_config AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_pkg_config not found or not executable) fi fi if test -z "$PKGCONFIG"; then AC_MSG_ERROR(pkg-config utility not found. use --with-pkg-config to specify its location.) fi fi AC_SUBST(PKGCONFIG) ]) AC_DEFUN([CAIRO_CHECK],[ AC_ARG_WITH(cairo, AC_HELP_STRING([--with-cairo@<:@=ARG@:>@],[Include Cairo Support (ARG=yes/no/path to cairo.pc)]), , [with_cairo=yes]) if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then AC_MSG_RESULT(no) CAIRO_CONFIG="no" else if test -z "$PKGCONFIG"; then AC_MSG_ERROR([cairo support requested, but pkg-config not found/configured]) fi if test "$with_cairo" = "yes" ; then AC_MSG_CHECKING(for cairo pkg-config entry) `$PKGCONFIG --silence-errors -- cairo >> /dev/null` if test $? -eq 0 ; then AC_MSG_RESULT(found) CAIRO_CONFIG="cairo" else AC_MSG_ERROR([cairo support requested, but not found.Try installing the cairo development headers]) fi else CAIRO_CONFIG=$with_cairo fi fi if test "$CAIRO_CONFIG" = "no" ; then AC_MSG_WARN([cairo support has been disabled or could not be configured. full WMS support cannot be enabled on the resulting build]) CAIRO_ENABLED= CAIRO_INC= CAIRO_LIB= else CAIRO_ENABLED="-DUSE_CAIRO" CAIRO_LIB=`$PKGCONFIG --libs $CAIRO_CONFIG` CAIRO_INC=`$PKGCONFIG --cflags $CAIRO_CONFIG` fi AC_SUBST(CAIRO_ENABLED,$CAIRO_ENABLED) AC_SUBST(CAIRO_INC,$CAIRO_INC) AC_SUBST(CAIRO_LIB,$CAIRO_LIB) ]) AC_DEFUN([PIXMAN_CHECK],[ AC_ARG_WITH(pixman, AC_HELP_STRING([--with-pixman@<:@=ARG@:>@],[Include Pixman Support (ARG=yes/no/path to pixman.pc)]), , [with_pixman=yes]) AC_MSG_CHECKING(for Pixman) if test "$with_pixman" = "no" -o "$with_pixman" = "" ; then AC_MSG_RESULT(disabled) PIXMAN_CONFIG="no" else if test -z "$PKGCONFIG"; then AC_MSG_ERROR([pixman support requested, but pkg-config not found/configured]) fi if test "$with_pixman" = "yes" ; then AC_MSG_RESULT(searching default locations) AC_MSG_CHECKING(for pixman pkg-config entry) `$PKGCONFIG --silence-errors -- pixman >> /dev/null` if test $? -eq 0 ; then AC_MSG_RESULT(found) PIXMAN_CONFIG="pixman" else `$PKGCONFIG --silence-errors -- pixman-1 >> /dev/null` if test $? -eq 0 ; then AC_MSG_RESULT(found) PIXMAN_CONFIG="pixman-1" else AC_MSG_ERROR([pixman support requested, but not found.Try installing the pixman development headers]) fi fi else `$PKGCONFIG $with_pixman` if test $? -eq 0 ; then AC_MSG_RESULT([using supplied pkg-config definition $with_pixman]) PIXMAN_CONFIG=$with_pixman else AC_MSG_ERROR([failed to use $with_pixman]) fi fi fi if test "$PIXMAN_CONFIG" = "no" ; then AC_MSG_WARN([pixman support has been disabled or could not be configured. full WMS will use the internal (usually slower) image merging functions]) PIXMAN_ENABLED= PIXMAN_INC= PIXMAN_LIB= else AC_MSG_CHECKING([if pixman version is >= 0.13.2]) PIXMAN_VERSION=`$PKGCONFIG --modversion -- "$PIXMAN_CONFIG"` AC_MSG_RESULT([$PIXMAN_VERSION]) `$PKGCONFIG --silence-errors -- "$PIXMAN_CONFIG >= 0.13.2" >> /dev/null` if test $? -eq 0 ; then PIXMAN_ENABLED="-DUSE_PIXMAN" PIXMAN_LIB=`$PKGCONFIG --libs $PIXMAN_CONFIG` PIXMAN_INC=`$PKGCONFIG --cflags $PIXMAN_CONFIG` else AC_MSG_WARN([pixman support has been disabled because your version is too old. full WMS will use the internal (usually slower) image merging functions]) PIXMAN_ENABLED= PIXMAN_INC= PIXMAN_LIB= fi fi AC_SUBST(PIXMAN_ENABLED,$PIXMAN_ENABLED) AC_SUBST(PIXMAN_INC,$PIXMAN_INC) AC_SUBST(PIXMAN_LIB,$PIXMAN_LIB) ]) AC_DEFUN([MEMCACHE_CHECK],[ AC_ARG_ENABLE(memcache, AC_HELP_STRING([--enable-memcache],[Enable memcache backend]), , [enable_memcache=yes] ) AC_SUBST(MEMCACHE_ENABLED) if test "$enable_memcache" == "yes"; then AC_SUBST(MEMCACHE_ENABLED) if test -z "$APUCONFIG"; then AC_MSG_ERROR(memcache check failed: apu-config utility not found) fi OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS `$APUCONFIG --ldflags --libs --link-ld`" OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS `$APUCONFIG --includes`" #check we can link against the memcache functions (i.e. is apr-util recent enough) AC_CHECK_LIB(aprutil-1, apr_memcache_hash,[MEMCACHE_ENABLED=[-DUSE_MEMCACHE]],) if test -z "$APU_LIBS"; then AC_CHECK_LIB(aprutil, apr_memcache_hash,[MEMCACHE_ENABLED=[-DUSE_MEMCACHE]],) fi if test -n "$MEMCACHE_ENABLED"; then #we managed to link against the memcache functions. are the headers available? AC_CHECK_HEADER([apr_memcache.h],, [ AC_MSG_WARN([apr-util contains memcache functions, but the headers where not found. memcache cache backend disabled]) MEMCACHE_ENABLED="" ]) else AC_MSG_WARN([supplied apr-util does not contain memcache functions. memcache cache backend disabled]) fi CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS" AC_SUBST(MEMCACHE_ENABLED) fi ]) AC_DEFUN([APU_CHECK],[ AC_SUBST(APUCONFIG) AC_SUBST(MEMCACHE_ENABLED) AC_ARG_WITH(apu_config, AC_HELP_STRING([--with-apu-config], [path to apu-config program]), , [with_apu_config=yes] ) if test "$with_apu_config" = "yes"; then AC_MSG_CHECKING(for apu-config in default locations) if test -n "$APXS"; then APXSFULL=`which "$APXS"` APXSDIR=`dirname "$APXSFULL"` if test -x "$APXSDIR/apu-config"; then APUCONFIG="$APXSDIR/apu-config" elif test -x "$APACHE_SBINDIR/apu-config"; then APUCONFIG="$APACHE_SBINDIR/apu-config" elif test -x "$APACHE_BINDIR/apu-config"; then APUCONFIG="$APACHE_BINDIR/apu-config" elif test -x "$APXSDIR/apu-1-config"; then APUCONFIG="$APXSDIR/apu-1-config" elif test -x "$APACHE_SBINDIR/apu-1-config"; then APUCONFIG="$APACHE_SBINDIR/apu-1-config" elif test -x "$APACHE_BINDIR/apu-1-config"; then APUCONFIG="$APACHE_BINDIR/apu-1-config" fi fi if test -z "$APUCONFIG"; then AC_PATH_PROG(APUCONFIG, apu-config) fi if test -z "$APUCONFIG"; then AC_PATH_PROG(APUCONFIG, apu-1-config) fi if test -n "$APUCONFIG"; then AC_MSG_RESULT([using $APUCONFIG, use --with-apu-config=/path/to/apu-(1-)config to modify]) else AC_MSG_RESULT([not found]) fi else AC_MSG_CHECKING(for apu-config usability in $with_apu_config) if test -x "$with_apu_config"; then APUCONFIG=$with_apu_config AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_apu_config not found or not executable) fi fi if test -z "$APUCONFIG"; then AC_MSG_ERROR(apu-config utility not found) else APU_LIBS=`$APUCONFIG --link-ld` APU_INC=`$APUCONFIG --includes` APU_INCDIR=`$APUCONFIG --includedir` fi AC_SUBST(APUCONFIG) AC_SUBST(APU_INC) AC_SUBST(APU_INCDIR) AC_SUBST(APU_LIBS) ]) AC_DEFUN([APR_CHECK],[ AC_SUBST(APRCONFIG) AC_ARG_WITH(apr_config, AC_HELP_STRING([--with-apr-config], [path to apr-config program]), , [with_apr_config=yes] ) if test "$with_apr_config" = "yes"; then AC_MSG_CHECKING(for apr-config in default locations) if test -n "$APXS"; then APXSFULL=`which "$APXS"` APXSDIR=`dirname "$APXSFULL"` if test -x "$APXSDIR/apr-config"; then APRCONFIG="$APXSDIR/apr-config" elif test -x "$APACHE_SBINDIR/apr-config"; then APRCONFIG="$APACHE_SBINDIR/apr-config" elif test -x "$APACHE_BINDIR/apr-config"; then APRCONFIG="$APACHE_BINDIR/apr-config" elif test -x "$APXSDIR/apr-1-config"; then APRCONFIG="$APXSDIR/apr-1-config" elif test -x "$APACHE_SBINDIR/apr-1-config"; then APRCONFIG="$APACHE_SBINDIR/apr-1-config" elif test -x "$APACHE_BINDIR/apr-1-config"; then APRCONFIG="$APACHE_BINDIR/apr-1-config" fi fi if test -z "$APRCONFIG"; then AC_PATH_PROG(APRCONFIG, apr-config) fi if test -z "$APRCONFIG"; then AC_PATH_PROG(APRCONFIG, apr-1-config) fi if test -n "$APRCONFIG"; then AC_MSG_RESULT([using $APRCONFIG, use --with-apr-config=/path/to/apr-(1-)config to modify]) else AC_MSG_RESULT([not found]) fi elif test "$with_apr_config" = "no"; then AC_MSG_ERROR(apr-config is required and cannot be disabled) else AC_MSG_CHECKING(for apr-config usability in $with_apr_config) if test -x "$with_apr_config"; then APRCONFIG=$with_apr_config AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_apr_config not found or not executable) fi fi if test -z "$APRCONFIG"; then AC_MSG_ERROR(apr-config utility not found. use --with-apr-config to specify its location.) fi AC_SUBST(APRCONFIG) AC_SUBST(APR_CFLAGS,`$APRCONFIG --cppflags --cflags`) AC_SUBST(APR_INC,`$APRCONFIG --includes`) AC_SUBST(APR_INCDIR,`$APRCONFIG --includedir`) AC_SUBST(APR_LIBS,`$APRCONFIG --link-ld`) ]) AC_DEFUN([PCRE_CHECK],[ PCRE_LIBS='' PCRE_CFLAGS='' AC_MSG_CHECKING([for pcre library inclusion]) AC_ARG_WITH(pcre, [ --with-pcre[[=prefix]] use pcre instead of posix regular expressions],, with_pcre="yes") if test "x$with_pcre" = "xno" ; then AC_MSG_RESULT([disabled by request]) else if test "x$with_pcre" = "xyes" ; then AC_MSG_RESULT([in system locations]) AC_CHECK_LIB(pcre, pcre_compile,PCRE_LIBS=[-lpcre], [AC_MSG_WARN([pcre library not found, will fall back to posix regular expressions which are less powerfull])]) if test -n "$PCRE_LIBS"; then AC_CHECK_HEADER([pcre.h],PCRE_ENABLED=[-DUSE_PCRE],[AC_MSG_WARN([pcre.h not found, will fall back to posix regular expressions which are less powerfull])]) fi else OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib" OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include" AC_CHECK_LIB(pcre, pcre_compile,PCRE_LIBS="-L$with_pcre/lib -lpcre", [AC_MSG_WARN([pcre library not found in $with_pcre/lib, will fall back to posix regular expressions which are less powerfull])]) CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS" if test -n "$PCRE_LIBS"; then test -f $with_pcre/include/pcre.h && PCRE_CFLAGS="-I$with_pcre/include" test -f $with_pcre/lib/pcre.h && PCRE_CFLAGS="-I$with_pcre/lib" test -f $with_pcre/pcre.h && PCRE_CFLAGS="-I$with_pcre" if test -z $PCRE_CFLAGS; then AC_MSG_WARN([pcre.h not found, will fall back to posix regular expressions which are less powerfull]) else PCRE_ENABLED="-DUSE_PCRE" fi fi fi fi AC_SUBST([PCRE_ENABLED]) AC_SUBST([PCRE_LIBS]) AC_SUBST([PCRE_CFLAGS]) ]) AC_DEFUN([MAPSERVER_CHECK],[ AC_ARG_WITH(mapserver, AC_HELP_STRING([--with-mapserver@<:@=/path/to/mapserver-prefix@:>@ ],[Enable mapserver sources (experimental)]), , [enable_mapserver=no] ) if test "$with_mapserver" == "yes"; then AC_CHECK_LIB(mapserver, msDrawMap,MAPSERVER_LIB="-lmapserver", [AC_MSG_ERROR([mapserver library not found in default path, specify installation prefix])]) else if test "$enable_mapserver" != "no"; then OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_mapserver/lib" AC_CHECK_LIB(mapserver, msDrawMap,MAPSERVER_LIB="-L$with_mapserver/lib -lmapserver", [AC_MSG_ERROR([mapserver library not found in $with_mapserver/lib])]) LDFLAGS="$OLDLDFLAGS" fi fi if test -n "$MAPSERVER_LIB"; then AC_SUBST(MAPSERVER_ENABLED,"-DUSE_MAPSERVER") AC_SUBST(MAPSERVER_LIB,$MAPSERVER_LIB) fi ]) AC_DEFUN([DEBUG_CHECK],[ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Enable debug build]), , [enable_debug=no] ) if test "$enable_debug" == "yes"; then CFLAGS="$CFLAGS -g -O0 -DDEBUG" else CFLAGS="-O2 $CFLAGS -DNDEBUG" fi AC_SUBST(CFLAGS,$CFLAGS) ]) AC_DEFUN([AC_EXPAND_PATH],[ if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then $2="$1" else $2="`pwd`/$1" fi ]) AC_DEFUN([GDAL_CHECK],[ AC_ARG_WITH(gdal, AC_HELP_STRING([--with-gdal], [path to gdal-config program]), , [with_gdal=yes] ) GDALCONFIG="" if test "$with_gdal" = "no"; then AC_MSG_WARN([gdal support disabled by request: advanced seeding options will not be available]) else if test "$with_gdal" = "yes"; then AC_PATH_PROG(GDALCONFIG, gdal-config) else AC_MSG_CHECKING(for gdal-config usability in $with_gdal) if test -x "$with_gdal"; then GDALCONFIG=$with_gdal AC_MSG_RESULT(ok) else AC_MSG_ERROR($with_gdal not found or not executable) fi fi if test -n "$GDALCONFIG"; then GDAL_ENABLED="-DUSE_GDAL" GDAL_CFLAGS=`$GDALCONFIG --cflags --includes` GDAL_LIBS=`$GDALCONFIG --libs` OGR_ENABLED=`$GDALCONFIG --ogr-enabled` fi fi if test "x$OGR_ENABLED" == "xyes"; then OGR_ENABLED="-DUSE_OGR" fi AC_SUBST(OGR_ENABLED,$OGR_ENABLED) AC_SUBST(GDAL_ENABLED,$GDAL_ENABLED) AC_SUBST(GDAL_INC,$GDAL_CFLAGS) AC_SUBST(GDAL_LIB,$GDAL_LIBS) ]) AC_DEFUN([GEOS_CHECK],[ AC_ARG_WITH(geos, AC_HELP_STRING([--with-geos], [path to geos-config program]), , [with_geos=yes] ) GEOSCONFIG="" if test -z "$OGR_ENABLED"; then AC_MSG_WARN([geos support disabled as gdal/ogr support was disabled/not found]) fi if test "$with_geos" = "no"; then AC_MSG_WARN([geos support disabled by request: advanced seeding options will not be available]) else if test "$with_geos" = "yes"; then AC_PATH_PROG(GEOSCONFIG, geos-config) else AC_MSG_CHECKING(for geos-config usability in $with_geos) if test -x "$with_geos"; then GEOSCONFIG=$with_geos AC_MSG_RESULT(yes) else AC_MSG_ERROR($with_geos not found or not executable) fi fi if test -n "$GEOSCONFIG"; then GEOS_CFLAGS=`$GEOSCONFIG --cflags` GEOS_LIBS="`$GEOSCONFIG --ldflags` -lgeos_c" AC_CHECK_LIB(geos_c, GEOSPreparedIntersects, GEOS_ENABLED="-DUSE_GEOS", AC_MSG_WARN([Geos support disabled as installed version is too old]), "$GEOS_LIBS") fi fi AC_SUBST(GEOS_ENABLED,$GEOS_ENABLED) AC_SUBST(GEOS_INC,$GEOS_CFLAGS) AC_SUBST(GEOS_LIB,$GEOS_LIBS) ]) AC_DEFUN([FASTCGI_CHECK],[ AC_ARG_WITH(fastcgi, AC_HELP_STRING([--with-fastcgi@<:@=DIR@:>@],[Specify where FASTCGI is installed]), ,[with_fastcgi=no]) AC_MSG_CHECKING(whether to enable FASTCGI) FASTCGI_LIB='' FASTCGI_INC='' FASTCGI_ENABLED='' if test x"$with_fastcgi" == "xno"; then AC_MSG_RESULT([not requested. use --with-fastcgi[=dir] to enable]) else if test x"$with_fastcgi" != "xyes"; then FASTCGI_DIR="$with_fastcgi" AC_EXPAND_PATH($FASTCGI_DIR, FASTCGI_DIR) test -f $FASTCGI_DIR/lib/libfcgi.a -o -f $FASTCGI_DIR/lib/libfcgi.so -o -f $FASTCGI_DIR/lib/libfcgi.sl -o -f $FASTCGI_DIR/lib/libfcgi.dylib && FASTCGI_LIBDIR="$FASTCGI_DIR/lib" test -f $FASTCGI_DIR/lib64/libfcgi.a -o -f $FASTCGI_DIR/lib64/libfcgi.so -o -f $FASTCGI_DIR/lib64/libfcgi.sl -o -f $FASTCGI_DIR/libfcgi.dylib && FASTCGI_LIBDIR="$FASTCGI_DIR/lib64" test -f $FASTCGI_DIR/libfcgi.a -o -f $FASTCGI_DIR/libfcgi.so -o -f $FASTCGI_DIR/libfcgi.sl -o -f $FASTCGI_DIR/libfcgi.dylib && FASTCGI_LIBDIR="$FASTCGI_DIR" test -f $FASTCGI_DIR/include/fcgiapp.h && FASTCGI_INCLUDE="$FASTCGI_DIR/include" test -f $FASTCGI_DIR/lib/fcgiapp.h && FASTCGI_INCLUDE="$FASTCGI_DIR/lib" test -f $FASTCGI_DIR/fcgiapp.h && FASTCGI_INCLUDE="$FASTCGI_DIR" if test -n "$FASTCGI_LIBDIR" ; then FASTCGI_LIB="-L$FASTCGI_LIBDIR -lfcgi" AC_MSG_RESULT([using libfastcgi from $FASTCGI_LIB]) else AC_MSG_ERROR([cannot find fastcgi lib in $FASTCGI_DIR]) fi if test -n "$FASTCGI_INCLUDE" ; then FASTCGI_INC=-I$FASTCGI_INCLUDE FASTCGI_ENABLED="-DUSE_FASTCGI" else AC_MSG_ERROR([cannot find fastcgi header fcgiapp.h in $FASTCGI_DIR]) fi else dnl check for fastcgi in system locations AC_CHECK_LIB(fcgi, FCGI_Accept, FASTCGI_LIB="-lfcgi",[AC_MSG_ERROR([cannot find fastcgi lib in system path])],) AC_CHECK_HEADER([fcgi_stdio.h],, [AC_MSG_ERROR([cannot find fastcgi headers in system path])]) FASTCGI_ENABLED="-DUSE_FASTCGI" fi fi AC_SUBST(FASTCGI_INC,$FASTCGI_INC) AC_SUBST(FASTCGI_LIB,$FASTCGI_LIB) AC_SUBST(FASTCGI_ENABLED,$FASTCGI_ENABLED) ]) GEOTIFF_ENABLED="" AC_DEFUN([GEOTIFF_CHECK],[ AC_ARG_WITH(geotiff, AC_HELP_STRING([--with-geotiff@<:@=ARG@:>@],[Libgeotiff library to use (ARG=yes or path)]), ,[with_geotiff=no]) if test "$with_geotiff" = "yes" -o "$with_geotiff" = "" ; then dnl We now require libgeotiff 1.2.1 (for XTIFFClientOpen). AC_CHECK_LIB(geotiff,XTIFFClientOpen, GEOTIFF_LIB="-lgeotiff", AC_MSG_ERROR([failed to link with libgeotiff. Specify path])) dnl Now search for headers AC_CHECK_HEADER([geotiff.h], [ GEOTIFF_ENABLED="-DUSE_GEOTIFF" echo "using system libgeotiff." ], [ if test -r /usr/include/geotiff/geotiff.h ; then GEOTIFF_INC="-I/usr/include/geotiff" echo "using system libgeotiff from /usr/include/geotiff/." elif test -r /usr/local/include/geotiff/geotiff.h ; then GEOTIFF_INC="-I/usr/local/include/geotiff" echo "using system libgeotiff from /usr/local/include/geotiff/." else AC_MSG_ERROR([failed to find geotiff.h in system locations. Specify path]) fi GEOTIFF_ENABLED="-DUSE_GEOTIFF" ]) elif test "$with_geotiff" != "no" ; then GEOTIFF_LIB="-L$with_geotiff/lib -lgeotiff" AC_CHECK_LIB(geotiff,XTIFFClientOpen,GEOTIFF_LIB="-L$with_geotiff/lib -lgeotiff", AC_MSG_ERROR([failed to link with libgeotiff. Specify path]), "$GEOTIFF_LIB") if test -r $with_geotiff/include/geotiff.h ; then GEOTIFF_INC="-I$with_geotiff/include" echo "using system libgeotiff from $with_geotiff/include/." elif test -r $with_geotiff/include/geotiff/geotiff.h ; then GEOTIFF_INC="-I$with_geotiff/include/geotiff" echo "using system libgeotiff from $with_geotiff/geotiff/include/." else AC_MSG_ERROR([failed to find geotiff.h in $with_geotiff]) fi GEOTIFF_ENABLED="-DUSE_GEOTIFF" fi AC_SUBST(GEOTIFF_ENABLED,$GEOTIFF_ENABLED) AC_SUBST(GEOTIFF_INC,$GEOTIFF_INC) AC_SUBST(GEOTIFF_LIB,$GEOTIFF_LIB) ] ) AC_DEFUN([TIFF_CHECK],[ AC_ARG_WITH(tiff, AC_HELP_STRING([--with-tiff@<:@=DIR@:>@],[Specify where TIFF is installed]), TIFF_DIR=$withval,TIFF_DIR='') AC_EXPAND_PATH($TIFF_DIR, TIFF_DIR) AC_CHECKING(where TIFF is installed) TIFF_LIB='' TIFF_INC='' TIFF_FOUND='no' TIFF_ENABLED="-DUSE_TIFF" if test -n "$TIFF_DIR" -a x$withval != "xno" -a x$withval != "xyes"; then test -f $TIFF_DIR/lib/libtiff.a -o -f $TIFF_DIR/lib/libtiff.so -o -f $TIFF_DIR/lib/libtiff.sl -o -f $TIFF_DIR/lib/libtiff.dylib && TIFF_LIBDIR="$TIFF_DIR/lib" test -f $TIFF_DIR/lib64/libtiff.a -o -f $TIFF_DIR/lib64/libtiff.so -o -f $TIFF_DIR/lib64/libtiff.sl -o -f $TIFF_DIR/libtiff.dylib && TIFF_LIBDIR="$TIFF_DIR/lib64" test -f $TIFF_DIR/libtiff.a -o -f $TIFF_DIR/libtiff.so -o -f $TIFF_DIR/libtiff.sl -o -f $TIFF_DIR/libtiff.dylib && TIFF_LIBDIR="$TIFF_DIR" test -f $TIFF_DIR/include/tiffio.h && TIFF_INCLUDE="$TIFF_DIR/include" test -f $TIFF_DIR/lib/tiffio.h && TIFF_INCLUDE="$TIFF_DIR/lib" test -f $TIFF_DIR/tiffio.h && TIFF_INCLUDE="$TIFF_DIR" if test -n "$TIFF_LIBDIR" ; then AC_CHECK_LIB(tiff, TIFFReadScanline,[TIFF_LIB=[-L$TIFF_LIBDIR -ltiff]], AC_MSG_ERROR([failed to link against libtiff]), [-L$TIFF_LIBDIR -ltiff]) AC_MSG_RESULT([ using libtiff from $TIFF_LIB]) else AC_MSG_WARN([cannot find tiff lib in $TIFF_DIR]) TIFF_ENABLED="" fi if test -n "$TIFF_INCLUDE" ; then AC_CHECK_HEADER([$TIFF_INCLUDE/tiffio.h],TIFF_INC=-I$TIFF_INCLUDE, [ AC_MSG_WARN([cannot find tiff headers]) TIFF_ENABLED="" ]) else AC_MSG_WARN([cannot find tiff headers in $TIFF_DIR]) TIFF_ENABLED="" fi else if test x$withval != "xno"; then dnl check for tiff in system locations AC_CHECK_LIB(tiff, TIFFReadScanline, TIFF_LIB="-ltiff",,) AC_CHECK_HEADER([tiffio.h],, [ AC_MSG_WARN([cannot find tiff headers in system path]) TIFF_ENABLED="" ]) if test -n "$TIFF_LIB" ; then AC_MSG_RESULT([using libtiff from system libs.]) else AC_MSG_WARN([TIFF (libtiff) library cannot be found. install or reconfigure with --with-tiff=DIR]) TIFF_ENABLED="" fi else TIFF_ENABLED="" fi fi if test -n $TIFF_ENABLED; then AC_ARG_ENABLE(tiff_write_support, AC_HELP_STRING([--enable-tiff-write-support],[Enable tiff cache write support (experimental)]), , [enable_tiff_write_support=no] ) if test "$enable_tiff_write_support" == "yes"; then TIFF_ENABLED="$TIFF_ENABLED -DUSE_TIFF_WRITE" fi fi AC_SUBST(TIFF_INC,$TIFF_INC) AC_SUBST(TIFF_LIB,$TIFF_LIB) AC_SUBST(TIFF_ENABLED,$TIFF_ENABLED) ]) AC_DEFUN([PNG_CHECK],[ AC_ARG_WITH(png, AC_HELP_STRING([--with-png@<:@=DIR@:>@],[Specify where PNG is installed]), PNG_DIR=$withval,PNG_DIR='') AC_EXPAND_PATH($PNG_DIR, PNG_DIR) AC_CHECKING(where PNG is installed) PNG_LIB='' PNG_INC='' PNG_FOUND='no' if test -n "$PNG_DIR" ; then test -f $PNG_DIR/lib/libpng.a -o -f $PNG_DIR/lib/libpng.so -o -f $PNG_DIR/lib/libpng.sl -o -f $PNG_DIR/lib/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib" test -f $PNG_DIR/lib64/libpng.a -o -f $PNG_DIR/lib64/libpng.so -o -f $PNG_DIR/lib64/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib64" test -f $PNG_DIR/libpng.a -o -f $PNG_DIR/libpng.so -o -f $PNG_DIR/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR" test -f $PNG_DIR/include/png.h && PNG_INCLUDE="$PNG_DIR/include" test -f $PNG_DIR/lib/png.h && PNG_INCLUDE="$PNG_DIR/lib" test -f $PNG_DIR/png.h && PNG_INCLUDE="$PNG_DIR" if test -n "$PNG_LIBDIR" ; then PNG_LIB="-L$PNG_LIBDIR -lpng" AC_MSG_RESULT([ using libpng from $PNG_LIB]) else AC_MSG_ERROR([cannot find png lib in $PNG_DIR]) fi if test -n "$PNG_INCLUDE" ; then AC_CHECK_HEADER([$PNG_INCLUDE/png.h],PNG_INC=-I$PNG_INCLUDE, [AC_MSG_ERROR([cannot find png headers])]) else AC_MSG_ERROR([cannot find png headers in $PNG_DIR]) fi else dnl check for png in system locations AC_CHECK_LIB(png, png_init_io, PNG_LIB="-lpng",, $ZLIB_LIB) AC_CHECK_HEADER([png.h],, [AC_MSG_ERROR([cannot find png headers in system path])]) if test -n "$PNG_LIB" ; then AC_MSG_RESULT([using libpng from system libs.]) else AC_MSG_ERROR([PNG (libpng) library cannot be found. install or reconfigure with --with-png=DIR]) fi fi AC_CHECK_HEADER([setjmp.h],,[AC_MSG_ERROR([setjmp.h is required with libpng])]) AC_SUBST(PNG_INC,$PNG_INC) AC_SUBST(PNG_LIB,$PNG_LIB) ]) AC_DEFUN([SQLITE_CHECK],[ AC_ARG_WITH(sqlite, AC_HELP_STRING([--with-sqlite], [path to sqlite-config program]), , [with_sqlite=yes] ) SQLITE_DIR="" if test x"$with_sqlite" != "xyes" -a x"$with_sqlite" != "xno"; then AC_EXPAND_PATH($with_sqlite, SQLITE_DIR) fi SQLITE_LIB='' SQLITE_INC='' SQLITE_ENABLED='' if test -n "$SQLITE_DIR" ; then test -f $SQLITE_DIR/lib/libsqlite3.a -o -f $SQLITE_DIR/lib/libsqlite3.so -o -f $SQLITE_DIR/lib/libsqlite3.sl -o -f $SQLITE_DIR/lib/libsqlite3.dylib && SQLITE_LIBDIR="$SQLITE_DIR/lib" test -f $SQLITE_DIR/lib64/libsqlite.a -o -f $SQLITE_DIR/lib64/libsqlite3.so -o -f $SQLITE_DIR/lib64/libsqlite3.sl -o -f $SQLITE_DIR/libsqlite3.dylib && SQLITE_LIBDIR="$SQLITE_DIR/lib64" test -f $SQLITE_DIR/libsqlite3.a -o -f $SQLITE_DIR/libsqlite3.so -o -f $SQLITE_DIR/libsqlite3.sl -o -f $SQLITE_DIR/libsqlite3.dylib && SQLITE_LIBDIR="$SQLITE_DIR" test -f $SQLITE_DIR/include/sqlite3.h && SQLITE_INCLUDE="$SQLITE_DIR/include" test -f $SQLITE_DIR/include/sqlite/sqlite3.h && SQLITE_INCLUDE="$SQLITE_DIR/include/sqlite" test -f $SQLITE_DIR/lib/sqlite3.h && SQLITE_INCLUDE="$SQLITE_DIR/lib" test -f $SQLITE_DIR/sqlite3.h && SQLITE_INCLUDE="$SQLITE_DIR" if test -n "$SQLITE_LIBDIR" ; then OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$SQLITE_LIBDIR -lsqlite3" AC_CHECK_LIB(sqlite3, sqlite3_open_v2, SQLITE_LIB="-L$SQLITE_LIBDIR -lsqlite3",,) if test -z "$SQLITE_LIB" ; then AC_CHECK_LIB(sqlite3, sqlite3_open, AC_MSG_ERROR([SQLITE library found but is too old. Need at least 3.5.0]), AC_MSG_ERROR([SQLITE (libsqlite3) library cannot be found. install or reconfigure with --with-sqlite=DIR]), ) fi LDFLAGS="$OLDLDFLAGS" else AC_MSG_ERROR([cannot find sqlite lib in $SQLITE_DIR]) fi if test -n "$SQLITE_INCLUDE" ; then AC_CHECK_HEADER([$SQLITE_INCLUDE/sqlite3.h],SQLITE_INC=-I$SQLITE_INCLUDE, [AC_MSG_ERROR([cannot use sqlite3.h headers from $SQLITE_INCLUDE])]) else AC_MSG_ERROR([cannot find sqlite3.h]) fi SQLITE_ENABLED="-DUSE_SQLITE" AC_MSG_RESULT([using sqlite from $SQLITE_DIR]) elif test x"$with_sqlite" = "xyes"; then dnl check for sqlite in system locations AC_CHECK_HEADER([sqlite3.h],, [AC_MSG_ERROR([cannot find sqlite3.h header in system path])]) AC_CHECK_LIB(sqlite3, sqlite3_open_v2, SQLITE_LIB="-lsqlite3",,) if test -n "$SQLITE_LIB" ; then AC_MSG_RESULT([using libsqlite3 from system libs.]) SQLITE_ENABLED="-DUSE_SQLITE" else AC_CHECK_LIB(sqlite3, sqlite3_open, AC_MSG_ERROR([SQLITE library found but is too old. Need at least 3.5.0]), AC_MSG_ERROR([SQLITE (libsqlite3) library cannot be found. install or reconfigure with --with-sqlite=DIR]), ) fi else AC_MSG_RESULT([sqlite support disabled by request]) fi AC_SUBST(SQLITE_INC,$SQLITE_INC) AC_SUBST(SQLITE_LIB,$SQLITE_LIB) AC_SUBST(SQLITE_ENABLED,$SQLITE_ENABLED) ]) AC_DEFUN([JPEG_CHECK],[ AC_ARG_WITH(jpeg, AC_HELP_STRING([--with-jpeg@<:@=DIR@:>@],[Specify where JPEG is installed]), JPEG_DIR=$withval,JPEG_DIR='') AC_EXPAND_PATH($JPEG_DIR, JPEG_DIR) AC_CHECKING(where JPEG is installed) JPEG_LIB='' JPEG_INC='' JPEG_FOUND='no' if test -n "$JPEG_DIR" ; then test -f $JPEG_DIR/lib/libjpeg.a -o -f $JPEG_DIR/lib/libjpeg.so -o -f $JPEG_DIR/lib/libjpeg.sl -o -f $JPEG_DIR/lib/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR/lib" test -f $JPEG_DIR/lib64/libjpeg.a -o -f $JPEG_DIR/lib64/libjpeg.so -o -f $JPEG_DIR/lib64/libjpeg.sl -o -f $JPEG_DIR/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR/lib64" test -f $JPEG_DIR/libjpeg.a -o -f $JPEG_DIR/libjpeg.so -o -f $JPEG_DIR/libjpeg.sl -o -f $JPEG_DIR/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR" test -f $JPEG_DIR/include/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include" test -f $JPEG_DIR/include/jpeg/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include/jpeg" test -f $JPEG_DIR/lib/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/lib" test -f $JPEG_DIR/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR" if test -n "$JPEG_LIBDIR" ; then JPEG_LIB="-L$JPEG_LIBDIR -ljpeg" AC_MSG_RESULT([using libjpeg from $JPEG_LIB]) else AC_MSG_ERROR([cannot find jpeg lib in $JPEG_DIR]) fi if test -n "$JPEG_INCLUDE" ; then AC_CHECK_HEADER([$JPEG_INCLUDE/jpeglib.h],JPEG_INC=-I$JPEG_INCLUDE, [AC_MSG_ERROR([cannot find jpeg headers])]) else AC_MSG_ERROR([cannot find jpeg headers in $JPEG_DIR]) fi else dnl check for jpeg in system locations AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LIB="-ljpeg",,) AC_CHECK_HEADER([jpeglib.h],, [AC_MSG_ERROR([cannot find jpeg headers in system path])]) if test -n "$JPEG_LIB" ; then AC_MSG_RESULT([using libjpeg from system libs.]) else AC_MSG_ERROR([JPEG (libjpeg) library cannot be found. install or reconfigure with --with-jpeg=DIR]) fi fi AC_SUBST(JPEG_INC,$JPEG_INC) AC_SUBST(JPEG_LIB,$JPEG_LIB) ]) # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_compare_version.html # =========================================================================== # # SYNOPSIS # # AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # # DESCRIPTION # # This macro compares two version strings. Due to the various number of # minor-version numbers that can exist, and the fact that string # comparisons are not compatible with numeric comparisons, this is not # necessarily trivial to do in a autoconf script. This macro makes doing # these comparisons easy. # # The six basic comparisons are available, as well as checking equality # limited to a certain number of minor-version levels. # # The operator OP determines what type of comparison to do, and can be one # of: # # eq - equal (test A == B) # ne - not equal (test A != B) # le - less than or equal (test A <= B) # ge - greater than or equal (test A >= B) # lt - less than (test A < B) # gt - greater than (test A > B) # # Additionally, the eq and ne operator can have a number after it to limit # the test to that number of minor versions. # # eq0 - equal up to the length of the shorter version # ne0 - not equal up to the length of the shorter version # eqN - equal up to N sub-version levels # neN - not equal up to N sub-version levels # # When the condition is true, shell commands ACTION-IF-TRUE are run, # otherwise shell commands ACTION-IF-FALSE are run. The environment # variable 'ax_compare_version' is always set to either 'true' or 'false' # as well. # # Examples: # # AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) # AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) # # would both be true. # # AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) # AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) # # would both be false. # # AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) # # would be true because it is only comparing two minor versions. # # AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) # # would be true because it is only comparing the lesser number of minor # versions of the two values. # # Note: The characters that separate the version numbers do not matter. An # empty string is the same as version 0. OP is evaluated by autoconf, not # configure, so must be a string, not a variable. # # The author would like to acknowledge Guido Draheim whose advice about # the m4_case and m4_ifvaln functions make this macro only include the # portions necessary to perform the specific comparison specified by the # OP argument in the final configure script. # # LICENSE # # Copyright (c) 2008 Tim Toolan # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 11 dnl ######################################################################### AC_DEFUN([AX_COMPARE_VERSION], [ AC_REQUIRE([AC_PROG_AWK]) # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. AS_VAR_PUSHDEF([A],[ax_compare_version_A]) A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/[[^0-9]]//g'` AS_VAR_PUSHDEF([B],[ax_compare_version_B]) B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/[[^0-9]]//g'` dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary dnl # then the first line is used to determine if the condition is true. dnl # The sed right after the echo is to remove any indented white space. m4_case(m4_tolower($2), [lt],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` ], [gt],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` ], [le],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` ], [ge],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` ],[ dnl Split the operator from the subversion count if present. m4_bmatch(m4_substr($2,2), [0],[ # A count of zero means use the length of the shorter version. # Determine the number of characters in A and B. ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` # Set A to no more than B's length and B to no more than A's length. A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` ], [[0-9]+],[ # A count greater than zero means use only that many subversions A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` ], [.+],[ AC_WARNING( [illegal OP numeric parameter: $2]) ],[]) # Pad zeros at end of numbers to make same length. ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" B="$B`echo $A | sed 's/./0/g'`" A="$ax_compare_version_tmp_A" # Check for equality or inequality as necessary. m4_case(m4_tolower(m4_substr($2,0,2)), [eq],[ test "x$A" = "x$B" && ax_compare_version=true ], [ne],[ test "x$A" != "x$B" && ax_compare_version=true ],[ AC_WARNING([illegal OP parameter: $2]) ]) ]) AS_VAR_POPDEF([A])dnl AS_VAR_POPDEF([B])dnl dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. if test "$ax_compare_version" = "true" ; then m4_ifvaln([$4],[$4],[:])dnl m4_ifvaln([$5],[else $5])dnl fi ]) dnl AX_COMPARE_VERSION # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_path_bdb.html # =========================================================================== # # SYNOPSIS # # AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro finds the latest version of Berkeley DB on the system, and # ensures that the header file and library versions match. If # MINIMUM-VERSION is specified, it will ensure that the library found is # at least that version. # # It determines the name of the library as well as the path to the header # file and library. It will check both the default environment as well as # the default Berkeley DB install location. When found, it sets BDB_LIBS, # BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary values to add to LIBS, # CPPFLAGS, and LDFLAGS, as well as setting BDB_VERSION to the version # found. HAVE_DB_H is defined also. # # The option --with-bdb-dir=DIR can be used to specify a specific Berkeley # DB installation to use. # # An example of it's use is: # # AX_PATH_BDB([3],[ # LIBS="$BDB_LIBS $LIBS" # LDFLAGS="$BDB_LDFLAGS $LDFLAGS" # CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" # ]) # # which will locate the latest version of Berkeley DB on the system, and # ensure that it is version 3.0 or higher. # # Details: This macro does not use either AC_CHECK_HEADERS or AC_CHECK_LIB # because, first, the functions inside the library are sometimes renamed # to contain a version code that is only available from the db.h on the # system, and second, because it is common to have multiple db.h and libdb # files on a system it is important to make sure the ones being used # correspond to the same version. Additionally, there are many different # possible names for libdb when installed by an OS distribution, and these # need to be checked if db.h does not correspond to libdb. # # When cross compiling, only header versions are verified since it would # be difficult to check the library version. Additionally the default # Berkeley DB installation locations /usr/local/BerkeleyDB* are not # searched for higher versions of the library. # # The format for the list of library names to search came from the Cyrus # IMAP distribution, although they are generated dynamically here, and # only for the version found in db.h. # # The macro AX_COMPARE_VERSION is required to use this macro, and should # be available from the Autoconf Macro Archive. # # The author would like to acknowledge the generous and valuable feedback # from Guido Draheim, without which this macro would be far less robust, # and have poor and inconsistent cross compilation support. # # Changes: # # 1/5/05 applied patch from Rafal Rzepecki to eliminate compiler # warning about unused variable, argv # # LICENSE # # Copyright (c) 2008 Tim Toolan # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 11 dnl ######################################################################### AC_DEFUN([AX_PATH_BDB], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_ok=no # Add --with-bdb-dir option to configure. AC_ARG_WITH([bdb-dir], [AS_HELP_STRING([--with-bdb-dir=DIR], [Berkeley DB installation directory])]) # Check if --with-bdb-dir was specified. if test "x$with_bdb_dir" = "x" ; then # No option specified, so just search the system. AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [ ax_path_bdb_ok=yes ]) else # Set --with-bdb-dir option. ax_path_bdb_INC="$with_bdb_dir/include" ax_path_bdb_LIB="$with_bdb_dir/lib" dnl # Save previous environment, and modify with new stuff. ax_path_bdb_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS" ax_path_bdb_save_LDFLAGS=$LDFLAGS LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS" # Check for specific header file db.h AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC]) if test -f "$ax_path_bdb_INC/db.h" ; then AC_MSG_RESULT([yes]) # Check for library AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [ ax_path_bdb_ok=yes BDB_CPPFLAGS="-I$ax_path_bdb_INC" BDB_LDFLAGS="-L$ax_path_bdb_LIB" ]) else AC_MSG_RESULT([no]) AC_MSG_NOTICE([no usable Berkeley DB not found]) fi dnl # Restore the environment. CPPFLAGS="$ax_path_bdb_save_CPPFLAGS" LDFLAGS="$ax_path_bdb_save_LDFLAGS" fi dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. if test "$ax_path_bdb_ok" = "yes" ; then m4_ifvaln([$2],[$2],[:])dnl m4_ifvaln([$3],[else $3])dnl fi ]) dnl AX_PATH_BDB dnl ######################################################################### dnl Check for berkeley DB of at least MINIMUM-VERSION on system. dnl dnl The OPTION argument determines how the checks occur, and can be one of: dnl dnl HIGHEST - Check both the environment and the default installation dnl directories for Berkeley DB and choose the version that dnl is highest. (default) dnl ENVFIRST - Check the environment first, and if no satisfactory dnl library is found there check the default installation dnl directories for Berkeley DB which is /usr/local/BerkeleyDB* dnl ENVONLY - Check the current environment only. dnl dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST, dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and dnl AX_COMPARE_VERSION macros. dnl dnl Result: sets ax_path_bdb_no_options_ok to yes or no dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION dnl dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_no_options_ok=no # Values to add to environment to use Berkeley DB. BDB_VERSION='' BDB_LIBS='' BDB_CPPFLAGS='' BDB_LDFLAGS='' # Check cross compilation here. if test "x$cross_compiling" = "xyes" ; then # If cross compiling, can't use AC_RUN_IFELSE so do these tests. # The AC_PREPROC_IFELSE confirms that db.h is preprocessable, # and extracts the version number from it. AC_MSG_CHECKING([for db.h]) AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl HEADER_VERSION='' AC_PREPROC_IFELSE([ AC_LANG_SOURCE([[ #include AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH ]]) ],[ # Extract version from preprocessor output. HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \ | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'` ],[]) if test "x$HEADER_VERSION" = "x" ; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([$HEADER_VERSION]) # Check that version is high enough. AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[ # get major and minor version numbers AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'` AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'` dnl # Save LIBS. ax_path_bdb_no_options_save_LIBS="$LIBS" # Check that we can link with the library. AC_SEARCH_LIBS([db_version], [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[ # Sucessfully found library. ax_path_bdb_no_options_ok=yes BDB_VERSION=$HEADER_VERSION # Extract library from LIBS ax_path_bdb_no_options_LEN=` \ echo "x$ax_path_bdb_no_options_save_LIBS" \ | awk '{print(length)}'` BDB_LIBS=`echo "x$LIBS " \ | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"` ],[]) dnl # Restore LIBS LIBS="$ax_path_bdb_no_options_save_LIBS" AS_VAR_POPDEF([MAJ])dnl AS_VAR_POPDEF([MIN])dnl ]) fi AS_VAR_POPDEF([HEADER_VERSION])dnl else # Not cross compiling. # Check version of Berkeley DB in the current environment. AX_PATH_BDB_ENV_GET_VERSION([ AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[ # Found acceptable version in current environment. ax_path_bdb_no_options_ok=yes BDB_VERSION="$ax_path_bdb_env_get_version_VERSION" BDB_LIBS="$ax_path_bdb_env_get_version_LIBS" ]) ]) # Determine if we need to search /usr/local/BerkeleyDB* ax_path_bdb_no_options_DONE=no if test "x$2" = "xENVONLY" ; then ax_path_bdb_no_options_DONE=yes elif test "x$2" = "xENVFIRST" ; then ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok fi if test "$ax_path_bdb_no_options_DONE" = "no" ; then # Check for highest in /usr/local/BerkeleyDB* AX_PATH_BDB_PATH_FIND_HIGHEST([ if test "$ax_path_bdb_no_options_ok" = "yes" ; then # If we already have an acceptable version use this if higher. AX_COMPARE_VERSION( [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION]) else # Since we didn't have an acceptable version check if this one is. AX_COMPARE_VERSION( [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1]) fi ]) dnl # If result from _AX_COMPARE_VERSION is true we want this version. if test "$ax_compare_version" = "true" ; then ax_path_bdb_no_options_ok=yes BDB_LIBS="-ldb" if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include" BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib" fi BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION" fi fi fi dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. if test "$ax_path_bdb_no_options_ok" = "yes" ; then AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION]) AC_DEFINE([HAVE_DB_H],[1], [Define to 1 if you have the header file.]) m4_ifvaln([$3],[$3])dnl else AC_MSG_NOTICE([no Berkeley DB version $1 or higher found]) m4_ifvaln([$4],[$4])dnl fi ]) dnl AX_PATH_BDB_NO_OPTIONS dnl ######################################################################### dnl Check the default installation directory for Berkeley DB which is dnl of the form /usr/local/BerkeleyDB* for the highest version. dnl dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no, dnl sets ax_path_bdb_path_find_highest_VERSION to version, dnl sets ax_path_bdb_path_find_highest_DIR to directory. dnl dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_path_find_highest_ok=no AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl VERSION='' ax_path_bdb_path_find_highest_DIR='' # find highest verison in default install directory for Berkeley DB AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null` do AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[ AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[ ax_path_bdb_path_find_highest_ok=yes ax_path_bdb_path_find_highest_DIR="$CURDIR" VERSION="$CUR_VERSION" ]) ]) done AS_VAR_POPDEF([VERSION])dnl AS_VAR_POPDEF([CUR_VERSION])dnl AS_VAR_POPDEF([CURDIR])dnl dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl fi ]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST dnl ######################################################################### dnl Checks for Berkeley DB in specified directory's lib and include dnl subdirectories. dnl dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no, dnl sets ax_path_bdb_path_get_version_VERSION to version. dnl dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_path_get_version_ok=no # Indicate status of checking for Berkeley DB header. AC_MSG_CHECKING([in $1/include for db.h]) ax_path_bdb_path_get_version_got_header=no test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header]) # Indicate status of checking for Berkeley DB library. AC_MSG_CHECKING([in $1/lib for library -ldb]) ax_path_bdb_path_get_version_VERSION='' if test -d "$1/include" && test -d "$1/lib" && test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then dnl # save and modify environment ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I$1/include $CPPFLAGS" ax_path_bdb_path_get_version_save_LIBS="$LIBS" LIBS="$LIBS -ldb" ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS" LDFLAGS="-L$1/lib $LDFLAGS" # Compile and run a program that compares the version defined in # the header file with a version defined in the library function # db_version. AC_RUN_IFELSE([ AC_LANG_SOURCE([[ #include #include int main(int argc,char **argv) { int major,minor,patch; (void) argv; db_version(&major,&minor,&patch); if (argc > 1) printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && DB_VERSION_PATCH == patch) return 0; else return 1; } ]]) ],[ # Program compiled and ran, so get version by adding argument. ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x` ax_path_bdb_path_get_version_ok=yes ],[],[]) dnl # restore environment CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS" LIBS="$ax_path_bdb_path_get_version_save_LIBS" LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS" fi dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION]) m4_ifvaln([$2],[$2])dnl else AC_MSG_RESULT([no]) m4_ifvaln([$3],[$3])dnl fi ]) dnl AX_PATH_BDB_PATH_GET_VERSION ############################################################################# dnl Checks if version of library and header match specified version. dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro. dnl dnl Requires AX_COMPARE_VERSION macro. dnl dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no. dnl dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME]) AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_env_confirm_lib_ok=no dnl # save and modify environment to link with library LIBNAME ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" LIBS="$LIBS $2" # Compile and run a program that compares the version defined in # the header file with a version defined in the library function # db_version. AC_RUN_IFELSE([ AC_LANG_SOURCE([[ #include #include int main(int argc,char **argv) { int major,minor,patch; (void) argv; db_version(&major,&minor,&patch); if (argc > 1) printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && DB_VERSION_PATCH == patch) return 0; else return 1; } ]]) ],[ # Program compiled and ran, so get version by giving an argument, # which will tell the program to print the output. ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` # If the versions all match up, indicate success. AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[ ax_path_bdb_env_confirm_lib_ok=yes ]) ],[],[]) dnl # restore environment LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" ]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB ############################################################################# dnl Finds the version and library name for Berkeley DB in the dnl current environment. Tries many different names for library. dnl dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro. dnl dnl Result: set ax_path_bdb_env_get_version_ok to yes or no, dnl set ax_path_bdb_env_get_version_VERSION to the version found, dnl and ax_path_bdb_env_get_version_LIBNAME to the library name. dnl dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [ dnl # Used to indicate success or failure of this function. ax_path_bdb_env_get_version_ok=no ax_path_bdb_env_get_version_VERSION='' ax_path_bdb_env_get_version_LIBS='' AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl # Indicate status of checking for Berkeley DB library. AC_MSG_CHECKING([for db.h]) # Compile and run a program that determines the Berkeley DB version # in the header file db.h. HEADER_VERSION='' AC_RUN_IFELSE([ AC_LANG_SOURCE([[ #include #include int main(int argc,char **argv) { (void) argv; if (argc > 1) printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); return 0; } ]]) ],[ # Program compiled and ran, so get version by adding an argument. HEADER_VERSION=`./conftest$ac_exeext x` AC_MSG_RESULT([$HEADER_VERSION]) ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])]) # Have header version, so try to find corresponding library. # Looks for library names in the order: # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX # and stops when it finds the first one that matches the version # of the header file. if test "x$HEADER_VERSION" != "x" ; then AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION]) AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl # get major and minor version numbers MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'` MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'` # see if it is already specified in LIBS TEST_LIBNAME='' AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "db" TEST_LIBNAME='-ldb' AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "db-X.Y" TEST_LIBNAME="-ldb-${MAJOR}.$MINOR" AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "dbX.Y" TEST_LIBNAME="-ldb${MAJOR}.$MINOR" AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "dbXY" TEST_LIBNAME="-ldb$MAJOR$MINOR" AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "db-X" TEST_LIBNAME="-ldb-$MAJOR" AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then # try format "dbX" TEST_LIBNAME="-ldb$MAJOR" AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) fi dnl # Found a valid library. if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then if test "x$TEST_LIBNAME" = "x" ; then AC_MSG_RESULT([none required]) else AC_MSG_RESULT([$TEST_LIBNAME]) fi ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION" ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME" ax_path_bdb_env_get_version_ok=yes else AC_MSG_RESULT([no]) fi AS_VAR_POPDEF([MAJOR])dnl AS_VAR_POPDEF([MINOR])dnl fi AS_VAR_POPDEF([HEADER_VERSION])dnl AS_VAR_POPDEF([TEST_LIBNAME])dnl dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl fi ]) dnl BDB_ENV_GET_VERSION ############################################################################# DEBUG_CHECK AC_ARG_ENABLE(version_string, AC_HELP_STRING([--enable-version-string],[add mod-mapcache version string to the apache server header]), , [enable_version_string=yes] ) if test "$enable_version_string" != "yes"; then MISC_ENABLED="-DDISABLE_VERSION_STRING $MISC_ENABLED" fi AC_ARG_ENABLE(module, AC_HELP_STRING([--enable-module],[Enable apache module building]), , [enable_module=yes] ) if test "$enable_module" == "yes"; then APXS_CHECK AC_SUBST(MODULE_TARGET,"mod_mapcache.la") else AC_SUBST(MODULE_TARGET,"") fi FASTCGI_CHECK APR_CHECK APU_CHECK MEMCACHE_CHECK SQLITE_CHECK PKGCONFIG_CHECK # CAIRO_CHECK PIXMAN_CHECK PNG_CHECK JPEG_CHECK TIFF_CHECK GEOTIFF_CHECK PCRE_CHECK GDAL_CHECK GEOS_CHECK MAPSERVER_CHECK AX_PATH_BDB([4],[AC_SUBST(BDB_ENABLED,[-DUSE_BDB])]) AC_SUBST(BDB_LIB, "$BDB_LDFLAGS $BDB_LIBS") AC_SUBST(BDB_INC,$BDB_CPPFLAGS) AC_SUBST(MISC_ENABLED,$MISC_ENABLED) CURL_CHECK # Write config.status and the Makefile AC_CONFIG_FILES(Makefile.inc nginx/config lib/Makefile apache/Makefile util/Makefile cgi/Makefile) AC_OUTPUT