summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-27 03:06:35 (GMT)
committerAlexey Neyman <stilor@att.net>2017-02-27 03:06:35 (GMT)
commit59bab98b2de061f395dc81f9a31157b4b1f9de91 (patch)
tree1f294bca496405cc83ac69967460b3f0cebb1d7c /configure.ac
parentdf1e3e32cfb7cf09e4636b08eeffb53181ca1e83 (diff)
Revert "Determine whether -E/-r option selects extended regexp"
This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 9 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 439cdca..11c5a8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,27 +171,15 @@ AS_IF([test "$EGREP" != "$GREP -E"],
ACX_WITH_DEPRECATED([sed], [SED])
AC_ARG_VAR([INSTALL], [Specify the full path to GNU sed])
AC_PROG_SED
-AC_CACHE_CHECK([whether $SED understands -i -e],
- [acx_cv_sed_i_e],
- [echo foo > .ct-ng.sed.test
- ${SED} -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1
- rc=$?
- content=`cat .ct-ng.sed.test`
- rm -f .ct-ng.sed.test
- AS_IF([test "$rc:$content" = "0:bar"],
- [acx_cv_sed_i_e=yes],
- [AC_MSG_ERROR([sed does not accept -i -e])])])
-AC_CACHE_CHECK([which $SED option selects extended regexp],
- [acx_cv_sed_r],
- [opt_r=`echo foo | $SED -r -e 's/f(o)o/b\1ar/' 2>/dev/null`
- opt_E=`echo foo | $SED -E -e 's/f(o)o/b\1ar/' 2>/dev/null`
- AS_IF([test "$opt_r" = "boar"],
- [acx_cv_sed_r=-r],
- [test "$opt_E" = "boar"],
- [acx_cv_sed_r=-E],
- [AC_MSG_ERROR([neither -r nor -E enables extended regexp])])])
-SED_R="$SED $acx_cv_sed_r"
-AC_SUBST([SED_R])
+AC_MSG_CHECKING([whether sed understands -r -i -e])
+echo foo > .ct-ng.sed.test
+${SED} -r -i -e 's/f(o)o/b\1ar/' .ct-ng.sed.test >/dev/null 2>&1
+rc=$?
+content=`cat .ct-ng.sed.test`
+rm -f .ct-ng.sed.test
+AS_IF([test "$rc:$content" = "0:boar"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([sed does not accept -r -i -e])])
AC_PROG_LN_S