-#define _PATH_UPAPFILE "/etc/ppp/pap-secrets"
-#define _PATH_CHAPFILE "/etc/ppp/chap-secrets"
-#define _PATH_SYSOPTIONS "/etc/ppp/options"
-#define _PATH_IPUP "/etc/ppp/ip-up"
-#define _PATH_IPDOWN "/etc/ppp/ip-down"
-#define _PATH_TTYOPT "/etc/ppp/options."
-#define _PATH_USEROPT ".ppprc"
+/*
+ * PPPD_LOGFILE_DIR is set by passing --with-logfile-dir=<path> via configure
+ * the default value set by configure when option is absent is ${localstatedir}/log/ppp
+ */
+#ifdef PPPD_LOGFILE_DIR
+#define PPP_PATH_VARLOG PPPD_LOGFILE_DIR
+#else
+#define PPP_PATH_VARLOG _PATH_VARRUN "/log/ppp"
+#endif
+
+/*
+ * PPPD_PLUGIN_DIR is set by passing --with-plugin-dir=<path> via configure
+ * the default value set by configure when option is absent is ${libdir}/pppd/${version}
+ */
+#ifdef PPPD_PLUGIN_DIR
+#define PPP_PATH_PLUGIN PPPD_PLUGIN_DIR
+#endif /* PPPD_PLUGIN_DIR */
+
+#define PPP_PATH_CONFDIR SYSCONFDIR "/ppp"
+
+#define PPP_PATH_UPAPFILE PPP_PATH_CONFDIR "/pap-secrets"
+#define PPP_PATH_CHAPFILE PPP_PATH_CONFDIR "/chap-secrets"
+#define PPP_PATH_SRPFILE PPP_PATH_CONFDIR "/srp-secrets"
+
+#ifdef PPP_WITH_EAPTLS
+#define PPP_PATH_EAPTLSCLIFILE PPP_PATH_CONFDIR "/eaptls-client"
+#define PPP_PATH_EAPTLSSERVFILE PPP_PATH_CONFDIR "/eaptls-server"
+#define PPP_PATH_OPENSSLCONFFILE PPP_PATH_CONFDIR "/openssl.cnf"
+#endif /* PPP_WITH_EAPTLS */
+
+#define PPP_PATH_SYSOPTIONS PPP_PATH_CONFDIR "/options"
+#define PPP_PATH_IPUP PPP_PATH_CONFDIR "/ip-up"
+#define PPP_PATH_IPDOWN PPP_PATH_CONFDIR "/ip-down"
+#define PPP_PATH_IPPREUP PPP_PATH_CONFDIR "/ip-pre-up"
+#define PPP_PATH_AUTHUP PPP_PATH_CONFDIR "/auth-up"
+#define PPP_PATH_AUTHDOWN PPP_PATH_CONFDIR "/auth-down"
+#define PPP_PATH_TTYOPT PPP_PATH_CONFDIR "/options."
+#define PPP_PATH_PEERFILES PPP_PATH_CONFDIR "/peers/"
+#define PPP_PATH_RESOLV PPP_PATH_CONFDIR "/resolv.conf"
+
+#define PPP_PATH_NET_INIT PPP_PATH_CONFDIR "/net-init"
+#define PPP_PATH_NET_PREUP PPP_PATH_CONFDIR "/net-pre-up"
+#define PPP_PATH_NET_DOWN PPP_PATH_CONFDIR "/net-down"
+
+#define PPP_PATH_CONNERRS PPP_PATH_VARLOG "/connect-errors"
+
+#define PPP_PATH_USEROPT ".ppprc"
+#define PPP_PATH_PSEUDONYM ".ppp_pseudonym"
+
+#ifdef PPP_WITH_IPV6CP
+#define PPP_PATH_IPV6UP PPP_PATH_CONFDIR "/ipv6-up"
+#define PPP_PATH_IPV6DOWN PPP_PATH_CONFDIR "/ipv6-down"
+#endif
+
+#define PPP_PATH_PPPDB PPP_PATH_VARRUN "/pppd2.tdb"
+
+#ifdef __linux__
+#define PPP_PATH_LOCKDIR PPP_PATH_VARRUN "/lock"
+#else
+#ifdef SVR4
+#define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/locks"
+#else
+#define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/lock"
+#endif
+#endif
+
+
+#endif /* PPP_PATHNAMES_H */