1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

r1037: Always export all symbols

(This used to be commit 0209dce1eb9c62c0e454906d9ba015d8c5f5abf6)
This commit is contained in:
Jelmer Vernooij 2004-06-05 20:33:11 +00:00 committed by Gerald (Jerry) Carter
parent bd54b891c1
commit 7aa5a5de59
2 changed files with 151 additions and 154 deletions

View File

@ -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,"
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
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])
BLDSHARED="true"
LDSHFLAGS="-shared"
SONAMEFLAG="-Wl,-soname,"
else
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)
;;
## ${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"
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
*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)
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])
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"
;;
*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
*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])
#######################################################
# test whether building a shared library actually works

View File

@ -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
#