summaryrefslogtreecommitdiff
path: root/source4/lib/popt/config.m4
blob: 7532c5826e76dc05c39fad3773a3791e2d0e9043 (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
#################################################
# Check to see if we should use the included popt 

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_LIB(popt, poptGetContext,
	         INCLUDED_POPT=no, INCLUDED_POPT=yes)
fi

AC_MSG_CHECKING(whether to use included popt)
if test x"$INCLUDED_POPT" = x"yes"; then
    AC_MSG_RESULT(yes)
    BUILD_POPT='$(POPT_OBJS)'
    FLAGS1="-I$srcdir/popt"
else
    AC_MSG_RESULT(no)
    LIBS="$LIBS -lpopt"
fi
AC_SUBST(BUILD_POPT)
AC_SUBST(FLAGS1)