File: acinclude.m4

package info (click to toggle)
snapraid 13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,656 kB
  • sloc: ansic: 46,018; makefile: 1,004; sh: 154
file content (19 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
dnl 
dnl Shows a message as like "checking whether gcc accepts flag ... no"
dnl and executes ifyes or ifno.

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*
])