[mapserver-commits] r8458 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Jan 27 09:16:37 EST 2009
Author: aboudreault
Date: 2009-01-27 09:16:37 -0500 (Tue, 27 Jan 2009)
New Revision: 8458
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/configure
trunk/mapserver/configure.in
Log:
Fixed build problem using --with-gd=static and freetype (#2697)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-01-26 21:09:54 UTC (rev 8457)
+++ trunk/mapserver/HISTORY.TXT 2009-01-27 14:16:37 UTC (rev 8458)
@@ -11,6 +11,9 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+
+- Fixed build problem using --with-gd=static and freetype (#2697)
+
- RFC49 implementation (#2865)
- Fixed Blobs not filtered in OracleSpatial Attribute/WFS queries (#2829)
Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure 2009-01-26 21:09:54 UTC (rev 8457)
+++ trunk/mapserver/configure 2009-01-27 14:16:37 UTC (rev 8458)
@@ -7258,7 +7258,8 @@
fi
- as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
+ GD_FT_SUPPORT=no
+ as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
echo $ECHO_N "checking for gdImageStringFT in -l$GD_CHECKLIB... $ECHO_C" >&6; }
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -7322,10 +7323,86 @@
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- GD_DEF="$GD_DEF -DUSE_GD_FT"
+ GD_FT_SUPPORT=yes
fi
+ if test -n "$GD_STATIC" ; then
+ GD_LIB="$GD_LIB -lfontconfig"
+ unset ac_cv_lib_c___gdImageStringFT
+ as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
+echo $ECHO_N "checking for gdImageStringFT in -l$GD_CHECKLIB... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 gdImageStringFT ();
+int
+main ()
+{
+return gdImageStringFT ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ GD_FT_SUPPORT=yes
+fi
+
+ fi
+
+ if test "$GD_FT_SUPPORT" = "yes"; then
+ GD_DEF="$GD_DEF -DUSE_GD_FT"
+ fi
+
as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageOpenPolygon" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for gdImageOpenPolygon in -l$GD_CHECKLIB" >&5
echo $ECHO_N "checking for gdImageOpenPolygon in -l$GD_CHECKLIB... $ECHO_C" >&6; }
Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in 2009-01-26 21:09:54 UTC (rev 8457)
+++ trunk/mapserver/configure.in 2009-01-27 14:16:37 UTC (rev 8458)
@@ -615,7 +615,7 @@
if test -n "$with_gd" -a "$with_gd" != "yes" ; then
dnl check gd lib that was found on --with-gd=
-
+
if test "$GD_STATIC" = "yes" ; then
dnl To test against static GD, do AC_CHECK_LIB calls against -lc and
dnl include libgd.a in GD_LIB param
@@ -628,15 +628,27 @@
# GD_LIB was already set above
GD_STATIC=""
fi
-
+
AC_CHECK_LIB($GD_CHECKLIB, gdImageGif, GD_DEF="$GD_DEF -DUSE_GD_GIF",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
AC_CHECK_LIB($GD_CHECKLIB, gdImagePng, GD_DEF="$GD_DEF -DUSE_GD_PNG",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
AC_CHECK_LIB($GD_CHECKLIB, gdImageJpeg, GD_DEF="$GD_DEF -DUSE_GD_JPEG",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
AC_CHECK_LIB($GD_CHECKLIB, gdImageWBMP, GD_DEF="$GD_DEF -DUSE_GD_WBMP",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
- dnl check for Freetype 2.x support
- AC_CHECK_LIB($GD_CHECKLIB, gdImageStringFT, GD_DEF="$GD_DEF -DUSE_GD_FT",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+ dnl check for Freetype 2.x support
+ GD_FT_SUPPORT=no
+ AC_CHECK_LIB($GD_CHECKLIB, gdImageStringFT, GD_FT_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+ dnl If GD static is requested, it may needs libfontconfig.
+ if test -n "$GD_STATIC" ; then
+ GD_LIB="$GD_LIB -lfontconfig"
+ unset ac_cv_lib_c___gdImageStringFT
+ AC_CHECK_LIB($GD_CHECKLIB, gdImageStringFT, GD_FT_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+ fi
+
+ if test "$GD_FT_SUPPORT" = "yes"; then
+ GD_DEF="$GD_DEF -DUSE_GD_FT"
+ fi
+
dnl check for gdImageOpenPolygon (means GD version 2.0.29 or higher)
AC_CHECK_LIB($GD_CHECKLIB, gdImageOpenPolygon, GD_DEF="$GD_DEF -DGD_HAS_FTEX_XSHOW",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
More information about the mapserver-commits
mailing list