From 33fc82df956d7fafd64b37eff9635f1e219fe0fe Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst Date: Sat, 7 Jun 2003 01:01:50 +0000 Subject: [PATCH] * configure.ac * src/mimeview.c detect apache mishap in which case don't include fnmatch.h if regex.h is already included --- ChangeLog.claws | 7 +++++++ configure.ac | 14 +++++++++++++- src/mimeview.c | 5 ++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index d0364cbae..989f3fe47 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,10 @@ +2003-06-07 [alfons] 0.9.0claws17 + + * configure.ac + * src/mimeview.c + detect apache mishap in which case don't include fnmatch.h + if regex.h is already included + 2003-06-06 [christoph] 0.9.0claws16 * configure.ac diff --git a/configure.ac b/configure.ac index 2dff4d01e..e2a06e225 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws16 +EXTRA_VERSION=claws17 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target @@ -130,6 +130,18 @@ AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \ sys/param.h sys/utsname.h sys/select.h \ wchar.h wctype.h fnmatch.h) +dnl alf - Check for apache installation f*ck up. apache may also install an +dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined +AC_TRY_COMPILE([#include + #include ], + [int x = USE_HSREGEX;], + ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no) +if test $ac_cv_have_apache_fnmatch = yes; then + AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!) +fi +AC_MSG_CHECKING([whether to use Apache regex header kludge]) +AC_MSG_RESULT($ac_cv_have_apache_fnmatch) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T diff --git a/src/mimeview.c b/src/mimeview.c index 3a5d678f8..0c73a49a7 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -36,7 +36,10 @@ #include #include #include -#ifdef HAVE_FNMATCH_H + +#ifndef HAVE_APACHE_FNMATCH +/* kludge: apache's fnmatch clashes with , don't include + * fnmatch.h */ #include #endif -- 2.25.1