SF.net SVN: geany:[6003] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Thu Oct 6 00:43:47 UTC 2011
Revision: 6003
http://geany.svn.sourceforge.net/geany/?rev=6003&view=rev
Author: colombanw
Date: 2011-10-06 00:43:46 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Move configure logic for internal GNU regex usage to its own file
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Added Paths:
-----------
trunk/m4/geany-gnu-regex.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:43:28 UTC (rev 6002)
+++ trunk/ChangeLog 2011-10-06 00:43:46 UTC (rev 6003)
@@ -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.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:43:28 UTC (rev 6002)
+++ trunk/configure.ac 2011-10-06 00:43:46 UTC (rev 6003)
@@ -92,25 +92,9 @@
# 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])
+GEANY_CHECK_GNU_REGEX
-# 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
-
-
# check for mingw specific settings
case "${host}" in
*mingw*)
Added: trunk/m4/geany-gnu-regex.m4
===================================================================
--- trunk/m4/geany-gnu-regex.m4 (rev 0)
+++ trunk/m4/geany-gnu-regex.m4 2011-10-06 00:43:46 UTC (rev 6003)
@@ -0,0 +1,24 @@
+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
+])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list