aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/common/ChangeLog6
-rw-r--r--sim/common/aclocal.m447
-rwxr-xr-xsim/common/configure25
-rw-r--r--sim/common/configure.ac10
4 files changed, 27 insertions, 61 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 7206839..3facbce 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -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.
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 6820164..7beaebd 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -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
diff --git a/sim/common/configure b/sim/common/configure
index 1cc9897..06cb101 100755
--- a/sim/common/configure
+++ b/sim/common/configure
@@ -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"
diff --git a/sim/common/configure.ac b/sim/common/configure.ac
index 5516d9e..5f5845a 100644
--- a/sim/common/configure.ac
+++ b/sim/common/configure.ac
@@ -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])