[mapserver-commits] r13023 - in trunk/mapserver/mapcache: . lib
svn at osgeo.org
svn at osgeo.org
Wed Feb 1 07:28:42 EST 2012
Author: tbonfort
Date: 2012-02-01 04:28:42 -0800 (Wed, 01 Feb 2012)
New Revision: 13023
Modified:
trunk/mapserver/mapcache/configure
trunk/mapserver/mapcache/configure.in
trunk/mapserver/mapcache/lib/Makefile.in
Log:
fix building with mapserver support (#4155)
Modified: trunk/mapserver/mapcache/configure
===================================================================
--- trunk/mapserver/mapcache/configure 2012-02-01 10:22:14 UTC (rev 13022)
+++ trunk/mapserver/mapcache/configure 2012-02-01 12:28:42 UTC (rev 13023)
@@ -777,7 +777,7 @@
with_pcre
with_gdal
with_geos
-enable_mapserver
+with_mapserver
with_curl_config
'
ac_precious_vars='build_alias
@@ -1414,7 +1414,6 @@
--enable-memcache Enable memcache backend
--enable-tiff-write-support
Enable tiff cache write support (experimental)
- --enable-mapserver Enable mapserver sources (experimental)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1439,6 +1438,7 @@
--with-pcre[=prefix] use pcre instead of posix regular expressions
--with-gdal path to gdal-config program
--with-geos path to geos-config program
+ --enable-mapserver Enable mapserver sources (experimental)
--with-curl-config path to curl-config program
Some influential environment variables:
@@ -13678,23 +13678,114 @@
- # Check whether --enable-mapserver was given.
-if test "${enable_mapserver+set}" = set; then :
- enableval=$enable_mapserver;
+
+# Check whether --with-mapserver was given.
+if test "${with_mapserver+set}" = set; then :
+ withval=$with_mapserver;
else
enable_mapserver=no
fi
- if test "$enable_mapserver" == "yes"; then
- MAPSERVER_ENABLED="-DUSE_MAPSERVER"
+ if test "$with_mapserver" == "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msDrawMap in -lmapserver" >&5
+$as_echo_n "checking for msDrawMap in -lmapserver... " >&6; }
+if ${ac_cv_lib_mapserver_msDrawMap+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmapserver $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- MAPSERVER_LIB="../../libmapserver.la"
- MAPSERVER_LIB=$MAPSERVER_LIB
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char msDrawMap ();
+int
+main ()
+{
+return msDrawMap ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_mapserver_msDrawMap=yes
+else
+ ac_cv_lib_mapserver_msDrawMap=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mapserver_msDrawMap" >&5
+$as_echo "$ac_cv_lib_mapserver_msDrawMap" >&6; }
+if test "x$ac_cv_lib_mapserver_msDrawMap" = xyes; then :
+ MAPSERVER_LIB="-lmapserver"
+else
+ as_fn_error $? "mapserver library not found in default path, specify installation prefix" "$LINENO" 5
+fi
- fi
+ else
+ if test "$enable_mapserver" != "no"; then
+ OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_mapserver/lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msDrawMap in -lmapserver" >&5
+$as_echo_n "checking for msDrawMap in -lmapserver... " >&6; }
+if ${ac_cv_lib_mapserver_msDrawMap+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmapserver $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char msDrawMap ();
+int
+main ()
+{
+return msDrawMap ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_mapserver_msDrawMap=yes
+else
+ ac_cv_lib_mapserver_msDrawMap=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mapserver_msDrawMap" >&5
+$as_echo "$ac_cv_lib_mapserver_msDrawMap" >&6; }
+if test "x$ac_cv_lib_mapserver_msDrawMap" = xyes; then :
+ MAPSERVER_LIB="-L$with_mapserver/lib -lmapserver"
+else
+ as_fn_error $? "mapserver library not found in $with_mapserver/lib" "$LINENO" 5
+fi
+ LDFLAGS="$OLDLDFLAGS"
+ fi
+ fi
+ if test -n "$MAPSERVER_LIB"; then
+ MAPSERVER_ENABLED="-DUSE_MAPSERVER"
+
+ MAPSERVER_LIB=$MAPSERVER_LIB
+
+ fi
+
+
MISC_ENABLED=$MISC_ENABLED
Modified: trunk/mapserver/mapcache/configure.in
===================================================================
--- trunk/mapserver/mapcache/configure.in 2012-02-01 10:22:14 UTC (rev 13022)
+++ trunk/mapserver/mapcache/configure.in 2012-02-01 12:28:42 UTC (rev 13023)
@@ -466,16 +466,26 @@
AC_DEFUN([MAPSERVER_CHECK],[
- AC_ARG_ENABLE(mapserver,
+ AC_ARG_WITH(mapserver,
AC_HELP_STRING([--enable-mapserver],[Enable mapserver sources (experimental)]),
,
[enable_mapserver=no]
)
- if test "$enable_mapserver" == "yes"; then
- AC_SUBST(MAPSERVER_ENABLED,"-DUSE_MAPSERVER")
- MAPSERVER_LIB="../../libmapserver.la"
- AC_SUBST(MAPSERVER_LIB,$MAPSERVER_LIB)
- fi
+ 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],[
Modified: trunk/mapserver/mapcache/lib/Makefile.in
===================================================================
--- trunk/mapserver/mapcache/lib/Makefile.in 2012-02-01 10:22:14 UTC (rev 13022)
+++ trunk/mapserver/mapcache/lib/Makefile.in 2012-02-01 12:28:42 UTC (rev 13023)
@@ -10,7 +10,7 @@
$(LIBTOOL) --tag CC --mode=compile $(CC) $(ALL_ENABLED) $(CFLAGS) $(INCLUDES) -c $<
libmapcache.la: $(OBJS)
- $(LIBTOOL) --mode=link --tag CC $(CC) -rpath $(libdir) $(LOBJS) $(LIBS)-o $@
+ $(LIBTOOL) --mode=link --tag CC $(CC) -rpath $(libdir) $(LOBJS) $(LIBS) -o $@
clean:
rm -f *.o
More information about the mapserver-commits
mailing list