summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-22 05:27:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:26 -0500
commit787dbed6c3f8000307da77ef93dceefdd7d390ea (patch)
tree20a6db0b6e30da4731db304f7a5b69e43167a7ae /source4
parent66758e092b36cc1a3dc78adf42366d1b71f28eca (diff)
downloadsamba-787dbed6c3f8000307da77ef93dceefdd7d390ea.tar.gz
samba-787dbed6c3f8000307da77ef93dceefdd7d390ea.tar.bz2
samba-787dbed6c3f8000307da77ef93dceefdd7d390ea.zip
r17696: attempt to allow ldb to use an external popt directory, so we can
point it at the popt sources in the samba source tree when building in the build farm (This used to be commit 13e14e0f8decbb7f3bafed9d980950d825a985e6)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/Makefile.in5
-rw-r--r--source4/lib/ldb/popt.m429
2 files changed, 32 insertions, 2 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index fce9d21fca..dc5b0630b0 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -8,13 +8,14 @@ includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
mandir = @mandir@
-VPATH = @srcdir@:@srcdir@/..
+VPATH = @srcdir@:@srcdir@/..:@POPTDIR@
srcdir = @srcdir@
builddir = @builddir@
WITH_GCOV = @WITH_GCOV@
WITH_LDAP = @WITH_LDAP@
SLAPD = @SLAPD@
WITH_SQLITE3 = @WITH_SQLITE3@
+POPTOBJ = @POPTOBJ@
ifeq ($(WITH_LDAP),yes)
OPENLDAP_PREFIX=/usr
@@ -71,7 +72,7 @@ MODULES_OBJ=$(MODDIR)/operational.o $(MODDIR)/schema.o $(MODDIR)/rdn_name.o \
$(MODDIR)/objectclass.o \
$(MODDIR)/paged_results.o $(MODDIR)/sort.o $(MODDIR)/asq.o
-OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LDAP_OBJ) $(LDB_SQLITE3_OBJ)
+OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LDAP_OBJ) $(LDB_SQLITE3_OBJ) $(POPTOBJ)
LDB_LIB = lib/libldb.a
diff --git a/source4/lib/ldb/popt.m4 b/source4/lib/ldb/popt.m4
new file mode 100644
index 0000000000..7c7969fa9d
--- /dev/null
+++ b/source4/lib/ldb/popt.m4
@@ -0,0 +1,29 @@
+#################################################
+# Check to see if we should use an external src dir
+
+POPTDIR=""
+AC_ARG_WITH(popt-src,
+[ --with-popt-src set location of popt source],
+[
+case "$withval" in
+ yes|no)
+ AC_MSG_ERROR([--with-popt-src called without argument])
+ ;;
+ *)
+ POPTDIR="$withval"
+ ;;
+esac ],
+)
+
+if test x"$POPTDIR" = x; then
+ AC_CHECK_HEADERS(popt.h)
+ AC_CHECK_LIB(popt, poptGetContext)
+else
+ POPTOBJ="findme.o popt.o poptconfig.o popthelp.o poptparse.o"
+ CFLAGS="$CFLAGS -I$POPTDIR"
+fi
+
+AC_CHECK_HEADERS([float.h alloca.h])
+AC_CHECK_FUNCS(strerror)
+AC_SUBST(POPTOBJ)
+AC_SUBST(POPTDIR)