Kaydet (Commit) c7b57e24 authored tarafından Colomban Wendling's avatar Colomban Wendling

Move configure logic for internal GNU regex usage to its own file

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@6003 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 294a21db
......@@ -2,7 +2,8 @@
* autogen.sh, configure.ac:
Modernize configure.ac a bit.
* configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4:
* configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4,
m4/geany-gnu-regex.m4:
Extract some configure logic to separate files for better
readability.
......
......@@ -92,23 +92,7 @@ fi
# check whether to use included GNU regex library
AC_ARG_ENABLE([gnu-regex],
[AS_HELP_STRING([--enable-gnu-regex],
[compile with included GNU regex library [default=no]])],
,
[enable_gnu_regex=no])
# auto-enable included regex if necessary
# FIXME: this may override a user choice
AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
if test "x$enable_gnu_regex" = "xyes" ; then
AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
else
AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
fi
GEANY_CHECK_GNU_REGEX
# check for mingw specific settings
......
dnl GEANY_CHECK_GNU_REGEX
dnl Checks whether to use internal GNU regex library
dnl Defines USE_INCLUDED_REGEX both with AC_DEFINE and as an
dnl AM_CONDITIONAL
AC_DEFUN([GEANY_CHECK_GNU_REGEX],
[
AC_ARG_ENABLE([gnu-regex],
[AS_HELP_STRING([--enable-gnu-regex],
[compile with included GNU regex library [default=no]])],
,
[enable_gnu_regex=no])
# auto-enable included regex if necessary
# FIXME: this may override a user choice
AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
if test "x$enable_gnu_regex" = "xyes" ; then
AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
else
AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
fi
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment