Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MlsTz-0006ju-6G for mharc-grub-devel@gnu.org; Thu, 10 Sep 2009 18:51:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlsTw-0006dI-4N for grub-devel@gnu.org; Thu, 10 Sep 2009 18:51:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlsTq-0006Qt-TI for grub-devel@gnu.org; Thu, 10 Sep 2009 18:51:11 -0400 Received: from [199.232.76.173] (port=56783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlsTq-0006Q7-Jb for grub-devel@gnu.org; Thu, 10 Sep 2009 18:51:06 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:39983) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlsTq-0005pY-1v for grub-devel@gnu.org; Thu, 10 Sep 2009 18:51:06 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1MlsTp-0004va-5V for grub-devel@gnu.org; Thu, 10 Sep 2009 22:51:05 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MlsTo-0007m4-00; Thu, 10 Sep 2009 23:51:04 +0100 Date: Thu, 10 Sep 2009 23:51:04 +0100 From: Colin Watson To: The development of GRUB 2 Message-ID: <20090910225103.GE13423@riva.ucam.org> References: <20090910153729.GA13423@riva.ucam.org> <20090910192019.GE18736@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090910192019.GE18736@thorin> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Don't try to use help2man when cross-compiling X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2009 22:51:12 -0000 On Thu, Sep 10, 2009 at 09:20:19PM +0200, Robert Millan wrote: > On Thu, Sep 10, 2009 at 04:37:29PM +0100, Colin Watson wrote: > > Index: configure.ac > > =================================================================== > > --- configure.ac (revision 2584) > > +++ configure.ac (working copy) > > @@ -147,7 +147,9 @@ > > > > # These are not a "must". > > AC_PATH_PROG(RUBY, ruby) > > -AC_PATH_PROG(HELP2MAN, help2man) > > +if test "x$cross_compiling" = xno; then > > + AC_PATH_PROG(HELP2MAN, help2man) > > +fi > > Autoconf documentation says you can test for $cross_compiling being set to > "yes", but is unclear about the variable being defined or not when we're not > cross-compiling. It's always set during initialisation. > Maybe we should test "x$cross_compiling" != xyes instead? This is probably a good idea anyway. AC_RUN_IFELSE just checks against yes, so I think it's the right thing to do. Furthermore, if we move this down to after the compiler checks then we get a more reliable test. Revised patch follows, also addressing Felix's comment. Is this better? 2009-09-10 Colin Watson * configure.ac: Don't look for help2man when cross-compiling. Fixes part of bug #27349. Index: configure.ac =================================================================== --- configure.ac (revision 2585) +++ configure.ac (working copy) @@ -147,7 +147,6 @@ # These are not a "must". AC_PATH_PROG(RUBY, ruby) -AC_PATH_PROG(HELP2MAN, help2man) # # Checks for host programs. @@ -171,6 +170,12 @@ ASFLAGS="$ASFLAGS -DAPPLE_CC=1" fi +if test "x$cross_compiling" = xyes; then + AC_MSG_WARN([cannot generate manual pages while cross compiling]) +else + AC_PATH_PROG(HELP2MAN, help2man) +fi + # Check for functions. AC_CHECK_FUNCS(posix_memalign memalign asprintf) Thanks, -- Colin Watson [cjwatson@ubuntu.com]