_XOPEN_SOURCE_EXTENDED where appropriate, use AC_C_INLINE to avoid using
the inline keyword when unsupported, and use #pragma INIT for library
initialisation routines.
15 lines
510 B
Plaintext
15 lines
510 B
Plaintext
dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
|
|
dnl check if $CC supports a given set of cflags
|
|
AC_DEFUN([AC_TRY_CFLAGS],
|
|
[AC_MSG_CHECKING([if $CC supports $1 flags])
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
CFLAGS="$1"
|
|
AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
AC_MSG_RESULT([$ac_cv_try_cflags_ok])
|
|
if test x"$ac_cv_try_cflags_ok" = x"yes"; then
|
|
ifelse([$2],[],[:],[$2])
|
|
else
|
|
ifelse([$3],[],[:],[$3])
|
|
fi])
|