summaryrefslogtreecommitdiff
path: root/source4/lib/popt/config.m4
blob: d48cbe1dff42b53ed7f20dccd1d19f5c9a253b41 (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
30
31
32
33
34
35
36
37
38
39
#################################################
# 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],
[ 
case "$withval" in
	yes)
		INCLUDED_POPT=yes
		;;
        no)
        	INCLUDED_POPT=no
		;;
esac ],
)
if test x"$INCLUDED_POPT" != x"yes"; then
	AC_CHECK_HEADERS(popt.h)
	AC_CHECK_LIB_EXT(popt, TMP_LIBPOPT_LIBS, poptGetContext, [], [], INCLUDED_POPT=no)
	if test x"$ac_cv_header_popt_h" = x"no"; then
		INCLUDED_POPT=yes
		TMP_LIBPOPT_LIBS=""
	fi
fi

AC_MSG_CHECKING(whether to use included popt)
if test x"$INCLUDED_POPT" != x"no"; then
	CPPFLAGS="$CPPFLAGS -I$srcdir/lib/popt"
	SMB_SUBSYSTEM(LIBPOPT,
		[lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o lib/popt/popthelp.o lib/popt/poptparse.o], [])

	AC_MSG_RESULT(yes)
else
	SMB_EXT_LIB(LIBPOPT, [${TMP_LIBPOPT_LIBS}])
	SMB_ENABLE(LIBPOPT,YES)
	AC_MSG_RESULT(no)
fi

AC_CHECK_HEADERS([float.h alloca.h])