gitlog-to-changelog: give better diagnostic for failed pipe-open
[gnulib.git] / m4 / warning.m4
1 # serial 4
2 # Find valid warning flags for the C Compiler.           -*-Autoconf-*-
3
4 # Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # Written by Jesse Thilo.
10
11 AC_DEFUN([gl_WARNING_CFLAGS],
12   [AC_MSG_CHECKING(whether compiler accepts $1)
13    AC_SUBST(WARNING_CFLAGS)
14    ac_save_CFLAGS="$CFLAGS"
15    CFLAGS="$CFLAGS $1"
16    AC_TRY_COMPILE(,
17     [int x;],
18     WARNING_CFLAGS="$WARNING_CFLAGS $1"
19     AC_MSG_RESULT(yes),
20     AC_MSG_RESULT(no))
21   CFLAGS="$ac_save_CFLAGS"
22  ])