r18108: move tdb to use the same build methods
[vlendec/samba-autobuild/.git] / source4 / lib / ldb / popt.m4
1 #################################################
2 # Check to see if we should use an external src dir
3
4 POPTDIR=""
5 AC_ARG_WITH(popt-src,
6 [  --with-popt-src    set location of popt source],
7 [
8 case "$withval" in
9         yes|no)
10                 AC_MSG_ERROR([--with-popt-src called without argument])
11                 ;;
12         *)
13                 POPTDIR="$withval"
14                 ;;
15 esac ],
16 )
17
18 if test x"$POPTDIR" = x; then
19         AC_CHECK_HEADERS(popt.h)
20         AC_CHECK_LIB(popt, poptGetContext)
21 else
22         EXTRA_OBJ="$EXTRA_OBJ findme.o popt.o poptconfig.o popthelp.o poptparse.o"
23         CFLAGS="$CFLAGS -I$POPTDIR"
24 fi
25
26 AC_CHECK_HEADERS([float.h alloca.h])
27 AC_CHECK_FUNCS(strerror)
28 AC_SUBST(POPTDIR)