From f9ebee99a7d67fa3d64e92b23598957812ebd611 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 9 Sep 2004 03:36:05 +0000 Subject: r2263: When testing whether building shared libraries actually works, use $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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 50ac335647..31ccb1e11f 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 -- cgit