summaryrefslogtreecommitdiff
path: root/m4/include_next.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-09-11 09:52:58 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-09-11 09:52:58 -0700
commit3f44249e19c27e3cf87a0676dfdc4136f49539b3 (patch)
tree0b842bf77a6121a2d9da02a119726ab025456f6b /m4/include_next.m4
parenta98e7468321a83381758bd894b94f7c1c40c2991 (diff)
downloademacs-3f44249e19c27e3cf87a0676dfdc4136f49539b3.tar.gz
Merge from gnulib, porting to Tru64.
* lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4: * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4: Merge from gnulib. This fixes a compilation error on Tru64 UNIX aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that doesn't affect Emacs.
Diffstat (limited to 'm4/include_next.m4')
-rw-r--r--m4/include_next.m431
1 files changed, 24 insertions, 7 deletions
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index ebf081a1101..14a1009b5d4 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 20
+# include_next.m4 serial 21
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,
@@ -207,17 +207,34 @@ dnl until we can assume autoconf 2.64 or newer.
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+changequote(,)
+ case "$host_os" in
+ mingw*)
+ dnl For the sake of native Windows compilers (excluding gcc),
+ dnl treat backslash as a directory separator, like /.
+ dnl Actually, these compilers use a double-backslash as
+ dnl directory separator, inside the
+ dnl # line "filename"
+ dnl directives.
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='/'
+ ;;
+ esac
+changequote([,])
+ gl_absolute_header_sed='\#'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[#{
+ s#.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'
dnl eval is necessary to expand gl_absname_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
dnl so use subshell.
AS_VAR_SET(gl_next_header,
['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
- s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'])
+ sed -n "$gl_absolute_header_sed"`'"'])
m4_if([$2], [check],
[else
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])