diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-15 16:46:57 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:45:27 +0100 |
commit | d7e5d3fe27a066b5e394129b16e02c9793b73231 (patch) | |
tree | 0bb28acd876dafe0f39cd3b38e1b62f314ac6fe4 /source4/build/m4 | |
parent | b415712d3fe7c71f79334bf7c1cdd246150ff077 (diff) | |
download | samba-d7e5d3fe27a066b5e394129b16e02c9793b73231.tar.gz samba-d7e5d3fe27a066b5e394129b16e02c9793b73231.tar.bz2 samba-d7e5d3fe27a066b5e394129b16e02c9793b73231.zip |
r25978: build: use AC_LIBREPLACE_MDLD_* macros and use the result to build modules
metze
(This used to be commit f86db3348b0ee243988526578cc09c2d5d9a70af)
Diffstat (limited to 'source4/build/m4')
-rw-r--r-- | source4/build/m4/check_ld.m4 | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4 index c3b01551ab..eb1d9a7a1d 100644 --- a/source4/build/m4/check_ld.m4 +++ b/source4/build/m4/check_ld.m4 @@ -115,6 +115,8 @@ AC_LD_EXPORT_DYNAMIC AC_LD_SHLDFLAGS AC_LD_SHLIBEXT AC_LD_SONAMEFLAG +AC_LIBREPLACE_MDLD +AC_LIBREPLACE_MDLD_FLAGS ####################################################### # test whether building a shared library actually works @@ -125,6 +127,11 @@ if test $BLDSHARED = true; then AC_MSG_CHECKING([SHLD_FLAGS]) AC_MSG_RESULT([$SHLD_FLAGS]) + AC_MSG_CHECKING([MDLD]) + AC_MSG_RESULT([$MDLD]) + AC_MSG_CHECKING([MDLD_FLAGS]) + AC_MSG_RESULT([$MDLD_FLAGS]) + AC_MSG_CHECKING([SHLIBEXT]) AC_MSG_RESULT([$SHLIBEXT]) AC_MSG_CHECKING([SONAMEFLAG]) @@ -137,12 +144,22 @@ if test $BLDSHARED = true; then [ac_cv_shlib_works],[ ac_cv_shlib_works=no # try building a trivial shared library + # TODO: also test SONAMEFLAG ${CC} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/build/tests/shlib.c -o shlib.o && ${SHLD} ${SHLD_FLAGS} -o shlib.${SHLIBEXT} shlib.o && ac_cv_shlib_works=yes rm -f shlib.${SHLIBEXT} shlib.o ]) - if test $ac_cv_shlib_works = no; then + AC_CACHE_CHECK([whether building shared modules actually works], + [ac_cv_shmod_works],[ + ac_cv_shmod_works=no + # try building a trivial shared library + ${CC} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/build/tests/shlib.c -o shlib.o && + ${MDLD} ${MDLD_FLAGS} -o shlib.${SHLIBEXT} shlib.o && + ac_cv_shmod_works=yes + rm -f shlib.${SHLIBEXT} shlib.o + ]) + if test $ac_cv_shlib_works = no -o $ac_cv_shmod_works = no; then BLDSHARED=false fi fi @@ -150,6 +167,8 @@ fi if test $BLDSHARED != true; then SHLD="shared-libraries-disabled" SHLD_FLAGS="shared-libraries-disabled" + MDLD="shared-modules-disabled" + MDLD_FLAGS="shared-modules-disabled" SHLIBEXT="shared_libraries_disabled" SONAMEFLAG="shared-libraries-disabled" PICFLAG="" @@ -158,6 +177,11 @@ if test $BLDSHARED != true; then AC_MSG_CHECKING([SHLD_FLAGS]) AC_MSG_RESULT([$SHLD_FLAGS]) + AC_MSG_CHECKING([MDLD]) + AC_MSG_RESULT([$MDLD]) + AC_MSG_CHECKING([MDLD_FLAGS]) + AC_MSG_RESULT([$MDLD_FLAGS]) + AC_MSG_CHECKING([SHLIBEXT]) AC_MSG_RESULT([$SHLIBEXT]) AC_MSG_CHECKING([SONAMEFLAG]) |