1dnl SPDX-License-Identifier: GPL-2.0-or-later
2dnl Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
3dnl Author: Alexey Kodanev <alexey.kodanev@oracle.com>
4
5AC_DEFUN([LTP_CHECK_CC_WARN_OLDSTYLE],[
6
7wflag="-Wold-style-definition"
8AC_MSG_CHECKING([if $CC supports $wflag])
9
10backup_cflags="$CFLAGS"
11CFLAGS="$CFLAGS $wflag"
12
13AC_LINK_IFELSE(
14	[AC_LANG_PROGRAM([])],
15	[GCC_WARN_OLDSTYLE="$wflag"]
16	[AC_MSG_RESULT([yes])],
17	[AC_MSG_RESULT([no])]
18)
19
20AC_SUBST(GCC_WARN_OLDSTYLE)
21CFLAGS="$backup_cflags"
22
23])
24