~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/include_next.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# include_next.m4 serial 20
2
 
dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 
1
# include_next.m4 serial 23
 
2
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
143
143
# even if the compiler does not support include_next.
144
144
# The three "///" are to pacify Sun C 5.8, which otherwise would say
145
145
# "warning: #include of /usr/include/... may be non-portable".
146
 
# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
 
146
# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
147
147
# Note: This macro assumes that the header file is not empty after
148
148
# preprocessing, i.e. it does not only define preprocessor macros but also
149
149
# provides some type/enum definitions or function/variable declarations.
207
207
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
208
208
                 *)    gl_absname_cpp="$ac_cpp" ;;
209
209
               esac
 
210
changequote(,)
 
211
               case "$host_os" in
 
212
                 mingw*)
 
213
                   dnl For the sake of native Windows compilers (excluding gcc),
 
214
                   dnl treat backslash as a directory separator, like /.
 
215
                   dnl Actually, these compilers use a double-backslash as
 
216
                   dnl directory separator, inside the
 
217
                   dnl   # line "filename"
 
218
                   dnl directives.
 
219
                   gl_dirsep_regex='[/\\]'
 
220
                   ;;
 
221
                 *)
 
222
                   gl_dirsep_regex='\/'
 
223
                   ;;
 
224
               esac
 
225
               dnl A sed expression that turns a string into a basic regular
 
226
               dnl expression, for use within "/.../".
 
227
               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
228
changequote([,])
 
229
               gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
 
230
                                        | sed -e "$gl_make_literal_regex_sed"`
 
231
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
232
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
233
changequote(,)dnl
 
234
                   s|^/[^/]|//&|
 
235
changequote([,])dnl
 
236
                   p
 
237
                   q
 
238
                 }'
210
239
               dnl eval is necessary to expand gl_absname_cpp.
211
240
               dnl Ultrix and Pyramid sh refuse to redirect output of eval,
212
241
               dnl so use subshell.
213
242
               AS_VAR_SET(gl_next_header,
214
243
                 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
215
 
                  sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
216
 
                    s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
217
 
                    s#^/[^/]#//&#
218
 
                    p
219
 
                    q
220
 
                  }'`'"'])
 
244
                      sed -n "$gl_absolute_header_sed"`'"'])
221
245
          m4_if([$2], [check],
222
246
            [else
223
247
               AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])