[PATCH] Configure check for FreeType sets LDFLAGS

Nick Wellnhofer <[email protected]> Sat, 03 Oct 2009 23:32:50 +0200
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------060603070000060807040902
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

The configure check for FreeType appends '-lfreetype' to LDFLAGS, so
everything in the distribution is linked against FreeType. For most
files this is unneccessary. The attached patch changes this to use LIBS
instead which is not passed globally.

Nick

--------------060603070000060807040902
Content-Type: text/plain;
 name="configure-freetype.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="configure-freetype.diff"

Index: configure.ac
===================================================================
--- configure.ac	(revision 279)
+++ configure.ac	(working copy)
@@ -1748,7 +1748,7 @@
     AC_MSG_RESULT([])
     failed=0
     passed=0
-    PERSIST_LDFLAGS="$LDFLAGS"
+    PERSIST_LIBS="$LIBS"
     PERSIST_CPPFLAGS="$CPPFLAGS"
     if test "$enable_delegate_build" != 'no' && test -d "$builddir/freetype/include"; then
         :
@@ -1758,7 +1758,7 @@
         if test -n "$freetype_config"; then
             freetype_cflags=`$freetype_config --cflags`
             freetype_libs=`$freetype_config --libs`
-            LDFLAGS="$LDFLAGS $freetype_libs"
+            LIBS="$LIBS $freetype_libs"
             CPPFLAGS="$freetype_cflags $CPPFLAGS"
         fi
     fi
@@ -1770,7 +1770,7 @@
             passed=`expr $passed + 1`
         else
             failed=`expr $failed + 1`
-            LDFLAGS="$PERSIST_LDFLAGS"
+            LIBS="$PERSIST_LIBS"
         fi
     fi
 

--------------060603070000060807040902
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Magick-developers mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-developers

--------------060603070000060807040902--