diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-02-10 05:39:24 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-02-10 05:39:24 +0000 |
commit | 2fae5c2a7405d566c860a493740417118724e20b (patch) | |
tree | 3e8c1adf36dff23bd344f4d2094e1e10b27fd19b /m4 | |
parent | 687b04a2d298a9a1ee50e45c4ef8538e4b578fbd (diff) | |
download | grep-2fae5c2a7405d566c860a493740417118724e20b.tar.gz |
updates.
updates from Eli.
Few typo fixed.
use DJ_GPP instead of DJGPP
prototype undossify_input.
* grep-2.2f beta release.
* m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
New files to aid configuration and unload configure.in.
* m4/Makefile.am : updated.
Patch forwarded by Ben Elliston.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/djgpp.m4 | 6 | ||||
-rw-r--r-- | m4/envsep.m4 | 2 | ||||
-rw-r--r-- | m4/gettext.m4 | 2 | ||||
-rw-r--r-- | m4/regex.m4 | 86 |
4 files changed, 70 insertions, 26 deletions
diff --git a/m4/djgpp.m4 b/m4/djgpp.m4 index 98b4b555..607c8e59 100644 --- a/m4/djgpp.m4 +++ b/m4/djgpp.m4 @@ -1,9 +1,9 @@ -dnl Check for DJGPP. we use DJ_GPP a the variable +dnl Check for DJGPP. we use DJ_GPP as the variable dnl EXEEXXT AC_DEFUN(AC_DJGPP, [AC_CACHE_CHECK(for DJGPP environment, ac_cv_djgpp, [AC_TRY_COMPILE(,[ return __DJGPP__;], ac_cv_djgpp=yes, ac_cv_djgpp=no) rm -f conftest*]) -DJGPP= -test "$ac_cv_djgpp" = yes && DJGPP=yes]) +DJ_GPP= +test "$ac_cv_djgpp" = yes && DJ_GPP=yes]) diff --git a/m4/envsep.m4 b/m4/envsep.m4 index 91c082cd..8a3d2687 100644 --- a/m4/envsep.m4 +++ b/m4/envsep.m4 @@ -9,7 +9,7 @@ AC_REQUIRE([AC_MINGW32]) AC_REQUIRE([AC_DJGPP]) AC_MSG_CHECKING([for environ variable separator]) AC_CACHE_VAL(ac_cv_sep, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$DJGPP" = yes ; then +[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$DJ_GPP" = yes ; then ac_cv_sep=yes else ac_cv_sep=no diff --git a/m4/gettext.m4 b/m4/gettext.m4 index d0b48454..ba0343f7 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -310,7 +310,7 @@ strdup __argz_count __argz_stringify __argz_next]) dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + if test "x`echo $srcdir | sed -e 's@^[A-z]:@@' -e 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" diff --git a/m4/regex.m4 b/m4/regex.m4 index cbd2f333..13ccd4c1 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,25 +1,69 @@ -dnl Even packages that don't use regex.c can use this macro. -dnl Of course, for them it doesn't do anything. -dnl Derived from code in GNU fileutils ;-). - -AC_DEFUN(AM_INCLUDED_REGEX, -[AC_REQUIRE([AM_GLIBC]) -AC_CACHE_CHECK([whether compiling regex.c], ac_cv_included_regex, -[ -# By default, don't use the included regex.c on systems with glibc 2 -if test x"$ac_cv_glibc" = xyes ; then - default=no -else - default=yes -fi +#serial 4 + +dnl Initially derived from code in GNU grep. +dnl Mostly written by Jim Meyering. + +AC_DEFUN(jm_INCLUDED_REGEX, + [ + AC_REQUIRE([AM_GLIBC]) + + dnl Even packages that don't use regex.c can use this macro. + dnl Of course, for them it doesn't do anything. + + # Normally we should skip the test for GLIBC but a bug + # in the older regex will not be detected so test for everyone. + # The failing regular expression is from `Spencer ere test + # #75' in grep-2.2f. + ac_use_included_regex=yes + + # Without this run-test, on older glibc2 systems we'd end up + # using the buggy system regex. + AC_CACHE_CHECK([for working re_compile_pattern], + jm_cv_func_working_re_compile_pattern, + AC_TRY_RUN( + changequote(<<, >>)dnl + << +#include <stdio.h> +#include <regex.h> + int + main () + { + static struct re_pattern_buffer regex; + const char *s; + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + /* Add this third left square bracket, [, to balance the + three right ones below. Otherwise autoconf-2.14 chokes. */ + s = re_compile_pattern ("a[[:]:]]b\n", 9, ®ex); + /* This should fail with _Invalid character class name_ error. */ + exit (s ? 0 : 1); + } + >>, + changequote([, ])dnl + + jm_cv_func_working_re_compile_pattern=yes, + jm_cv_func_working_re_compile_pattern=no, + dnl When crosscompiling, assume it's broken. + jm_cv_func_working_re_compile_pattern=no)) + if test $jm_cv_func_working_re_compile_pattern = yes; then + ac_use_included_regex=no + fi + + test -n "$1" || AC_MSG_ERROR([missing argument]) + syscmd([test -f $1]) + ifelse(sysval, 0, + [ + AC_ARG_WITH(included-regex, [ --without-included-regex don't compile regex; this is the default on systems with version 2 of the GNU C library (use with caution on other system)], - ac_cv_included_regex=$withval, - ac_cv_included_regex=$default) -if test x"$ac_cv_included_regex" = xyes; then - LIBOBJS="$LIBOBJS regex.${ac_objext}" -fi -AC_SUBST(LIBOBJS)dnl -])]) + jm_with_regex=$withval, + jm_with_regex=$ac_use_included_regex) + if test "$jm_with_regex" = yes; then + LIBOBJS="$LIBOBJS regex.o" + fi + ], + ) + AC_SUBST(LIBOJS)dnl + ] +) |