Module: wine Branch: master Commit: 7d5e565b5a114de6d9e5a1a44d3ef73ed4bca6bb URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d5e565b5a114de6d9e5a1a44d...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 1 12:51:54 2009 +0200
configure: Add checks for fnmatch support.
---
configure | 4 ++++ configure.ac | 2 ++ include/config.h.in | 6 ++++++ programs/winemenubuilder/winemenubuilder.c | 6 ++++++ 4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/configure b/configure index 52a8130..4ed22e0 100755 --- a/configure +++ b/configure @@ -5780,6 +5780,7 @@ done
+ for ac_header in \ AudioUnit/AudioUnit.h \ Carbon/Carbon.h \ @@ -5799,6 +5800,7 @@ for ac_header in \ dlfcn.h \ elf.h \ float.h \ + fnmatch.h \ fontconfig/fontconfig.h \ getopt.h \ grp.h \ @@ -17988,6 +17990,7 @@ CFLAGS="$CFLAGS $BUILTINFLAG"
+ for ac_func in \ _pclose \ _popen \ @@ -18005,6 +18008,7 @@ for ac_func in \ epoll_create \ ffs \ finite \ + fnmatch \ fork \ fpclass \ fstatfs \ diff --git a/configure.ac b/configure.ac index beccbbd..2185331 100644 --- a/configure.ac +++ b/configure.ac @@ -275,6 +275,7 @@ AC_CHECK_HEADERS(\ dlfcn.h \ elf.h \ float.h \ + fnmatch.h \ fontconfig/fontconfig.h \ getopt.h \ grp.h \ @@ -1476,6 +1477,7 @@ AC_CHECK_FUNCS(\ epoll_create \ ffs \ finite \ + fnmatch \ fork \ fpclass \ fstatfs \ diff --git a/include/config.h.in b/include/config.h.in index c22d1f7..a36d1fb 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -93,6 +93,12 @@ /* Define to 1 if you have the <float.h> header file. */ #undef HAVE_FLOAT_H
+/* Define to 1 if you have the `fnmatch' function. */ +#undef HAVE_FNMATCH + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#undef HAVE_FNMATCH_H + /* Define to 1 if you have the <fontconfig/fontconfig.h> header file. */ #undef HAVE_FONTCONFIG_FONTCONFIG_H
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 2e87ca5..a86d207 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -64,7 +64,9 @@ #endif #include <errno.h> #include <stdarg.h> +#ifdef HAVE_FNMATCH_H #include <fnmatch.h> +#endif
#define COBJMACROS
@@ -1444,6 +1446,7 @@ static BOOL build_native_mime_types(const char *xdg_data_home, struct list **mim static BOOL match_glob(struct list *native_mime_types, const char *extension, char **match) { +#ifdef HAVE_FNMATCH struct xdg_mime_type *mime_type_entry; int matchLength = 0;
@@ -1467,6 +1470,9 @@ static BOOL match_glob(struct list *native_mime_types, const char *extension, if (*match == NULL) return FALSE; } +#else + *match = NULL; +#endif return TRUE; }