* [PATCH] Use AH_TEMPLATE to generate config.in
@ 2004-06-07 11:15 Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2004-06-07 11:15 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
This patch removes useless code from gcc's configure, relying instead on
Autoconf 2.5x's autoheader specific directive, AH_TEMPLATE. The code is
mostly based on Autoconf's AC_CHECK_FUNCS.
Bootstrapped/regtested i686-pc-linux-gnu. Since config.in needed to be
regenerated, I have just committed a regeneration (of course without
this patch): after applying the patch and rerunning autoheader, the new
config.in only differs in comments.
Ok for mainline?
Paolo
2004-06-02 Paolo Bonzini <bonzini@gnu.org>
* aclocal.m4 (gcc_AC_CHECK_DECLS): Generate
autoheader templates without leaving dummy code
in configure.
* configure: Regenerate.
* config.in: Regenerate.
[-- Attachment #2: modernize-ac-check-decls.patch --]
[-- Type: text/plain, Size: 1305 bytes --]
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
retrieving revision 1.90
diff -u -r1.90 aclocal.m4
--- aclocal.m4 24 May 2004 10:50:33 -0000 1.90
+++ aclocal.m4 3 Jun 2004 09:30:38 -0000
@@ -28,11 +28,13 @@
dnl gcc_AC_CHECK_DECLS(SYMBOLS,
dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
AC_DEFUN([gcc_AC_CHECK_DECLS],
-[for ac_func in $1
+[AC_FOREACH([gcc_AC_Func], [$1],
+ [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_[]gcc_AC_Func),
+ [Define to 1 if we found a declaration for ']gcc_AC_Func[', otherwise
+ define to 0.])])dnl
+for ac_func in $1
do
-changequote(, )dnl
- ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-changequote([, ])dnl
+ ac_tr_decl=AS_TR_CPP([HAVE_DECL_$ac_func])
gcc_AC_CHECK_DECL($ac_func,
[AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
[AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
@@ -48,12 +50,6 @@
$4
)
done
-dnl Automatically generate config.h entries via autoheader.
-if test x = y ; then
- patsubst(translit([$1], [a-z], [A-Z]), [\w+],
- [AC_DEFINE([HAVE_DECL_\&], 1,
- [Define to 1 if we found this declaration otherwise define to 0.])])dnl
-fi
])
dnl 'make compare' can be significantly faster, if cmp itself can
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Use AH_TEMPLATE to generate config.in
@ 2004-06-09 5:06 Nathanael Nerode
0 siblings, 0 replies; 2+ messages in thread
From: Nathanael Nerode @ 2004-06-09 5:06 UTC (permalink / raw)
To: paolo.bonzini, gcc-patches
>This patch removes useless code from gcc's configure, relying instead on Autoconf 2.5x's autoheader specific directive, AH_TEMPLATE. The code is mostly based on Autoconf's AC_CHECK_FUNCS.
>
> Bootstrapped/regtested i686-pc-linux-gnu. Since config.in needed to be regenerated, I have just committed a regeneration (of course without this patch): after applying the patch and rerunning autoheader, the new config.in only differs in comments.
>
> Ok for mainline?
Yes, please commit.
> Paolo
>
> 2004-06-02 Paolo Bonzini <bonzini@gnu.org>
>
>
> * aclocal.m4 (gcc_AC_CHECK_DECLS): Generate
> autoheader templates without leaving dummy code
> in configure.
> * configure: Regenerate.
> * config.in: Regenerate.
--
There are none so blind as those who will not see.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-09 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-07 11:15 [PATCH] Use AH_TEMPLATE to generate config.in Paolo Bonzini
2004-06-09 5:06 Nathanael Nerode
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).