[Top][All Lists]

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

Re: What is the distinction between AC_PROG_CC_C_O and AC_PROG_CC ??

From: Russ Allbery
Subject: Re: What is the distinction between AC_PROG_CC_C_O and AC_PROG_CC ??
Date: Sun, 29 Apr 2007 23:29:35 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.20 (linux)

Ralf Wildenhues <address@hidden> writes:
> * Bruce Korb wrote on Mon, Apr 30, 2007 at 12:04:53AM CEST:

>> The index and search of the docs only yields this:

>>      This is like `AC_PROG_CC_C_O', but it generates its results in the
>>      manner required by automake.  You must use this instead of
>>      `AC_PROG_CC_C_O' when you need this functionality, that is, when
>>      using per-target flags or subdir-objects with C sources.

> The above is from the Automake manual.  AC_PROG_CC_C_O is explained in
> the Autoconf manual (the name prefix hints to where this macro comes
> from):

> | -- Macro: AC_PROG_CC_C_O
> |     If the C compiler does not accept the `-c' and `-o' options
> |     simultaneously, define `NO_MINUS_C_MINUS_O'.  This macro actually
> |     tests both the compiler found by `AC_PROG_CC', and, if different,
> |     the first `cc' in the path.  The test fails if one fails.  This
> |     macro was created for GNU Make to choose the default C compilation
> |     rule.

Since AC_PROG_CC_C_O tests compilers you're not even using, it's less than
useful unless you're writing GNU make or some similar software that cares
about more compilers than just the one you're using to build.  In places
where I couldn't use AM_PROG_CC_C_O because I wasn't using Automake, I've
rolled my own version that defines Makefile fragments.

Russ Allbery (address@hidden)             <>

reply via email to

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