* configure.ac
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sat, 7 Jun 2003 01:01:50 +0000 (01:01 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sat, 7 Jun 2003 01:01:50 +0000 (01:01 +0000)
* src/mimeview.c
detect apache mishap in which case don't include fnmatch.h
if regex.h is already included

ChangeLog.claws
configure.ac
src/mimeview.c

index d0364cb..989f3fe 100644 (file)
@@ -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
index 2dff4d0..e2a06e2 100644 (file)
@@ -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 <stdlib.h>
+               #include <fnmatch.h>],
+       [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
index 3a5d678..0c73a49 100644 (file)
 #include <gtk/gtkdnd.h>
 #include <gtk/gtkselection.h>
 #include <stdio.h>
-#ifdef HAVE_FNMATCH_H
+
+#ifndef HAVE_APACHE_FNMATCH
+/* kludge: apache's fnmatch clashes with <regex.h>, don't include
+ * fnmatch.h */
 #include <fnmatch.h>
 #endif