* AUTHORS:
[tunertool] / m4 / as-compiler-flag.m4
1 dnl as-compiler-flag.m4 0.0.1
2 dnl autostars m4 macro for detection of compiler flags
3 dnl
4 dnl ds@schleef.org
5
6 AC_DEFUN([AS_COMPILER_FLAG],
7 [
8   AC_MSG_CHECKING([to see if compiler understands $1])
9
10   save_CFLAGS="$CFLAGS"
11   CFLAGS="$CFLAGS $1"
12
13   AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
14   CFLAGS="$save_CFLAGS"
15
16   if test "X$flag_ok" = Xyes ; then
17     $2
18     true
19   else
20     $3
21     true
22   fi
23   AC_MSG_RESULT([$flag_ok])
24 ])
25