summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-06 02:35:46 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:27 +0100
commit26c3cad60f4c04231efb7ff67ce77c5e3d701b58 (patch)
tree9d27b33e26a4f5700195061b361f54e670dc48b1 /source4/lib
parentdd66e34d416a95c1a1d36b032c72f781b14a13b7 (diff)
downloadsamba-26c3cad60f4c04231efb7ff67ce77c5e3d701b58.tar.gz
samba-26c3cad60f4c04231efb7ff67ce77c5e3d701b58.tar.bz2
samba-26c3cad60f4c04231efb7ff67ce77c5e3d701b58.zip
r25852: Move SHLIBEXT determination into a test as well.
(This used to be commit aaaed5edc06f3055794e55a8038dbbdac47ce5b6)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/configure.ac4
-rw-r--r--source4/lib/replace/libreplace_ld.m418
2 files changed, 19 insertions, 3 deletions
diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac
index ffa3f4f750..d6f6a4996e 100644
--- a/source4/lib/ldb/configure.ac
+++ b/source4/lib/ldb/configure.ac
@@ -38,9 +38,6 @@ AC_CHECK_HEADERS(stdint.h dlfcn.h)
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_SUBST(EXTRA_OBJ)
AC_LD_EXPORT_DYNAMIC
AC_LD_PICFLAG
AC_LD_SHLDFLAGS
+AC_LD_SHLIBEXT
m4_include(libldb.m4)
AC_OUTPUT(Makefile ldb.pc)
diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4
index 07dd2db231..7f85fb4ccc 100644
--- a/source4/lib/replace/libreplace_ld.m4
+++ b/source4/lib/replace/libreplace_ld.m4
@@ -101,3 +101,21 @@ AC_DEFUN([AC_LD_SHLDFLAGS],
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)
+])