+2009-09-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ 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 <ebb9@byu.net>
fchdir: fix off-by-one bug in previous patch
-# serial 10
+# serial 11
dnl From Jim Meyering.
dnl
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 <sys/types.h>
#include <dirent.h>
- ],
- [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
-# serial 16 -*- Autoconf -*-
+# serial 17 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
for ac_expr in d_fd dd_fd; do
CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
- AC_TRY_COMPILE(
- [#include <sys/types.h>
- #include <dirent.h>],
- [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
- dir_fd_found=yes
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <dirent.h>]],
+ [[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
-#serial 10 -*- autoconf -*-
+#serial 11 -*- autoconf -*-
# Define some macros required for proper operation of code in lib/*.c
# on MSDOS/Windows systems.
[
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])
])
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])
])
-# serial 14
+# serial 15
# Copyright (C) 2000-2001, 2004-2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# Skip each embedded comment.
case "$ac_expr" in '#'*) continue;; esac
- AC_TRY_COMPILE(
- [#include <stdio.h>
- ],
- [FILE *fp = stdin; (void) ($ac_expr);],
- fp_done=yes
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[FILE *fp = stdin; (void) ($ac_expr);]])],
+ [fp_done=yes]
)
test "$fp_done" = yes && break
done
-# serial 24
+# serial 25
# Obtaining file system usage information.
# Copyright (C) 1997-1998, 2000-2001, 2003-2009 Free Software Foundation, Inc.
if test $ac_fsusage_space = no; then
# SVR4
AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs],
- [AC_TRY_LINK([#include <sys/types.h>
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#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
"Do not use Tru64's statvfs implementation"
#endif
-#include <sys/statvfs.h>],
- [struct statvfs fsd; statvfs (0, &fsd);],
- fu_cv_sys_stat_statvfs=yes,
- fu_cv_sys_stat_statvfs=no)])
+#include <sys/statvfs.h>]],
+ [[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],
# 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 <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
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
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 <sys/param.h>
#endif
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
# 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 <sys/types.h>
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
#include <sys/statfs.h>
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
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 <sys/types.h>
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
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
# 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 <sys/types.h>
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
/* 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
if test $ac_fsusage_space = no; then
# SVR2
- AC_TRY_CPP([#include <sys/filsys.h>
- ],
- AC_DEFINE([STAT_READ_FILSYS], [1],
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h>
+ ]])],
+ [AC_DEFINE([STAT_READ_FILSYS], [1],
[Define if there is no specific function for reading file systems usage
information and you have the <sys/filsys.h> header file. (SVR2)])
- ac_fsusage_space=yes)
+ ac_fsusage_space=yes])
fi
AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
#endif
#include <sys/types.h>
#include <sys/vfs.h>]],
- [[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
`n_un' member. Obsolete, depend on
`HAVE_STRUCT_NLIST_N_UN_N_NAME])], [],
[@%:@include <nlist.h>])
- AC_TRY_LINK([#include <nlist.h>],
- [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 <nlist.h>]],
+ [[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
-# serial 10
+# serial 11
# Copyright (C) 1996, 1999, 2001-2002, 2004, 2006, 2009
# Free Software Foundation, Inc.
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 <termios.h>],
- [struct winsize x;
- if (sizeof x > 0) return 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]],
+ [[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 <sys/ptem.h>],
- [struct winsize x;
- if (sizeof x > 0) return 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ptem.h>]],
+ [[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
-# serial 11
+# serial 12
dnl Run a program to determine whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
[
# Create a regular file.
echo > conftest.file
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
# include <sys/types.h>
# include <sys/stat.h>
# include <unistd.h>
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
-# serial 27
+# serial 28
# How to list mounted file systems.
# Copyright (C) 1998-2004, 2006, 2009 Free Software Foundation, Inc.
# AIX.
AC_MSG_CHECKING([for mntctl function and struct vmount])
AC_CACHE_VAL([fu_cv_sys_mounted_vmount],
- [AC_TRY_CPP([#include <fshelp.h>],
- fu_cv_sys_mounted_vmount=yes,
- fu_cv_sys_mounted_vmount=no)])
+ [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <fshelp.h>]])],
+ [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
# 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 <stdio.h>
# 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
AC_MSG_CHECKING([for getfsstat function])
AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat],
- [AC_TRY_LINK([
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#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
# 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 <sys/statfs.h>
#include <sys/fstyp.h>
-#include <mnttab.h>],
- fu_cv_sys_mounted_fread_fstyp=yes,
- fu_cv_sys_mounted_fread_fstyp=no)])
+#include <mnttab.h>]])],
+ [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
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 <sys/param.h>
#endif
# include <sys/statvfs.h>
#endif
extern int getmntinfo (struct statfs **, int);
- ], [],
+ ]], [])],
[fu_cv_sys_mounted_getmntinfo2=no],
[fu_cv_sys_mounted_getmntinfo2=yes])
])
# 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 <sys/fs_types.h>
-#include <sys/mount.h>],
- fu_cv_sys_mounted_getmnt=yes,
- fu_cv_sys_mounted_getmnt=no)])
+#include <sys/mount.h>]])],
+ [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
# 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 <mnttab.h>],
- fu_cv_sys_mounted_fread=yes,
- fu_cv_sys_mounted_fread=no)])
+ [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mnttab.h>]])],
+ [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
-# 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
[
# 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 <sys/types.h>
# include <sys/stat.h>
# include <stdlib.h>
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]
)
]
)
-# 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,
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 <sys/types.h>],
- [typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
+ [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])],
[gl_cv_promoted_mode_t='int'],
[gl_cv_promoted_mode_t='mode_t'])
])
-# serial 3
+# serial 4
# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
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 <stdio.h>
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
])
-# serial 13
+# serial 14
# Copyright (C) 2001, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
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 <stdio.h>
# include <stdlib.h>
int
{
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
])
-# serial 9
+# serial 10
# Copyright (C) 2000, 2001, 2005, 2006, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# 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 <stdio.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
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]
)
]
)
-# 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,
# 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 <langinfo.h>],
- [char* cs = nl_langinfo(YESEXPR); return !cs;],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
+ [[char* cs = nl_langinfo(YESEXPR); return !cs;]])],
[gl_cv_langinfo_yesexpr=yes],
[gl_cv_langinfo_yesexpr=no])
])
-# serial 5
+# serial 6
# Copyright (C) 1998, 1999, 2001, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
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 <sys/types.h>
-#include <sys/stat.h>], [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 <sys/types.h>
+#include <sys/stat.h>]], [[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],
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 <sys/types.h>
#include <sys/stat.h>
#if HAVE_SYS_TIME_H
#include <time.h>
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
-# serial 8
+# serial 9
# Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009 Free Software
# Foundation, Inc.
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 <sys/types.h>
&& 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