changeset 33:b9911aed06bc

*** empty log message ***
author Jim Blandy <jimb@red-bean.com>
date Thu, 24 Dec 1992 06:48:09 +0000
parents 320b31b5b035
children 39dca083e5dc
files configure.in regex.h
diffstat 2 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,9 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(regex.c)
 
+dnl Because regex may or may not be used with Autoconf, we need to know.
+AC_DEFINE(USING_AUTOCONF)
+
 AC_PROG_CC
 AC_PROG_INSTALL
 
--- a/regex.h
+++ b/regex.h
@@ -393,12 +393,25 @@
    already been defined, as by Autoconf's AC_CONST, don't do anything.  */
 
 #if __STDC__
+
 #define _RE_ARGS(args) args
+
 #else /* not __STDC__ */
+
 #define _RE_ARGS(args) ()
-#if !const && !HAVE_CONST
+
+#ifndef USING_AUTOCONF
+
+#ifndef HAVE_CONST
+#define const
+#else
+#if !HAVE_CONST
 #define const
 #endif
+#endif
+
+#endif /* not USING_AUTOCONF */
+
 #endif /* not __STDC__ */
 
 /* Sets the current default syntax to SYNTAX, and return the old syntax.