Skip to content

Commit 77a8990

Browse files
Get rid of pppd/ppp in build system
1 parent d645a8c commit 77a8990

2 files changed

Lines changed: 2 additions & 85 deletions

File tree

configure.ac

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ cast_addr(&(&route)->rt_dst)->sin_family = AF_INET;
211211
])
212212

213213
NETSTAT_PATH=""
214-
PPP_PATH=""
215214
RESOLVCONF_PATH=""
216215

217216
# prepare possibility to override default locations
@@ -220,26 +219,6 @@ AC_ARG_WITH([netstat],
220219
[set the path to the netstat executable on MacOSX or FreeBSD]),
221220
NETSTAT_PATH="$withval"
222221
)
223-
# this is for the pppd daemon executable
224-
AC_ARG_WITH([pppd],
225-
AS_HELP_STRING([--with-pppd],
226-
[set the path to the pppd daemon executable]),
227-
AS_IF([test ! "x$with_pppd" = "xno" -a ! "x$with_pppd" = "xyes"],[
228-
PPP_PATH="$withval"
229-
with_pppd="yes"
230-
with_ppp="no"
231-
])
232-
)
233-
# and this is for the ppp user space client on FreeBSD
234-
AC_ARG_WITH([ppp],
235-
AS_HELP_STRING([--with-ppp],
236-
[set the path to the ppp userspace client on FreeBSD]),
237-
AS_IF([test ! "x$with_ppp" = "xno" -a ! "x$with_ppp" = "xyes"],[
238-
PPP_PATH="$withval"
239-
with_ppp="yes"
240-
with_pppd="no"
241-
])
242-
)
243222

244223
# override for /proc/net/route detection
245224
AC_ARG_ENABLE([proc],
@@ -266,66 +245,6 @@ AS_IF([test "x$enable_proc" = "x"], [
266245
])
267246
])
268247

269-
# check for ppp if not specified
270-
AC_PATH_PROG(PPP, [ppp], [/usr/sbin/ppp], "$PATH:/sbin:/usr/sbin")
271-
AS_IF([test "x$PPP_PATH" = "x"], [
272-
AC_CHECK_FILE([$PPP], [
273-
AS_IF([test "x$PPP_PATH" = "x"], [
274-
PPP_PATH="$PPP"
275-
])
276-
AS_IF([test "x$with_ppp" = "x"], [
277-
with_ppp="yes"
278-
])
279-
],[])
280-
])
281-
# check for pppd if not specified
282-
AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], "$PATH:/sbin:/usr/sbin")
283-
AS_IF([test "x$PPP_PATH" = "x"], [
284-
AC_CHECK_FILE([$PPPD], [
285-
AS_IF([test "x$PPP_PATH" = "x"], [
286-
PPP_PATH="$PPPD"
287-
])
288-
AS_IF([test "x$with_pppd" = "x"], [
289-
with_pppd="yes"
290-
])
291-
],[])
292-
])
293-
# when neither ppp nor pppd are enabled fall back to a sensible choice for the platform
294-
AS_IF([test "x$with_ppp" = "x" -a "x$with_pppd" = "x"], [
295-
AS_IF([test "x$(uname)" = "xFreeBSD"], [
296-
with_ppp="yes"
297-
PPP_PATH="/usr/sbin/ppp"
298-
], [
299-
with_pppd="yes"
300-
PPP_PATH="/usr/sbin/pppd"
301-
])
302-
])
303-
# when both are enabled, give pppd the higher priority (we can only use one of them)
304-
AS_IF([test "x$with_ppp" = "xyes" -a "x$with_pppd" = "xyes"], [
305-
with_ppp="no"
306-
])
307-
# replace empty settings with "no"
308-
AS_IF([test "x$with_pppd" = "x"], [
309-
with_pppd="no"
310-
])
311-
AS_IF([test "x$with_ppp" = "x"], [
312-
with_ppp="no"
313-
])
314-
315-
AS_IF([test "x$with_ppp" = "xyes"], [
316-
AC_DEFINE(HAVE_USR_SBIN_PPP, 1)
317-
AC_MSG_NOTICE([HAVE_USR_SBIN_PPP... 1])
318-
],[
319-
AC_DEFINE(HAVE_USR_SBIN_PPP, 0)
320-
AC_MSG_NOTICE([HAVE_USR_SBIN_PPP... 0])
321-
])
322-
AS_IF([test "x$with_pppd" = "xyes"], [
323-
AC_DEFINE(HAVE_USR_SBIN_PPPD, 1)
324-
AC_MSG_NOTICE([HAVE_USR_SBIN_PPPD... 1])
325-
],[
326-
AC_DEFINE(HAVE_USR_SBIN_PPPD, 0)
327-
AC_MSG_NOTICE([HAVE_USR_SBIN_PPPD... 0])
328-
])
329248
AS_IF([test "x$enable_proc" = "xyes"], [
330249
AC_DEFINE(HAVE_PROC_NET_ROUTE, 1)
331250
AC_MSG_NOTICE([HAVE_PROC_NET_ROUTE... 1])
@@ -334,9 +253,6 @@ AS_IF([test "x$enable_proc" = "xyes"], [
334253
AC_MSG_NOTICE([HAVE_PROC_NET_ROUTE... 0])
335254
])
336255

337-
AC_SUBST(PPP_PATH)
338-
AC_MSG_NOTICE([PPP_PATH...] $PPP_PATH)
339-
340256
AC_SUBST(NETSTAT_PATH)
341257
AS_IF([test "x$NETSTAT_PATH" != "x"], [
342258
AC_MSG_NOTICE([NETSTAT_PATH...] $NETSTAT_PATH)

src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
" --ppp-system=<system> Connect to the specified system as defined in\n" \
6161
" /etc/ppp/ppp.conf.\n"
6262
#else
63-
#error "Neither HAVE_USR_SBIN_PPPD nor HAVE_USR_SBIN_PPP have been defined."
63+
#define PPPD_USAGE ""
64+
#define PPPD_HELP ""
6465
#endif
6566

6667
#if HAVE_RESOLVCONF

0 commit comments

Comments
 (0)