From a59706f721c70e9a4f78eb2296bb746b912ce9d0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 6 Sep 2006 01:36:02 +0000 Subject: r18121: Simplify m4 code, hopefully fix Samba4 build problems. (This used to be commit 1adf65b4d7c5d2d4f65d4b28575bdf2368a42139) --- source4/lib/replace/config.mk | 2 +- source4/lib/replace/libreplace.m4 | 5 +++++ source4/lib/replace/samba.m4 | 27 --------------------------- 3 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 source4/lib/replace/samba.m4 (limited to 'source4/lib/replace') 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}]) -- cgit