summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in55
1 files changed, 29 insertions, 26 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 516104ffd7..1bf8576097 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -613,17 +613,24 @@ BLDSHARED="false"
# and these are for particular systems
case "$host_os" in
*linux*) AC_DEFINE(LINUX)
- BLDSHARED="true"
+ BLDSHARED="true"
+ LDSHFLAGS="-shared"
+ PICFLAG="-fPIC"
;;
*solaris*) AC_DEFINE(SUNOS5)
- LDSHFLAGS="-G"
- BLDSHARED="true"
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ PICFLAG="-KPIC -xO4"
;;
*sunos*) AC_DEFINE(SUNOS4)
- LDSHFLAGS=""
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-h,\$@ -G"
+ PICFLAG="-KPIC -O2" # Is this correct for SunOS
;;
*bsd*) LDSHFLAGS="-shared -Bshareable"
BLDSHARED="true"
+ LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ PICFLAG="-fPIC -O2"
;;
*irix*) AC_DEFINE(IRIX)
case "$host_os" in
@@ -631,19 +638,34 @@ case "$host_os" in
;;
esac
ATTEMPT_WRAP32_BUILD=yes
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ PICFLAG="-fPIC"
+ ;;
+ *aix*) AC_DEFINE(AIX)
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
+ PICFLAG="=O2 -qmaxmem=6000"
;;
- *aix*) AC_DEFINE(AIX);;
*hpux*) AC_DEFINE(HPUX)
SHLIBEXT="sl"
# Use special PIC flags for the native HP-UX compiler.
if test $ac_cv_prog_cc_Ae = yes; then
- LDSHFLAGS="-b"
+ BLDSHARED="true"
+ LDSHFLAGS="-b -z +h \$@"
PICFLAG="+z"
fi
;;
*qnx*) AC_DEFINE(QNX);;
- *osf*) AC_DEFINE(OSF1);;
+ *osf*) AC_DEFINE(OSF1)
+ BLDSHARED="true"
+ LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ PICFLAG="-fPIC"
+ ;;
*sco*) AC_DEFINE(SCO);;
+ *unixware*) AC_DEFINE(UNIXWARE)
+ BLDSHARED="true"
+ ;;
*next2*) AC_DEFINE(NEXT2);;
*dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);;
*sysv4*)
@@ -664,25 +686,6 @@ case "$host_os" in
;;
esac
-# try to work out how to produce PIC code with this compiler
-# We try -KPIC before -fPIC so that we handle UnixWare correctly.
-AC_PROG_CC_FLAG(KPIC)
-if test $ac_cv_prog_cc_KPIC = yes; then
- PICFLAG="-KPIC";
-fi
-if test x$PICFLAG = x; then
- AC_PROG_CC_FLAG(fPIC)
- if test $ac_cv_prog_cc_fPIC = yes; then
- PICFLAG="-fPIC";
- fi
-fi
-if test x$PICFLAG = x; then
- AC_PROG_CC_FLAG(Kpic)
- if test $ac_cv_prog_cc_Kpic = yes; then
- PICFLAG="-Kpic";
- fi
-fi
-
################
AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[