Don't eval $LDSHFLAGS in configure.in

Albert Chin samba-technical at mlists.thewrittenword.com
Mon Jan 2 18:57:10 GMT 2006


>From configure.in:
   # The $SHLD and $LDSHFLAGS variables may contain references to other
   # variables so they need to be eval'ed.

However, only Solaris has variables in LDSHFLAGS:
  LDSHFLAGS="-G \${CFLAGS}"

This is redundant though as SHLD="\${CC} \${CFLAGS}" is the default.

Based on these observations, I've attached a patch to remove the eval
of $LDSHFLAGS and treat it as a normal variable.

-- 
albert chin (china at thewrittenword.com)
-------------- next part --------------
Index: source/configure.in
===================================================================
--- source/configure.in.orig	2006-01-02 12:52:18.055921000 -0600
+++ source/configure.in	2006-01-02 12:53:36.961177000 -0600
@@ -1408,9 +1400,6 @@
 				fi
 			else
 				PICFLAGS="-KPIC"
-				## ${CFLAGS} added for building 64-bit shared 
-				## libs using Sun's Compiler
-				LDSHFLAGS="-G \${CFLAGS}"
 				PICSUFFIX="po.o"
 			fi
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
@@ -1570,11 +1569,11 @@
                [ac_cv_shlib_works],[
    # try building a trivial shared library
    ac_cv_shlib_works=no
-   # The $SHLD and $LDSHFLAGS variables may contain references to other
-   # variables so they need to be eval'ed.
+   # The $SHLD variable may contain references to other variables
+   # so they need to be eval'ed.
    $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o \
 	shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c && \
-   `eval echo $SHLD` `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" \
+   `eval echo $SHLD` $LDSHFLAGS -o "shlib.$SHLIBEXT" \
         shlib.$PICSUFFIX && ac_cv_shlib_works=yes
    rm -f "shlib.$SHLIBEXT" shlib.$PICSUFFIX
 ])


More information about the samba-technical mailing list