From 1dc09597b24d19683abc597d45d7c28d37c199f0 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 9 Nov 2014 17:11:31 +0100 Subject: [PATCH] Fix check for fnmatch and remove strict dependency on it for Windows Strict dependency on fnmatch was removed in 52076d19e8fe7ab41ebc92928e. We still have an optional dependency on it from CTags, but I don't think we use this code, and anyways the checks we had for the optional path to be taken were incorrect, so it was never actually used. So, drop the dependency on libibrety for Windows builds, and fix the remaining checks for an optional fnmatch so if it is found it can actually be used. --- configure.ac | 2 +- m4/geany-mingw.m4 | 2 -- src/Makefile.am | 2 +- wscript | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 68d23580..4a26e786 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ AC_TYPE_SIZE_T AC_STRUCT_TM # Checks for library functions. -AC_CHECK_FUNCS([ftruncate fgetpos mkstemp strerror strstr]) +AC_CHECK_FUNCS([ftruncate fgetpos fnmatch mkstemp strerror strstr]) # autoscan end diff --git a/m4/geany-mingw.m4 b/m4/geany-mingw.m4 index 0fa8e441..75f6780f 100644 --- a/m4/geany-mingw.m4 +++ b/m4/geany-mingw.m4 @@ -6,8 +6,6 @@ AC_DEFUN([GEANY_CHECK_MINGW], [ case "${host}" in *mingw*) - AC_CHECK_LIB([iberty], [fnmatch], [], - [AC_MSG_ERROR([fnmatch does not present in libiberty. You need to update it, read http://www.geany.org/Support/CrossCompile for details.])]) AC_DEFINE([WIN32], [1], [we are cross compiling for WIN32]) GEANY_CHECK_VTE([no]) GEANY_CHECK_SOCKET([yes]) diff --git a/src/Makefile.am b/src/Makefile.am index ddd22b02..81449905 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -108,7 +108,7 @@ geany_LDADD = \ @GTK_LIBS@ \ @GTHREAD_LIBS@ \ $(INTLLIBS) \ - -lole32 -luuid -liberty -lwsock32 \ + -lole32 -luuid -lwsock32 \ geany_private.res AM_CFLAGS = -DGEANY_DATADIR=\"data\" \ diff --git a/wscript b/wscript index 889e8342..0973b2e8 100644 --- a/wscript +++ b/wscript @@ -193,6 +193,7 @@ def configure(conf): _add_to_env_and_define(conf, 'HAVE_REGCOMP', 1) # needed for CTags conf.check_cc(function_name='fgetpos', header_name='stdio.h', mandatory=False) + conf.check_cc(function_name='fnmatch', header_name='fnmatch.h', mandatory=False) conf.check_cc(function_name='ftruncate', header_name='unistd.h', mandatory=False) conf.check_cc(function_name='mkstemp', header_name='stdlib.h', mandatory=False) conf.check_cc(function_name='strstr', header_name='string.h') @@ -259,7 +260,7 @@ but you then may not have a local copy of the HTML manual.''' '-mwindows', '-static-libgcc', '-static-libstdc++']) - conf.env.append_value('LIB_WIN32', ['wsock32', 'uuid', 'ole32', 'iberty']) + conf.env.append_value('LIB_WIN32', ['wsock32', 'uuid', 'ole32']) # explicitly define Windows version for older Mingw environments conf.define('WINVER', '0x0501', quote=False) # for SHGetFolderPathAndSubDirW conf.define('_WIN32_IE', '0x0500', quote=False) # for SHGFP_TYPE