1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-24 10:50:22 +03:00

added a simple test to see whether building shared libraries actually

works
(This used to be commit 3aeefbca4f272f57e83e753177ee6e8157b2dbd5)
This commit is contained in:
Andrew Tridgell 2001-12-31 22:10:24 +00:00
parent 7a3cac39a5
commit 927e860477
3 changed files with 346 additions and 297 deletions

619
source3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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

6
source3/tests/shlib.c Normal file
View File

@ -0,0 +1,6 @@
/* a trivial function used to test building shared libraries */
int foo(void)
{
return 1;
}