]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2263: When testing whether building shared libraries actually works, use
authorTim Potter <tpot@samba.org>
Thu, 9 Sep 2004 03:36:05 +0000 (03:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:38 +0000 (10:52 -0500)
$SHLD and $LDSHFLAGS instead of $CC, $CPPFLAGS and $CFLAGS as this is
more likely to actually work.  Bugzilla #1731.

I'm checking this in to 3.0 so it can hit the build farm and flush out
any problems with other architectures.  With a bit of luck this should
go in to Samba 3.0.8.
(This used to be commit a754f29ef819e1cf7ea31c117e5ef1487cb5cb5e)

source3/configure.in

index 50ac33564770da73cf45a2335839b8d47ef4a4c3..31ccb1e11fa935f7457e18dbd8a9646d24927d38 100644 (file)
@@ -1302,13 +1302,14 @@ fi
 if test $BLDSHARED = true; then
 AC_CACHE_CHECK([whether building shared libraries actually works], 
                [ac_cv_shlib_works],[
-   ac_cv_shlib_works=no
    # 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.
    $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o \
        shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c && \
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" \
-       shlib.$PICSUFFIX && \
-       ac_cv_shlib_works=yes
+   `eval echo $SHLD` `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" \
+        shlib.$PICSUFFIX && ac_cv_shlib_works=yes
    rm -f "shlib.$SHLIBEXT" shlib.$PICSUFFIX
 ])
 if test $ac_cv_shlib_works = no; then