* configure.ac: fix the __printf__ attribute macro.

This commit is contained in:
Sam Hocevar 2008-07-20 11:16:06 +00:00 committed by sam
parent 1fa7c66f0f
commit 4b777d9bb7

View File

@ -112,12 +112,14 @@ AC_TRY_COMPILE([],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for __printf__ attribute)
ac_v_attribute_printf=""
AC_TRY_COMPILE([],
[extern void foo(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));],
[AC_MSG_RESULT(yes)
AC_DEFINE(ATTRIBUTE_PRINTF(x,y), __attribute__((__format__(__printf__, x, y))), [Define to the __printf__ attribute if present])],
ac_v_attribute_printf="__attribute__((__format__(__printf__, x, y)))"],
[AC_MSG_RESULT(no)])
AC_DEFINE_UNQUOTED(ATTRIBUTE_PRINTF(x,y), $ac_v_attribute_printf, [Define to the __printf__ attribute if present])
ac_cv_have_getopt_long="no"
AC_CHECK_FUNCS(getopt_long,