summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/cmdline/config.mk4
-rw-r--r--source4/lib/ldb/config.mk2
-rw-r--r--source4/lib/popt/samba.m428
-rw-r--r--source4/lib/registry/config.mk8
-rw-r--r--source4/lib/replace/config.mk2
-rw-r--r--source4/lib/replace/libreplace.m45
-rw-r--r--source4/lib/replace/samba.m427
7 files changed, 15 insertions, 61 deletions
diff --git a/source4/lib/cmdline/config.mk b/source4/lib/cmdline/config.mk
index 33607636a9..5c47be66e6 100644
--- a/source4/lib/cmdline/config.mk
+++ b/source4/lib/cmdline/config.mk
@@ -1,12 +1,12 @@
[SUBSYSTEM::LIBCMDLINE_CREDENTIALS]
PRIVATE_PROTO_HEADER = credentials.h
OBJ_FILES = credentials.o
-PUBLIC_DEPENDENCIES = CREDENTIALS POPT_EXT
+PUBLIC_DEPENDENCIES = CREDENTIALS LIBPOPT
[SUBSYSTEM::POPT_SAMBA]
PUBLIC_HEADERS = popt_common.h
OBJ_FILES = popt_common.o
-PUBLIC_DEPENDENCIES = POPT_EXT
+PUBLIC_DEPENDENCIES = LIBPOPT
[SUBSYSTEM::POPT_CREDENTIALS]
PRIVATE_PROTO_HEADER = popt_credentials.h
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 0ebd51192c..8dff4df2dc 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -200,7 +200,7 @@ OBJ_FILES = \
[SUBSYSTEM::LIBLDB_CMDLINE]
OBJ_FILES= \
tools/cmdline.o
-PUBLIC_DEPENDENCIES = ldb LIBSAMBA-UTIL POPT_EXT POPT_SAMBA POPT_CREDENTIALS
+PUBLIC_DEPENDENCIES = ldb LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS
PRIVATE_DEPENDENCIES = gensec
# End SUBSYSTEM LIBLDB_CMDLINE
################################################
diff --git a/source4/lib/popt/samba.m4 b/source4/lib/popt/samba.m4
index cd0de5e826..d940075f86 100644
--- a/source4/lib/popt/samba.m4
+++ b/source4/lib/popt/samba.m4
@@ -1,27 +1,3 @@
-SAVE_LIBS="$LIBS"
-SAVE_CFLAGS="$CFLAGS"
-SAVE_CPPFLAGS="$CPPFLAGS"
-SAVE_LDFLAGS="$LDFLAGS"
-
-LIBS=""
-CFLAGS=""
-CPPFLAGS=""
-LDFLAGS=""
-
m4_include(lib/popt/libpopt.m4)
-
-POPT_EXT_LIBS="$LIBS $POPTOBJ"
-POPT_EXT_CFLAGS="$CFLAGS"
-POPT_EXT_CPPFLAGS="$CPPFLAGS"
-POPT_EXT_LDFLAGS="$LDFLAGS"
-
-LIBS="$SAVE_LIBS"
-CFLAGS="$SAVE_CFLAGS"
-CPPFLAGS="$SAVE_CPPFLAGS"
-LDFLAGS="$SAVE_LDFLAGS"
-
-SMB_EXT_LIB(POPT_EXT,
- [${POPT_EXT_LIBS}],
- [${POPT_EXT_CFLAGS}],
- [${POPT_EXT_CPPFLAGS}],
- [${POPT_EXT_LDFLAGS}])
+SMB_SUBSYSTEM(LIBPOPT,
+ [lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o lib/popt/popthelp.o lib/popt/poptparse.o], [], [-I$srcdir/lib/popt])
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index d979f9fb99..89a77c231e 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -110,7 +110,7 @@ PUBLIC_HEADERS = registry.h
INSTALLDIR = BINDIR
OBJ_FILES = tools/regdiff.o
PRIVATE_DEPENDENCIES = \
- LIBSAMBA-CONFIG registry POPT_EXT POPT_SAMBA POPT_CREDENTIALS
+ LIBSAMBA-CONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS
MANPAGE = man/regdiff.1
# End BINARY regdiff
################################################
@@ -121,7 +121,7 @@ MANPAGE = man/regdiff.1
INSTALLDIR = BINDIR
OBJ_FILES = tools/regpatch.o
PRIVATE_DEPENDENCIES = \
- LIBSAMBA-CONFIG registry POPT_EXT POPT_SAMBA POPT_CREDENTIALS
+ LIBSAMBA-CONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS
MANPAGE = man/regpatch.1
# End BINARY regpatch
################################################
@@ -132,7 +132,7 @@ MANPAGE = man/regpatch.1
INSTALLDIR = BINDIR
OBJ_FILES = tools/regshell.o
PRIVATE_DEPENDENCIES = \
- LIBSAMBA-CONFIG POPT_EXT registry POPT_SAMBA POPT_CREDENTIALS \
+ LIBSAMBA-CONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS \
SMBREADLINE
MANPAGE = man/regshell.1
# End BINARY regshell
@@ -144,7 +144,7 @@ MANPAGE = man/regshell.1
INSTALLDIR = BINDIR
OBJ_FILES = tools/regtree.o
PRIVATE_DEPENDENCIES = \
- LIBSAMBA-CONFIG POPT_EXT registry POPT_SAMBA POPT_CREDENTIALS
+ LIBSAMBA-CONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS
MANPAGE = man/regtree.1
# End BINARY regtree
################################################
diff --git a/source4/lib/replace/config.mk b/source4/lib/replace/config.mk
index a05db5abad..2482c69636 100644
--- a/source4/lib/replace/config.mk
+++ b/source4/lib/replace/config.mk
@@ -14,6 +14,6 @@ OBJ_FILES = replace.o \
snprintf.o \
dlfcn.o \
getpass.o
-PUBLIC_DEPENDENCIES = REPLACE_READDIR REPLACE_EXT
+PUBLIC_DEPENDENCIES = REPLACE_READDIR
# End SUBSYSTEM LIBREPLACE
##############################
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index abbd63db7a..7136a18029 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -139,7 +139,12 @@ if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
fi
dnl dummies provided by dlfcn.c if not available
+save_LIBS="$LIBS"
+LIBS=""
AC_SEARCH_LIBS(dlopen, dl)
+LIBDL="$LIBS"
+AC_SUBST(LIBDL)
+LIBS="$save_LIBS"
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose)
diff --git a/source4/lib/replace/samba.m4 b/source4/lib/replace/samba.m4
deleted file mode 100644
index 6183b7e28f..0000000000
--- a/source4/lib/replace/samba.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-SAVE_LIBS="$LIBS"
-SAVE_CFLAGS="$CFLAGS"
-SAVE_CPPFLAGS="$CPPFLAGS"
-SAVE_LDFLAGS="$LDFLAGS"
-
-LIBS=""
-CFLAGS=""
-CPPFLAGS=""
-LDFLAGS=""
-
-m4_include(libreplace.m4)
-
-REPLACE_EXT_LIBS="$LIBS"
-REPLACE_EXT_CFLAGS="$CFLAGS"
-REPLACE_EXT_CPPFLAGS="$CPPFLAGS"
-REPLACE_EXT_LDFLAGS="$LDFLAGS"
-
-LIBS="$SAVE_LIBS"
-CFLAGS="$SAVE_CFLAGS"
-CPPFLAGS="$SAVE_CPPFLAGS"
-LDFLAGS="$SAVE_LDFLAGS"
-
-SMB_EXT_LIB(REPLACE_EXT,
- [${REPLACE_EXT_LIBS}],
- [${REPLACE_EXT_CFLAGS}],
- [${REPLACE_EXT_CPPFLAGS}],
- [${REPLACE_EXT_LDFLAGS}])