[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Don't try to use help2man when cross-compiling
From: |
Colin Watson |
Subject: |
Re: [PATCH] Don't try to use help2man when cross-compiling |
Date: |
Thu, 10 Sep 2009 23:51:04 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
* 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 address@hidden