tizen 2.3 release
[framework/uifw/embryo.git] / m4 / efl_fnmatch.m4
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.
3
4 dnl Macro that check if fnmatch functions are available or not.
5
6 dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7 dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
8
9 AC_DEFUN([EFL_CHECK_FNMATCH],
10 [
11
12 AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
13
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"])
19 fi
20
21 EFL_FNMATCH_LIBS=""
22
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}
25 fi
26
27 AC_SUBST(EFL_FNMATCH_LIBS)
28
29 AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])
30
31 ])