This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] 6.1: Convert sim/ to autoconf 2.5x
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Daniel Jacobowitz <drow at false dot org>,gdb-patches at sources dot redhat dot com
- Date: Wed, 19 May 2004 16:51:38 +0200 (CEST)
- Subject: [patch] 6.1: Convert sim/ to autoconf 2.5x
- Organization: Technical University of Gdansk
Hello,
Here are the changes needed in sim/ for autoconf 2.5x. Note, that due to
a bug in autoconf 2.59 (and likely older versions), bad code is generated
in common/configure.
sim/arm/ChangeLog, sim/d10v/ChangeLog, sim/d30v/ChangeLog,
sim/erc32/ChangeLog, sim/fr30/ChangeLog, sim/h8300/ChangeLog,
sim/h8500/ChangeLog, sim/i960/ChangeLog, sim/igen/ChangeLog,
sim/m32r/ChangeLog, sim/m68hc11/ChangeLog, sim/mcore/ChangeLog,
sim/mips/ChangeLog, sim/mn10200/ChangeLog, sim/mn10300/ChangeLog,
sim/ppc/ChangeLog, sim/sh/ChangeLog, sim/v850/ChangeLog,
sim/z8k/ChangeLog:
2004-05-19 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* configure.in: Convert to autoconf 2.5x.
* configure: Regenerate.
sim/common/ChangeLog:
2004-05-19 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* aclocal.m4: Convert to autoconf 2.5x.
* configure: Regenerate.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
gdb-6.0-sim-ac25.patch
diff -up --recursive --new-file gdb-6.0.macro/sim/arm/configure.in gdb-6.0/sim/arm/configure.in
--- gdb-6.0.macro/sim/arm/configure.in 2003-03-30 10:39:22.000000000 +0000
+++ gdb-6.0/sim/arm/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(unistd.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/common/aclocal.m4 gdb-6.0/sim/common/aclocal.m4
--- gdb-6.0.macro/sim/common/aclocal.m4 2002-06-16 16:33:12.000000000 +0000
+++ gdb-6.0/sim/common/aclocal.m4 2003-11-08 18:54:23.000000000 +0000
@@ -21,7 +21,8 @@
AC_DEFUN(SIM_AC_COMMON,
[
# autoconf.info says this should be called right after AC_INIT.
-AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in)
+AC_CONFIG_HEADERS(m4_if([$1],,config.h,[$1]):config.in,
+ m4_if([$1],,[echo > stamp-h],))
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
AC_CANONICAL_SYSTEM
@@ -523,7 +524,7 @@ AC_SUBST(sim_float)
dnl The argument is the default cache size if none is specified.
AC_DEFUN(SIM_AC_OPTION_SCACHE,
[
-default_sim_scache="ifelse([$1],,0,[$1])"
+default_sim_scache="m4_if([$1],,0,[$1])"
AC_ARG_ENABLE(sim-scache,
[ --enable-sim-scache=size Specify simulator execution cache size.],
[case "${enableval}" in
@@ -543,7 +544,7 @@ AC_SUBST(sim_scache)
dnl The argument is the default model if none is specified.
AC_DEFUN(SIM_AC_OPTION_DEFAULT_MODEL,
[
-default_sim_default_model="ifelse([$1],,0,[$1])"
+default_sim_default_model="m4_if([$1],,0,[$1])"
AC_ARG_ENABLE(sim-default-model,
[ --enable-sim-default-model=model Specify default model to simulate.],
[case "${enableval}" in
@@ -626,7 +627,7 @@ dnl Guarantee that unconfigured simulato
sim_inline="-DDEFAULT_INLINE=0"
AC_DEFUN(SIM_AC_OPTION_INLINE,
[
-default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])"
+default_sim_inline="m4_if([$1],,,-DDEFAULT_INLINE=[$1])"
AC_ARG_ENABLE(sim-inline,
[ --enable-sim-inline=inlines Specify which functions should be inlined.],
[sim_inline=""
@@ -714,7 +715,7 @@ AC_SUBST(sim_regparm)
AC_DEFUN(SIM_AC_OPTION_RESERVED_BITS,
[
-default_sim_reserved_bits="ifelse([$1],,1,[$1])"
+default_sim_reserved_bits="m4_if([$1],,1,[$1])"
AC_ARG_ENABLE(sim-reserved-bits,
[ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.],
[case "${enableval}" in
@@ -731,7 +732,7 @@ AC_SUBST(sim_reserved_bits)
AC_DEFUN(SIM_AC_OPTION_SMP,
[
-default_sim_smp="ifelse([$1],,5,[$1])"
+default_sim_smp="m4_if([$1],,5,[$1])"
AC_ARG_ENABLE(sim-smp,
[ --enable-sim-smp=n Specify number of processors to configure for (default ${default_sim_smp}).],
[case "${enableval}" in
@@ -768,7 +769,7 @@ AC_SUBST(sim_stdcall)
AC_DEFUN(SIM_AC_OPTION_XOR_ENDIAN,
[
-default_sim_xor_endian="ifelse([$1],,8,[$1])"
+default_sim_xor_endian="m4_if([$1],,8,[$1])"
AC_ARG_ENABLE(sim-xor-endian,
[ --enable-sim-xor-endian=n Specify number bytes involved in XOR bi-endian mode (default ${default_sim_xor_endian}).],
[case "${enableval}" in
@@ -861,21 +862,21 @@ dnl the target's fragment at the appropr
AC_DEFUN(SIM_AC_OUTPUT,
[
AC_LINK_FILES($sim_link_files, $sim_link_links)
-AC_OUTPUT(Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in,
-[case "x$CONFIG_FILES" in
- xMakefile*)
- echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
+AC_CONFIG_FILES([Makefile.sim:Makefile.in]
+ [Make-common.sim:../common/Make-common.in]
+ [.gdbinit:../common/gdbinit.in])
+AC_CONFIG_COMMANDS([Makefile],
+[
+ AC_MSG_NOTICE([Merging Makefile.sim+Make-common.sim into Makefile ...])
rm -f Makesim1.tmp Makesim2.tmp Makefile
sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
-e '/^## COMMON_POST_/ r Makesim2.tmp' \
<Makefile.sim >Makefile
- rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
- ;;
- esac
- case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
+ rm -f Makesim1.tmp Makesim2.tmp
])
+AC_OUTPUT
])
# This file is derived from `gettext.m4'. The difference is that the
@@ -1176,7 +1177,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ for ac_dir in m4_if([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
@@ -1188,7 +1189,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+m4_if([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
diff -up --recursive --new-file gdb-6.0.macro/sim/d10v/configure.in gdb-6.0/sim/d10v/configure.in
--- gdb-6.0.macro/sim/d10v/configure.in 1999-04-16 01:34:59.000000000 +0000
+++ gdb-6.0/sim/d10v/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
SIM_AC_OPTION_WARNINGS
diff -up --recursive --new-file gdb-6.0.macro/sim/d30v/configure.in gdb-6.0/sim/d30v/configure.in
--- gdb-6.0.macro/sim/d30v/configure.in 1999-04-16 01:35:00.000000000 +0000
+++ gdb-6.0/sim/d30v/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
dnl Find a versionn of m4 to use as a preprocessor
diff -up --recursive --new-file gdb-6.0.macro/sim/erc32/configure.in gdb-6.0/sim/erc32/configure.in
--- gdb-6.0.macro/sim/erc32/configure.in 1999-04-26 18:31:58.000000000 +0000
+++ gdb-6.0/sim/erc32/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(stdlib.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/fr30/configure.in gdb-6.0/sim/fr30/configure.in
--- gdb-6.0.macro/sim/fr30/configure.in 2002-07-16 14:30:13.000000000 +0000
+++ gdb-6.0/sim/fr30/configure.in 2003-11-08 16:02:12.000000000 +0000
@@ -1,8 +1,9 @@
dnl OBSOLETE dnl Process this file with autoconf to produce a configure script.
-dnl OBSOLETE sinclude(../common/aclocal.m4)
dnl OBSOLETE AC_PREREQ(2.5)dnl
dnl OBSOLETE AC_INIT(Makefile.in)
dnl OBSOLETE
+dnl OBSOLETE m4_sinclude(../common/aclocal.m4)
+dnl OBSOLETE
dnl OBSOLETE SIM_AC_COMMON
dnl OBSOLETE
dnl OBSOLETE SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
diff -up --recursive --new-file gdb-6.0.macro/sim/h8300/configure.in gdb-6.0/sim/h8300/configure.in
--- gdb-6.0.macro/sim/h8300/configure.in 1999-04-16 01:35:02.000000000 +0000
+++ gdb-6.0/sim/h8300/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(stdlib.h time.h sys/param.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/h8500/configure.in gdb-6.0/sim/h8500/configure.in
--- gdb-6.0.macro/sim/h8500/configure.in 1999-04-16 01:35:02.000000000 +0000
+++ gdb-6.0/sim/h8500/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(stdlib.h time.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/i960/configure.in gdb-6.0/sim/i960/configure.in
--- gdb-6.0.macro/sim/i960/configure.in 1999-04-16 01:35:03.000000000 +0000
+++ gdb-6.0/sim/i960/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
diff -up --recursive --new-file gdb-6.0.macro/sim/igen/configure.in gdb-6.0/sim/igen/configure.in
--- gdb-6.0.macro/sim/igen/configure.in 1999-04-16 01:35:04.000000000 +0000
+++ gdb-6.0/sim/igen/configure.in 2003-11-08 16:01:25.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(table.h)
+m4_sinclude(../common/aclocal.m4)
+
AC_PROG_INSTALL
AC_PROG_CC
diff -up --recursive --new-file gdb-6.0.macro/sim/m32r/configure.in gdb-6.0/sim/m32r/configure.in
--- gdb-6.0.macro/sim/m32r/configure.in 1999-04-16 01:35:05.000000000 +0000
+++ gdb-6.0/sim/m32r/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
diff -up --recursive --new-file gdb-6.0.macro/sim/m68hc11/configure.in gdb-6.0/sim/m68hc11/configure.in
--- gdb-6.0.macro/sim/m68hc11/configure.in 2000-07-27 11:23:39.000000000 +0000
+++ gdb-6.0/sim/m68hc11/configure.in 2003-11-08 16:01:33.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.12.1)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
dnl Options available in this module
diff -up --recursive --new-file gdb-6.0.macro/sim/mcore/configure.in gdb-6.0/sim/mcore/configure.in
--- gdb-6.0.macro/sim/mcore/configure.in 1999-04-27 01:33:01.000000000 +0000
+++ gdb-6.0/sim/mcore/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(unistd.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/mips/configure.in gdb-6.0/sim/mips/configure.in
--- gdb-6.0.macro/sim/mips/configure.in 2003-01-05 07:56:59.000000000 +0000
+++ gdb-6.0/sim/mips/configure.in 2003-11-08 15:53:39.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
dnl Options available in this module
diff -up --recursive --new-file gdb-6.0.macro/sim/mn10200/configure.in gdb-6.0/sim/mn10200/configure.in
--- gdb-6.0.macro/sim/mn10200/configure.in 1999-04-16 01:35:07.000000000 +0000
+++ gdb-6.0/sim/mn10200/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(unistd.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/mn10300/configure.in gdb-6.0/sim/mn10300/configure.in
--- gdb-6.0.macro/sim/mn10300/configure.in 1999-04-16 01:35:07.000000000 +0000
+++ gdb-6.0/sim/mn10300/configure.in 2003-11-08 16:01:42.000000000 +0000
@@ -1,9 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
dnl 2.12 botches SHELL substitution
AC_PREREQ(2.12.1)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
diff -up --recursive --new-file gdb-6.0.macro/sim/ppc/configure.in gdb-6.0/sim/ppc/configure.in
--- gdb-6.0.macro/sim/ppc/configure.in 2003-06-22 16:48:12.000000000 +0000
+++ gdb-6.0/sim/ppc/configure.in 2003-11-08 16:01:49.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
AC_PROG_INSTALL
AC_PROG_CC
diff -up --recursive --new-file gdb-6.0.macro/sim/sh/configure.in gdb-6.0/sim/sh/configure.in
--- gdb-6.0.macro/sim/sh/configure.in 1999-04-16 01:35:12.000000000 +0000
+++ gdb-6.0/sim/sh/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(unistd.h)
diff -up --recursive --new-file gdb-6.0.macro/sim/v850/configure.in gdb-6.0/sim/v850/configure.in
--- gdb-6.0.macro/sim/v850/configure.in 1999-04-16 01:35:12.000000000 +0000
+++ gdb-6.0/sim/v850/configure.in 2003-11-08 16:00:31.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
diff -up --recursive --new-file gdb-6.0.macro/sim/z8k/configure.in gdb-6.0/sim/z8k/configure.in
--- gdb-6.0.macro/sim/z8k/configure.in 1999-04-16 01:35:14.000000000 +0000
+++ gdb-6.0/sim/z8k/configure.in 2003-11-08 16:00:32.000000000 +0000
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
+m4_sinclude(../common/aclocal.m4)
+
SIM_AC_COMMON
AC_CHECK_HEADERS(string.h strings.h stdlib.h time.h sys/times.h)