diff options
author | Christos Zoulas <christos@zoulas.com> | 2021-07-01 06:55:35 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2021-07-01 06:55:35 +0000 |
commit | 8bfbda61c5895b22aa857604c1e501a3dea7a03f (patch) | |
tree | ff74f436a116cbfe7f32f0b9282c7b69a0ec0698 /acinclude.m4 | |
parent | 04e2d4a31f3be7e70863044e3257d70922fd72f3 (diff) | |
download | file-git-8bfbda61c5895b22aa857604c1e501a3dea7a03f.tar.gz |
adjust for newer autoconf
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index dcbf92f5..e827758b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3,8 +3,9 @@ dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT], [AC_REQUIRE([AC_STRUCT_TM])dnl AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone, -[AC_TRY_COMPILE([#include <sys/types.h> -#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], +[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;])], ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)]) if test "$ac_cv_struct_tm_zone" = yes; then AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE]) @@ -14,19 +15,20 @@ fi # consider it declared and we won't give our own extern. AC_CHECK_DECLS([tzname], , , [#include <time.h>]) AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, -[AC_TRY_LINK( -[#include <time.h> -#if !HAVE_DECL_TZNAME +[AC_LINK_IFELSE( +[AC_LANG_PROGRAM([#include <time.h>], +[#if !HAVE_DECL_TZNAME extern char *tzname[]; -#endif], -[return tzname[0][0];], [ac_cv_var_tzname=yes], [ac_cv_var_tzname=no])]) +#endif +return tzname[0][0];])], [ac_cv_var_tzname=yes], [ac_cv_var_tzname=no])]) if test $ac_cv_var_tzname = yes; then AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME]) fi AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst, -[AC_TRY_COMPILE([#include <sys/types.h> -#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;], +[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;])], ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)]) if test "$ac_cv_struct_tm_isdst" = yes; then AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST]) @@ -35,14 +37,12 @@ fi AC_CHECK_DECLS([daylight], , , [#include <time.h>]) AC_CACHE_CHECK(for daylight, ac_cv_var_daylight, -[AC_TRY_LINK( -changequote(<<, >>)dnl -<<#include <time.h> -#if !HAVE_DECL_DAYLIGHT +[AC_LINK_IFELSE( +[AC_LANG_PROGRAM([#include <time.h>], +[#if !HAVE_DECL_DAYLIGHT extern int daylight; -#endif>>, -changequote([, ])dnl -[atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)]) +#endif +atoi(daylight);])], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)]) if test $ac_cv_var_daylight = yes; then AC_DEFINE(HAVE_DAYLIGHT,1,[HAVE_DAYLIGHT]) fi @@ -50,7 +50,8 @@ changequote([, ])dnl AC_DEFUN([AC_STRUCT_OPTION_GETOPT_H], [AC_CACHE_CHECK([for struct option in getopt], ac_cv_struct_option_getopt_h, -[AC_TRY_COMPILE([#include <getopt.h>], [struct option op; op.name;], +[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <getopt.h>], [struct option op; op.name;])], ac_cv_struct_option_getopt_h=yes, ac_cv_struct_option_getopt_h=no)]) if test "$ac_cv_struct_option_getopt_h" = yes; then AC_DEFINE(HAVE_STRUCT_OPTION,1,[HAVE_STRUCT_OPTION]) |