I'm using AM_CONFIG_HEADER to insert a couple of configure-time
defines into headers which will be installed.  This works well, except
that I want to have one literal #undef pass through, rather than be
commented out like normally happens.

Perhaps a special marker could stop selected #undef's from getting
transformed, for instance,

        #define __need_size_t
        #include <stddef.h>
        #undef __need_size_t /*NOTATEMPLATE*/

--- acgeneral.m4.old	Thu Mar  8 06:59:40 2001
+++ acgeneral.m4	Thu Mar  8 07:02:01 2001
@@ -4199,7 +4199,7 @@
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
 cat >>conftest.undefs <<\EOF
-[s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
+[/[*]NOTATEMPLATE[*]/!s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
 EOF
 
 # Break up conftest.defines because some shells have a limit on the size

Reply via email to