[mapserver-commits] r10763 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Nov 25 15:07:07 EST 2010


Author: dmorissette
Date: 2010-11-25 12:07:07 -0800 (Thu, 25 Nov 2010)
New Revision: 10763

Modified:
   trunk/mapserver/Makefile.in
   trunk/mapserver/configure
   trunk/mapserver/configure.in
Log:
Fixed configure/dependencies when building with libpng, giflib, etc. in non-system dir

Modified: trunk/mapserver/Makefile.in
===================================================================
--- trunk/mapserver/Makefile.in	2010-11-25 17:36:16 UTC (rev 10762)
+++ trunk/mapserver/Makefile.in	2010-11-25 20:07:07 UTC (rev 10763)
@@ -97,6 +97,13 @@
 PNG_INC= @PNG_INC@
 PNG_LIB= @PNG_LIB@
 
+#
+# Giflib support
+#
+GIF_INC= @GIF_INC@
+GIF_LIB= @GIF_LIB@
+GIF=	 @GIF_ENABLED@
+
 # 
 # ZLIB option (compressed SVG)
 #
@@ -241,7 +248,8 @@
 
 DEFINES = $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) @ALL_ENABLED@ $(FRIBIDI) -DDISABLE_CVSID
 
-INCLUDES = $(FT_INC) $(REGEX_INC) $(PNG_INC) $(GD_INC) $(AGG_INC) $(OGL_INC) $(FTGL_INC) $(PROJ_INC) $(JPEG_INC) $(EGIS_INC) \
+INCLUDES = $(FT_INC) $(REGEX_INC) $(PNG_INC) $(GIF_INC) $(JPEG_INC) $(GD_INC) \
+        $(AGG_INC) $(OGL_INC) $(FTGL_INC) $(PROJ_INC) $(EGIS_INC) \
         $(SDE_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \
         $(CURL_INC) $(MING_INC) $(ORACLESPATIAL_INC) $(GEOS_INC) $(ICONV_INC) \
         $(FASTCGI_INC) $(ZLIB_INC) $(XML2_INC) $(FRIBIDI_INC) $(CAIRO_INC)
@@ -253,7 +261,7 @@
 
 # Link flags and shared libs only
 SUP_LIBS =  $(FT_LIB) $(GD_LIB) $(AGG_LIB) $(OGL_LIB) $(FTGL_LIB) $(PROJ_LIBS) \
-          $(JPEG_LIB) $(PNG_LIB) $(SDE_LIB) $(GDAL_LIB) $(MING_LIB) $(POSTGIS_LIB) \
+          $(JPEG_LIB) $(PNG_LIB) $(GIF_LIB) $(SDE_LIB) $(GDAL_LIB) $(MING_LIB) $(POSTGIS_LIB) \
 	  $(MYGIS_LIB) $(CURL_LIB) $(ORACLESPATIAL_LIB) $(GEOS_LIB) \
 	  $(THREAD_LIB) $(ICONV_LIB) $(FASTCGI_LIB) $(XSLT_LIB) $(EXSLT_LIB) \
 	  $(ZLIB_LIB) $(XML2_LIB) $(FRIBIDI_LIB) $(XTRALIBS)  $(CAIRO_LIB)

Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure	2010-11-25 17:36:16 UTC (rev 10762)
+++ trunk/mapserver/configure	2010-11-25 20:07:07 UTC (rev 10763)
@@ -4827,6 +4827,7 @@
 
 _cppflags="$CPPFLAGS"
 _ldflags="$LDFLAGS"
+_libs="$LIBS"
 CPPFLAGS="$FT_CFLAGS $CPPFLAGS"
 LDFLAGS="$FT_LDFLAGS $LDFLAGS"
 
@@ -5138,6 +5139,7 @@
 
 CPPFLAGS=$_cppflags
 LDFLAGS=$_ldflags
+LIBS=$_libs
 FT_ENABLED="-DUSE_FREETYPE"
 FT_ENABLED=$FT_ENABLED
 
@@ -6006,10 +6008,10 @@
     fi
 
     if test -n "$GIF_INCLUDE" ; then
-      as_ac_Header=`echo "ac_cv_header_$GIF_INCLUDE/png.h" | $as_tr_sh`
+      as_ac_Header=`echo "ac_cv_header_$GIF_INCLUDE/gif_lib.h" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $GIF_INCLUDE/png.h" >&5
-echo $ECHO_N "checking for $GIF_INCLUDE/png.h... $ECHO_C" >&6
+  echo "$as_me:$LINENO: checking for $GIF_INCLUDE/gif_lib.h" >&5
+echo $ECHO_N "checking for $GIF_INCLUDE/gif_lib.h... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -6017,8 +6019,8 @@
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $GIF_INCLUDE/png.h usability" >&5
-echo $ECHO_N "checking $GIF_INCLUDE/png.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $GIF_INCLUDE/gif_lib.h usability" >&5
+echo $ECHO_N "checking $GIF_INCLUDE/gif_lib.h usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6026,7 +6028,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <$GIF_INCLUDE/png.h>
+#include <$GIF_INCLUDE/gif_lib.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6062,15 +6064,15 @@
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking $GIF_INCLUDE/png.h presence" >&5
-echo $ECHO_N "checking $GIF_INCLUDE/png.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $GIF_INCLUDE/gif_lib.h presence" >&5
+echo $ECHO_N "checking $GIF_INCLUDE/gif_lib.h presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$GIF_INCLUDE/png.h>
+#include <$GIF_INCLUDE/gif_lib.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -6104,25 +6106,25 @@
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/png.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $GIF_INCLUDE/png.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
 ## ------------------------------------------ ##
@@ -6133,8 +6135,8 @@
       sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $GIF_INCLUDE/png.h" >&5
-echo $ECHO_N "checking for $GIF_INCLUDE/png.h... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for $GIF_INCLUDE/gif_lib.h" >&5
+echo $ECHO_N "checking for $GIF_INCLUDE/gif_lib.h... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6147,8 +6149,8 @@
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   GIF_INC=-I$GIF_INCLUDE
 else
-  { { echo "$as_me:$LINENO: error: cannot find png headers" >&5
-echo "$as_me: error: cannot find png headers" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find gif headers" >&5
+echo "$as_me: error: cannot find gif headers" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -6465,6 +6467,7 @@
 
     _cppflags="$CPPFLAGS"
     _ldflags="$LDFLAGS"
+    _libs="$LIBS"
     CPPFLAGS="$JPEG_INC $CPPFLAGS"
     LDFLAGS="$JPEG_LIB $LDFLAGS"
 
@@ -6694,11 +6697,13 @@
     JPEG_ENABLED="-DUSE_JPEG"
     CPPFLAGS=$_cppflags
     LDFLAGS=$_ldflags
+    LIBS=$_libs
     echo "$as_me:$LINENO: result:         using libjpeg from system $JPEG_LIB" >&5
 echo "${ECHO_T}        using libjpeg from system $JPEG_LIB" >&6
 
 else
 
+
 echo "$as_me:$LINENO: checking for jpeg_read_header in -ljpeg" >&5
 echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6
 if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then

Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in	2010-11-25 17:36:16 UTC (rev 10762)
+++ trunk/mapserver/configure.in	2010-11-25 20:07:07 UTC (rev 10763)
@@ -175,6 +175,7 @@
 
 _cppflags="$CPPFLAGS"
 _ldflags="$LDFLAGS"
+_libs="$LIBS"
 CPPFLAGS="$FT_CFLAGS $CPPFLAGS"
 LDFLAGS="$FT_LDFLAGS $LDFLAGS"
 
@@ -186,6 +187,7 @@
 
 CPPFLAGS=$_cppflags
 LDFLAGS=$_ldflags
+LIBS=$_libs
 FT_ENABLED="-DUSE_FREETYPE"
 AC_SUBST(FT_ENABLED,$FT_ENABLED)
 AC_SUBST(FT_INC,$FT_CFLAGS)
@@ -367,8 +369,8 @@
     fi
     
     if test -n "$GIF_INCLUDE" ; then
-      AC_CHECK_HEADER([$GIF_INCLUDE/png.h],GIF_INC=-I$GIF_INCLUDE,
-        [AC_MSG_ERROR([cannot find png headers])])
+      AC_CHECK_HEADER([$GIF_INCLUDE/gif_lib.h],GIF_INC=-I$GIF_INCLUDE,
+        [AC_MSG_ERROR([cannot find gif headers])])
       ALL_INC="$GIF_INC $ALL_INC"
     else
         AC_MSG_ERROR([cannot find gif headers in $GIF_DIR])
@@ -432,6 +434,7 @@
 
     _cppflags="$CPPFLAGS"
     _ldflags="$LDFLAGS"
+    _libs="$LIBS"
     CPPFLAGS="$JPEG_INC $CPPFLAGS"
     LDFLAGS="$JPEG_LIB $LDFLAGS"
     AC_CHECK_LIB(jpeg, jpeg_read_header,,AC_MSG_ERROR(["cannot link with libjpeg"]),,)
@@ -439,9 +442,12 @@
     JPEG_ENABLED="-DUSE_JPEG"
     CPPFLAGS=$_cppflags
     LDFLAGS=$_ldflags
+    LIBS=$_libs
     AC_MSG_RESULT([        using libjpeg from system $JPEG_LIB])
 
 else
+    dnl Look for libjpeg in system dirs
+
     AC_CHECK_LIB(jpeg, jpeg_read_header,,AC_MSG_ERROR(["cannot link with libjpeg"]),,)
     AC_CHECK_HEADER(jpeglib.h,,AC_MSG_ERROR(["cannot find jpeg headers"]))
     JPEG_ENABLED="-DUSE_JPEG"



More information about the mapserver-commits mailing list