summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEivind Næss <eivnaes@yahoo.com>2021-08-10 16:38:45 -0700
committerEivind Næss <eivnaes@yahoo.com>2022-07-15 15:25:39 -0700
commitbdd34ab1f2f87acb23c6d92feee7354ac53005ff (patch)
tree57a45d6e3f98e6c06e1f3afeccd299587243fb25 /configure.ac
parente8605bcddbad7e47277b86f2ce0b28f6ca951fa2 (diff)
downloadppp-bdd34ab1f2f87acb23c6d92feee7354ac53005ff.tar.gz
Fix include paths for plugins to use the public API of pppd
This change does a few different things. * Projects that needs #include "config.h" should use a config.h.in for the project generated by configure in the project's local directory. * All projects will use #include <pppd/pppd.h>, and Makefile will add -I${top_srcdir} to the appropriate *_CPPFLAGS variable. * The inclusion of <pppd/pppdconf.h> will set the presidence for all features enabled/disabled in pppd * Plugins will now need to use PPPD_VERSION as it conflicts with VERSION from config.h generated by autotools for third party packages Currently, only pppoe require the use of config.h to correctly set the defines for which header files and so on was detected by configure Other projects only needed to include <pppd/pppd.h> (and maybe a few other header files), a future change will fixup <pppd/pppd.h> to include features as needed such that it's the only needed include for a plugin. This will avoid littering the code with #ifdef/#endif constructs. BREAKING CHANGE! pppd/pppd.h no longer provide VERSION, third party packages are required to switch to use PPPD_VERSION. This is to avoid conflict with a source package's own VERSION as set by autotools / config.h. Also, the use of PPP_VERSION conflicts with public header files from Glibc/Linux kernel. Example: char pppd_version[] = PPPD_VERSION; pppd will load plugins, and also look for the symbol "pppd_version" to validate that the plugin was built for the current version of pppd. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ae69aa7..a6cf829 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AM_MAINTAINER_MODE([enable])
AC_LANG(C)
AC_CONFIG_SRCDIR([pppd/main.c])
-AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h])
+AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h pppd/plugins/pppoe/config.h])
# Checks for programs.
AC_PROG_CC
@@ -305,6 +305,7 @@ if test "x${with_gtk}" = "xyes"; then
fi
AM_CONDITIONAL([WITH_GTK], test "x${with_gtk}" = "xyes")
+AC_DEFINE_UNQUOTED(PPPD_VERSION, "$VERSION", [Version of pppd])
AC_CONFIG_FILES([
Makefile