1 dnl Check to see if we should use the included popt
4 AC_ARG_WITH(included-popt,
5 [ --with-included-popt use bundled popt library, not from system],
6 [ INCLUDED_POPT=$withval ])
11 if test x"$INCLUDED_POPT" != x"yes"; then
12 AC_CHECK_HEADERS(popt.h)
13 AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS="-lpopt" ])
14 if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then
22 AC_MSG_CHECKING(whether to use included popt)
23 AC_MSG_RESULT($INCLUDED_POPT)
24 if test x"$INCLUDED_POPT" != x"no"; then
25 dnl find the popt sources. This is meant to work both for
26 dnl popt standalone builds, and builds of packages using popt
28 poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt $srcdir/../lib/popt"
29 for d in $poptpaths; do
30 if test -f "$d/popt.c"; then
37 if test x"$poptdir" = "x"; then
38 AC_MSG_ERROR([cannot find popt source in $poptpaths])
40 POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
42 AC_CHECK_HEADERS([float.h alloca.h])