diff --git a/configure.ac b/configure.ac index 7ee06d3b5..4e6f97d14 100644 --- a/configure.ac +++ b/configure.ac @@ -209,18 +209,24 @@ AC_SUBST(PPPD_PLUGIN_DIR, "$PPPD_PLUGIN_DIR", [The pppd plugin directory]) AC_ARG_WITH([runtime-dir], AS_HELP_STRING([--with-runtime-dir=DIR],[Specify the runtime directory for pppd])) AS_IF([test -n "$with_runtime_dir"], - [PPPD_RUNTIME_DIR="$with_runtime_dir"], - [PPPD_RUNTIME_DIR="${runstatedir}/pppd"]) -AC_SUBST(PPPD_RUNTIME_DIR) + [PPPD_RUNTIME_DIR="$with_runtime_dir"; + AC_DEFINE_UNQUOTED(PPPD_RUNTIME_DIR, "$PPPD_RUNTIME_DIR", [The pppd runtime directory])]) # -# Specify runtime directory +# Specify lock directory +AC_ARG_WITH([lock-dir], + AS_HELP_STRING([--with-lock-dir=DIR],[Specify the lock directory for pppd])) +AS_IF([test -n "$with_lock_dir"], + [PPPD_LOCK_DIR="$with_lock_dir"; + AC_DEFINE_UNQUOTED(PPPD_LOCK_DIR, "$PPPD_LOCK_DIR", [The pppd lock directory])]) + +# +# Specify logfile directory AC_ARG_WITH([logfile-dir], AS_HELP_STRING([--with-logfile-dir=DIR],[Specify the log directory for pppd])) AS_IF([test -n "$with_logfile_dir"], - [PPPD_LOGFILE_DIR="$with_logfile_dir"], - [PPPD_LOGFILE_DIR="${localstatedir}/log/ppp"]) -AC_SUBST(PPPD_LOGFILE_DIR) + [PPPD_LOGFILE_DIR="$with_logfile_dir"]; + AC_DEFINE_UNQUOTED(PPPD_LOGFILE_DIR, "$PPPD_LOGFILE_DIR", [The pppd logfile directory])]) # # System CA certificates path @@ -410,8 +416,9 @@ Setting up SunOS kernel module(s)" echo " $PACKAGE_NAME version $PACKAGE_VERSION Prefix...............: $prefix - Runtime Dir..........: $PPPD_RUNTIME_DIR - Logfile Dir..........: $PPPD_LOGFILE_DIR + Runtime Dir..........: ${PPPD_RUNTIME_DIR:-system default} + Lock Dir.............: ${PPPD_LOCK_DIR:-system default} + Logfile Dir..........: ${PPPD_LOGFILE_DIR:-system default} Plugin Dir...........: $PPPD_PLUGIN_DIR System CA Path ......: ${SYSTEM_CA_PATH:-not set} With OpenSSL.........: ${with_openssl:-yes} diff --git a/pppd/Makefile.am b/pppd/Makefile.am index e5bedf26a..6971cbb10 100644 --- a/pppd/Makefile.am +++ b/pppd/Makefile.am @@ -83,7 +83,7 @@ pppd_SOURCES = \ upap.c \ utils.c -pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"' +pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\" pppd_LDFLAGS = pppd_LIBS = diff --git a/pppd/pathnames.h b/pppd/pathnames.h index de2fb6889..29e2ce1d0 100644 --- a/pppd/pathnames.h +++ b/pppd/pathnames.h @@ -37,10 +37,14 @@ * sysconfdir is ${prefix}/etc. Setting prefix to /usr, you'll have to override * sysconfdir with /etc to avoid installing config files into /usr/etc. * - * In addition, there are three explicit variables that has overrides via configure: - * - PPPD_RUNTIME_DIR, set by --with-runtime-dir=