# HG changeset patch # User Ralf Wildenhues # Date 1251914853 -7200 # Node ID 0e6b6e9d54d0e333eb25e83ae0fcae00b6c8e267 # Parent fb9478b0ba3923a3fd243cdb137c90a4ded7f9d4 Replace uses of obsolete autoconf macros in Jim's modules. The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use can evoke a warning from autoconf when run with -Wobsolete enabled. They were declared obsolete for good reasons (see the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual, recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we should not continue using the deprecated macros. * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace obsolete Autoconf macros with modern counterparts. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. * m4/dos.m4 (gl_AC_DOS): Likewise. * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise. * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise. * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise. * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise. * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise. * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise. * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise. * m4/stat-time.m4 (gl_STAT_TIME): Likewise. * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise. Signed-off-by: Ralf Wildenhues diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2009-09-02 Ralf Wildenhues + + Replace uses of obsolete autoconf macros in Jim's modules. + The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and + AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use + can evoke a warning from autoconf when run with -Wobsolete + enabled. They were declared obsolete for good reasons (see + the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual, + recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we + should not continue using the deprecated macros. + * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace + obsolete Autoconf macros with modern counterparts. + * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. + * m4/dos.m4 (gl_AC_DOS): Likewise. + * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise. + * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. + * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise. + * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise. + * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. + * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise. + * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise. + * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise. + * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): + Likewise. + * m4/rename.m4 (gl_FUNC_RENAME): Likewise. + * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. + * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise. + * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise. + * m4/stat-time.m4 (gl_STAT_TIME): Likewise. + * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise. + 2009-09-01 Eric Blake fchdir: fix off-by-one bug in previous patch diff --git a/m4/d-type.m4 b/m4/d-type.m4 --- a/m4/d-type.m4 +++ b/m4/d-type.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 dnl From Jim Meyering. dnl @@ -14,15 +14,13 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], [AC_CACHE_CHECK([for d_type member in directory struct], gl_cv_struct_dirent_d_type, - [AC_TRY_LINK(dnl - [ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], - [struct dirent dp; dp.d_type = 0;], - - gl_cv_struct_dirent_d_type=yes, - gl_cv_struct_dirent_d_type=no) + ]], + [[struct dirent dp; dp.d_type = 0;]])], + [gl_cv_struct_dirent_d_type=yes], + [gl_cv_struct_dirent_d_type=no]) ] ) if test $gl_cv_struct_dirent_d_type = yes; then diff --git a/m4/dirfd.m4 b/m4/dirfd.m4 --- a/m4/dirfd.m4 +++ b/m4/dirfd.m4 @@ -1,4 +1,4 @@ -# serial 16 -*- Autoconf -*- +# serial 17 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. @@ -53,11 +53,11 @@ for ac_expr in d_fd dd_fd; do CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" - AC_TRY_COMPILE( - [#include - #include ], - [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;], - dir_fd_found=yes + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include ]], + [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])], + [dir_fd_found=yes] ) CFLAGS=$dirfd_save_CFLAGS test "$dir_fd_found" = yes && break diff --git a/m4/dos.m4 b/m4/dos.m4 --- a/m4/dos.m4 +++ b/m4/dos.m4 @@ -1,4 +1,4 @@ -#serial 10 -*- autoconf -*- +#serial 11 -*- autoconf -*- # Define some macros required for proper operation of code in lib/*.c # on MSDOS/Windows systems. @@ -14,10 +14,10 @@ [ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], [ - AC_TRY_COMPILE([], - [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows -#endif], +#endif]])], [ac_cv_win_or_dos=yes], [ac_cv_win_or_dos=no]) ]) @@ -28,10 +28,10 @@ AC_CACHE_CHECK([whether drive letter can start relative path], [ac_cv_drive_letter_can_be_relative], [ - AC_TRY_COMPILE([], - [#if defined __CYGWIN__ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ +#if defined __CYGWIN__ drive letters are always absolute -#endif], +#endif]])], [ac_cv_drive_letter_can_be_relative=yes], [ac_cv_drive_letter_can_be_relative=no]) ]) diff --git a/m4/fpending.m4 b/m4/fpending.m4 --- a/m4/fpending.m4 +++ b/m4/fpending.m4 @@ -1,4 +1,4 @@ -# serial 14 +# serial 15 # Copyright (C) 2000-2001, 2004-2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -65,11 +65,9 @@ # Skip each embedded comment. case "$ac_expr" in '#'*) continue;; esac - AC_TRY_COMPILE( - [#include - ], - [FILE *fp = stdin; (void) ($ac_expr);], - fp_done=yes + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[FILE *fp = stdin; (void) ($ac_expr);]])], + [fp_done=yes] ) test "$fp_done" = yes && break done diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,4 +1,4 @@ -# serial 24 +# serial 25 # Obtaining file system usage information. # Copyright (C) 1997-1998, 2000-2001, 2003-2009 Free Software Foundation, Inc. @@ -46,7 +46,7 @@ if test $ac_fsusage_space = no; then # SVR4 AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], - [AC_TRY_LINK([#include + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #if defined __GLIBC__ && defined __linux__ Do not use statvfs on systems with GNU libc on Linux, because that function stats all preceding entries in /proc/mounts, and that makes df hang if even @@ -59,10 +59,10 @@ "Do not use Tru64's statvfs implementation" #endif -#include ], - [struct statvfs fsd; statvfs (0, &fsd);], - fu_cv_sys_stat_statvfs=yes, - fu_cv_sys_stat_statvfs=no)]) +#include ]], + [[struct statvfs fsd; statvfs (0, &fsd);]])], + [fu_cv_sys_stat_statvfs=yes], + [fu_cv_sys_stat_statvfs=no])]) if test $fu_cv_sys_stat_statvfs = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATVFS], [1], @@ -74,7 +74,7 @@ # DEC Alpha running OSF/1 AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs3_osf1], - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -84,10 +84,10 @@ struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd, sizeof (struct statfs)) != 0; - }], - fu_cv_sys_stat_statfs3_osf1=yes, - fu_cv_sys_stat_statfs3_osf1=no, - fu_cv_sys_stat_statfs3_osf1=no)]) + }]])], + [fu_cv_sys_stat_statfs3_osf1=yes], + [fu_cv_sys_stat_statfs3_osf1=no], + [fu_cv_sys_stat_statfs3_osf1=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs3_osf1]) if test $fu_cv_sys_stat_statfs3_osf1 = yes; then ac_fsusage_space=yes @@ -101,7 +101,7 @@ AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl member (AIX, 4.3BSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_SYS_PARAM_H #include #endif @@ -117,10 +117,10 @@ struct statfs fsd; fsd.f_bsize = 0; return statfs (".", &fsd) != 0; - }], - fu_cv_sys_stat_statfs2_bsize=yes, - fu_cv_sys_stat_statfs2_bsize=no, - fu_cv_sys_stat_statfs2_bsize=no)]) + }]])], + [fu_cv_sys_stat_statfs2_bsize=yes], + [fu_cv_sys_stat_statfs2_bsize=no], + [fu_cv_sys_stat_statfs2_bsize=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_bsize]) if test $fu_cv_sys_stat_statfs2_bsize = yes; then ac_fsusage_space=yes @@ -134,17 +134,18 @@ # SVR3 AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs4], - [AC_TRY_RUN([#include + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include #include int main () { struct statfs fsd; return statfs (".", &fsd, sizeof fsd, 0) != 0; - }], - fu_cv_sys_stat_statfs4=yes, - fu_cv_sys_stat_statfs4=no, - fu_cv_sys_stat_statfs4=no)]) + }]])], + [fu_cv_sys_stat_statfs4=yes], + [fu_cv_sys_stat_statfs4=no], + [fu_cv_sys_stat_statfs4=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs4]) if test $fu_cv_sys_stat_statfs4 = yes; then ac_fsusage_space=yes @@ -158,7 +159,8 @@ AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl member (4.4BSD and NetBSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], - [AC_TRY_RUN([#include + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include #ifdef HAVE_SYS_PARAM_H #include #endif @@ -171,10 +173,10 @@ struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd) != 0; - }], - fu_cv_sys_stat_statfs2_fsize=yes, - fu_cv_sys_stat_statfs2_fsize=no, - fu_cv_sys_stat_statfs2_fsize=no)]) + }]])], + [fu_cv_sys_stat_statfs2_fsize=yes], + [fu_cv_sys_stat_statfs2_fsize=no], + [fu_cv_sys_stat_statfs2_fsize=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_fsize]) if test $fu_cv_sys_stat_statfs2_fsize = yes; then ac_fsusage_space=yes @@ -188,7 +190,8 @@ # Ultrix AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) AC_CACHE_VAL([fu_cv_sys_stat_fs_data], - [AC_TRY_RUN([#include + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include #ifdef HAVE_SYS_PARAM_H #include #endif @@ -205,10 +208,10 @@ /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ return statfs (".", &fsd) != 1; - }], - fu_cv_sys_stat_fs_data=yes, - fu_cv_sys_stat_fs_data=no, - fu_cv_sys_stat_fs_data=no)]) + }]])], + [fu_cv_sys_stat_fs_data=yes], + [fu_cv_sys_stat_fs_data=no], + [fu_cv_sys_stat_fs_data=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_fs_data]) if test $fu_cv_sys_stat_fs_data = yes; then ac_fsusage_space=yes @@ -220,12 +223,12 @@ if test $ac_fsusage_space = no; then # SVR2 - AC_TRY_CPP([#include - ], - AC_DEFINE([STAT_READ_FILSYS], [1], + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include + ]])], + [AC_DEFINE([STAT_READ_FILSYS], [1], [Define if there is no specific function for reading file systems usage information and you have the header file. (SVR2)]) - ac_fsusage_space=yes) + ac_fsusage_space=yes]) fi AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) @@ -246,8 +249,8 @@ #endif #include #include ]], - [[struct statfs t; long c = *(t.f_spare); - if (c) return 0;]])], + [[struct statfs t; long c = *(t.f_spare); + if (c) return 0;]])], [fu_cv_sys_truncating_statfs=yes], [fu_cv_sys_truncating_statfs=no])]) if test $fu_cv_sys_truncating_statfs = yes; then diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -174,14 +174,14 @@ `n_un' member. Obsolete, depend on `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [], [@%:@include ]) - AC_TRY_LINK([#include ], - [struct nlist x; - #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME - x.n_un.n_name = ""; - #else - x.n_name = ""; - #endif], - [AC_DEFINE([N_NAME_POINTER], [1], - [Define to 1 if the nlist n_name member is a pointer])]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct nlist x; + #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME + x.n_un.n_name = ""; + #else + x.n_name = ""; + #endif]])], + [AC_DEFINE([N_NAME_POINTER], [1], + [Define to 1 if the nlist n_name member is a pointer])]) ])dnl ])# gl_PREREQ_GETLOADAVG diff --git a/m4/jm-winsz1.m4 b/m4/jm-winsz1.m4 --- a/m4/jm-winsz1.m4 +++ b/m4/jm-winsz1.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # Copyright (C) 1996, 1999, 2001-2002, 2004, 2006, 2009 # Free Software Foundation, Inc. @@ -31,15 +31,15 @@ gl_cv_sys_struct_winsize_needs_sys_ptem_h, [gl_cv_sys_struct_winsize_needs_sys_ptem_h=yes if test $ac_cv_sys_posix_termios = yes; then - AC_TRY_COMPILE([#include ], - [struct winsize x; - if (sizeof x > 0) return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct winsize x; + if (sizeof x > 0) return 0;]])], [gl_cv_sys_struct_winsize_needs_sys_ptem_h=no]) fi if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then - AC_TRY_COMPILE([#include ], - [struct winsize x; - if (sizeof x > 0) return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct winsize x; + if (sizeof x > 0) return 0;]])], [], [gl_cv_sys_struct_winsize_needs_sys_ptem_h=no]) fi]) if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then diff --git a/m4/link-follow.m4 b/m4/link-follow.m4 --- a/m4/link-follow.m4 +++ b/m4/link-follow.m4 @@ -1,4 +1,4 @@ -# serial 11 +# serial 12 dnl Run a program to determine whether link(2) follows symlinks. dnl Set LINK_FOLLOWS_SYMLINKS accordingly. @@ -14,8 +14,7 @@ [ # Create a regular file. echo > conftest.file - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include @@ -50,10 +49,10 @@ the link call followed the symlink. */ return SAME_INODE (sb_hard, sb_file) ? 0 : 1; } - ], - gl_ac_cv_func_link_follows_symlink=yes, - gl_ac_cv_func_link_follows_symlink=no, - gl_ac_cv_func_link_follows_symlink=yes dnl We're cross compiling. + ]])], + [gl_ac_cv_func_link_follows_symlink=yes], + [gl_ac_cv_func_link_follows_symlink=no], + [gl_ac_cv_func_link_follows_symlink=yes] dnl We're cross compiling. ) ]) if test $gl_ac_cv_func_link_follows_symlink = yes; then diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -# serial 27 +# serial 28 # How to list mounted file systems. # Copyright (C) 1998-2004, 2006, 2009 Free Software Foundation, Inc. @@ -101,9 +101,9 @@ # AIX. AC_MSG_CHECKING([for mntctl function and struct vmount]) AC_CACHE_VAL([fu_cv_sys_mounted_vmount], - [AC_TRY_CPP([#include ], - fu_cv_sys_mounted_vmount=yes, - fu_cv_sys_mounted_vmount=no)]) + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], + [fu_cv_sys_mounted_vmount=yes], + [fu_cv_sys_mounted_vmount=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_vmount]) if test $fu_cv_sys_mounted_vmount = yes; then ac_list_mounted_fs=found @@ -123,7 +123,7 @@ # 4.3BSD, SunOS, HP-UX, Dynix, Irix AC_MSG_CHECKING([for one-argument getmntent function]) AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ #include @@ -139,11 +139,11 @@ # define MOUNTED MNTTABNAME # endif #endif -], - [ struct mntent *mnt = 0; char *table = MOUNTED; - if (sizeof mnt && sizeof table) return 0;], - fu_cv_sys_mounted_getmntent1=yes, - fu_cv_sys_mounted_getmntent1=no)]) +]], + [[ struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0;]])], + [fu_cv_sys_mounted_getmntent1=yes], + [fu_cv_sys_mounted_getmntent1=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1]) if test $fu_cv_sys_mounted_getmntent1 = yes; then ac_list_mounted_fs=found @@ -179,20 +179,20 @@ AC_MSG_CHECKING([for getfsstat function]) AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat], - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_STRUCT_FSSTAT_F_FSTYPENAME # define FS_TYPE(Ent) ((Ent).f_fstypename) #else # define FS_TYPE(Ent) mnt_names[(Ent).f_type] #endif -]$getfsstat_includes +$getfsstat_includes]] , - [struct statfs *stats; - int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); - char *t = FS_TYPE (*stats); ], - fu_cv_sys_mounted_getfsstat=yes, - fu_cv_sys_mounted_getfsstat=no)]) + [[struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); ]])], + [fu_cv_sys_mounted_getfsstat=yes], + [fu_cv_sys_mounted_getfsstat=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat]) if test $fu_cv_sys_mounted_getfsstat = yes; then ac_list_mounted_fs=found @@ -206,12 +206,12 @@ # SVR3 AC_MSG_CHECKING([for FIXME existence of three headers]) AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp], - [AC_TRY_CPP([ + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include #include -#include ], - fu_cv_sys_mounted_fread_fstyp=yes, - fu_cv_sys_mounted_fread_fstyp=no)]) +#include ]])], + [fu_cv_sys_mounted_fread_fstyp=yes], + [fu_cv_sys_mounted_fread_fstyp=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp]) if test $fu_cv_sys_mounted_fread_fstyp = yes; then ac_list_mounted_fs=found @@ -236,7 +236,7 @@ AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2], [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if HAVE_SYS_PARAM_H # include #endif @@ -248,7 +248,7 @@ # include #endif extern int getmntinfo (struct statfs **, int); - ], [], + ]], [])], [fu_cv_sys_mounted_getmntinfo2=no], [fu_cv_sys_mounted_getmntinfo2=yes]) ]) @@ -273,11 +273,11 @@ # Ultrix AC_MSG_CHECKING([for getmnt function]) AC_CACHE_VAL([fu_cv_sys_mounted_getmnt], - [AC_TRY_CPP([ + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include -#include ], - fu_cv_sys_mounted_getmnt=yes, - fu_cv_sys_mounted_getmnt=no)]) +#include ]])], + [fu_cv_sys_mounted_getmnt=yes], + [fu_cv_sys_mounted_getmnt=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt]) if test $fu_cv_sys_mounted_getmnt = yes; then ac_list_mounted_fs=found @@ -312,9 +312,9 @@ # SVR2 AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) AC_CACHE_VAL([fu_cv_sys_mounted_fread], - [AC_TRY_CPP([#include ], - fu_cv_sys_mounted_fread=yes, - fu_cv_sys_mounted_fread=no)]) + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], + [fu_cv_sys_mounted_fread=yes], + [fu_cv_sys_mounted_fread=no])]) AC_MSG_RESULT([$fu_cv_sys_mounted_fread]) if test $fu_cv_sys_mounted_fread = yes; then ac_list_mounted_fs=found diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4 --- a/m4/mkdir-slash.m4 +++ b/m4/mkdir-slash.m4 @@ -1,4 +1,4 @@ -# serial 7 +# serial 8 # Copyright (C) 2001, 2003-2004, 2006, 2008-2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -17,7 +17,7 @@ [ # Arrange for deletion of the temporary directory this test might create. ac_clean_files="$ac_clean_files confdir-slash" - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include @@ -29,10 +29,10 @@ rmdir ("confdir-slash"); exit (mkdir ("confdir-slash/", 0700)); } - ], - gl_cv_func_mkdir_trailing_slash_bug=no, - gl_cv_func_mkdir_trailing_slash_bug=yes, - gl_cv_func_mkdir_trailing_slash_bug=yes + ]])], + [gl_cv_func_mkdir_trailing_slash_bug=no], + [gl_cv_func_mkdir_trailing_slash_bug=yes], + [gl_cv_func_mkdir_trailing_slash_bug=yes] ) ] ) diff --git a/m4/mode_t.m4 b/m4/mode_t.m4 --- a/m4/mode_t.m4 +++ b/m4/mode_t.m4 @@ -1,4 +1,4 @@ -# mode_t.m4 serial 1 +# mode_t.m4 serial 2 dnl Copyright (C) 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,8 +16,8 @@ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', dnl and to itself otherwise. This assumption is not guaranteed by the ISO C dnl standard, but we don't know of any real-world counterexamples. - AC_TRY_COMPILE([#include ], - [typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], [gl_cv_promoted_mode_t='int'], [gl_cv_promoted_mode_t='mode_t']) ]) diff --git a/m4/rename-dest-slash.m4 b/m4/rename-dest-slash.m4 --- a/m4/rename-dest-slash.m4 +++ b/m4/rename-dest-slash.m4 @@ -1,4 +1,4 @@ -# serial 3 +# serial 4 # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -18,18 +18,18 @@ rm -rf conftest.d1 conftest.d2 mkdir conftest.d1 || AC_MSG_ERROR([cannot create temporary directory]) - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include int main () { return (rename ("conftest.d1", "conftest.d2/") ? 1 : 0); } - ], - gl_cv_func_rename_trailing_dest_slash_bug=no, - gl_cv_func_rename_trailing_dest_slash_bug=yes, + ]])], + [gl_cv_func_rename_trailing_dest_slash_bug=no], + [gl_cv_func_rename_trailing_dest_slash_bug=yes], dnl When crosscompiling, assume rename is broken. - gl_cv_func_rename_trailing_dest_slash_bug=yes) + [gl_cv_func_rename_trailing_dest_slash_bug=yes]) rm -rf conftest.d1 conftest.d2 ]) diff --git a/m4/rename.m4 b/m4/rename.m4 --- a/m4/rename.m4 +++ b/m4/rename.m4 @@ -1,4 +1,4 @@ -# serial 13 +# serial 14 # Copyright (C) 2001, 2003, 2005, 2006, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -22,7 +22,7 @@ rm -rf conftest.d1 conftest.d2 mkdir conftest.d1 || AC_MSG_ERROR([cannot create temporary directory]) - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include int @@ -30,11 +30,11 @@ { exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0); } - ], - gl_cv_func_rename_trailing_slash_bug=no, - gl_cv_func_rename_trailing_slash_bug=yes, + ]])], + [gl_cv_func_rename_trailing_slash_bug=no], + [gl_cv_func_rename_trailing_slash_bug=yes], dnl When crosscompiling, assume rename is broken. - gl_cv_func_rename_trailing_slash_bug=yes) + [gl_cv_func_rename_trailing_slash_bug=yes]) rm -rf conftest.d1 conftest.d2 ]) diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4 --- a/m4/rmdir-errno.m4 +++ b/m4/rmdir-errno.m4 @@ -1,4 +1,4 @@ -# serial 9 +# serial 10 # Copyright (C) 2000, 2001, 2005, 2006, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -19,7 +19,7 @@ # Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir2" mkdir confdir2; : > confdir2/file - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #ifdef HAVE_UNISTD_H @@ -35,10 +35,10 @@ fprintf (s, "%d\n", val); return 0; } - ], - gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`, - gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4', - gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY + ]])], + [gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`], + [gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4'], + [gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY] ) ] ) diff --git a/m4/rpmatch.m4 b/m4/rpmatch.m4 --- a/m4/rpmatch.m4 +++ b/m4/rpmatch.m4 @@ -1,4 +1,4 @@ -# rpmatch.m4 serial 8 +# rpmatch.m4 serial 9 dnl Copyright (C) 2002-2003, 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -20,8 +20,8 @@ # Prerequisites of lib/rpmatch.c. AC_DEFUN([gl_PREREQ_RPMATCH], [ AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr], - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(YESEXPR); return !cs;], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[char* cs = nl_langinfo(YESEXPR); return !cs;]])], [gl_cv_langinfo_yesexpr=yes], [gl_cv_langinfo_yesexpr=no]) ]) diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4 --- a/m4/st_dm_mode.m4 +++ b/m4/st_dm_mode.m4 @@ -1,4 +1,4 @@ -# serial 5 +# serial 6 # Copyright (C) 1998, 1999, 2001, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -9,10 +9,11 @@ AC_DEFUN([AC_STRUCT_ST_DM_MODE], [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode], - [AC_TRY_COMPILE([#include -#include ], [struct stat s; s.st_dm_mode;], - ac_cv_struct_st_dm_mode=yes, - ac_cv_struct_st_dm_mode=no)]) + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include ]], [[struct stat s; s.st_dm_mode;]])], + [ac_cv_struct_st_dm_mode=yes], + [ac_cv_struct_st_dm_mode=no])]) if test $ac_cv_struct_st_dm_mode = yes; then AC_DEFINE([HAVE_ST_DM_MODE], [1], diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 --- a/m4/stat-time.m4 +++ b/m4/stat-time.m4 @@ -26,8 +26,8 @@ AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], - [AC_TRY_COMPILE( - [ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ #include #include #if HAVE_SYS_TIME_H @@ -36,10 +36,10 @@ #include struct timespec ts; struct stat st; - ], - [ + ]], + [[ st.st_atim = ts; - ], + ]])], [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then diff --git a/m4/utimes-null.m4 b/m4/utimes-null.m4 --- a/m4/utimes-null.m4 +++ b/m4/utimes-null.m4 @@ -1,4 +1,4 @@ -# serial 8 +# serial 9 # Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009 Free Software # Foundation, Inc. @@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_UTIMES_NULL], [AC_CACHE_CHECK([whether utimes accepts a null argument], [ac_cv_func_utimes_null], [rm -f conftest.data; > conftest.data -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* In case stat has been defined to rpl_stat, undef it here. */ #undef stat #include @@ -27,10 +27,10 @@ && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120)); -}], - ac_cv_func_utimes_null=yes, - ac_cv_func_utimes_null=no, - ac_cv_func_utimes_null=no) +}]])], + [ac_cv_func_utimes_null=yes], + [ac_cv_func_utimes_null=no], + [ac_cv_func_utimes_null=no]) rm -f core core.* *.core]) if test $ac_cv_func_utimes_null = yes; then