[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] configure: ignore REG_ENHANCED test when we use gnu
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH] configure: ignore REG_ENHANCED test when we use gnulib |
Date: |
Tue, 4 Apr 2017 12:42:23 -0400 |
If we're using the bundled gnulib regex module, then assume REG_ENHANCED
is not supported (since gnulib doesn't support it).
This fixes https://savannah.gnu.org/bugs/?50714.
---
configure.ac | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index f914fa8e70f4..c839c5eca29d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -594,10 +594,19 @@ AC_CACHE_CHECK([for enhanced regular expression flag],
nano_cv_flag_reg_extended
error: No REG_ENHANCED
support!
#endif
]])],
- [nano_cv_flag_reg_extended="REG_EXTENDED |
REG_ENHANCED"],
- [nano_cv_flag_reg_extended="REG_EXTENDED"])])
+ [nano_cv_flag_reg_extended=yes],
+ [nano_cv_flag_reg_extended=no])])
+dnl The bundled gnulib regex module doesn't support REG_ENHANCED.
+if test "$ac_use_included_regex" = "yes"; then
+ nano_cv_flag_reg_extended="no"
+fi
+if test "$nano_cv_flag_reg_extended" = "yes"; then
+ nano_reg_extended="REG_EXTENDED | REG_ENHANCED"
+else
+ nano_reg_extended="REG_EXTENDED"
+fi
-AC_DEFINE_UNQUOTED(NANO_REG_EXTENDED, $nano_cv_flag_reg_extended,
+AC_DEFINE_UNQUOTED(NANO_REG_EXTENDED, $nano_reg_extended,
[Flag(s) to use to get the full range of extended regular
expressions])
# Check for word-boundary support (/< and />).
--
2.12.0
- [Nano-devel] [PATCH] configure: ignore REG_ENHANCED test when we use gnulib,
Mike Frysinger <=