Remove SIM_CHECK_MEMBER* in sim/common/.

sim/common/:
	* aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS)
	(SIM_CHECK_MEMBERS_1): Remove.
	* configure.ac: Replace SIM_CHECK_MEMBERS call with equivalent
	AC_CHECK_MEMBERS one.
	* configure: Regenerate.
This commit is contained in:
Ralf Wildenhues 2009-08-29 11:36:26 +00:00
parent 4433007921
commit 0aec8eb1b5
4 changed files with 27 additions and 61 deletions

View file

@ -1,5 +1,11 @@
2009-08-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS)
(SIM_CHECK_MEMBERS_1): Remove.
* configure.ac: Replace SIM_CHECK_MEMBERS call with equivalent
AC_CHECK_MEMBERS one.
* configure: Regenerate.
* aclocal.m4 (SIM_CHECK_MEMBER): Use AU_ALIAS to define, not defn.
* configure: Regenerate.

47
sim/common/aclocal.m4 vendored
View file

@ -933,50 +933,3 @@ AC_SUBST(CGEN_MAINT)
AC_SUBST(cgendir)
AC_SUBST(cgen)
])
dnl FIXME: When upgrading to modern autoconf, remove
dnl SIM_CHECK_MEMBER and SIM_CHECK_MEMBERS et al and use
dnl AC_CHECK_MEMBERS from autoconf.
dnl
dnl Translated from a FC2 autoconf-2.59-3 installation.
dnl AC_CHECK_MEMBER(AGGREGATE.MEMBER,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
dnl [INCLUDES])
dnl
dnl ---------------------------------------------------------
dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
dnl variables are not a valid argument.
AU_ALIAS([SIM_CHECK_MEMBER], [AC_CHECK_MEMBER])
dnl
dnl Translated from a FC2 autoconf-2.59-3 installation.
dnl SIM_CHECK_MEMBERS([AGGREGATE.MEMBER, ...])
dnl except we just work with a limited set of fixed includes.
dnl
AC_DEFUN([SIM_CHECK_MEMBERS_1],
[ifelse($#, 1,
[SIM_CHECK_MEMBER([$1],
AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1,
[Define to 1 if ]patsubst([$1],
[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif])],
[SIM_CHECK_MEMBER([$1],
AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1,
[Define to 1 if ]patsubst([$1],
[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif])
SIM_CHECK_MEMBERS_1(builtin(shift,$@))])])dnl SIM_CHECK_MEMBERS
dnl
AC_DEFUN([SIM_CHECK_MEMBERS],
[ifelse($#, 1, [SIM_CHECK_MEMBERS_1($1)],
[errprint(__file__:__line__:
[This SIM_CHECK_MEMBERS only supports one argument,]
[the list of struct tests])])])dnl SIM_CHECK_MEMBERS

25
sim/common/configure vendored
View file

@ -4361,8 +4361,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_DEV 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_ino" "ac_cv_member_struct_stat_st_ino" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4376,8 +4376,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_INO 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_mode" "ac_cv_member_struct_stat_st_mode" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4391,8 +4391,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_MODE 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_nlink" "ac_cv_member_struct_stat_st_nlink" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4406,8 +4406,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_NLINK 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_uid" "ac_cv_member_struct_stat_st_uid" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4421,8 +4421,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_UID 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_gid" "ac_cv_member_struct_stat_st_gid" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4436,8 +4436,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_GID 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4451,8 +4451,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_RDEV 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_size" "ac_cv_member_struct_stat_st_size" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4466,8 +4466,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_SIZE 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4481,8 +4481,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4496,8 +4496,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_atime" "ac_cv_member_struct_stat_st_atime" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4511,8 +4511,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_ATIME 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4526,8 +4526,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_MTIME 1
_ACEOF
fi
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime" "ac_cv_member_struct_stat_st_ctime" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@ -4541,6 +4541,7 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_CTIME 1
_ACEOF
fi
ac_config_files="$ac_config_files Makefile"

View file

@ -38,10 +38,16 @@ AC_SUBST(TARGET_SUBDIR)
# These aren't all needed yet, but will be eventually.
AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h)
AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate)
SIM_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid],
[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size],
[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime],
[struct stat.st_mtime], [struct stat.st_ctime]])
[struct stat.st_mtime], [struct stat.st_ctime]], [], [],
[[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif]])
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac])