forked from mirrors/tftp-hpa-google
autoconf: modernize and modularize
Use my modular m4 library used for other things as well; update autoconf macros to 2.71 standard. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
33051a296c
commit
fefaa2cc5c
35 changed files with 680 additions and 461 deletions
26
autoconf/m4/pa_check_bad_stdc_inline.m4
Normal file
26
autoconf/m4/pa_check_bad_stdc_inline.m4
Normal file
|
@ -0,0 +1,26 @@
|
|||
dnl --------------------------------------------------------------------------
|
||||
dnl PA_CHECK_BAD_STDC_INLINE
|
||||
dnl
|
||||
dnl Some versions of gcc seem to apply -Wmissing-prototypes to C99
|
||||
dnl inline functions, which means we need to use GNU inline syntax
|
||||
dnl --------------------------------------------------------------------------
|
||||
AC_DEFUN([PA_CHECK_BAD_STDC_INLINE],
|
||||
[AC_MSG_CHECKING([if $CC supports C99 external inlines])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
AC_INCLUDES_DEFAULT
|
||||
|
||||
/* Don't mistake GNU inlines for c99 */
|
||||
#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
|
||||
# error "Using gnu inline standard"
|
||||
#endif
|
||||
|
||||
inline int foo(int x)
|
||||
{
|
||||
return x+1;
|
||||
}
|
||||
])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_STDC_INLINE], 1,
|
||||
[Define to 1 if your compiler supports C99 extern inline])],
|
||||
[AC_MSG_RESULT([no])
|
||||
PA_ADD_CFLAGS([-fgnu89-inline])])])
|
Loading…
Add table
Add a link
Reference in a new issue