diff --git a/acinclude.m4 b/acinclude.m4 index e650e9bf3..f52ccf79e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,6 +1,7 @@ m4_include([m4.include/ac_onceonly.m4]) m4_include([m4.include/ax_path_lib_pcre.m4]) m4_include([m4.include/dx_doxygen.m4]) +m4_include([m4.include/mc-check-search-type.m4]) m4_include([m4.include/mc-mcserver.m4]) m4_include([m4.include/ac-get-fs-info.m4]) m4_include([m4.include/mc-use-termcap.m4]) diff --git a/configure.ac b/configure.ac index 8ff82701e..2537c5832 100644 --- a/configure.ac +++ b/configure.ac @@ -327,11 +327,7 @@ linux*) ;; esac -$PKG_CONFIG --max-version 2.14 glib-2.0 -if test $? -eq 0 -then - AX_PATH_LIB_PCRE -fi +MC_CHECK_SEARCH_TYPE dnl dnl Check nroff and the options it supports @@ -636,4 +632,5 @@ Configuration: With subshell support: ${subshell} Internal editor: ${edit_msg} Support for charset: ${charset_msg} + Search type: ${SEARCH_TYPE} " diff --git a/m4.include/mc-check-search-type.m4 b/m4.include/mc-check-search-type.m4 new file mode 100644 index 000000000..6444a4460 --- /dev/null +++ b/m4.include/mc-check-search-type.m4 @@ -0,0 +1,22 @@ +dnl @synopsis MC_VERSION +dnl +dnl Check search type in mc. Currently used glib-regexp or pcre +dnl +dnl @author Slava Zanko +dnl @version 2009-06-19 +dnl @license GPL +dnl @copyright Free Software Foundation, Inc. + +AC_DEFUN([MC_CHECK_SEARCH_TYPE],[ + + $PKG_CONFIG --max-version 2.14 glib-2.0 + if test $? -eq 0; then + AX_PATH_LIB_PCRE + if test x"${PCRE_LIBS}" = x; then + AC_MSG_ERROR([Your system have glib < 2.14 and don't have pcre library (or pcre devel stuff)]) + fi + SEARCH_TYPE="pcre" + else + SEARCH_TYPE="glib-regexp" + fi +])