diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2021-03-30 21:43:13 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2021-04-26 22:32:52 +0100 |
commit | 5ef26675cccf524ef929b90d15f61a57874830b5 (patch) | |
tree | d67155b2f49e134a5a1aedc879da1429d2419cd3 /CCache | |
parent | 0c3da29dc3800cc58651af53d762dab042dafeed (diff) | |
download | swig-5ef26675cccf524ef929b90d15f61a57874830b5.tar.gz |
configure.ac update (ccache)
Updated using autoupdate from autoconf 2.71
Diffstat (limited to 'CCache')
-rw-r--r-- | CCache/configure.ac | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/CCache/configure.ac b/CCache/configure.ac index e1c761860..2559fdb5f 100644 --- a/CCache/configure.ac +++ b/CCache/configure.ac @@ -1,12 +1,12 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([ccache-swig], [0.0]) # Get version from SWIG in ccache_swig_config.h.in -AC_PREREQ(2.52) +AC_INIT([ccache-swig],[0.0]) # Get version from SWIG in ccache_swig_config.h.in +AC_PREREQ([2.71]) AC_CONFIG_SRCDIR([ccache.h]) AC_MSG_NOTICE([Configuring ccache]) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([config_win32.h]) dnl Checks for programs. @@ -41,7 +41,20 @@ else fi AC_HEADER_DIRENT -AC_HEADER_TIME +m4_warn([obsolete], +[Update your code to rely only on HAVE_SYS_TIME_H, +then remove this warning and the obsolete code below it. +All current systems provide time.h; it need not be checked for. +Not all systems provide sys/time.h, but those that do, all allow +you to include it and time.h simultaneously.])dnl +AC_CHECK_HEADERS_ONCE([sys/time.h]) +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h> + and <time.h>. This macro is obsolete.]) +fi +# End of obsolete code. + AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h pwd.h sys/time.h) @@ -51,19 +64,16 @@ AC_CHECK_FUNCS(gethostname getpwuid) AC_CHECK_FUNCS(utimes) AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [ - AC_TRY_COMPILE( -[#include <stdlib.h>], -[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]], [[ void test_fn(void) { qsort(NULL, 0, 0, (__compar_fn_t)NULL); } -], - ccache_cv_COMPAR_FN_T=yes,ccache_cv_COMPAR_FN_T=no)]) +]])],[ccache_cv_COMPAR_FN_T=yes],[ccache_cv_COMPAR_FN_T=no])]) if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then AC_DEFINE(HAVE_COMPAR_FN_T, 1, [ ]) fi dnl Note: This could be replaced by AC_FUNC_SNPRINTF() in the autoconf macro archive AC_CACHE_CHECK([for C99 vsnprintf],ccache_cv_HAVE_C99_VSNPRINTF,[ -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <sys/types.h> #include <stdarg.h> void foo(const char *format, ...) { @@ -81,8 +91,7 @@ void foo(const char *format, ...) { exit(0); } main() { foo("hello"); } -], -ccache_cv_HAVE_C99_VSNPRINTF=yes,ccache_cv_HAVE_C99_VSNPRINTF=no,ccache_cv_HAVE_C99_VSNPRINTF=cross)]) +]])],[ccache_cv_HAVE_C99_VSNPRINTF=yes],[ccache_cv_HAVE_C99_VSNPRINTF=no],[ccache_cv_HAVE_C99_VSNPRINTF=cross])]) if test x"$ccache_cv_HAVE_C99_VSNPRINTF" = x"yes"; then AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [ ]) fi |