From 209a1a065ec056c35f30f1127e7255e49c7ab662 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 19 Oct 2011 10:38:07 +0200 Subject: Support for old NeXTstep 3.3 sed. * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): In the sed address part, use /.../, not \|...|. Escape periods in the header file name. * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise. Reported by Daniel Richard G. . --- m4/include_next.m4 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'm4/include_next.m4') diff --git a/m4/include_next.m4 b/m4/include_next.m4 index d5230ced8d..8a1fab66d1 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 22 +# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -219,12 +219,17 @@ changequote(,) gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + dnl A sed expression that turns a string into a basic regular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' changequote([,]) - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{ - s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1| + gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl -- cgit v1.2.1