~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to m4macros/detectcflags.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl GIMP_DETECT_CFLAGS(RESULT, FLAGSET)
 
2
dnl Detect if the compiler supports a set of flags
 
3
 
 
4
AC_DEFUN([GIMP_DETECT_CFLAGS],
 
5
[
 
6
  $1=
 
7
  for flag in $2; do
 
8
    if test -z "[$]$1"; then
 
9
      $1_save_CFLAGS="$CFLAGS"
 
10
      CFLAGS="$CFLAGS $flag"
 
11
      AC_MSG_CHECKING([whether [$]CC understands [$]flag])
 
12
      AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no])
 
13
      AC_MSG_RESULT([$]$1_works)
 
14
      CFLAGS="[$]$1_save_CFLAGS"
 
15
      if test "x[$]$1_works" = "xyes"; then
 
16
        $1="$flag"
 
17
      fi
 
18
    fi
 
19
  done
 
20
])