summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 34 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 140e546..2fe6069 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,40 @@ AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
+AC_ARG_WITH(ppp,
+ [AS_HELP_STRING([--with-ppp=PATH],[Use ppp support from PATH])],
+ [],
+ [with_ppp=check]
+ )
+set -x
+# somebody will fix that
+default_ppp_path=/usr
+
+case "$with_ppp" in
+ yes|check) ppp_path="$default_ppp_path";;
+ no) ppp_path='' ;;
+ *) ppp_path="$with_ppp" ;;
+esac
+
+level_file="$ppp_path/include/pppd/patchlevel.h"
+PPP_VERSION=
+if test "$ppp_path" != '' && test -r "$level_file"; then
+ PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
+fi
+
+case "$with_ppp" in
+ check|no) :;;
+ *)
+ # If we asked explicitly for ppp support
+ if test "$PPPD_VERSION" = ''; then
+ # but have not detected it
+ AC_MSG_ERROR(failed to find pppd/patchlevel.h: no ppp support.)
+ fi
+ ;;
+esac
+set +x
+AC_SUBST(PPPD_VERSION)
+
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
AC_OUTPUT