diff --git a/m4/macosx.m4 b/m4/macosx.m4 index d6919b89..cacb0e6b 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -8,6 +8,13 @@ case "$target_os" in ;; esac +if test "$target_darwin" = "yes"; then + AC_MSG_NOTICE([using bundled GNU regex on $target_os]) + # pretend that the regex.h check failed so that we use the bundled regex code + ac_cv_header_regex_h=no + AC_DEFINE([HAVE_REGEX_H], 0, [Define to 1 if you have the header file.]) +fi + AC_ARG_ENABLE([mac-universal], AC_HELP_STRING([--enable-mac-universal], [build a universal binary on Mac OS X @<:@no@:>@]), [case "${enableval}" in diff --git a/src/include/re.h b/src/include/re.h index d7029148..630916af 100644 --- a/src/include/re.h +++ b/src/include/re.h @@ -23,7 +23,7 @@ #ifndef RE_H_ #define RE_H_ -#ifdef HAVE_REGEX_H +#if HAVE_REGEX_H # include #else # include "compat/regex.h" diff --git a/src/include/spot.h b/src/include/spot.h index 5f77744d..6a309345 100644 --- a/src/include/spot.h +++ b/src/include/spot.h @@ -23,7 +23,7 @@ #ifndef SPOT_H_ #define SPOT_H_ -#ifdef HAVE_REGEX_H +#if HAVE_REGEX_H # include #else # include "compat/regex.h"