diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 15 | ||||
-rw-r--r-- | source3/configure.in | 55 |
2 files changed, 36 insertions, 34 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 6319f6650d..72b5fdca4d 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -448,10 +448,9 @@ MAKEDIR = || exec false; \ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi @echo Compiling $*.c with @PICFLAG@ - @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< \ - -o $*.po.o + @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< -o $*.po @BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@.o - @mv $*.po.o $@ +# @mv $*.po.o $@ # this is for IRIX .c.po32: @@ -589,13 +588,13 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) @echo Linking shared library $@ @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) -bin/libsmbclient: $(LIBSMBCLIENT_PICOBJS) +libsmbclient: $(LIBSMBCLIENT_PICOBJS) -if [ $(BLDSHARED) = true ]; then \ - echo Linking libsmbclient shared library $@.@SHLIBEXT@; \ - $(LD) @LDSHFLAGS@ -o $@.@SHLIBEXT@ $(LIBSMBCLIENT_PICOBJS) $(LIBS); \ + echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@; \ + $(LD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ $(LIBSMBCLIENT_PICOBJS) $(LIBS); \ fi - @echo Linking libsmbclient non-shared library $@.a - -$(AR) -rc $@.a $(LIBSMBCLIENT_PICOBJS) + @echo Linking libsmbclient non-shared library bin/$@.a + -$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) bin/smbsh: $(SMBSH_OBJ) bin/.dummy @echo Linking $@ 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,[ |