ppp/pppd/Makefile.sol2
Eivind Næss 2883dd0710 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>
2021-07-20 08:24:08 -07:00

72 lines
1.4 KiB
Makefile

#
# Makefile for pppd under Solaris 2.
# $Id: Makefile.sol2,v 1.30 2008/01/30 14:26:52 carlsonj Exp $
#
include ../Makedefs.com
CFLAGS = -I../include -DSVR4 -DSOL2 $(COPTS) '-DDESTDIR="@DESTDIR@"'
LIBS = -lsocket -lnsl
OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o eap.o md5.o \
tty.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o \
chap-md5.o session.o
# Solaris uses shadow passwords
CFLAGS += -DHAVE_SHADOW_H
#
# Comment the following out to disable plugins
#
CFLAGS += -DPLUGIN
LIBS += -ldl
#
# Solaris 8 and above accomodates /var/run, so uncomment the
# following to place pppd process IDs on that location
#
#CFLAGS += -D_PATH_VARRUN='"/var/run/"'
#
# uncomment the following to enable IPv6
#
# Solaris 8 and on includes support for IPv6
#
CFLAGS += -DINET6
OBJS += ipv6cp.o eui64.o
# Uncomment to enable MS-CHAP
CFLAGS += -DUSE_CRYPT -DCHAPMS -DMSLANMAN -DHAVE_CRYPT_H
OBJS += chap_ms.o pppcrypt.o md4.o sha1.o mppe.o
# Uncomment to enable MPPE (in both CHAP and EAP-TLS)
CFLAGS += -DMPPE
# Uncomment to enable EAP-TLS
CFLAGS += -DUSE_EAPTLS
LIBS += -lcrypto -lssl
OBJS += eap-tls.o
# Uncomment for CBCP
#CFLAGS += -DCBCP_SUPPORT
#OBJS += cbcp.o
# Uncomment for PAM
#CFLAGS += -DUSE_PAM
#LIBS += -lpam
#
# Make targets
#
all: pppd
pppd: $(OBJS)
$(CC) -o pppd $(OBJS) $(LIBS)
install:
$(INSTALL) -f $(BINDIR) -m 4755 -u root pppd
$(INSTALL) -f $(MANDIR)/man8 -m 444 pppd.8
clean:
rm -f $(OBJS) pppd *~ core y.tab.c y.tab.h