1*49cdfc7eSAndroid Build Coastguard Workerdnl SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Workerdnl Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved. 3*49cdfc7eSAndroid Build Coastguard Workerdnl Author: Alexey Kodanev <[email protected]> 4*49cdfc7eSAndroid Build Coastguard Worker 5*49cdfc7eSAndroid Build Coastguard WorkerAC_DEFUN([LTP_CHECK_CC_WARN_OLDSTYLE],[ 6*49cdfc7eSAndroid Build Coastguard Worker 7*49cdfc7eSAndroid Build Coastguard Workerwflag="-Wold-style-definition" 8*49cdfc7eSAndroid Build Coastguard WorkerAC_MSG_CHECKING([if $CC supports $wflag]) 9*49cdfc7eSAndroid Build Coastguard Worker 10*49cdfc7eSAndroid Build Coastguard Workerbackup_cflags="$CFLAGS" 11*49cdfc7eSAndroid Build Coastguard WorkerCFLAGS="$CFLAGS $wflag" 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard WorkerAC_LINK_IFELSE( 14*49cdfc7eSAndroid Build Coastguard Worker [AC_LANG_PROGRAM([])], 15*49cdfc7eSAndroid Build Coastguard Worker [GCC_WARN_OLDSTYLE="$wflag"] 16*49cdfc7eSAndroid Build Coastguard Worker [AC_MSG_RESULT([yes])], 17*49cdfc7eSAndroid Build Coastguard Worker [AC_MSG_RESULT([no])] 18*49cdfc7eSAndroid Build Coastguard Worker) 19*49cdfc7eSAndroid Build Coastguard Worker 20*49cdfc7eSAndroid Build Coastguard WorkerAC_SUBST(GCC_WARN_OLDSTYLE) 21*49cdfc7eSAndroid Build Coastguard WorkerCFLAGS="$backup_cflags" 22*49cdfc7eSAndroid Build Coastguard Worker 23*49cdfc7eSAndroid Build Coastguard Worker]) 24