[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preferring a specific compiler?
From: |
Andreas Schwab |
Subject: |
Re: Preferring a specific compiler? |
Date: |
Tue, 31 May 2005 22:27:07 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
Dan Stromberg <address@hidden> writes:
> On Tue, 31 May 2005 21:16:00 +0200, Stepan Kasal wrote:
>
>> Hi,
>>
>> On Tue, May 31, 2005 at 10:27:01AM -0700, Dan Stromberg wrote:
>>> I have an app I'd like to compile with tcc -b if available, otherwise try
>>> gcc, and if that is unavailable too, then try cc.
>>
>> place
>>
>> AC_PROG_CC(["tcc -b" gcc cc])
>>
>> near the top of your configure.ac
>>
>> Stepan
>
> That's generating a ./configure line:
>
> for ac_prog in "tcc -b" gcc cc
>
> ...but it's not finding tcc. Perhaps it's looking for a program called
> "tcc -b", and not a program called "tcc" with a "-b" argument?
Works fine here. Note how AC_CHECK_PROG splits its argument to extract
the first word from it.
$ cat configure.ac
AC_INIT
AC_PROG_CC(["gcc -v"])
AC_OUTPUT
$ ./configure
checking for gcc... gcc -v
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -v accepts -g... yes
checking for gcc -v option to accept ANSI C... none needed
configure: creating ./config.status
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."