From 77a8990055a8153b8a216274a09beff250317464 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 27 Feb 2023 08:44:42 +0100 Subject: [PATCH] Get rid of pppd/ppp in build system --- configure.ac | 84 ---------------------------------------------------- src/main.c | 3 +- 2 files changed, 2 insertions(+), 85 deletions(-) diff --git a/configure.ac b/configure.ac index ae0e18d0..7c26d9f9 100644 --- a/configure.ac +++ b/configure.ac @@ -211,7 +211,6 @@ cast_addr(&(&route)->rt_dst)->sin_family = AF_INET; ]) NETSTAT_PATH="" -PPP_PATH="" RESOLVCONF_PATH="" # prepare possibility to override default locations @@ -220,26 +219,6 @@ AC_ARG_WITH([netstat], [set the path to the netstat executable on MacOSX or FreeBSD]), NETSTAT_PATH="$withval" ) -# this is for the pppd daemon executable -AC_ARG_WITH([pppd], - AS_HELP_STRING([--with-pppd], - [set the path to the pppd daemon executable]), - AS_IF([test ! "x$with_pppd" = "xno" -a ! "x$with_pppd" = "xyes"],[ - PPP_PATH="$withval" - with_pppd="yes" - with_ppp="no" - ]) -) -# and this is for the ppp user space client on FreeBSD -AC_ARG_WITH([ppp], - AS_HELP_STRING([--with-ppp], - [set the path to the ppp userspace client on FreeBSD]), - AS_IF([test ! "x$with_ppp" = "xno" -a ! "x$with_ppp" = "xyes"],[ - PPP_PATH="$withval" - with_ppp="yes" - with_pppd="no" - ]) -) # override for /proc/net/route detection AC_ARG_ENABLE([proc], @@ -266,66 +245,6 @@ AS_IF([test "x$enable_proc" = "x"], [ ]) ]) -# check for ppp if not specified -AC_PATH_PROG(PPP, [ppp], [/usr/sbin/ppp], "$PATH:/sbin:/usr/sbin") -AS_IF([test "x$PPP_PATH" = "x"], [ - AC_CHECK_FILE([$PPP], [ - AS_IF([test "x$PPP_PATH" = "x"], [ - PPP_PATH="$PPP" - ]) - AS_IF([test "x$with_ppp" = "x"], [ - with_ppp="yes" - ]) - ],[]) -]) -# check for pppd if not specified -AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], "$PATH:/sbin:/usr/sbin") -AS_IF([test "x$PPP_PATH" = "x"], [ - AC_CHECK_FILE([$PPPD], [ - AS_IF([test "x$PPP_PATH" = "x"], [ - PPP_PATH="$PPPD" - ]) - AS_IF([test "x$with_pppd" = "x"], [ - with_pppd="yes" - ]) - ],[]) -]) -# when neither ppp nor pppd are enabled fall back to a sensible choice for the platform -AS_IF([test "x$with_ppp" = "x" -a "x$with_pppd" = "x"], [ - AS_IF([test "x$(uname)" = "xFreeBSD"], [ - with_ppp="yes" - PPP_PATH="/usr/sbin/ppp" - ], [ - with_pppd="yes" - PPP_PATH="/usr/sbin/pppd" - ]) -]) -# when both are enabled, give pppd the higher priority (we can only use one of them) -AS_IF([test "x$with_ppp" = "xyes" -a "x$with_pppd" = "xyes"], [ - with_ppp="no" -]) -# replace empty settings with "no" -AS_IF([test "x$with_pppd" = "x"], [ - with_pppd="no" -]) -AS_IF([test "x$with_ppp" = "x"], [ - with_ppp="no" -]) - -AS_IF([test "x$with_ppp" = "xyes"], [ - AC_DEFINE(HAVE_USR_SBIN_PPP, 1) - AC_MSG_NOTICE([HAVE_USR_SBIN_PPP... 1]) -],[ - AC_DEFINE(HAVE_USR_SBIN_PPP, 0) - AC_MSG_NOTICE([HAVE_USR_SBIN_PPP... 0]) -]) -AS_IF([test "x$with_pppd" = "xyes"], [ - AC_DEFINE(HAVE_USR_SBIN_PPPD, 1) - AC_MSG_NOTICE([HAVE_USR_SBIN_PPPD... 1]) -],[ - AC_DEFINE(HAVE_USR_SBIN_PPPD, 0) - AC_MSG_NOTICE([HAVE_USR_SBIN_PPPD... 0]) -]) AS_IF([test "x$enable_proc" = "xyes"], [ AC_DEFINE(HAVE_PROC_NET_ROUTE, 1) AC_MSG_NOTICE([HAVE_PROC_NET_ROUTE... 1]) @@ -334,9 +253,6 @@ AS_IF([test "x$enable_proc" = "xyes"], [ AC_MSG_NOTICE([HAVE_PROC_NET_ROUTE... 0]) ]) -AC_SUBST(PPP_PATH) -AC_MSG_NOTICE([PPP_PATH...] $PPP_PATH) - AC_SUBST(NETSTAT_PATH) AS_IF([test "x$NETSTAT_PATH" != "x"], [ AC_MSG_NOTICE([NETSTAT_PATH...] $NETSTAT_PATH) diff --git a/src/main.c b/src/main.c index e2d9378b..d69dc346 100644 --- a/src/main.c +++ b/src/main.c @@ -60,7 +60,8 @@ " --ppp-system= Connect to the specified system as defined in\n" \ " /etc/ppp/ppp.conf.\n" #else -#error "Neither HAVE_USR_SBIN_PPPD nor HAVE_USR_SBIN_PPP have been defined." +#define PPPD_USAGE "" +#define PPPD_HELP "" #endif #if HAVE_RESOLVCONF