summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2001-10-23 14:16:22 +0000
committerJim McDonough <jmcd@samba.org>2001-10-23 14:16:22 +0000
commitbe6edf50c4e76662cd80eab9d60182f2e4f02d24 (patch)
tree94b1de0f71446530fdbee48d46476b1742732897 /source3/configure.in
parentb0152aaea09a1d082ee90954cdc8512d22b8d8ae (diff)
downloadsamba-be6edf50c4e76662cd80eab9d60182f2e4f02d24.tar.gz
samba-be6edf50c4e76662cd80eab9d60182f2e4f02d24.tar.bz2
samba-be6edf50c4e76662cd80eab9d60182f2e4f02d24.zip
Add popt for parsing commandline options
(This used to be commit df34e11d84a6fe89dc6654eb10de0a49383e1dea)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 621c43be12..1de15c4333 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2476,6 +2476,36 @@ AC_SUBST(WINBIND_LTARGETS)
AC_SUBST(WINBIND_PAM_PROGS)
#################################################
+# Check to see if we should use the included popt
+
+AC_MSG_CHECKING(whether to use 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"no"; then
+ AC_CHECK_LIB(popt, poptGetContext, ,INCLUDED_POPT=yes)
+fi
+
+if test x"$INCLUDED_POPT" = x"yes"; then
+ AC_MSG_RESULT($srcdir/popt)
+ BUILD_POPT='$(POPT_OBJS)'
+ CFLAGS="$CFLAGS -I$srcdir/popt"
+else
+ AC_MSG_RESULT(no)
+ LIBS="$LIBS -lpopt"
+fi
+AC_SUBST(BUILD_POPT)
+
+#################################################
# final configure stuff
echo "checking configure summary"