[Magick-bugs] `configure' loses "LDFLAGS"

Ken Laprade klaprade at harris.com
Thu Jun 11 08:20:49 PDT 2009


I am building ImageMagick 6.5.3-3 on sparc-SunOS-5.9 using GCC 4.1.2.

I specify the location of external libraries (TIFF, JPEG, PNG) using
"LDFLAGS" on the "configure" command line.  E.g.:

  ../configure -C --prefix=$PWD --mandir=/programs/ipl/man --infodir=/programs/ipl/pub/info --enable-shared --disable-static --without-perl --enable-installed --without-frozenpaths --enable-lzw CC=gcc-4.1.2 CFLAGS="-O3" CXX=g++-4.1.2 CXXFLAGS="-O3" CPPFLAGS="-I$PWD/aux-libs/include" LDFLAGS="-L$PWD/aux-libs/lib" --without-x

Part way through the configure process, "LDFLAGS" changes to contain
only "-Wl,-zlazyload".  I traced this to a logic error in the section
that wants to add those options to "LDFLAGS".  Swapping the "if/else"
sections of thge conditional fixes it:

--------------------
--- ImageMagick-6.5.3-3/configure-orig	2009-06-05 20:20:33.000000000 -0400
+++ ImageMagick-6.5.3-3/configure	2009-06-11 10:47:24.727372000 -0400
@@ -7005,9 +7005,9 @@
 $as_echo "$im_cv_ld_lazyload" >&6; }
 if test "${im_cv_ld_lazyload}" != 'none' ; then
   if test -n "${LDFLAGS}" ; then
-    LDFLAGS="${im_cv_ld_lazyload}"
-  else
     LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
+  else
+    LDFLAGS="${im_cv_ld_lazyload}"
   fi
 fi
 
--------------------

-- 
Ken Laprade			Email: klaprade at harris.com
Harris Corporation		Voice: (321)984-5727
PO Box 9800, MS W3/31G
Melbourne, FL 32902


More information about the Magick-bugs mailing list