~ubuntu-branches/ubuntu/lucid/wget/lucid-security

« back to all changes in this revision

Viewing changes to m4/inline.m4

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# inline.m4 serial 4
 
2
dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
dnl Test for the 'inline' keyword or equivalent.
 
8
dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
 
9
dnl like AC_C_INLINE does.  Also, define HAVE_INLINE if 'inline' or an
 
10
dnl equivalent is effectively supported, i.e. if the compiler is likely to
 
11
dnl drop unused 'static inline' functions.
 
12
AC_DEFUN([gl_INLINE],
 
13
[
 
14
  AC_REQUIRE([AC_C_INLINE])
 
15
  AC_CACHE_CHECK([whether the compiler generally respects inline],
 
16
    [gl_cv_c_inline_effective],
 
17
    [if test $ac_cv_c_inline = no; then
 
18
       gl_cv_c_inline_effective=no
 
19
     else
 
20
       dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
 
21
       dnl specified.
 
22
       dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
 
23
       dnl depends on optimization flags, which can be in CFLAGS.
 
24
       dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
 
25
       AC_COMPILE_IFELSE(
 
26
         [AC_LANG_PROGRAM([[]],
 
27
           [[#ifdef __NO_INLINE__
 
28
               #error "inline is not effective"
 
29
             #endif]])],
 
30
         [gl_cv_c_inline_effective=yes],
 
31
         [gl_cv_c_inline_effective=no])
 
32
     fi
 
33
    ])
 
34
  if test $gl_cv_c_inline_effective = yes; then
 
35
    AC_DEFINE([HAVE_INLINE], [1],
 
36
      [Define to 1 if the compiler supports one of the keywords
 
37
       'inline', '__inline__', '__inline' and effectively inlines
 
38
       functions marked as such.])
 
39
  fi
 
40
])