Remove obsolete Makefile(s) and configure scripts Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Incorporating review feedback from David Seifert. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Use autoconf/automake to configure and make ppp This change brings in autoconf/automake scripts to configure the ppp project. Current change doesn't eliminate the previous build system, but the new script autogen.sh will overwrite configure, and generate the basic Makefile.in and Makefile files. Features can now be enabled by command line: * Microsoft Extensions, - MSCHAP - MPPE - MS LAN Manager support * IPXCP protocol * CBCP protocol * PAM support * EAP-TLS support * EAP-SRP support * Max session lifetime by byte count * Plugins * Packet activity filter support * Multilink * IPv6 support Control linkage with * OpenSSL (-lssl -lcrypto) * systemd (-lsystemd) * libatm (-latm) * libsrp (-lsrp) * pam (-lpam) Also, the configure script is made sensitive to features of OpenSSL. Like the presence or absence of DES, SHA, MD4 and MD5 crypto support. In the cases where either of these are missing, the support will be directly compiled into pppd and plugins. In addition, package maintainers can now control the installation paths with standard --prefix=, or --localstatedir=, or --sysconfdir= to configure. On top of that, they can now control the following directories: * runtime directory w/--with-runtime-dir * logfile directory w/--with-logfile-dir * plugin directory w/--with-plugin-dir In the case where automake isn't the right solution, namely: SunOS kernel module build, the original Makefile infrastructure is preserved and reused. Care was taken to only cosmetically touchup the source files in this change. This means: * Insert HAVE_CONFIG_H and include config.h in all .c files. * Change HAS_SHADOW to HAVE_SHADOW_H * Change HAVE_LOGWTMP to HAVE_UTMP_H * Introduce HAVE_CRYPT_H into the source code where appropriate * Added ifdef MPPE where appropriate * USE_SRP required a few changes as it didn't compile * Touchup some compile warning in pppstats directory on SunOS Introduced a new pppdconf.h file that exports the appropriate defines to a module that wants to provide a module that pppd can dynamically load. This will define/undef features like MPPE, CHAPMS such that the project doesn't have to guess what features pppd is compiled with. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Add pkgconfig support to PPP project (#270) This adds pppd.pc into $(INSTROOT)/$(LIBDIR)/pkgconfig. On some distributions this would be /lib/pkgconfig, or /usr/lib/pkgconfig, but other distributions may consider specifying --libdir=/usr/lib/x86_x64-linux-gnu/ and the pkgconfig directory would be under that. Allowing --libdir to be specified at configure time fixes #223, providing pkgconfig support fixes #19 and allows third party packages pickup the plugin directory. Manually cherry picking parts of two commits by @lkundrak from: https://github.com/NetworkManager/ppp/tree/lr/pkgconfig Mainly, the difference between the original commit is not to replace DESTDIR with "prefix". Leave DESTDIR alone, and add needed pkgconfig (pppd.pc.in) as a part of the linux distribution (previously in pppd/plugin directory). This fixes GitHub issues: #19 #47 and #223 Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
configure: Allow commas in the CFLAGS (#220) It allows e.g. the following: ./configure --cflags='-Wp,-D_FORTIFY_SOURCE=2' Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Add cross-compilation support on Linux This adds three new command-line options to the configure script: --cross_compile=<prefix> (default "") --cc=<compiler> (default cc) --cflags=<compile flags> (default -g -O2 -pipe) These get propagated to the Makefiles in the subdirectories. The cross-compile prefix is prepended to the CC value, so for example if you do "./configure --cross_compile=powerpc64le-linux-" then everything gets compiled and linked using powerpc64le-linux-cc. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Rename rp-pppoe.so plugin to pppoe.so Original out-of-tree rp-pppoe plugin for pppd software is still available at website https://dianne.skoll.ca/projects/rp-pppoe/ and receives new releases. The last update is from the June 2020. Currently it is ambiguous if user is using original out-of-tree rp-pppoe plugin or in-tree pppd's rp-pppoe plugin. These two plugins are different, come from different sources but share same name. Some users want to use original rp-pppoe plugin and not pppd's in-tree rp-pppoe plugin. Also some distribution want to package both plugins, pppd's in-tree and original rp-pppoe. So for this reason and also because all other PPP over <something> plugins have just pppo prefix, rename in-tree rp-pppoe.so plugin to just pppoe.so. This will allow to distinguish and make it clear what is the original rp-pppoe plugin and what is pppd's in-tree pppoe plugin. When installing pppd create a compatibility symlink from pppoe.so to rp-pppoe.so so nothing would be broken. This compatibility symlink may be removed by Linux distribution which do not want to have compatibility with the old name as before and rather use rp-pppoe.so name for original rp-pppoe software. Signed-off-by: Pali Rohár <pali@kernel.org>
config: Update Solaris compiler options and enable CHAPMS and IPV6 As suggested by James Carlson. Signed-off-by: Paul Mackerras <paulus@samba.org>
Add L2TP support. Patch from James Chapman. This patch adds support for L2TP. It allows pppd to interface with the pppol2tp driver in the Linux kernel. All data packets are handled by the Linux kernel in order that the datapath be as efficient as possible, while a userspace daemon implements the L2TP control protocol, handling tunnel/session setup and teardown. The implementation uses the PPPoX infrastructure; the architecture is similar to PPPoE/PPPoATM in that a userspace daemon spawns a pppd process per PPP session and uses a protocol-specific plugin to connect pppd with the kernel. The pppol2tp Linux kernel driver was integrated in the Linux kernel from 2.6.23. For earlier kernels, an out of tree driver is available from the pppol2tp-kmod package on the OpenL2TP project site at http://sourceforge.net/projects/openl2tp. Signed-off-by: James Chapman <jchapman@katalix.com>
Added support for x64 (AMD Opteron/Athlon and Intel EM64T) on Solaris using Sun WorkShop or gcc.
Fixed configure breakage in $archvariant support for Solaris introduced by fix in RCS ID 1.33 -- failed to configure for WorkShop C compiler correctly because test was changed from -f (file exists) to "$archvariant" (variable is non-null). Fixed ccp.c compilation warnings due to missing argument type in RCS ID 1.48 fix.
New pppoatm plugin, sent in by David Woodhouse.
Fix construction of $ksrc/Makefile for Solaris
Cope better when prototype Makefiles don't exist. Restore $archvariant stuff for solaris.
Add --prefix and --sysconfdir options to configure, and put @DESTDIR@ and @SYSCONF@ tags in various Makefile.linux files. These tags get expanded by configure.
Fixed compilation failure on Solaris due to new CHAP (missing chap-md5.o in makefile). Updated ppp_mod so that it will work with Solaris 10 and beyond (identify entry point is now obsolete). Fixed warnings in chat, bsd-comp, deflate, vjcompress, chap-new, sys-solaris, tty, pppdump, ppp_comp.
Added EAP support with MD5-Challenge and SRP-SHA1 methods. Tested on Linux (with both methods) and on Solaris (just MD5-Challenge). Fixed several Makefiles that were missing references to required modules such as tty.o.
Added ability to detect and use either gcc or Sun WorkShop C compiler on Solaris. Added support for Solaris 10. Quieted down warning in ppp_comp.c due to bad preprocessor usage. Quieted WorkShop warnings in options.c (casting of void * to function) and pppd.h (constant too large). Tested in 32 and 64 bit modes with gcc and WorkShop.
Added RADIUS suppport.
Switch to using RoaringPenguin-based PPPOE plugin