[Top][All Lists]

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

Re: Another snag.. extension detection

From: Benoit Sigoure
Subject: Re: Another snag.. extension detection
Date: Mon, 19 Nov 2007 00:30:12 +0100

On Nov 18, 2007, at 6:42 PM, NightStrike wrote:

On Nov 18, 2007 10:11 AM, Benoit Sigoure <address@hidden> wrote:

On Nov 18, 2007, at 9:02 AM, NightStrike wrote:

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

Can't you populate the right cache variables to set the results you
want without going through the tests?  It's a kludge, but it's less
kludgy than what Ralf suggested, or so I think.

I'm not really sure what that means, nor how to do it.  Are you
suggesting distributing a configure cache?  Wouldn't that defeat the
purpose of using configure?

AC_PROG_CC / CXX search for a C/C++ compiler, and your problem is that you can't use the compiler at configure time, right? So what you want --correct me if I'm wrong-- is to use AC_PROG_CC/CXX without actually running the compiler, right? In this case, you can preset some cache variables (shell variables of the form *_cv_*) so that configure doesn't run the tests that you know are going to fail.

Typically, I *guess* (untested) adding this before all your AC_PROG_CC/CXX/LIBTOOL and everything will trick configure:


The value of ac_cv_objext is obviously platform dependent and guessing it properly without running a compiler is fragile, at best.

For more information about cache variables, see software/autoconf/manual/html_node/Caching-Results.html

HTH, cheers,

Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory

Attachment: PGP.sig
Description: This is a digitally signed message part

reply via email to

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