summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-06-05 20:33:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:33 -0500
commit7aa5a5de59d18a13ff2fe902c9b9a6c3754215a8 (patch)
tree3cbccfc476cfced0b5f77ba0178ff123ca14222c /source4/build
parentbd54b891c1595fbf4ae8f99eaacc297591cb4689 (diff)
downloadsamba-7aa5a5de59d18a13ff2fe902c9b9a6c3754215a8.tar.gz
samba-7aa5a5de59d18a13ff2fe902c9b9a6c3754215a8.tar.bz2
samba-7aa5a5de59d18a13ff2fe902c9b9a6c3754215a8.zip
r1037: Always export all symbols
(This used to be commit 0209dce1eb9c62c0e454906d9ba015d8c5f5abf6)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/rewrite.m4298
-rw-r--r--source4/build/smb_build/output.pl3
2 files changed, 149 insertions, 152 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index ac2b9eb89b..465a3354fa 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -522,166 +522,160 @@ PICSUFFIX="po"
POBAD_CC="#"
SHLIBEXT="so"
-if test "$enable_shared" = "yes"; then
- # this bit needs to be modified for each OS that is suported by
- # smbwrapper. You need to specify how to created 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
- *linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux])
- BLDSHARED="true"
- LDSHFLAGS="-shared"
- DYNEXP="-Wl,--export-dynamic"
+# and these are for particular systems
+case "$host_os" in
+ *linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux])
+ BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
+ PICFLAG="-fPIC"
+ SONAMEFLAG="-Wl,-soname="
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
+ BLDSHARED="true"
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-h "
+ if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
- SONAMEFLAG="-Wl,-soname="
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
- BLDSHARED="true"
- LDSHFLAGS="-G"
- SONAMEFLAG="-h "
- if test "${GCC}" = "yes"; then
- PICFLAG="-fPIC"
- if test "${ac_cv_prog_gnu_ld}" = "yes"; then
- DYNEXP="-Wl,-E"
- fi
- else
- PICFLAG="-KPIC"
- ## ${CFLAGS} added for building 64-bit shared
- ## libs using Sun's Compiler
- LDSHFLAGS="-G \${CFLAGS}"
- POBAD_CC=""
- PICSUFFIX="po.o"
+ if test "${ac_cv_prog_gnu_ld}" = "yes"; then
+ DYNEXP="-Wl,-E"
fi
- AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
- ;;
- *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
- BLDSHARED="true"
- LDSHFLAGS="-G"
- SONAMEFLAG="-Wl,-h,"
- PICFLAG="-KPIC" # Is this correct for SunOS
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *netbsd* | *freebsd*) BLDSHARED="true"
- LDSHFLAGS="-shared"
- DYNEXP="-Wl,--export-dynamic"
- SONAMEFLAG="-Wl,-soname,"
- PICFLAG="-fPIC -DPIC"
- AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
- ;;
- *openbsd*) BLDSHARED="true"
- LDSHFLAGS="-shared"
- DYNEXP="-Wl,-Bdynamic"
- SONAMEFLAG="-Wl,-soname,"
+ else
+ PICFLAG="-KPIC"
+ ## ${CFLAGS} added for building 64-bit shared
+ ## libs using Sun's Compiler
+ LDSHFLAGS="-G \${CFLAGS}"
+ POBAD_CC=""
+ PICSUFFIX="po.o"
+ fi
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+ ;;
+ *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
+ BLDSHARED="true"
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-Wl,-h,"
+ PICFLAG="-KPIC" # Is this correct for SunOS
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *netbsd* | *freebsd*) BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC -DPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+ ;;
+ *openbsd*) BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,-Bdynamic"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+ ;;
+ *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
+ case "$host_os" in
+ *irix6*) AC_DEFINE(IRIX6,1,[Whether the host os is irix6])
+ ;;
+ esac
+ ATTEMPT_WRAP32_BUILD=yes
+ BLDSHARED="true"
+ LDSHFLAGS="-set_version sgi1.0 -shared"
+ SONAMEFLAG="-soname "
+ SHLD="\${LD}"
+ if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
- AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
- ;;
- *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
- case "$host_os" in
- *irix6*) AC_DEFINE(IRIX6,1,[Whether the host os is irix6])
- ;;
- esac
- ATTEMPT_WRAP32_BUILD=yes
- BLDSHARED="true"
- LDSHFLAGS="-set_version sgi1.0 -shared"
- SONAMEFLAG="-soname "
- SHLD="\${LD}"
- if test "${GCC}" = "yes"; then
- PICFLAG="-fPIC"
- else
- PICFLAG="-KPIC"
- fi
- AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
- ;;
- *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
- BLDSHARED="true"
- LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
- DYNEXP="-Wl,-brtl,-bexpall"
- PICFLAG="-O2"
- if test "${GCC}" != "yes"; then
- ## for funky AIX compiler using strncpy()
- CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
- fi
+ else
+ PICFLAG="-KPIC"
+ fi
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+ ;;
+ *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
+ DYNEXP="-Wl,-brtl,-bexpall"
+ PICFLAG="-O2"
+ if test "${GCC}" != "yes"; then
+ ## for funky AIX compiler using strncpy()
+ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
+ fi
- AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
- ;;
- *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
- SHLIBEXT="sl"
- # Use special PIC flags for the native HP-UX compiler.
- if test $ac_cv_prog_cc_Ae = yes; then
- BLDSHARED="true"
- SHLD="/usr/bin/ld"
- LDSHFLAGS="-B symbolic -b -z"
- SONAMEFLAG="+h "
- PICFLAG="+z"
- fi
- DYNEXP="-Wl,-E"
- AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
- ;;
- *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
- BLDSHARED="true"
- LDSHFLAGS="-shared"
- SONAMEFLAG="-Wl,-soname,"
- PICFLAG="-fPIC"
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
+ AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
+ ;;
+ *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
+ SHLIBEXT="sl"
+ # Use special PIC flags for the native HP-UX compiler.
+ if test $ac_cv_prog_cc_Ae = yes; then
BLDSHARED="true"
- LDSHFLAGS="-shared"
- SONAMEFLAG="-Wl,-soname,"
- PICFLAG="-KPIC"
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
- case "$host" in
- *-univel-*) if [ test "$GCC" != yes ]; then
- AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
- fi
- LDSHFLAGS="-G"
- DYNEXP="-Bexport"
- ;;
- *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
- esac
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ SHLD="/usr/bin/ld"
+ LDSHFLAGS="-B symbolic -b -z"
+ SONAMEFLAG="+h "
+ PICFLAG="+z"
+ fi
+ DYNEXP="-Wl,-E"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
+ ;;
+ *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
+ BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
+ BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-KPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
+ case "$host" in
+ *-univel-*) if [ test "$GCC" != yes ]; then
+ AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
+ fi
+ LDSHFLAGS="-G"
+ DYNEXP="-Bexport"
;;
+ *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
+ esac
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
- *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
- if [ test "$GCC" != yes ]; then
- AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
- fi
- LDSHFLAGS="-G"
- AC_DEFINE(STAT_ST_BLOCKSIZE,512)
- ;;
- *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
- BLDSHARED="false"
- LDSHFLAGS=""
- ;;
- *)
- 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])
-fi
+ *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
+ if [ test "$GCC" != yes ]; then
+ AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
+ fi
+ LDSHFLAGS="-G"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+ *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
+ BLDSHARED="false"
+ LDSHFLAGS=""
+ ;;
+ *)
+ 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])
#######################################################
# test whether building a shared library actually works
diff --git a/source4/build/smb_build/output.pl b/source4/build/smb_build/output.pl
index 524972f454..99a0eddb43 100644
--- a/source4/build/smb_build/output.pl
+++ b/source4/build/smb_build/output.pl
@@ -211,6 +211,9 @@ sub _generate_binaries($)
push(@LINK_FLAGS,@{$CTX->{DEPEND}{EXT_LIBS}{$elem}{LDFLAGS}});
}
+ # Export all symbols...
+ push(@LINK_FLAGS,"\@DYNEXP\@");
+
#
# set the lists
#