Jim Jagielski wrote:

Jeff Trawick wrote:

>How can a user add to LDFLAGS_SHLIB?
>
>I tried setting LDFLAGS_SHLIB outside of configure, but that replaced
>the necessary AIX additions specified in src/Configure.
>
>I tried setting EXTRA_LDFLAGS_SHLIB but that was ignored as far as I
>could tell.
>


src/Configure is woefully inconsistant regarding the LDFLAGS_SHLIB
family. You'll need to edit Configure to allow for enhancement
rather than replacement :(
looks to me that the minimal support for such variables is really intended to force the user to specify a full replacement

the attached patch adds support for EXTRA_LDFLAGS_SHLIB that allows the user to add to the hardcoded flags

the lack of such support for the other variables is a glaring inconsistency, but I'm scared to mess with 1.3 too much

with this, when people hit the lovely gcc issue with unresolved references to libgcc.a in DSOs they are able to do something like the following:

EXTRA_LDFLAGS_SHLIB='-L/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-ai1.0.0/2.9-aix43-010414/powerpc -lgcc' CC=gcc OPTIM='-g' ./configure --enable-module=most --enable-shared=max --prefix=/jeff/1327
Index: src/Configure
===================================================================
RCS file: /home/cvs/apache-1.3/src/Configure,v
retrieving revision 1.462
diff -u -r1.462 Configure
--- src/Configure       19 Feb 2003 15:50:40 -0000      1.462
+++ src/Configure       19 Feb 2003 16:00:30 -0000
@@ -1999,7 +1999,8 @@
        echo "LD_SHLIB=$LD_SHLIB" >> Makefile.config
     fi
     if [ "x$TLDFLAGS_SHLIB" = "x" ]; then
-       echo "LDFLAGS_SHLIB=$LDFLAGS_SHLIB" >> Makefile.config
+       echo "EXTRA_LDFLAGS_SHLIB=$EXTRA_LDFLAGS_SHLIB" >> Makefile.config
+       echo "LDFLAGS_SHLIB=$LDFLAGS_SHLIB $EXTRA_LDFLAGS_SHLIB" >> Makefile.config
     fi
     if [ "x$TLDFLAGS_SHLIB_EXPORT" = "x" ]; then
        echo "LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" >> Makefile.config

Reply via email to