|
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 acomponent of a cross compiler. Configure has to determine the varioustools 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 insteadof 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++ insteadof AC_PROG_CC and AC_PROG_CXX?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:
ac_cv_c_compiler_gnu=yes ac_cv_cxx_compiler_gnu=yes ac_cv_objext=o ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_ac_ct_CXX=g++ ac_cv_prog_cc_c89= ac_cv_prog_cc_g=yes ac_cv_prog_cxx_g=yesThe 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 http://www.gnu.org/ software/autoconf/manual/html_node/Caching-Results.html
HTH, cheers, -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part
[Prev in Thread] | Current Thread | [Next in Thread] |