Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* autotools patches for --*dir and upcoming versions
@ 2008-11-16 18:08 Daniel Mierswa
  2008-11-20 13:28 ` Thiago Jung Bauermann
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mierswa @ 2008-11-16 18:08 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 3426 bytes --]

Hi there
I created a patch to let the --{dataroot,doc,pdf,html}dir to be passed
through configure instead of using the self written --with-*dir.
The patch also fixes some warnings spilled out by newer autotools
regarding ordering of AC_ macros and unquoted definitions.
The patch was created against the official 6.8 tarball.
Tested by invoking the usual, autoreconf procedures, followed by
./configure with --docdir=/something and invoking make install-html at
the very end.
I'd like to hear your opinion.
The ChangeLog entries would be as follows:

ChangeLog: (couldn't find any)
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: use config directory for m4-macro searches, provide
    AC_PROG_LIBTOOL, so ltmain.sh and others get updated by autoreconf,
    remove self-written --with-{dataroot,doc,pdf,html}dir switches and
let the
    ones created by autoconf pass through, remove unneeded AC_SUBST

bfd/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.in: AC_GNU_SOURCE must occur before AC_PROG_CC,
    use own directory for m4-macro searches, remove unneeded AC_SUBST

gdb/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: AC_{GNU_SOURCE,AIX} are both present in
    AC_USE_SYSTEM_EXTENSIONS (must occur before AC_PROG_CC)
    * acinclude.m4: serial has to appear before any macro definition
    * Makefile.in: touch datarootdir so autoconf is happy, don't
redefine variables
    passed by configure

gdb/doc/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: don't redefine variables passed by configure, install
html files
    from subdirectories

gdb/gdbserver/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: don't redefine variables passed by configure

intl/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

libiberty/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: remove unneeded AC_SUBST

sim/common/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * aclocal.m4: use quoted definitions, autoconf cached variables
    have to include cv in their name

sim/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: use own directory for m4-macro searches
    * Makefile.in: touch datarootdir so autoconf is happy

libdecnumber/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

readline/ChangeLog.gdb:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy, create empty
    install-html target so make install-html from top-level won't fail

readline/doc/ChangeLog.gdb:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

readline/examples/rlfe/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.in: use quoted definitions

readline/shlib/ChangeLog.gdb: (couldn't find any)
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

Forgot to attach the patch in my first mail :-( Sorry.

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22


[-- Attachment #2: gdb-6.8-sane_autotools.patch --]
[-- Type: text/plain, Size: 17381 bytes --]

diff -Naur gdb-6.8.orig/bfd/configure.in gdb-6.8/bfd/configure.in
--- gdb-6.8.orig/bfd/configure.in	2008-02-14 16:20:26.000000000 +0100
+++ gdb-6.8/bfd/configure.in	2008-11-15 22:38:23.000000000 +0100
@@ -5,6 +5,8 @@
 AC_INIT
 AC_CONFIG_SRCDIR([libbfd.c])
 
+AC_CONFIG_MACRO_DIR(.)
+
 AC_CANONICAL_TARGET
 AC_ISC_POSIX
 
@@ -19,8 +21,8 @@
 dnl configure option --enable-shared.
 AM_DISABLE_SHARED
 
-AC_PROG_CC
 AC_GNU_SOURCE
+AC_PROG_CC
 
 AC_PROG_LIBTOOL
 
@@ -1053,10 +1055,4 @@
     -e "s,@GMOFILES@,$GMOFILES," \
     po/Makefile.in > po/Makefile]],[[]])
 
-dnl Required by html and install-html
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(htmldir)
-
 AC_OUTPUT
-
diff -Naur gdb-6.8.orig/configure.ac gdb-6.8/configure.ac
--- gdb-6.8.orig/configure.ac	2008-03-27 19:27:19.000000000 +0100
+++ gdb-6.8/configure.ac	2008-11-15 22:38:23.000000000 +0100
@@ -23,6 +23,8 @@
 AC_INIT(move-if-change)
 AC_PREREQ(2.59)
 
+AC_CONFIG_MACRO_DIR([config])
+
 # Find the build, host, and target systems.
 ACX_NONCANONICAL_BUILD
 ACX_NONCANONICAL_HOST
@@ -47,6 +49,7 @@
 AC_PROG_INSTALL
 ACX_PROG_LN
 AC_PROG_LN_S
+AC_PROG_LIBTOOL
 
 ### we might need to use some other shell than /bin/sh for running subshells
 ### If we are on Windows, search for the shell.  This will permit people
@@ -2751,30 +2754,4 @@
 esac
 AC_SUBST(stage2_werror_flag)
 
-# Flags needed to enable html installing and building
-AC_ARG_WITH(datarootdir,
-[  --with-datarootdir      use datarootdir as the data root directory.],
-[datarootdir="\${prefix}/${withval}"],
-[datarootdir="\${prefix}/share"])
-
-AC_ARG_WITH(docdir,
-[  --with-docdir           install documentation in this directory.],
-[docdir="\${prefix}/${withval}"],
-[docdir="\${datarootdir}/doc"])
-
-AC_ARG_WITH(pdfdir,
-[  --with-pdfdir           install pdf in this directory.],
-[pdfdir="\${prefix}/${withval}"],
-[pdfdir="\${docdir}"])
-
-AC_ARG_WITH(htmldir,
-[  --with-htmldir          install html in this directory.],
-[htmldir="\${prefix}/${withval}"],
-[htmldir="\${docdir}"])
-
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(pdfdir)
-AC_SUBST(htmldir)
-
 AC_OUTPUT(Makefile)
diff -Naur gdb-6.8.orig/etc/configure.in gdb-6.8/etc/configure.in
--- gdb-6.8.orig/etc/configure.in	2006-04-06 23:49:30.000000000 +0200
+++ gdb-6.8/etc/configure.in	2008-11-15 22:38:23.000000000 +0100
@@ -4,9 +4,4 @@
 
 AC_PROG_INSTALL
 
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(htmldir)
-
-
 AC_OUTPUT(Makefile)
diff -Naur gdb-6.8.orig/gdb/acinclude.m4 gdb-6.8/gdb/acinclude.m4
--- gdb-6.8.orig/gdb/acinclude.m4	2007-03-30 14:57:42.000000000 +0200
+++ gdb-6.8/gdb/acinclude.m4	2008-11-15 22:38:23.000000000 +0100
@@ -17,6 +17,7 @@
 sinclude(../config/lib-prefix.m4)
 sinclude(../config/lib-link.m4)
 
+# serial 1
 #
 # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
 # makes configure think it's cross compiling. If --target wasn't used, then
@@ -731,8 +732,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# serial 1
-
 # @defmac AC_PROG_CC_STDC
 # @maindex PROG_CC_STDC
 # @ovindex CC
diff -Naur gdb-6.8.orig/gdb/configure.ac gdb-6.8/gdb/configure.ac
--- gdb-6.8.orig/gdb/configure.ac	2008-01-13 13:23:05.000000000 +0100
+++ gdb-6.8/gdb/configure.ac	2008-11-15 22:38:23.000000000 +0100
@@ -25,10 +25,9 @@
 AC_CONFIG_HEADER(config.h:config.in)
 AM_MAINTAINER_MODE
 
-AC_PROG_CC
-AC_GNU_SOURCE
-AC_AIX
+AC_USE_SYSTEM_EXTENSIONS
 AC_ISC_POSIX
+AC_PROG_CC
 AM_PROG_CC_STDC
 
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
diff -Naur gdb-6.8.orig/gdb/doc/Makefile.in gdb-6.8/gdb/doc/Makefile.in
--- gdb-6.8.orig/gdb/doc/Makefile.in	2008-01-01 23:53:14.000000000 +0100
+++ gdb-6.8/gdb/doc/Makefile.in	2008-11-16 00:55:24.000000000 +0100
@@ -24,8 +24,9 @@
 prefix = @prefix@
 
 infodir = @infodir@
-pdfdir = $(prefix)/share/doc/gdb
-htmldir = $(prefix)/html
+datarootdir = @datarootdir@
+pdfdir = @pdfdir@
+htmldir = @htmldir@
 
 SHELL = @SHELL@
 
@@ -202,8 +203,13 @@
 	done
 
 install-html: html
-	for i in *.html ; do \
-		$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \
+	for dir in gdb gdbint annotate stabs ; do \
+		$(mkinstalldirs) $(DESTDIR)$(htmldir)/$$dir ; \
+		cd $$dir ; \
+		for i in *.html ; do \
+			$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$dir/$$i ; \
+		done ; \
+		cd .. ; \
 	done
 
 pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
@@ -515,7 +520,10 @@
 # "clean" or "distclean".  Use maintainer-clean to remove them.
 
 maintainer-clean realclean: distclean
-	rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf
+	for dir in gdb gdbint annotate stabs ; do \
+		rm -f $$dir/*.html ; \
+	done
+	rm -f GDBvn.texi *.info* *.dvi *.ps *.pdf
 
 install: install-info
 
diff -Naur gdb-6.8.orig/gdb/gdbserver/Makefile.in gdb-6.8/gdb/gdbserver/Makefile.in
--- gdb-6.8.orig/gdb/gdbserver/Makefile.in	2008-02-11 23:00:31.000000000 +0100
+++ gdb-6.8/gdb/gdbserver/Makefile.in	2008-11-15 22:38:23.000000000 +0100
@@ -28,6 +28,7 @@
 libdir = @libdir@
 tooldir = $(libdir)/$(target_alias)
 
+datarootdir = @datarootdir@
 datadir = @datadir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
@@ -40,7 +41,7 @@
 man8dir = $(mandir)/man8
 man9dir = $(mandir)/man9
 infodir = @infodir@
-htmldir = $(prefix)/html
+htmldir = @htmldir@
 includedir = @includedir@
 
 SHELL = /bin/sh
diff -Naur gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in
--- gdb-6.8.orig/gdb/Makefile.in	2008-03-17 13:15:08.000000000 +0100
+++ gdb-6.8/gdb/Makefile.in	2008-11-15 22:38:23.000000000 +0100
@@ -28,7 +28,7 @@
 bindir = @bindir@
 libdir = @libdir@
 tooldir = $(libdir)/$(target_alias)
-
+datarootdir = @datarootdir@
 datadir = @datadir@
 localedir = @localedir@
 mandir = @mandir@
@@ -42,8 +42,8 @@
 man8dir = $(mandir)/man8
 man9dir = $(mandir)/man9
 infodir = @infodir@
-pdfdir = $(prefix)/share/doc/gdb
-htmldir = $(prefix)/html
+pdfdir = @pdfdir@
+htmldir = @htmldir@
 includedir = @includedir@
 
 # This can be referenced by `LIBINTL' as computed by
diff -Naur gdb-6.8.orig/intl/configure.ac gdb-6.8/intl/configure.ac
--- gdb-6.8.orig/intl/configure.ac	2006-05-22 17:30:13.000000000 +0200
+++ gdb-6.8/intl/configure.ac	2008-11-15 22:38:23.000000000 +0100
@@ -3,6 +3,7 @@
 AC_CONFIG_SRCDIR(gettext.c)
 AC_CONFIG_HEADER(config.h)
 AC_CONFIG_MACRO_DIR(../config)
+AC_USE_SYSTEM_EXTENSIONS
 AM_GNU_GETTEXT_VERSION(0.12.1)
 AM_GNU_GETTEXT
 
diff -Naur gdb-6.8.orig/intl/Makefile.in gdb-6.8/intl/Makefile.in
--- gdb-6.8.orig/intl/Makefile.in	2006-09-27 17:03:38.000000000 +0200
+++ gdb-6.8/intl/Makefile.in	2008-11-15 22:38:23.000000000 +0100
@@ -31,6 +31,7 @@
 transform = @program_transform_name@
 libdir = @libdir@
 includedir = @includedir@
+datarootdir = @datarootdir@
 datadir = @datadir@
 localedir = $(datadir)/locale
 aliaspath = $(localedir)
diff -Naur gdb-6.8.orig/libdecnumber/Makefile.in gdb-6.8/libdecnumber/Makefile.in
--- gdb-6.8.orig/libdecnumber/Makefile.in	2008-01-25 20:05:42.000000000 +0100
+++ gdb-6.8/libdecnumber/Makefile.in	2008-11-15 23:08:40.000000000 +0100
@@ -44,6 +44,7 @@
 RANLIB = @RANLIB@
 SHELL = @SHELL@
 
+datarootdir = @datarootdir@
 datadir = @datadir@
 exec_prefix = @prefix@
 libdir = @libdir@
diff -Naur gdb-6.8.orig/libiberty/configure.ac gdb-6.8/libiberty/configure.ac
--- gdb-6.8.orig/libiberty/configure.ac	2007-07-17 20:05:02.000000000 +0200
+++ gdb-6.8/libiberty/configure.ac	2008-11-15 22:38:23.000000000 +0100
@@ -707,11 +707,6 @@
 done
 LIBOBJS="$L"
 
-dnl Required by html and install-html
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(htmldir)
-
 # We need multilib support, but only if configuring for the target.
 AC_CONFIG_FILES([Makefile testsuite/Makefile])
 AC_CONFIG_COMMANDS([default],
diff -Naur gdb-6.8.orig/readline/doc/Makefile.in gdb-6.8/readline/doc/Makefile.in
--- gdb-6.8.orig/readline/doc/Makefile.in	2006-05-05 20:26:12.000000000 +0200
+++ gdb-6.8/readline/doc/Makefile.in	2008-11-15 23:10:07.000000000 +0100
@@ -23,6 +23,7 @@
 
 prefix = @prefix@
 infodir = @infodir@
+datarootdir = @datarootdir@
 
 mandir = @mandir@
 manpfx = man
diff -Naur gdb-6.8.orig/readline/examples/rlfe/configure.in gdb-6.8/readline/examples/rlfe/configure.in
--- gdb-6.8.orig/readline/examples/rlfe/configure.in	2006-04-20 22:05:51.000000000 +0200
+++ gdb-6.8/readline/examples/rlfe/configure.in	2008-11-15 22:38:37.000000000 +0100
@@ -8,7 +8,7 @@
 dnl
 dnl Define some useful macros
 dnl
-AC_DEFUN(AC_PROGRAM_SOURCE,
+AC_DEFUN([AC_PROGRAM_SOURCE],
 [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <<EOF
 #include "confdefs.h"
 [$1]
diff -Naur gdb-6.8.orig/readline/Makefile.in gdb-6.8/readline/Makefile.in
--- gdb-6.8.orig/readline/Makefile.in	2007-03-27 20:09:35.000000000 +0200
+++ gdb-6.8/readline/Makefile.in	2008-11-16 00:12:33.000000000 +0100
@@ -55,6 +55,7 @@
 libdir = @libdir@
 mandir = @mandir@
 includedir = @includedir@
+datarootdir = @datarootdir@
 datadir = @datadir@
 localedir = $(datadir)/locale
 
@@ -300,6 +301,8 @@
 info dvi pdf:
 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
 
+html:
+install-html:
 install-info:
 check:
 installcheck:
diff -Naur gdb-6.8.orig/readline/shlib/Makefile.in gdb-6.8/readline/shlib/Makefile.in
--- gdb-6.8.orig/readline/shlib/Makefile.in	2006-05-05 20:26:14.000000000 +0200
+++ gdb-6.8/readline/shlib/Makefile.in	2008-11-15 23:10:26.000000000 +0100
@@ -55,6 +55,7 @@
 includedir = @includedir@
 bindir = @bindir@
 libdir = @libdir@
+datarootdir = @datarootdir@
 datadir = @datadir@
 localedir = $(datadir)/locale
 
diff -Naur gdb-6.8.orig/sim/common/aclocal.m4 gdb-6.8/sim/common/aclocal.m4
--- gdb-6.8.orig/sim/common/aclocal.m4	2006-06-13 10:06:48.000000000 +0200
+++ gdb-6.8/sim/common/aclocal.m4	2008-11-15 22:38:23.000000000 +0100
@@ -18,7 +18,7 @@
 #
 # SIM_AC_OUTPUT
 
-AC_DEFUN(SIM_AC_COMMON,
+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)
@@ -245,7 +245,7 @@
 dnl supported.
 dnl ??? Until there is demonstrable value in doing something more complicated,
 dnl let's not.
-AC_DEFUN(SIM_AC_OPTION_ENVIRONMENT,
+AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT],
 [
 AC_ARG_ENABLE(sim-environment,
 [  --enable-sim-environment=environment	Specify mixed, user, virtual or operating environment.],
@@ -269,7 +269,7 @@
 dnl Without this option all possible alignment restrictions are accommodated.
 dnl arg[1] is hardwired target alignment
 dnl arg[2] is default target alignment
-AC_DEFUN(SIM_AC_OPTION_ALIGNMENT,
+AC_DEFUN([SIM_AC_OPTION_ALIGNMENT],
 wire_alignment="[$1]"
 default_alignment="[$2]"
 [
@@ -318,7 +318,7 @@
 
 
 dnl Conditionally compile in assertion statements.
-AC_DEFUN(SIM_AC_OPTION_ASSERT,
+AC_DEFUN([SIM_AC_OPTION_ASSERT],
 [
 AC_ARG_ENABLE(sim-assert,
 [  --enable-sim-assert			Specify whether to perform random assertions.],
@@ -342,7 +342,7 @@
 dnl arg[3] is the number of bits in an address
 dnl arg[4] is the number of bits in an OpenFirmware cell.
 dnl FIXME: this information should be obtained from bfd/archure
-AC_DEFUN(SIM_AC_OPTION_BITSIZE,
+AC_DEFUN([SIM_AC_OPTION_BITSIZE],
 wire_word_bitsize="[$1]"
 wire_word_msb="[$2]"
 wire_address_bitsize="[$3]"
@@ -408,7 +408,7 @@
 dnl that support both big and little endian targets.
 dnl arg[1] is hardwired target endianness.
 dnl arg[2] is default target endianness.
-AC_DEFUN(SIM_AC_OPTION_ENDIAN,
+AC_DEFUN([SIM_AC_OPTION_ENDIAN],
 [
 wire_endian="[$1]"
 default_endian="[$2]"
@@ -458,7 +458,7 @@
 dnl --enable-sim-hostendian is for users of the simulator when
 dnl they find that AC_C_BIGENDIAN does not function correctly
 dnl (for instance in a canadian cross)
-AC_DEFUN(SIM_AC_OPTION_HOSTENDIAN,
+AC_DEFUN([SIM_AC_OPTION_HOSTENDIAN],
 [
 AC_ARG_ENABLE(sim-hostendian,
 [  --enable-sim-hostendian=end		Specify host byte endian orientation.],
@@ -490,7 +490,7 @@
 dnl And optionally the bitsize of the floating point register.
 dnl arg[1] specifies the presence (or absence) of floating point hardware
 dnl arg[2] specifies the number of bits in a floating point register
-AC_DEFUN(SIM_AC_OPTION_FLOAT,
+AC_DEFUN([SIM_AC_OPTION_FLOAT],
 [
 default_sim_float="[$1]"
 default_sim_float_bitsize="[$2]"
@@ -519,7 +519,7 @@
 
 
 dnl The argument is the default cache size if none is specified.
-AC_DEFUN(SIM_AC_OPTION_SCACHE,
+AC_DEFUN([SIM_AC_OPTION_SCACHE],
 [
 default_sim_scache="ifelse([$1],,0,[$1])"
 AC_ARG_ENABLE(sim-scache,
@@ -539,7 +539,7 @@
 
 
 dnl The argument is the default model if none is specified.
-AC_DEFUN(SIM_AC_OPTION_DEFAULT_MODEL,
+AC_DEFUN([SIM_AC_OPTION_DEFAULT_MODEL],
 [
 default_sim_default_model="ifelse([$1],,0,[$1])"
 AC_ARG_ENABLE(sim-default-model,
@@ -559,7 +559,7 @@
 dnl arg[1] Enable sim-hw by default? ("yes" or "no")
 dnl arg[2] is a space separated list of devices that override the defaults
 dnl arg[3] is a space separated list of extra target specific devices.
-AC_DEFUN(SIM_AC_OPTION_HARDWARE,
+AC_DEFUN([SIM_AC_OPTION_HARDWARE],
 [
 if test x"[$1]" = x"yes"; then
   sim_hw_p=yes
@@ -621,7 +621,7 @@
 dnl performance by inlining functions.
 dnl Guarantee that unconfigured simulators do not do any inlining
 sim_inline="-DDEFAULT_INLINE=0"
-AC_DEFUN(SIM_AC_OPTION_INLINE,
+AC_DEFUN([SIM_AC_OPTION_INLINE],
 [
 default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])"
 AC_ARG_ENABLE(sim-inline,
@@ -666,7 +666,7 @@
 AC_SUBST(sim_inline)
 
 
-AC_DEFUN(SIM_AC_OPTION_PACKAGES,
+AC_DEFUN([SIM_AC_OPTION_PACKAGES],
 [
 AC_ARG_ENABLE(sim-packages,
 [  --enable-sim-packages=list		Specify the packages to be included in the build.],
@@ -692,7 +692,7 @@
 AC_SUBST(sim_packages)
 
 
-AC_DEFUN(SIM_AC_OPTION_REGPARM,
+AC_DEFUN([SIM_AC_OPTION_REGPARM],
 [
 AC_ARG_ENABLE(sim-regparm,
 [  --enable-sim-regparm=nr-parm		Pass parameters in registers instead of on the stack - x86/GCC specific.],
@@ -709,7 +709,7 @@
 AC_SUBST(sim_regparm)
 
 
-AC_DEFUN(SIM_AC_OPTION_RESERVED_BITS,
+AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS],
 [
 default_sim_reserved_bits="ifelse([$1],,1,[$1])"
 AC_ARG_ENABLE(sim-reserved-bits,
@@ -726,7 +726,7 @@
 AC_SUBST(sim_reserved_bits)
 
 
-AC_DEFUN(SIM_AC_OPTION_SMP,
+AC_DEFUN([SIM_AC_OPTION_SMP],
 [
 default_sim_smp="ifelse([$1],,5,[$1])"
 AC_ARG_ENABLE(sim-smp,
@@ -746,7 +746,7 @@
 AC_SUBST(sim_smp)
 
 
-AC_DEFUN(SIM_AC_OPTION_STDCALL,
+AC_DEFUN([SIM_AC_OPTION_STDCALL],
 [
 AC_ARG_ENABLE(sim-stdcall,
 [  --enable-sim-stdcall=type		Use an alternative function call/return mechanism - x86/GCC specific.],
@@ -763,7 +763,7 @@
 AC_SUBST(sim_stdcall)
 
 
-AC_DEFUN(SIM_AC_OPTION_XOR_ENDIAN,
+AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN],
 [
 default_sim_xor_endian="ifelse([$1],,8,[$1])"
 AC_ARG_ENABLE(sim-xor-endian,
@@ -782,7 +782,7 @@
 
 dnl --enable-build-warnings is for developers of the simulator.
 dnl it enables extra GCC specific warnings.
-AC_DEFUN(SIM_AC_OPTION_WARNINGS,
+AC_DEFUN([SIM_AC_OPTION_WARNINGS],
 [
 # NOTE: Don't add -Wall or -Wunused, they both include
 # -Wunused-parameter which reports bogus warnings.
@@ -866,7 +866,7 @@
 dnl one afterwards.  The two pieces of the common fragment are inserted into
 dnl the target's fragment at the appropriate points.
 
-AC_DEFUN(SIM_AC_OUTPUT,
+AC_DEFUN([SIM_AC_OUTPUT],
 [
 AC_LINK_FILES($sim_link_files, $sim_link_links)
 dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
@@ -895,7 +895,7 @@
 sinclude(../../config/gettext-sister.m4)
 
 dnl --enable-cgen-maint support
-AC_DEFUN(SIM_AC_OPTION_CGEN_MAINT,
+AC_DEFUN([SIM_AC_OPTION_CGEN_MAINT],
 [
 cgen_maint=no
 dnl Default is to use one in build tree.
@@ -943,23 +943,23 @@
 dnl  variables are not a valid argument.
 AC_DEFUN([SIM_CHECK_MEMBER],
 dnl Extract the aggregate name, and the member name
-[AC_CACHE_CHECK([for $1], [ac_]patsubst([$1], [[\. ]], [_]),
-[ac_]patsubst([$1], [[\. ]], [_])[=no;]
+[AC_CACHE_CHECK([for $1], [ac_cv_]patsubst([$1], [[\. ]], [_]),
+[ac_cv_]patsubst([$1], [[\. ]], [_])[=no;]
 AC_TRY_COMPILE([$4],[
 dnl AGGREGATE ac_aggr;
 static ]patsubst([$1], [\..*])[ ac_aggr;
 dnl ac_aggr.MEMBER;
 if (ac_aggr.]patsubst([$1], [^[^.]*\.])[)
-return 0;],[ac_]patsubst([$1], [[\. ]], [_])[=yes;],
+return 0;],[ac_cv_]patsubst([$1], [[\. ]], [_])[=yes;],
 AC_TRY_COMPILE([$4],[
 dnl AGGREGATE ac_aggr;
 static ]patsubst([$1], [\..*])[ ac_aggr;
 dnl ac_aggr.MEMBER;
 if (sizeof ac_aggr.]patsubst([$1], [^[^.]*\.])[)
 return 0;],
-[ac_]patsubst([$1], [[\. ]], [_])[=yes;],
-[ac_]patsubst([$1], [[\. ]], [_])[=no;]))
-[if test [$]ac_]patsubst([$1], [[\. ]], [_])[ = yes; then :; [$2]
+[ac_cv_]patsubst([$1], [[\. ]], [_])[=yes;],
+[ac_cv_]patsubst([$1], [[\. ]], [_])[=no;]))
+[if test [$]ac_cv_]patsubst([$1], [[\. ]], [_])[ = yes; then :; [$2]
 else :; [$3]
 fi])
 ])dnl SIM_CHECK_MEMBER
diff -Naur gdb-6.8.orig/sim/configure.ac gdb-6.8/sim/configure.ac
--- gdb-6.8.orig/sim/configure.ac	2008-02-06 01:40:05.000000000 +0100
+++ gdb-6.8/sim/configure.ac	2008-11-15 22:38:23.000000000 +0100
@@ -2,6 +2,8 @@
 AC_PREREQ(2.59)dnl
 AC_INIT(Makefile.in)
 
+AC_CONFIG_MACRO_DIR(.)
+
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_CHECK_TOOL(AR, ar)
diff -Naur gdb-6.8.orig/sim/Makefile.in gdb-6.8/sim/Makefile.in
--- gdb-6.8.orig/sim/Makefile.in	2008-01-01 23:53:22.000000000 +0100
+++ gdb-6.8/sim/Makefile.in	2008-11-16 00:21:56.000000000 +0100
@@ -31,6 +31,7 @@
 libdir = @libdir@
 tooldir = $(libdir)/$(target_alias)
 
+datarootdir = @datarootdir@
 datadir = @datadir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
@@ -201,6 +202,8 @@
 TAGS:
 
 force:
+html:
+install-html:
 
 Makefile: Makefile.in config.status
 	$(SHELL) ./config.status

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: autotools patches for --*dir and upcoming versions
  2008-11-16 18:08 autotools patches for --*dir and upcoming versions Daniel Mierswa
@ 2008-11-20 13:28 ` Thiago Jung Bauermann
  2008-11-22 18:22   ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Jung Bauermann @ 2008-11-20 13:28 UTC (permalink / raw)
  To: Daniel Mierswa; +Cc: gdb-patches

Hi,

I'm far from what you'd call an autotools person, so I won't comment on
the actual changes you are proposing, just give some general information
on how I'd go about this.

First of all, thanks for your patch, of course.

GDB shares its source tree with other projects, and a number of the
directories it ships in its tarball are actually managed by those other
projects. So you'll have to talk to people in other mailing lists as
well, I'm afraid. For instance (I'm not even sure about some of them
myself):

Files in the root of the tarball I believe are responsibility of the GCC
project (also, you'd have to reflect your changes in the gcc build
system as well), and so are files under libdecnumber/. Files under bfd/
are from binutils, gdb/ and sim/ you can talk about them here, and files
under readline/ are from the readline project. I don't know about files
under intl/ and libiberty/. I'd guess either binutils or GCC...

Also, I'm sure everybody will ask a diff against a recent CVS (or svn)
version. But you can worry about that after discussing your proposed
changes, so that you don't have to do more work than necessary.
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


El dom, 16-11-2008 a las 01:56 +0100, Daniel Mierswa escribió:
> I created a patch to let the --{dataroot,doc,pdf,html}dir to be passed
> through configure instead of using the self written --with-*dir.
> The patch also fixes some warnings spilled out by newer autotools
> regarding ordering of AC_ macros and unquoted definitions.
> The patch was created against the official 6.8 tarball.
> Tested by invoking the usual, autoreconf procedures, followed by
> ./configure with --docdir=/something and invoking make install-html at
> the very end.
> I'd like to hear your opinion.
> The ChangeLog entries would be as follows:
> 
> ChangeLog: (couldn't find any)
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.ac: use config directory for m4-macro searches, provide
>     AC_PROG_LIBTOOL, so ltmain.sh and others get updated by autoreconf,
>     remove self-written --with-{dataroot,doc,pdf,html}dir switches and
> let the
>     ones created by autoconf pass through, remove unneeded AC_SUBST
> 
> bfd/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.in: AC_GNU_SOURCE must occur before AC_PROG_CC,
>     use own directory for m4-macro searches, remove unneeded AC_SUBST
> 
> gdb/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.ac: AC_{GNU_SOURCE,AIX} are both present in
>     AC_USE_SYSTEM_EXTENSIONS (must occur before AC_PROG_CC)
>     * acinclude.m4: serial has to appear before any macro definition
>     * Makefile.in: touch datarootdir so autoconf is happy, don't
> redefine variables
>     passed by configure
> 
> gdb/doc/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: don't redefine variables passed by configure, install
> html files
>     from subdirectories
> 
> gdb/gdbserver/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: don't redefine variables passed by configure
> 
> intl/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: touch datarootdir so autoconf is happy
> 
> libiberty/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.ac: remove unneeded AC_SUBST
> 
> sim/common/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * aclocal.m4: use quoted definitions, autoconf cached variables
>     have to include cv in their name
> 
> sim/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.ac: use own directory for m4-macro searches
>     * Makefile.in: touch datarootdir so autoconf is happy
> 
> libdecnumber/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: touch datarootdir so autoconf is happy
> 
> readline/ChangeLog.gdb:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: touch datarootdir so autoconf is happy, create empty
>     install-html target so make install-html from top-level won't fail
> 
> readline/doc/ChangeLog.gdb:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: touch datarootdir so autoconf is happy
> 
> readline/examples/rlfe/ChangeLog:
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * configure.in: use quoted definitions
> 
> readline/shlib/ChangeLog.gdb: (couldn't find any)
> 2008-11-15  Daniel Mierswa  <impulze@impulze.org>
>     * Makefile.in: touch datarootdir so autoconf is happy




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: autotools patches for --*dir and upcoming versions
  2008-11-20 13:28 ` Thiago Jung Bauermann
@ 2008-11-22 18:22   ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2008-11-22 18:22 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: Daniel Mierswa, gdb-patches

> I'm far from what you'd call an autotools person, so I won't comment on
> the actual changes you are proposing, just give some general information
> on how I'd go about this.

The patch is also fairly big - and I'm wondering whether some pieces
might be independent and thus submitted independently.

Otherwise, I liked all of Thiago's suggestions.

-- 
Joel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* autotools patches for --*dir and upcoming versions
@ 2008-11-16 17:37 Daniel Mierswa
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Mierswa @ 2008-11-16 17:37 UTC (permalink / raw)
  To: gdb-patches

Hi there
I created a patch to let the --{dataroot,doc,pdf,html}dir to be passed 
through configure instead of using the self written --with-*dir.
The patch also fixes some warnings spilled out by newer autotools 
regarding ordering of AC_ macros and unquoted definitions.
The patch was created against the official 6.8 tarball.
Tested by invoking the usual, autoreconf procedures, followed by 
./configure with --docdir=/something and invoking make install-html at 
the very end.
I'd like to hear your opinion.
The ChangeLog entries would be as follows:

ChangeLog: (couldn't find any)
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: use config directory for m4-macro searches, provide
    AC_PROG_LIBTOOL, so ltmain.sh and others get updated by autoreconf,
    remove self-written --with-{dataroot,doc,pdf,html}dir switches and 
let the
    ones created by autoconf pass through, remove unneeded AC_SUBST

bfd/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.in: AC_GNU_SOURCE must occur before AC_PROG_CC,
    use own directory for m4-macro searches, remove unneeded AC_SUBST

gdb/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: AC_{GNU_SOURCE,AIX} are both present in
    AC_USE_SYSTEM_EXTENSIONS (must occur before AC_PROG_CC)
    * acinclude.m4: serial has to appear before any macro definition
    * Makefile.in: touch datarootdir so autoconf is happy, don't 
redefine variables
    passed by configure

gdb/doc/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: don't redefine variables passed by configure, install 
html files
    from subdirectories

gdb/gdbserver/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: don't redefine variables passed by configure

intl/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

libiberty/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: remove unneeded AC_SUBST

sim/common/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * aclocal.m4: use quoted definitions, autoconf cached variables
    have to include cv in their name

sim/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.ac: use own directory for m4-macro searches
    * Makefile.in: touch datarootdir so autoconf is happy

libdecnumber/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

readline/ChangeLog.gdb:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy, create empty
    install-html target so make install-html from top-level won't fail

readline/doc/ChangeLog.gdb:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

readline/examples/rlfe/ChangeLog:
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * configure.in: use quoted definitions

readline/shlib/ChangeLog.gdb: (couldn't find any)
2008-11-15  Daniel Mierswa  <impulze@impulze.org>
    * Makefile.in: touch datarootdir so autoconf is happy

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-22  5:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-16 18:08 autotools patches for --*dir and upcoming versions Daniel Mierswa
2008-11-20 13:28 ` Thiago Jung Bauermann
2008-11-22 18:22   ` Joel Brobecker
  -- strict thread matches above, loose matches on Subject: below --
2008-11-16 17:37 Daniel Mierswa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox