diff options
| author | Rob Crittenden <rcritten@redhat.com> | 2015-10-01 13:58:12 -0400 |
|---|---|---|
| committer | Rob Crittenden <rcritten@redhat.com> | 2015-10-02 16:51:56 -0400 |
| commit | d536eae8b69e500a9d20954c102e05d7ba676566 (patch) | |
| tree | 388981e87846b8ca983d3a60fc543b2ee1c18660 | |
| parent | 555dac5e98ac73496fc5cf9a147489a0479f2bfd (diff) | |
| download | mod_nss-d536eae8b69e500a9d20954c102e05d7ba676566.tar.gz mod_nss-d536eae8b69e500a9d20954c102e05d7ba676566.tar.xz mod_nss-d536eae8b69e500a9d20954c102e05d7ba676566.zip | |
Modernize autotools configuration slightly, add config.h
I need to generate config.h because Apache ships its own
autotools-generated config.h which redefines a lot of
variables like PACKAGE_NAME, PACKAGE_TARBALL, etc.
By having my own configh I can reset things before the compiler
complains. The downside is that compile-time options are hidden
in a config file instead of being defined on the gcc
command-line.
| -rw-r--r-- | Makefile.am | 4 | ||||
| -rw-r--r-- | configure.ac | 5 | ||||
| -rw-r--r-- | mod_nss.h | 14 |
3 files changed, 17 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index ca89989..602c25e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,3 @@ -VERSION = 1.0.11 - ## This is the shared library to be built lib_LTLIBRARIES = libmodnss.la @@ -23,7 +21,7 @@ libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engin libmodnss_la_LDFLAGS = -module -avoid-version ## Set the includes and libraries needed -INCLUDES = -I@apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@ +AM_CPPFLAGS = -I@apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@ LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lplc4 -lplds4 -lnspr4 EXTRA_CPPFLAGS=@extra_cppflags@ diff --git a/configure.ac b/configure.ac index 2676b92..1e4e778 100644 --- a/configure.ac +++ b/configure.ac @@ -1,15 +1,16 @@ # Required initializer -AC_INIT +AC_INIT([mod_nss],[1.0.11]) m4_include([acinclude.m4]) # Automake initialization -AM_INIT_AUTOMAKE(mod_nss, 1.0) +AM_INIT_AUTOMAKE # Add a test for a compiler. AC_PROG_CC AM_PROG_CC_C_O AM_PROG_LIBTOOL +AC_CONFIG_HEADERS([config.h]) # Check for header files AC_HEADER_STDC @@ -45,7 +45,7 @@ #include <sys/ipc.h> #include <sys/sem.h> -#define MOD_NSS_VERSION AP_SERVER_BASEREVISION +#define MOD_NSS_VERSION PACKAGE_VERSION /* NSPR headers */ #include "nspr.h" @@ -59,6 +59,18 @@ #include <nss.h> #include <sslproto.h> +/* Apache ships its autoconf-generated config.h which defines these + * as empty. We want the mod_nss version in our own config.h so + * undefine them to eliminate the build warnings. + */ +#undef PACKAGE_NAME +#undef PACKAGE_VERSION +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_URL +#undef PACKAGE_BUGREPORT +#include "config.h" + /* The #ifdef macros are only defined AFTER including the above * therefore we cannot include these system files at the top :-( */ |
