From 927e86047786cbdda2bded6d983d952202b08006 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 31 Dec 2001 22:10:24 +0000 Subject: added a simple test to see whether building shared libraries actually works (This used to be commit 3aeefbca4f272f57e83e753177ee6e8157b2dbd5) --- source3/configure.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index 077486e798..2e46609ccc 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -766,6 +766,24 @@ AC_MSG_RESULT([$LDSHFLAGS]) AC_MSG_CHECKING([compiler flags for position-independent code]) AC_MSG_RESULT([$PICFLAGS]) +####################################################### +# test whether building a shared library actually works +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 + $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c && + $CC $LDSHFLAGS -o shlib.so shlib.po && + ac_cv_shlib_works=yes + rm -f shlib.so shlib.po +]) +if test $ac_cv_shlib_works = no; then + BLDSHARED=false +fi +fi + + # this updates our target list if we can build shared libs if test $BLDSHARED = true; then LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT -- cgit