1 dnl GEANY_CHECK_GNU_REGEX
2 dnl Checks whether to use internal GNU regex library
3 dnl Defines USE_INCLUDED_REGEX both with AC_DEFINE and as an
5 AC_DEFUN([GEANY_CHECK_GNU_REGEX],
7 AC_ARG_ENABLE([gnu-regex],
8 [AS_HELP_STRING([--enable-gnu-regex],
9 [compile with included GNU regex library [default=no]])],
11 [enable_gnu_regex=no])
13 # auto-enable included regex if necessary
14 # FIXME: this may override a user choice
15 AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
17 if test "x$enable_gnu_regex" = "xyes" ; then
18 AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
19 AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
20 AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
21 GEANY_STATUS_ADD([GNU regex library], [built-in])
23 AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
24 GEANY_STATUS_ADD([GNU regex library], [system])