]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/Makefile.linux
pppd: Use a run-time test to detect libutil availability on Linux
[ppp.git] / pppd / Makefile.linux
index 15fb8da976a6fc24153da9ce39b423e3113a8664..958cc29b1e595f484c95ab6dcde98321d4db11bb 100644 (file)
@@ -1,6 +1,6 @@
 #
 # pppd makefile for Linux
-# $Id: Makefile.linux,v 1.70 2007/06/19 02:08:34 carlsonj Exp $
+# Processed by configure to produce pppd/Makefile
 #
 
 # Default installation locations
@@ -78,8 +78,10 @@ PLUGIN=y
 # Enable EAP SRP-SHA1 authentication (requires libsrp)
 #USE_SRP=y
 
-# Use libutil
+# Use libutil; test if logwtmp is declared in <utmp.h> to detect
+ifeq ($(shell echo '\#include <utmp.h>' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
 USE_LIBUTIL=y
+endif
 
 # Enable EAP-TLS authentication (requires MPPE support, libssl and libcrypto)
 USE_EAPTLS=y