summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/popt.m4
blob: 7c7969fa9de4a1073443d54c2a0119590641ad97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)