From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17670 invoked by alias); 6 Dec 2002 00:56:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17652 invoked from network); 6 Dec 2002 00:56:26 -0000 Received: from unknown (HELO mailout6-0.nyroc.rr.com) (24.92.226.177) by sources.redhat.com with SMTP; 6 Dec 2002 00:56:26 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout6-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gB60uMk08854; Thu, 5 Dec 2002 19:56:22 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18K6m3-00036E-00; Thu, 05 Dec 2002 19:55:23 -0500 Date: Fri, 06 Dec 2002 05:28:00 -0000 To: zack@codesourcery.com Cc: gdb-patches@sources.redhat.com, binutils@sources.redhat.com, gcc-patches@gcc.gnu.org Subject: Re: [RFC] Update to current automake/autoconf/libtool versions Message-ID: <20021206005522.GA11907@doctormoo> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-12/txt/msg00219.txt.bz2 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 991 >Going over it all again, I realize that we could probably just >redefine AC_NO_EXECUTABLES to do what we want. We'd have to >specialize its definition for every version of autoconf that we cared >about, and check at every new release that it hadn't broken, but it >would work. I guess it's not impossible after all. > >zw *twisted half-grin* For the top level, I'd been unable to avoid writing complete replacements for AC_PROG_CC and AC_PROG_CXX, and it was really nasty. So this is actually better than I'd hoped. Thanks! Writing a specialized implementation of AC_NO_EXECUTABLES will make my life easier, probably. :-) The real reason I want autoconf 2.5x is twofold: * it handles AC_REQUIRES on AC_CANONICAL_* properly * it allows the use of m4_include, so I can make a master macro file (in top level config, for instance) and use it even in directories without automake. You might be amused by the most basic parts of my experimental aclocal.m4 include file. --Nathanael --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aclocal.m4" Content-length: 2431 # Autoconf M4 include file defining valuable macros for complex Canadian # cross builds. #### # _NCN_TOOL_PREFIXES # Get prefixes for cross-compilers to the host and the target. # This requires that AC_CANONICAL_SYSTEM be called beforehand. # Unfortunately, AC_REQUIRE doesn't work properly in this case under # autoconf 2.13. AC_DEFUN([_NCN_TOOL_PREFIXES], [ncn_tool_prefix= test -n "$host_alias" && ncn_tool_prefix=$host_alias- ncn_target_tool_prefix= test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- ]) []dnl # _NCN_TOOL_PREFIXES #### # NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) # Like AC_CHECK_TOOL, but tries a prefix of the target, not the host. # Code is pretty much lifted from autoconf2.53. AC_DEFUN([NCN_CHECK_TARGET_TOOL], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl if test -n "$ncn_target_tool_prefix"; then AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], [${ncn_target_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1" ; then ncn_ct_$1=$$1 AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) $1=$ncn_ct_$1 else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_CHECK_TARGET_TOOL #### # NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) # Like AC_CHECK_TOOL, but requires the prefix if build!=host. AC_DEFUN([NCN_STRICT_CHECK_TOOL], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl if test -n "$ncn_tool_prefix"; then AC_CHECK_PROG([$1], [${ncn_tool_prefix}$2], [${ncn_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1" ; then if test $build = $host ; then ncn_ct_$1=$$1 AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) $1=$ncn_ct_$1 else $1="$3" fi else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TOOL #### # NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) # Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target. AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOL], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl if test -n "$ncn_target_tool_prefix"; then AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], [${ncn_target_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1" ; then if test $build = $target ; then ncn_ct_$1=$$1 AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) $1=$ncn_ct_$1 else $1="$3" fi else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL --/04w6evG8XlLl3ft--