]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
enabled built in popt if system doesn't have it
authorAndrew Tridgell <tridge@samba.org>
Wed, 2 May 2007 19:21:14 +0000 (05:21 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 2 May 2007 19:21:14 +0000 (05:21 +1000)
(This used to be ctdb commit 30c8d69267a78e1d3dea0fcc936ee2939bb7a373)

ctdb/Makefile.in
ctdb/configure.ac
ctdb/lib/popt/libpopt.m4
ctdb/lib/popt/samba.m4

index 75fb3cb1cf2345faf5f7f895cbd0db51a285be8e..5cf0c58e3a86b449cd1d434c8d6e68f27f59641c 100644 (file)
@@ -8,16 +8,20 @@ includedir = @includedir@
 libdir = @libdir@
 bindir = @bindir@
 localstatedir = @localstatedir@
-VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@
+VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
 srcdir = @srcdir@
 builddir = @builddir@
 EXTRA_OBJ=@EXTRA_OBJ@
 
+POPT_LIBS = @POPT_LIBS@
+POPT_CFLAGS = @POPT_CFLAGS@
+POPT_OBJ = @POPT_OBJ@
+
 CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
        -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
-       -DVARDIR=\"$(localstatedir)\" -DUSE_MMAP=1 @CFLAGS@
+       -DVARDIR=\"$(localstatedir)\" -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
 
-LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ -lpopt @INFINIBAND_LIBS@
+LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@
 
 EVENTS_OBJ = lib/events/events.o lib/events/events_standard.o \
        lib/events/events_signal.o lib/events/events_timed.o
@@ -32,7 +36,7 @@ CTDB_COMMON_OBJ = common/ctdb.o common/ctdb_daemon.o common/ctdb_client.o \
 
 CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
 
-CTDB_OBJ = $(CTDB_COMMON_OBJ) $(CTDB_TCP_OBJ)
+CTDB_OBJ = $(CTDB_COMMON_OBJ) $(CTDB_TCP_OBJ) $(POPT_OBJ)
 
 OBJS = @TDB_OBJ@ @TALLOC_OBJ@ @LIBREPLACEOBJ@ @INFINIBAND_WRAPPER_OBJ@ $(EXTRA_OBJ) $(EVENTS_OBJ) $(CTDB_OBJ) $(UTIL_OBJ)
 
index 784eef2190640cf8fdd94018d39df357f0714318..b65cec58b2b258adf52030e95ba576c907045f63 100644 (file)
@@ -24,6 +24,7 @@ AC_CONFIG_HEADER(config.h)
 
 EXTRA_OBJ=""
 
+m4_include(libpopt.m4)
 m4_include(libtalloc.m4)
 m4_include(libtdb.m4)
 m4_include(ib/config.m4)
index b3e2df519b4409bdb41ab8939ae6312caba05772..79980d1d6b504344330e1ce0d4e76ff5c4a7f698 100644 (file)
@@ -37,7 +37,7 @@ if test x"$INCLUDED_POPT" != x"no"; then
         if test x"$poptdir" = "x"; then
                AC_MSG_ERROR([cannot find popt source in $poptpaths])
        fi
-       POPTOBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
-       AC_SUBST(POPTOBJ)
+       POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
+       AC_SUBST(POPT_OBJ)
        AC_CHECK_HEADERS([float.h alloca.h])
 fi
index 86a79f1c6a216e12212f0f1016c1175a1c5f0166..b6e939f5a0421e56fe5ec494476ba52b436a62f1 100644 (file)
@@ -1,6 +1,6 @@
 m4_include(lib/popt/libpopt.m4)
 
-if test x"$POPTOBJ" = "x"; then
+if test x"$POPT_OBJ" = "x"; then
        SMB_EXT_LIB(LIBPOPT, [${POPT_LIBS}])
        SMB_ENABLE(LIBPOPT,YES)
 else