automake
[Top][All Lists]
Advanced

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

Re: Another snag.. extension detection


From: Ralf Wildenhues
Subject: Re: Another snag.. extension detection
Date: Sun, 18 Nov 2007 15:17:24 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello,

This is an Autoconf issue, not an Automake one.

* NightStrike wrote on Sun, Nov 18, 2007 at 09:02:08AM CET:
> I hit another snag in my project.  I am building a runtime as a
> component of a cross compiler.  Configure has to determine the various
> tools to use (denoted by passing --host=xx to configure), and I use
> all of the AC_PROG_XX macros.  This may be an autoconf issue instead
> of automake, but what happens is that configure tries to test for the
> default extention of exe files.  The compiler doesn't make exe files,
> however, because there is no runtime (chicken, egg).
> 
> Will automake be ok if I just do AC_CHECK_TOOL for gcc and g++ instead
> of AC_PROG_CC and AC_PROG_CXX?

This is definitely a problem.  Lots of macros AC_REQUIRE([AC_PROG_CC]),
so not calling it at all will likely not save you from it.  One (ugly)
choice is to redefine AC_PROG_CC to do what you need, but doing that
right is rather nontrivial, and also likely to break with an Autoconf
version unlike the one you used.  Another possibility is to temporarily
redefine (m4_pushdef/m4_popdef) AC_MSG_ERROR just to avoid the script
from exiting if the EXEEXT test fails, and then just setting the right
value (since presumably you do know it anyway).

GCC has similar issues, too, and they use hacks like GCC_NO_EXECUTABLES
to work around the issues, see
  gcc/config/no-executables.m4

in the GCC source tree, and other places where it's used.  Sorry.

Cheers,
Ralf




reply via email to

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