This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/sim] flip and separate; Was: [commit/sim] Add common/common.m4;Was: [commit/sim] switch autoconf 2.59


Hello,

The attached patch does what the discussion below suggests:

- flips the common.m4/aclocal.m4 include order
- separates out AC_CONFIG_HEADER adding it explicitly to each file (including common/configure.ac)


Next?

committed,
Andrew

Hans-Peter Nilsson wrote:

On Wed, 12 Jan 2005, Andrew Cagney wrote:


I've also committed the attached.  It gets around the SIM_AC_COMMON
problem by inlining the macro's contents.

Your turn :-)



With current sources (after adding common.m4), CY_GNU_GETTEXT is
not defined before use (checkout, configury and build as
before):
...
configure: configuring in frv
...
/n/asic/slask/hp/fixsimbreakage/src/sim/frv/configure: CY_GNU_GETTEXT: command not found
...
(further problems ignored.)


The bug seen above can be fixed by sincluding aclocal.m4 before
common.m4, putting the definition before the call.  (After that
I then see some disturbing warnings when compiling
sim/frv/sem.c, but those aren't any fault of the configury at
least, so that's to be considered a success.)

I'm not sure why you didn't just sinclude common.m4 from
aclocal.m4 and why you didn't remove SIM_AC_COMMON from
aclocal.m4.  Therefore I don't know how you want the above and
the worry below actually fixed and so I'll pass back the "your
turn". ;-)


(I don't like nested includes, and aclocal.m4 should just contain macro definitions :-)

Have a look at common/configure.ac. It's still calling SIM_AC_COMMON with a parameter, hence my reason for keeping the SIM_AC_COMMON macro (well for at least the moment).

To do like you suggest would mean adding AC_CONFIG_HEADER to */configure.ac (possibly not a bad thing - common/ is probably still broken).

The biggest problem is that I don't understand why breaking out
SIM_AC_COMMON to common.m4 should help at all, but it does.


Yea, weird :-)

I'll flip the sinclude order.

Andrew


Index: arm/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: common/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Replace SIM_AC_COMMON with sinclude of common.m4.
	Add explicit call to AC_CONFIG_HEADER.
	* common.m4: Delete call to AC_CONFIG_HEADER, update usage.
	* configure: Re-generate.

Index: d10v/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: erc32/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: frv/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: h8300/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: m32r/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: m68hc11/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: mcore/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: mips/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: mn10300/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: sh/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: v850/ChangeLog
2005-01-14  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Sinclude aclocal.m4 before common.m4.  Add
	explicit call to AC_CONFIG_HEADER.
	* configure: Regenerate.

Index: common/common.m4
===================================================================
RCS file: /cvs/src/src/sim/common/common.m4,v
retrieving revision 1.1
diff -p -u -r1.1 common.m4
--- common/common.m4	12 Jan 2005 17:12:41 -0000	1.1
+++ common/common.m4	14 Jan 2005 20:00:39 -0000
@@ -10,13 +10,13 @@
 # dnl Process this file with autoconf to produce a configure script.
 # AC_PREREQ(2.5)dnl
 # AC_INIT(Makefile.in)
+# AC_CONFIG_HEADER(config.h:config.in)
 #
+# sinclude(../common/aclocal.m4)
 # sinclude(../common/common.m4)
 #
 # ... target specific stuff ...
 
-# autoconf.info says this should be called right after AC_INIT.
-AC_CONFIG_HEADER(config.h:config.in)
 AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 AC_PROG_CC
Index: common/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/common/configure.ac,v
retrieving revision 1.1
diff -p -u -r1.1 configure.ac
--- common/configure.ac	10 Jan 2005 16:14:34 -0000	1.1
+++ common/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,9 +1,11 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(cconfig.h:config.in)
 
-# This is intended for use by the target specific directories, and by us.
-SIM_AC_COMMON(cconfig.h)
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
 
 # Put a useful copy of CPP_FOR_TARGET in Makefile.
 # This is only used to build the target values header files.  These files are
Index: arm/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/arm/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- arm/configure.ac	12 Jan 2005 17:12:40 -0000	1.2
+++ arm/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 AC_CHECK_HEADERS(unistd.h)
 
 COPRO="armcopro.o maverick.o iwmmxt.o"
Index: d10v/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/d10v/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- d10v/configure.ac	12 Jan 2005 17:12:41 -0000	1.2
+++ d10v/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 SIM_AC_OPTION_WARNINGS
 
 AC_CHECK_HEADERS(unistd.h)
Index: erc32/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/erc32/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- erc32/configure.ac	12 Jan 2005 17:12:42 -0000	1.2
+++ erc32/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 AC_CHECK_HEADERS(stdlib.h)
 
 # In the Cygwin environment, we need some additional flags.
Index: frv/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/frv/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- frv/configure.ac	12 Jan 2005 17:12:42 -0000	1.2
+++ frv/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
 SIM_AC_OPTION_HOSTENDIAN
Index: h8300/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/h8300/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- h8300/configure.ac	12 Jan 2005 17:12:43 -0000	1.2
+++ h8300/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 AC_CHECK_HEADERS(stdlib.h time.h sys/param.h)
 
 SIM_AC_OUTPUT
Index: m32r/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/m32r/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- m32r/configure.ac	12 Jan 2005 17:12:43 -0000	1.2
+++ m32r/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
 SIM_AC_OPTION_HOSTENDIAN
Index: m68hc11/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/m68hc11/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- m68hc11/configure.ac	12 Jan 2005 17:12:44 -0000	1.2
+++ m68hc11/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 dnl Options available in this module
 SIM_AC_OPTION_INLINE()
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
Index: mcore/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/mcore/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- mcore/configure.ac	12 Jan 2005 17:12:44 -0000	1.2
+++ mcore/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 AC_CHECK_HEADERS(unistd.h)
 
 SIM_AC_OUTPUT
Index: mips/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/mips/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- mips/configure.ac	12 Jan 2005 17:12:45 -0000	1.2
+++ mips/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 dnl Options available in this module
 SIM_AC_OPTION_INLINE()
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
Index: mn10300/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/mn10300/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- mn10300/configure.ac	12 Jan 2005 17:12:45 -0000	1.2
+++ mn10300/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
 SIM_AC_OPTION_HOSTENDIAN
Index: sh/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/sh/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- sh/configure.ac	12 Jan 2005 17:12:45 -0000	1.2
+++ sh/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 AC_CHECK_HEADERS(unistd.h)
 
 SIM_AC_OUTPUT
Index: v850/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/v850/configure.ac,v
retrieving revision 1.2
diff -p -u -r1.2 configure.ac
--- v850/configure.ac	12 Jan 2005 17:12:46 -0000	1.2
+++ v850/configure.ac	14 Jan 2005 20:00:39 -0000
@@ -1,10 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
+AC_CONFIG_HEADER(config.h:config.in)
 
-sinclude(../common/common.m4)
 sinclude(../common/aclocal.m4)
 
+# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
+# it by inlining the macro's contents.
+sinclude(../common/common.m4)
+
 SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
 SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
 SIM_AC_OPTION_HOSTENDIAN

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]