From bbb725a8b6ac412c44495f59bea4afdefef885f4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Sep 2006 23:48:05 +0000 Subject: r18110: renamed config.m4 for popt (This used to be commit 495fcdddb2ead6f2cd6d1479cade1f025997f8ba) --- source4/lib/popt/libpopt.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 source4/lib/popt/libpopt.m4 (limited to 'source4/lib/popt/libpopt.m4') diff --git a/source4/lib/popt/libpopt.m4 b/source4/lib/popt/libpopt.m4 new file mode 100644 index 0000000000..19b99f2bd0 --- /dev/null +++ b/source4/lib/popt/libpopt.m4 @@ -0,0 +1,14 @@ +dnl find the popt sources. This is meant to work both for +dnl popt standalone builds, and builds of packages using popt +poptdir="" +for d in "$srcdir" "$srcdir/lib/popt" "$srcdir/popt" "$srcdir/../popt"; do + if test -f "$d/popt.c"; then + poptdir="$d" + AC_SUBST(poptdir) + break; + fi +done +POPTOBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o" +AC_SUBST(POPTOBJ) + +AC_CHECK_HEADERS([float.h alloca.h]) -- cgit From d52b2fb7c4a7f2b2a700204236f29bbb97b0f1d6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 6 Sep 2006 10:50:52 +0000 Subject: r18157: Fix building with external popt. (This used to be commit 72e71de3e591091d71e43a3c9efd1cafd82d6c89) --- source4/lib/popt/libpopt.m4 | 49 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) (limited to 'source4/lib/popt/libpopt.m4') diff --git a/source4/lib/popt/libpopt.m4 b/source4/lib/popt/libpopt.m4 index 19b99f2bd0..b6b8808a4e 100644 --- a/source4/lib/popt/libpopt.m4 +++ b/source4/lib/popt/libpopt.m4 @@ -1,14 +1,39 @@ -dnl find the popt sources. This is meant to work both for -dnl popt standalone builds, and builds of packages using popt -poptdir="" -for d in "$srcdir" "$srcdir/lib/popt" "$srcdir/popt" "$srcdir/../popt"; do - if test -f "$d/popt.c"; then - poptdir="$d" - AC_SUBST(poptdir) - break; +dnl Check to see if we should use the included popt + +INCLUDED_POPT=auto +AC_ARG_WITH(included-popt, +[ --with-included-popt use bundled popt library, not from system], +[ INCLUDED_POPT=$withval ]) + +AC_SUBST(POPT_LIBS) +AC_SUBST(POPT_CFLAGS) + +if test x"$INCLUDED_POPT" != x"yes"; then + AC_CHECK_HEADERS(popt.h) + AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS="-lpopt" ]) + if test x"$ac_cv_header_popt_h" = x"no"; then + INCLUDED_POPT=yes + POPT_CFLAGS="" + else + INCLUDED_POPT=no fi -done -POPTOBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o" -AC_SUBST(POPTOBJ) +fi -AC_CHECK_HEADERS([float.h alloca.h]) +AC_MSG_CHECKING(whether to use included popt) +AC_MSG_RESULT($INCLUDED_POPT) +if test x"$INCLUDED_POPT" != x"no"; then + dnl find the popt sources. This is meant to work both for + dnl popt standalone builds, and builds of packages using popt + poptdir="" + for d in "$srcdir" "$srcdir/lib/popt" "$srcdir/popt" "$srcdir/../popt"; do + if test -f "$d/popt.c"; then + poptdir="$d" + POPT_CFLAGS="-I$d" + AC_SUBST(poptdir) + break + fi + done + POPTOBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o" + AC_SUBST(POPTOBJ) + AC_CHECK_HEADERS([float.h alloca.h]) +fi -- cgit From 2a3ebd9a7e81e48b9e0975a471b301918156c5c3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Sep 2006 19:36:26 +0000 Subject: r18537: after testing for poptGetContext, if the test fails, don't try to use the external popt (this affects hpisgr8) (This used to be commit 9afbd60f91bca84dd645372ed7139e42f712384d) --- source4/lib/popt/libpopt.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/popt/libpopt.m4') diff --git a/source4/lib/popt/libpopt.m4 b/source4/lib/popt/libpopt.m4 index b6b8808a4e..f0c683ce57 100644 --- a/source4/lib/popt/libpopt.m4 +++ b/source4/lib/popt/libpopt.m4 @@ -11,7 +11,7 @@ AC_SUBST(POPT_CFLAGS) if test x"$INCLUDED_POPT" != x"yes"; then AC_CHECK_HEADERS(popt.h) AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS="-lpopt" ]) - if test x"$ac_cv_header_popt_h" = x"no"; then + if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then INCLUDED_POPT=yes POPT_CFLAGS="" else -- cgit From e84ee4a6fd3bb1cc0b92de89f4568e0865ccac0a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 18 Sep 2006 01:31:57 +0000 Subject: r18600: - fix shell syntax in tests for libraries - add library test for libpopt (This used to be commit 13878b7e7ec65b21df954f83afc0e9ceb73e44a0) --- source4/lib/popt/libpopt.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/popt/libpopt.m4') diff --git a/source4/lib/popt/libpopt.m4 b/source4/lib/popt/libpopt.m4 index f0c683ce57..b3e2df519b 100644 --- a/source4/lib/popt/libpopt.m4 +++ b/source4/lib/popt/libpopt.m4 @@ -25,7 +25,8 @@ if test x"$INCLUDED_POPT" != x"no"; then dnl find the popt sources. This is meant to work both for dnl popt standalone builds, and builds of packages using popt poptdir="" - for d in "$srcdir" "$srcdir/lib/popt" "$srcdir/popt" "$srcdir/../popt"; do + poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt" + for d in $poptpaths; do if test -f "$d/popt.c"; then poptdir="$d" POPT_CFLAGS="-I$d" @@ -33,6 +34,9 @@ if test x"$INCLUDED_POPT" != x"no"; then break fi done + 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) AC_CHECK_HEADERS([float.h alloca.h]) -- cgit From 42cf31f3c695913b68500302ebb2dc6cd0df4464 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 30 Apr 2007 10:49:42 +0000 Subject: r22600: Update bzr ignores, put right version in .pc files, prepare for support of system versions of tdb, talloc. (This used to be commit 9b991ce9ca28b3d88c778305ec5f681506162637) --- source4/lib/popt/libpopt.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/popt/libpopt.m4') diff --git a/source4/lib/popt/libpopt.m4 b/source4/lib/popt/libpopt.m4 index b3e2df519b..79980d1d6b 100644 --- a/source4/lib/popt/libpopt.m4 +++ b/source4/lib/popt/libpopt.m4 @@ -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 -- cgit