]> granicus.if.org Git - flex/commitdiff
check for regex.h; resolves bug #2337486
authorWill Estes <wlestes@users.sourceforge.net>
Sun, 28 Dec 2008 15:46:20 +0000 (15:46 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Sun, 28 Dec 2008 15:46:20 +0000 (15:46 +0000)
configure.in
flexdef.h

index 969c51522fd6e1fca1521529fa5945a006ff26eb..c03e2582b1a2162b1c2d6b365284c2caadbebd0e 100644 (file)
@@ -84,7 +84,8 @@ fi
 AC_FUNC_ALLOCA
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h stddef.h stdlib.h string.h strings.h unistd.h])
+AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h
+netinet/in.h stddef.h stdlib.h string.h strings.h unistd.h regex.h])
 AC_CHECK_LIB(m, log10)
 
 # The test test-pthread uses libpthread, so we check for it here, but
index d038952d44ea422f9d400f564bda6d3464a5e8ee..72827117418487aa41581b51522064e7f4aba9bf 100644 (file)
--- a/flexdef.h
+++ b/flexdef.h
@@ -91,7 +91,9 @@ char *alloca ();
 #define true 1
 #define false 0
 #endif
+#ifdef HAVE_REGEX_H
 #include <regex.h>
+#endif
 #include "flexint.h"
 
 /* We use gettext. So, when we write strings which should be translated, we mark them with _() */