X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fabsolute-header.m4;h=5b7a2fc35f08d6bddc2f58eb0a1f887c2f8364a7;hb=b6a9d33ee89de0a0f7bf482449339e97cbbbdaef;hp=6cf5c1512ff0c49bbea703dbe3f5dfb9e9312c52;hpb=1e92888e842eb79cded05c1c31b727f796b851ff;p=gnulib.git diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index 6cf5c1512..5b7a2fc35 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -1,5 +1,5 @@ -# absolute-header.m4 serial 4 -dnl Copyright (C) 2006 Free Software Foundation, Inc. +# absolute-header.m4 serial 7 +dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,11 +10,12 @@ dnl From Derek Price. # --------------------------------------- # Find the absolute name of a header file, assuming the header exists. # If the header were sys/inttypes.h, this macro would define -# ABSOLUTE_SYS_INTTYPES_H to the `<>' quoted absolute name of sys/inttypes.h +# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h # in config.h -# (e.g. `#define ABSOLUTE_SYS_INTTYPES_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". +# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. AC_DEFUN([gl_ABSOLUTE_HEADER], [AC_LANG_PREPROC_REQUIRE()dnl AC_FOREACH([gl_HEADER_NAME], [$1], @@ -31,12 +32,17 @@ 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#;s#^/[^/]#//&#;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 an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) AS_VAR_POPDEF([gl_absolute_header])dnl ])dnl