123456789101112131415161718 |
- # AX_CHECK_CFLAGS(ADDITIONAL-CFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
- #
- # checks whether the $(CC) compiler accepts the ADDITIONAL-CFLAGS
- # if so, they are added to the CXXFLAGS
- AC_DEFUN([AX_CHECK_CFLAGS],
- [
- AC_MSG_CHECKING([whether compiler accepts "$1"])
- echo "int main(int argc, char** argv){ return 0; }" > conftest.c
- if $CC $CFLAGS -o conftest.o conftest.c [$1] > /dev/null 2>&1
- then
- AC_MSG_RESULT([yes])
- CFLAGS="${CFLAGS} [$1]"
- [$2]
- else
- AC_MSG_RESULT([no])
- [$3]
- fi
- ])dnl AX_CHECK_CFLAGS
|