2019-01-07 14:06:15 +01:00
|
|
|
dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
|
|
|
|
dnl
|
2020-09-11 13:42:22 +02:00
|
|
|
dnl Shows a message as like "checking whether gcc accepts flag ... no"
|
|
|
|
dnl and executes ifyes or ifno.
|
2019-01-07 14:06:15 +01:00
|
|
|
|
|
|
|
AC_DEFUN([AC_CHECK_CC_OPT],
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
|
|
|
|
echo 'void f(){}' > conftest.c
|
|
|
|
if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
$2
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
$3
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
])
|
|
|
|
|