~ubuntu-branches/ubuntu/vivid/gtk-vnc/vivid-proposed

« back to all changes in this revision

Viewing changes to m4/warnings.m4

  • Committer: Package Import Robot
  • Author(s): Laurent Léonard
  • Date: 2012-07-24 00:49:55 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20120724004955-6711f7ontxvn9yzy
Tags: 0.5.1-1
* [e2591bf] Imported Upstream version 0.5.1
* [a0f6408] Drop patch
  - Allow-Unix-domain-sockets-in-gvncviewer.patch - fixed upstream
* [c031b94] Bump Standards-Version to 3.9.3
* [61e5796] Set build directories for dh_auto_clean
* [7fde78d] Drop patch
  - Look-for-generated-enums-in-srcdir.patch
* [fada5be] Add dh_auto_test override
* [d7567f1] Update symbols
* [6189676] Enable dpkg-buildflags

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# warnings.m4 serial 5
 
2
dnl Copyright (C) 2008-2012 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 From Simon Josefsson
 
8
 
 
9
# gl_AS_VAR_APPEND(VAR, VALUE)
 
10
# ----------------------------
 
11
# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
 
12
m4_ifdef([AS_VAR_APPEND],
 
13
[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
 
14
[m4_define([gl_AS_VAR_APPEND],
 
15
[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
 
16
 
 
17
# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
 
18
# ------------------------------------------------
 
19
# Adds parameter to WARN_CFLAGS if the compiler supports it.  For example,
 
20
# gl_WARN_ADD([-Wparentheses]).
 
21
AC_DEFUN([gl_WARN_ADD],
 
22
dnl FIXME: gl_Warn must be used unquoted until we can assume
 
23
dnl autoconf 2.64 or newer.
 
24
[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
 
25
AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
 
26
  gl_save_CPPFLAGS="$CPPFLAGS"
 
27
  CPPFLAGS="${CPPFLAGS} $1"
 
28
  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
 
29
                    [AS_VAR_SET(gl_Warn, [yes])],
 
30
                    [AS_VAR_SET(gl_Warn, [no])])
 
31
  CPPFLAGS="$gl_save_CPPFLAGS"
 
32
])
 
33
AS_VAR_IF(gl_Warn, [yes],
 
34
  [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
 
35
AS_VAR_POPDEF([gl_Warn])dnl
 
36
m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
 
37
])