Rev 235: enabled built in popt if system doesn't have it in	http://samba.org/~tridge/ctdb ------------------------------------------------------------
revno: 235
revision-id: tridge@samba.org-20070502192114-f33n5eur6vzyi8xt
parent: tridge@samba.org-20070502051111-kol2q81ec0oz8o1k
committer: Andrew Tridgell 
branch nick: tridge
timestamp: Thu 2007-05-03 05:21:14 +1000
message:
  enabled built in popt if system doesn't have it
modified:
  Makefile.in                    makefile.in-20061117234101-o3qt14umlg9en8z0-1
  configure.ac                   configure.ac-20061117234101-o3qt14umlg9en8z0-10
  lib/popt/libpopt.m4            libpopt.m4-20070125040942-nz1rv4zkr26q77uw-7
  lib/popt/samba.m4              samba.m4-20070125040942-nz1rv4zkr26q77uw-14
=== modified file 'Makefile.in'
--- a/Makefile.in	2007-05-02 03:25:45 +0000
+++ b/Makefile.in	2007-05-02 19:21:14 +0000
@@ -8,16 +8,20 @@
 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_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)
 

=== modified file 'configure.ac'
--- a/configure.ac	2007-04-10 02:51:54 +0000
+++ b/configure.ac	2007-05-02 19:21:14 +0000
@@ -24,6 +24,7 @@
 
 EXTRA_OBJ=""
 
+m4_include(libpopt.m4)
 m4_include(libtalloc.m4)
 m4_include(libtdb.m4)
 m4_include(ib/config.m4)

=== modified file 'lib/popt/libpopt.m4'
--- a/lib/popt/libpopt.m4	2007-01-25 04:10:40 +0000
+++ b/lib/popt/libpopt.m4	2007-05-02 19:21:14 +0000
@@ -37,7 +37,7 @@
         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

=== modified file 'lib/popt/samba.m4'
--- a/lib/popt/samba.m4	2007-01-25 04:10:40 +0000
+++ b/lib/popt/samba.m4	2007-05-02 19:21:14 +0000
@@ -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

