diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-12-10 13:36:29 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-12-10 13:36:29 +0000 |
commit | 66f89c335967360f6f1dda35f6c2a96ac81c291a (patch) | |
tree | 01f3c1d5bc5f6eb877ef19452e2da07f51ecf96a /Makefile.am | |
parent | dcf4232db2afc0b9479d8523fba3935645cc6dad (diff) | |
download | pcre-66f89c335967360f6f1dda35f6c2a96ac81c291a.tar.gz |
Ensure boolean macros are #undeffed in pcre.h.generic.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1235 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am index 37925a0..2372690 100644 --- a/Makefile.am +++ b/Makefile.am @@ -138,14 +138,16 @@ pcre.h.generic: pcre.h.in configure.ac cp -p pcre.h $@ # It is more complicated for config.h.generic. We need the version that results -# from a default configuration. We can get this by doing a configure in a -# temporary directory. However, some trickery is needed, -# because the source directory may already be configured. If you -# just try running configure in a new directory, it complains. For this reason, -# we move config.status out of the way while doing the default configuration. -# The resulting config.h is munged by perl to put #ifdefs round any #defines -# and to get rid of any gcc-specific visibility settings. Make sure that -# PCRE_EXP_DEFN is unset (in case it has visibility settings). +# from a default configuration so as to get all the default values for PCRE +# configuration macros such as MATCH_LIMIT and NEWLINE. We can get this by +# doing a configure in a temporary directory. However, some trickery is needed, +# because the source directory may already be configured. If you just try +# running configure in a new directory, it complains. For this reason, we move +# config.status out of the way while doing the default configuration. The +# resulting config.h is munged by perl to put #ifdefs round any #defines for +# macros with values, and to #undef all boolean macros such as HAVE_xxx and +# SUPPORT_xxx. We also get rid of any gcc-specific visibility settings. Make +# sure that PCRE_EXP_DEFN is unset (in case it has visibility settings). config.h.generic: configure.ac rm -rf $@ _generic mkdir _generic @@ -158,8 +160,10 @@ config.h.generic: configure.ac -e 'if(/PCRE_EXP_DEFN/){print"/* #undef PCRE_EXP_DEFN */\n";$$blank=0;next;}' \ -e 'if(/to make a symbol visible/){next;}' \ -e 'if(/__attribute__ \(\(visibility/){next;}' \ - -e 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;}' \ - -e 'else {if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}}' \ + -e 'if(/LT_OBJDIR/){print"/* This is ignored unless you are using libtool. */\n";}' \ + -e 'if(/^#define\s((?:HAVE|SUPPORT|STDC)_\w+)/){print"/* #undef $$1 */\n";$$blank=0;next;}' \ + -e 'if(/^#define\s(?!PACKAGE|VERSION)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;next;}' \ + -e 'if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}' \ _generic/config.h >$@ rm -rf _generic |