From 4fcfbecfd91eacf8fc7441e3c645e0f72277b650 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sat, 1 Sep 2007 03:32:51 +0000 Subject: * Maintain the same meaning of DESTDIR and INSTALL_PREFIX as in main Makefile * Document ppp support to the best of my knowledge. * Err clearly if the VERSION was not found. * Add some basic/broken detection of ppp in autoconf. Merged revisions 2987 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2990 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- configure.ac | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.3