autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using AC_CANONICAL_BUILD


From: Dawood Tariq
Subject: Re: Problem using AC_CANONICAL_BUILD
Date: Fri, 13 Apr 2012 13:29:16 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 4/13/12 12:54 PM, Nick Bowler wrote:
On 2012-04-13 13:40 -0600, Eric Blake wrote:
On 04/13/2012 01:31 PM, Dawood Tariq wrote:
Hello all,

I'm using autoconf 2.68 on Darwin kernel version 10.8.0. I want to use
the AX_PROG_JAVAH macro to determine the location of the jni.h header
file and set the CPPFLAGS accordingly. This macro uses the $build_os
variable which is generated by the AC_CANONICAL_BUILD macro. If I don't
use the AX_PROG_JAVAH and AC_CANONICAL_BUILD macros, my configure script
works fine. But if I invoke either of them, I get the following error:

configure: error: cannot find install-sh, install.sh, or shtool in "."
"./.." "./../.."

Why am I getting this message and how can I get around it?
Probably because you didn't properly populate your AC_CONFIG_AUX_DIR
directory.  I'm guessing you aren't using automake (since automake will
automatically place a copy of install-sh into your CONFIG_AUX_DIR)?  If
so, the solution is to manually place a version of install-sh alongside
your copies of config.guess and config.sub, all in the directory you
passed to AC_CONFIG_AUX_DIR (or, if you aren't using AC_CONFIG_AUX_DIR,
into your top-level directory, although I do recommend using
AC_CONFIG_AUX_DIR).  The version of install-sh shipped with autoconf
2.68 is adequate for the purpose.
Nevertheless, it's surprising (to me) that AC_CANONICAL_BUILD would
require install-sh.  I can reproduce the error with the following
configure.ac:

   AC_INIT([test], [1.0])
   AC_CANONICAL_BUILD
   AC_OUTPUT

The autoconf manual documents the install-sh requirement if you call
AC_PROG_INSTALL, but the above does not call AC_PROG_INSTALL, nor does
it appear in the output of "autoconf -t AC_PROG_INSTALL".

Moreover, after copying install-sh/config.guess/config.sub, the
generated configure script doesn't even test for a working install, nor
does it reference install-sh in any capacity other than to bail out if
it's not present.

https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicalizing
This section of the manual only says you need to copy config.guess and
config.sub.  The requirement for install-sh is not mentioned.

Cheers,

Thank you for the feedback! The script works fine after copying the install-sh, config.guess, config.sub files. For now, I found that simpler to do than to use automake. I thought I may have been missing something or doing something silly but was surprised by the 'install-sh' requirement myself. Anyway, thank you again!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]