Author: jelmer
Date: 2007-11-06 02:35:46 +0000 (Tue, 06 Nov 2007)
New Revision: 25852

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25852

Log:
Move SHLIBEXT determination into a test as well.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/build/m4/check_ld.m4
   branches/SAMBA_4_0/source/lib/ldb/configure.ac
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4      2007-11-06 02:17:05 UTC 
(rev 25851)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4      2007-11-06 02:35:46 UTC 
(rev 25852)
@@ -18,11 +18,8 @@
 AC_SUBST(LD)
 AC_SUBST(LDFLAGS)
 AC_SUBST(SHLD)
-AC_SUBST(SHLD_FLAGS)
 AC_SUBST(SHLD_UNDEF_FLAGS)
-AC_SUBST(SHLIBEXT)
 AC_SUBST(SONAMEFLAG)
-AC_SUBST(PICFLAG)
 
 # Assume non-shared by default and override below
 # these are the defaults, good for lots of systems
@@ -31,7 +28,6 @@
 BLDSHARED="false"
 LD="${CC}"
 SHLD="${CC}"
-SHLIBEXT="so"
 SONAMEFLAG=""
 PICFLAG=""
 
@@ -101,10 +97,8 @@
                        BLDSHARED="true" # I hope this is correct
                fi
                if test "$host_cpu" = "ia64"; then
-                       SHLIBEXT="so"
                        LDFLAGS="$LDFLAGS 
-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
                else
-                       SHLIBEXT="sl"
                        LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib:/usr/lib"
                fi
                ;;
@@ -119,7 +113,6 @@
                ;;
        *darwin*)
                BLDSHARED="true"
-               SHLIBEXT="dylib"
                ;;
 esac
 
@@ -140,6 +133,7 @@
 AC_LD_PICFLAG
 AC_LD_EXPORT_DYNAMIC
 AC_LD_SHLDFLAGS
+AC_LD_SHLIBEXT
 
 AC_ARG_ENABLE(shared,
 [  --disable-shared        Disable testing for building shared libraries],

Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/configure.ac      2007-11-06 02:17:05 UTC 
(rev 25851)
+++ branches/SAMBA_4_0/source/lib/ldb/configure.ac      2007-11-06 02:35:46 UTC 
(rev 25852)
@@ -38,9 +38,6 @@
 AC_CONFIG_HEADER(include/config.h)
 AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen]))
 
-SHLIBEXT="so" # Should be set based on OS later on
-AC_SUBST(SHLIBEXT)
-
 AC_DEFINE_UNQUOTED(LDB_MODULESDIR, LIBDIR "/ldb" , [Modules directory] )
 AC_SUBST(LDB_MODULESDIR)
 
@@ -74,6 +71,7 @@
 AC_LD_EXPORT_DYNAMIC
 AC_LD_PICFLAG
 AC_LD_SHLDFLAGS
+AC_LD_SHLIBEXT
 
 m4_include(libldb.m4)
 AC_OUTPUT(Makefile ldb.pc)

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4      2007-11-06 
02:17:05 UTC (rev 25851)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4      2007-11-06 
02:35:46 UTC (rev 25852)
@@ -101,3 +101,21 @@
 
        AC_SUBST(SHLD_FLAGS)
 ])
+
+AC_DEFUN([AC_LD_SHLIBEXT],
+[
+       SHLIBEXT="so"
+       case "$host_os" in
+               *hpux*)
+                       if test "$host_cpu" = "ia64"; then
+                               SHLIBEXT="so"
+                       else
+                               SHLIBEXT="sl"
+                       fi
+               ;;
+               *darwin*)
+                       SHLIBEXT="dylib"
+               ;;
+       esac
+       AC_SUBST(SHLIBEXT)
+])

Reply via email to