diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-31 22:10:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-31 22:10:24 +0000 |
commit | 927e86047786cbdda2bded6d983d952202b08006 (patch) | |
tree | fb52e2960e579dee299815214cb6354c6047d3f7 /source3/configure.in | |
parent | 7a3cac39a5cbbadcd31d30058d3b513725aa2fa0 (diff) | |
download | samba-927e86047786cbdda2bded6d983d952202b08006.tar.gz samba-927e86047786cbdda2bded6d983d952202b08006.tar.xz samba-927e86047786cbdda2bded6d983d952202b08006.zip |
added a simple test to see whether building shared libraries actually
works
(This used to be commit 3aeefbca4f272f57e83e753177ee6e8157b2dbd5)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in index 077486e7983..2e46609ccc6 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 |