* absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Jul 2006 07:38:59 +0000 (07:38 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Jul 2006 07:38:59 +0000 (07:38 +0000)
to the absolute name, not just one, to bypass Sun C 5.8's
"warning: #include of /usr/include/... may be non-portable".

m4/ChangeLog
m4/absolute-header.m4

index ef3f406..d11fdde 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
+       to the absolute name, not just one, to bypass Sun C 5.8's
+       "warning: #include of /usr/include/... may be non-portable".
+
 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * absolute-header.m4: Renamed from full-header-path.m4.
index 82fd901..6cf5c15 100644 (file)
@@ -1,4 +1,4 @@
-# absolute-header.m4 serial 3
+# absolute-header.m4 serial 4
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,6 +13,8 @@ dnl From Derek Price.
 # ABSOLUTE_SYS_INTTYPES_H to the `<>' quoted absolute name of sys/inttypes.h
 # in config.h
 # (e.g. `#define ABSOLUTE_SYS_INTTYPES_H <///usr/include/sys/inttypes.h>').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
 AC_DEFUN([gl_ABSOLUTE_HEADER],
 [AC_LANG_PREPROC_REQUIRE()dnl
 AC_FOREACH([gl_HEADER_NAME], [$1],
@@ -29,13 +31,13 @@ dnl eval is necessary to expand ac_cpp.
 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
       AS_VAR_SET(gl_absolute_header,
 [`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;p;q;}'`])
+sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
     fi
     AS_VAR_POPDEF([ac_header_exists])dnl
     ])dnl
   AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
                      [<AS_VAR_GET(gl_absolute_header)>],
-                     [Define this to the absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
+                     [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
   AS_VAR_POPDEF([gl_absolute_header])dnl
 ])dnl
 ])# gl_ABSOLUTE_HEADER