summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-15 18:44:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:43:35 -0500
commitfda5cbc62e767e90c0a9122506759b0268e57c79 (patch)
tree95245d24ed999e4514cbeb56c0df007f859ab51f /source4
parente6875ca215f6337e7c78ff7bbe82fa448f83c7bb (diff)
downloadsamba-fda5cbc62e767e90c0a9122506759b0268e57c79.tar.gz
samba-fda5cbc62e767e90c0a9122506759b0268e57c79.tar.bz2
samba-fda5cbc62e767e90c0a9122506759b0268e57c79.zip
r20814: always define SHLIBEXT, to fix the build on host with no support for shared libs,
there we just define it to an invalid value metze (This used to be commit d491258c2cf7e86ab82571360a9d51a1b0a61fad)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/check_ld.m471
1 files changed, 46 insertions, 25 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index ad514054cd..bc0c0a07f1 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -154,34 +154,55 @@ AC_MSG_RESULT([$STLD_FLAGS])
# test whether building a shared library actually works
if test $BLDSHARED = true; then
-AC_MSG_CHECKING([SHLD])
-AC_MSG_RESULT([$SHLD])
-AC_MSG_CHECKING([SHLD_FLAGS])
-AC_MSG_RESULT([$SHLD_FLAGS])
-
-AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension])
-AC_MSG_CHECKING([SHLIBEXT])
-AC_MSG_RESULT([$SHLIBEXT])
-AC_MSG_CHECKING([SONAMEFLAG])
-AC_MSG_RESULT([$SONAMEFLAG])
-
-AC_MSG_CHECKING([PICFLAG])
-AC_MSG_RESULT([$PICFLAG])
-
-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} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/build/tests/shlib.c -o shlib.o &&
- ${SHLD} `eval echo ${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
- BLDSHARED=false
+ AC_MSG_CHECKING([SHLD])
+ AC_MSG_RESULT([$SHLD])
+ AC_MSG_CHECKING([SHLD_FLAGS])
+ AC_MSG_RESULT([$SHLD_FLAGS])
+
+ AC_MSG_CHECKING([SHLIBEXT])
+ AC_MSG_RESULT([$SHLIBEXT])
+ AC_MSG_CHECKING([SONAMEFLAG])
+ AC_MSG_RESULT([$SONAMEFLAG])
+
+ AC_MSG_CHECKING([PICFLAG])
+ AC_MSG_RESULT([$PICFLAG])
+
+ 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} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/build/tests/shlib.c -o shlib.o &&
+ ${SHLD} `eval echo ${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
+ BLDSHARED=false
+ fi
fi
+
+if test $BLDSHARED != true; then
+ SHLD="shared-libraries-disabled"
+ SHLD_FLAGS="shared-libraries-disabled"
+ SHLIBEXT="shared_libraries_disabled"
+ SONAMEFLAG="shared-libraries-disabled"
+ PICFLAG=""
+ AC_MSG_CHECKING([SHLD])
+ AC_MSG_RESULT([$SHLD])
+ AC_MSG_CHECKING([SHLD_FLAGS])
+ AC_MSG_RESULT([$SHLD_FLAGS])
+
+ AC_MSG_CHECKING([SHLIBEXT])
+ AC_MSG_RESULT([$SHLIBEXT])
+ AC_MSG_CHECKING([SONAMEFLAG])
+ AC_MSG_RESULT([$SONAMEFLAG])
+
+ AC_MSG_CHECKING([PICFLAG])
+ AC_MSG_RESULT([$PICFLAG])
fi
+AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension])
+
AC_MSG_CHECKING([if we can link using the selected flags])
AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
AC_MSG_RESULT(yes),