1 dnl @synopsis MC_VERSION
3 dnl Check search type in mc. Currently used glib-regexp or pcre
5 dnl @author Slava Zanko <slavazanko@gmail.com>
6 dnl @version 2009-06-19
8 dnl @copyright Free Software Foundation, Inc.
10 AC_DEFUN([MC_CHECK_SEARCH_TYPE_PCRE],[
12 if test x"${PCRE_LIBS}" = x; then
13 AC_MSG_ERROR([Your system don't have pcre library (or pcre devel stuff)])
16 AC_DEFINE(SEARCH_TYPE_PCRE, 1, [Define to select 'pcre' search type])
21 AC_DEFUN([MC_CHECK_SEARCH_TYPE_GLIB],[
22 $PKG_CONFIG --max-version 2.14 glib-2.0
23 if test $? -eq 0; then
24 AC_MSG_RESULT([[Selected 'glib' search engine, but you don't have glib >= 2.14. Trying to use 'pcre' engine], (WARNING)])
25 MC_CHECK_SEARCH_TYPE_PCRE
27 AC_DEFINE(SEARCH_TYPE_GLIB, 1, [Define to select 'glib-regexp' search type])
32 AC_DEFUN([MC_CHECK_SEARCH_TYPE],[
34 AC_ARG_WITH([search-engine],
35 AC_HELP_STRING([--with-search-engine=type],
36 [Select low-level search engine (since glib >= 2.14). [[glib|pcre]]])
38 case x$with_search_engine in
40 SEARCH_TYPE="glib-regexp"
43 MC_CHECK_SEARCH_TYPE_PCRE
46 SEARCH_TYPE="glib-regexp"
49 AC_MSG_ERROR([Value of the search-engine is incorrect])
53 if test x"$SEARCH_TYPE" = x"glib-regexp"; then
54 MC_CHECK_SEARCH_TYPE_GLIB