summaryrefslogtreecommitdiff
path: root/m4/include_next.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-10-19 10:38:07 +0200
committerBruno Haible <bruno@clisp.org>2011-10-19 11:23:47 +0200
commit209a1a065ec056c35f30f1127e7255e49c7ab662 (patch)
tree0b763f16bd34305b6c75d21f6b434b731d4da351 /m4/include_next.m4
parentd1a06d87a70c6a1f0588a70c91c182f6873aae41 (diff)
downloadgnulib-209a1a065ec056c35f30f1127e7255e49c7ab662.tar.gz
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. <skunk@iskunk.org>.
Diffstat (limited to 'm4/include_next.m4')
-rw-r--r--m4/include_next.m413
1 files changed, 9 insertions, 4 deletions
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