1dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno) 2dnl 3dnl Shows a message as like "checking wether gcc accepts flag ... no" 4dnl and executess ifyes or ifno. 5 6AC_DEFUN([AC_CHECK_CC_OPT], 7[ 8AC_MSG_CHECKING([whether ${CC-cc} accepts $1]) 9echo 'void f(){}' > conftest.c 10if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then 11 AC_MSG_RESULT([yes]) 12 $2 13else 14 AC_MSG_RESULT([no]) 15 $3 16fi 17rm -f conftest* 18]) 19 20 21