From 26885bb3402c1eaaa4045243cda5e0cb3c70f653 Mon Sep 17 00:00:00 2001 From: Antony Mee Date: Sat, 5 Aug 2006 10:27:24 +0000 Subject: [PATCH] * Added autoconf macros to check for the existance and version of pppd * Test that headers exist for the version found and explain what is missing if they cannot be found. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1928 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/pptp/configure.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vpn-daemons/pptp/configure.in b/vpn-daemons/pptp/configure.in index e08328bb63..9719d7687f 100644 --- a/vpn-daemons/pptp/configure.in +++ b/vpn-daemons/pptp/configure.in @@ -14,6 +14,23 @@ AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LIBTOOL +AC_CHECK_PROG(PPPD,pppd,pppd) +if test "z$PPPD" = "z"; then + AC_MSG_ERROR(Cannot compile without pppd) +fi +##### Find out the version of PPPD we're using +PPPD_VERSION=`$PPPD --version 2>&1 | awk '{print $3}'` +if test "z$PPPD_VERSION" = "z"; then + AC_MSG_ERROR(Couldn't determine the version of your pppd package.) +fi +if test -d "src/pppd/$PPPD_VERSION"; then + AC_MSG_RESULT(Found pppd version $PPPD_VERSION) +else + AC_MSG_ERROR(pppd version $PPPD_VERSION is not supported by the build tools: + the headers need to be added in src/pppd/$PPPD_VERSION and the version added to this test in configure.in) +fi +AC_SUBST(PPPD_VERSION) + dnl dnl Required headers @@ -81,6 +98,7 @@ PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) AC_SUBST(GNOMEKEYRING_CFLAGS) AC_SUBST(GNOMEKEYRING_LIBS) + AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir) AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) AS_AC_EXPAND(DATADIR, $datadir)