[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Detect Cross Compiler
From: |
Too, Justin A. |
Subject: |
Detect Cross Compiler |
Date: |
Thu, 10 Feb 2011 09:56:08 -0800 |
User-agent: |
Microsoft-MacOutlook/14.0.0.100825 |
Hi,
As a whole, my project is not being cross-compiled, but there is a test that
uses a user-specified compiler on some test code and then runs the generated
executable. The problem is that the user may specify to cross-compile this test
code, in which case the executable should NOT be run. Therefore, I would like
to set an AM_CONDITIONAL(IS_USING_CROSS_COMPILER), for example.
Say the user specifies the test compiler on the configure line using
—with-test-compiler=<compiler>.
What I would like to do is have configure detect that this compiler,
$with_test_compiler, is a cross-compiler for the host system and then I can set
my AM_CONDITIONAL to use in my Makefile.am's. I'm aware of AC_RUN_IFELSE and
AC_LANG_PROGRAM, but I don't see a way to feed these macros a different
compiler. AC_LANG and AC_LANG_PUSH don't seem to be useful in this scenario
either.
Any tips?
Thanks,
Justin
- Detect Cross Compiler,
Too, Justin A. <=