summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/check_ld.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index 9428f62040..1b1c6e92c6 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -185,3 +185,21 @@ AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
AC_MSG_RESULT(yes),
AC_MSG_ERROR([we cannot link with the selected cc and ld flags. Aborting configure]),
AC_MSG_WARN([cannot run when cross-compiling]))
+
+try_dso=no
+USESHARED=false
+AC_SUBST(USESHARED)
+
+AC_ARG_ENABLE(dso,
+[ --enable-dso Enable using shared libraries internally (experimental)])
+
+if test x"$enable_dso" = x"yes" -a x"$BLDSHARED" != x"true"; then
+ AC_MSG_ERROR([--enable-dso: no support for shared libraries])
+fi
+
+if test x"$enable_dso" != x"no"; then
+ USESHARED=$BLDSHARED
+fi
+
+AC_MSG_CHECKING([if binaries will use shared libraries])
+AC_MSG_RESULT([$USESHARED])