[RP-PPPoE] Fix for kernel-mode PPPoE compilation (was Re: some PPPoe advice would be appreciated.)
Dianne Skoll
dfs at roaringpenguin.com
Wed Aug 15 09:46:34 EDT 2018
On Wed, 15 Aug 2018 13:29:51 +0200
Adrian Ban <adrian at abtelecom.ro> wrote:
> I've notice that most of the distributions are not coming with
> pppoe-server with kernel-mode enabled.You have to build it by
> yourself. Each time I've recompiled I've notice errors in configure
> when it tried to autodetect the kernel mode, like in Debian case some
> variables were declare twice in the test program because of changes
> in kernel headers and the software is including two headers which
> actually each of them declares the same variables (they also are
> including the same header from kernel).
I wish someone had reported this earlier! It's a simple patch to
configure.in / configure to fix this.
Regards,
Dianne.
diff --git a/src/configure b/src/configure
index db345ae..338aea2 100755
--- a/src/configure
+++ b/src/configure
@@ -674,6 +674,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -747,6 +748,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -999,6 +1001,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1136,7 +1147,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1289,6 +1300,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4555,8 +4567,6 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/socket.h>
-#include <net/ethernet.h>
-#include <linux/if.h>
#include <netinet/in.h>
#include <linux/if_pppox.h>
int main()
diff --git a/src/configure.in b/src/configure.in
index 90a07df..ade3fa8 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -166,8 +166,6 @@ modprobe ppp_synctty > /dev/null 2>&1
modprobe pppoe > /dev/null 2>&1
fi
AC_TRY_RUN([#include <sys/socket.h>
-#include <net/ethernet.h>
-#include <linux/if.h>
#include <netinet/in.h>
#include <linux/if_pppox.h>
int main()
More information about the RP-PPPoE
mailing list