Initial step at cleaning and splitting up configure.in.
[ira/wip.git] / source / lib / popt / config.m4
1 #################################################
2 # Check to see if we should use the included popt 
3
4 AC_ARG_WITH(included-popt,
5 [  --with-included-popt    use bundled popt library, not from system],
6
7   case "$withval" in
8         yes)
9                 INCLUDED_POPT=yes
10                 ;;
11         no)
12                 INCLUDED_POPT=no
13                 ;;
14   esac ],
15 )
16 if test x"$INCLUDED_POPT" != x"yes"; then
17     AC_CHECK_LIB(popt, poptGetContext,
18                  INCLUDED_POPT=no, INCLUDED_POPT=yes)
19 fi
20
21 AC_MSG_CHECKING(whether to use included popt)
22 if test x"$INCLUDED_POPT" = x"yes"; then
23     AC_MSG_RESULT(yes)
24     BUILD_POPT='$(POPT_OBJS)'
25     FLAGS1="-I$srcdir/popt"
26 else
27     AC_MSG_RESULT(no)
28     LIBS="$LIBS -lpopt"
29 fi
30 AC_SUBST(BUILD_POPT)
31 AC_SUBST(FLAGS1)