]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/Makefile.linux
Use systemd's sd_notify with option up_sdnotify
[ppp.git] / pppd / Makefile.linux
index d75b20c7086988d717768b85beb0815599233b0b..b541fe89a4fa21b264f70a02cb26b4c70efcd21a 100644 (file)
@@ -1,10 +1,10 @@
 #
 # pppd makefile for Linux
-# $Id: Makefile.linux,v 1.67 2005/07/10 11:19:10 paulus Exp $
+# $Id: Makefile.linux,v 1.70 2007/06/19 02:08:34 carlsonj Exp $
 #
 
 # Default installation locations
-DESTDIR = @DESTDIR@
+DESTDIR = $(INSTROOT)@DESTDIR@
 BINDIR = $(DESTDIR)/sbin
 MANDIR = $(DESTDIR)/share/man/man8
 INCDIR = $(DESTDIR)/include
@@ -13,16 +13,16 @@ TARGETS = pppd
 
 PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \
           ecp.c ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \
-          demand.c utils.c tty.c eap.c chap-md5.c
+          demand.c utils.c tty.c eap.c chap-md5.c session.c
 
-HEADERS = ccp.h chap-new.h ecp.h fsm.h ipcp.h \
+HEADERS = ccp.h session.h chap-new.h ecp.h fsm.h ipcp.h \
        ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \
        upap.h eap.h
 
 MANPAGES = pppd.8
 PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \
           ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o \
-          eap.o chap-md5.o
+          eap.o chap-md5.o session.o
 
 #
 # include dependencies if present
@@ -60,9 +60,14 @@ HAVE_MULTILINK=y
 # Linux distributions: Please leave TDB ENABLED in your builds.
 USE_TDB=y
 
+# Uncomment the next line to enable Type=notify services in systemd
+# If enabled, and the user sets the up_sdnotify option, then
+# pppd will not detach and will notify systemd when up.
+#SYSTEMD=y
+
 HAS_SHADOW=y
 #USE_PAM=y
-#HAVE_INET6=y
+HAVE_INET6=y
 
 # Enable plugins
 PLUGIN=y
@@ -73,6 +78,9 @@ PLUGIN=y
 # Enable EAP SRP-SHA1 authentication (requires libsrp)
 #USE_SRP=y
 
+# Use libutil
+USE_LIBUTIL=y
+
 MAXOCTETS=y
 
 INCLUDE_DIRS= -I../include
@@ -118,12 +126,15 @@ CFLAGS   += -DHAS_SHADOW
 endif
 
 ifneq ($(wildcard /usr/include/crypt.h),)
-CFLAGS   += -DHAVE_CRYPT_H=1
-endif
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
+CFLAGS  += -DHAVE_CRYPT_H=1
 LIBS   += -lcrypt
 endif
 
+ifdef USE_LIBUTIL
+CFLAGS += -DHAVE_LOGWTMP=1
+LIBS   += -lutil
+endif
+
 ifdef NEEDDES
 ifndef USE_CRYPT
 LIBS     += -ldes $(LIBS)
@@ -164,6 +175,11 @@ LIBS     += -llock
 CFLAGS   += -DLOCKLIB=1
 endif
 
+ifdef SYSTEMD
+LIBS += -lsystemd
+CFLAGS   += -DSYSTEMD=1
+endif
+
 ifdef PLUGIN
 CFLAGS += -DPLUGIN
 LDFLAGS        += -Wl,-E