1 dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2 dnl That code is public domain and can be freely used or copied.
4 dnl Macro that check if fnmatch functions are available or not.
6 dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7 dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
9 AC_DEFUN([EFL_CHECK_FNMATCH],
12 AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
14 if test "x${_efl_have_fnmatch}" = "xyes" ; then
15 AC_SEARCH_LIBS([fnmatch],
16 [fnmatch evil exotic iberty],
17 [_efl_have_fnmatch="yes"],
18 [_efl_have_fnmatch="no"])
23 if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
24 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
27 AC_SUBST(EFL_FNMATCH_LIBS)
29 AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])