summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-28 14:08:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:52 -0500
commit8f4f93a201e93a99bdde457b155704dd2c9c1f24 (patch)
treeaa884d895ec5fa03df2a41abf237281a2ba747a8
parentb80cbfc20e0d0ede84531a37e187274ba04e822c (diff)
downloadsamba-8f4f93a201e93a99bdde457b155704dd2c9c1f24.tar.gz
samba-8f4f93a201e93a99bdde457b155704dd2c9c1f24.tar.bz2
samba-8f4f93a201e93a99bdde457b155704dd2c9c1f24.zip
r18973: we should always set LDFLAGS and DYNEXP depending on the host_os
but disable building of shared libs and modules whe enable_shared != yes Also make it easier to track down the problem with lost LDFLAGS values on AIX. metze (This used to be commit 3367e306e6aa5c2007fb41655b7af1fd37dea47d)
-rw-r--r--source3/Makefile.in14
-rw-r--r--source3/configure.in50
2 files changed, 45 insertions, 19 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 3611638b2e..68c37dc04a 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -904,12 +904,16 @@ everything: all libsmbclient debug2html smbfilter talloctort modules torture \
.SUFFIXES: .c .o .@PICSUFFIX@ .lo
SHOWFLAGS:
- @echo "Using FLAGS = $(FLAGS)"
- @echo " LIBS = $(LIBS)"
- @echo " LDSHFLAGS = $(LDSHFLAGS)"
- @echo " LDFLAGS = $(LDFLAGS)"
- @echo " PIE_CFLAGS = @PIE_CFLAGS@"
+ @echo "Using FLAGS = $(FLAGS)"
+ @echo " LIBS = $(LIBS)"
+ @echo " LDFLAGS = $(LDFLAGS)"
+ @echo " DYNEXP = $(DYNEXP)"
+ @echo " PIE_CFLAGS = @PIE_CFLAGS@"
@echo " PIE_LDFLAGS = @PIE_LDFLAGS@"
+ @echo " LDSHFLAGS = $(LDSHFLAGS)"
+ @echo " SHLIBEXT = @SHLIBEXT@"
+ @echo " SONAMEFLAG = @SONAMEFLAG@"
+ @echo " PICFLAGS = @PICFLAGS@"
MAKEDIR = || exec false; \
if test -d "$$dir"; then :; else \
diff --git a/source3/configure.in b/source3/configure.in
index d97ca54485..df808f5257 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -615,6 +615,7 @@ dnl Add #include for broken IRIX header files
esac
DYNEXP=
+AC_SUBST(DYNEXP)
dnl Add modules that have to be built by default here
dnl These have to be built static:
@@ -1642,15 +1643,14 @@ PICFLAGS=""
PICSUFFIX="po"
SHLIBEXT="so"
-if test "$enable_shared" = "yes"; then
- # this bit needs to be modified for each OS that supports share libs
- # You need to specify how to create a shared library and
- # how to compile C code to produce PIC object files
+# this bit needs to be modified for each OS that supports share libs
+# You need to specify how to create a shared library and
+# how to compile C code to produce PIC object files
- AC_MSG_CHECKING([ability to build shared libraries])
+AC_MSG_CHECKING([ability to build shared libraries])
- # and these are for particular systems
- case "$host_os" in
+# and these are for particular systems
+case "$host_os" in
*linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux])
BLDSHARED="true"
if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
@@ -1826,18 +1826,39 @@ if test "$enable_shared" = "yes"; then
*)
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
- esac
- AC_SUBST(DYNEXP)
- AC_MSG_RESULT($BLDSHARED)
- AC_MSG_CHECKING([linker flags for shared libraries])
- AC_MSG_RESULT([$LDSHFLAGS])
- AC_MSG_CHECKING([compiler flags for position-independent code])
- AC_MSG_RESULT([$PICFLAGS])
+esac
+
+if test "$enable_shared" != "yes"; then
+ BLDSHARED=false
fi
+AC_MSG_RESULT($BLDSHARED)
+
+AC_MSG_CHECKING([LDFLAGS])
+AC_MSG_RESULT([$LDFLAGS])
+AC_MSG_CHECKING([DYNEXP])
+AC_MSG_RESULT([$DYNEXP])
+
#######################################################
# test whether building a shared library actually works
if test $BLDSHARED = true; then
+
+AC_MSG_CHECKING([SHLD])
+AC_MSG_RESULT([$SHLD])
+AC_MSG_CHECKING([LDSHFLAGS])
+AC_MSG_RESULT([$LDSHFLAGS])
+
+AC_MSG_CHECKING([SHLIBEXT])
+AC_MSG_RESULT([$SHLIBEXT])
+AC_MSG_CHECKING([SONAMEFLAG])
+AC_MSG_RESULT([$SONAMEFLAG])
+
+AC_MSG_CHECKING([PICFLAGS])
+AC_MSG_RESULT([$PICFLAGS])
+
+AC_MSG_CHECKING([NSSSONAMEVERSIONSUFFIX])
+AC_MSG_RESULT([$NSSSONAMEVERSIONSUFFIX])
+
AC_CACHE_CHECK([whether building shared libraries actually works],
[ac_cv_shlib_works],[
# try building a trivial shared library
@@ -1849,6 +1870,7 @@ AC_CACHE_CHECK([whether building shared libraries actually works],
`eval echo $SHLD` `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" \
shlib.$PICSUFFIX && ac_cv_shlib_works=yes
rm -f "shlib.$SHLIBEXT" shlib.$PICSUFFIX
+
])
if test $ac_cv_shlib_works = no; then
BLDSHARED=false