AM_CFLAGS = -Wall -Wextra -Werror
Those compiler flags are specific to gcc and do not work
under some other C compilers.
It's somewhat easy to override this, but thought it might
be best to fix the configure script to either not set these
here; or to conditionally do it based on whether gcc is
being used. BTW, configure doesn't support --without-gcc,
thought forcing $CC and $CFLAGS does seem to work.
--
Deron Meranda
http://deron.meranda.us/
I fixed it so that those flags are set only if gcc is detected. It's
in the 1.3 branch:
git> commit f71eb7fe1749836ac45cc6c0015dd6d2aec4bef9
git> Author: Petri Lehtinen <pe...@digip.org>
git> Date: Thu Aug 12 20:59:48 2010 +0300
git>
git> Check for gcc before setting gcc specific CFLAGS
git>
git> configure.ac | 1 +
git> src/Makefile.am | 3 +++
git> 2 files changed, 4 insertions(+), 0 deletions(-)
> BTW, configure doesn't support --without-gcc,
> thought forcing $CC and $CFLAGS does seem to work.
I've never heard of this flag. Is it supposed to change the order in
which configure searches for C compiler so that gcc isn't searched
first?
Petri
I'm certainly not an autoconfigure/automake expert,
but lots of other OSS packages provide that configure flag.
It essentially will ignore any gcc* it finds in the path
and will look for other (native) compilers instead.
I don't know how it works or how to activate it.
It's not terribly important as long as you can force a
compiler by setting CC; such as
CC=xlc ./configure ...
but it can still be convenient for those of us mucking
with proprietary Unixes.
Do you happen to remember any package that has the flag? I could have
a look on how it's implemented. Reading through Autoconf docs doesn't
give an obvious answer.
> It essentially will ignore any gcc* it finds in the path
> and will look for other (native) compilers instead.
> I don't know how it works or how to activate it.
>
> It's not terribly important as long as you can force a
> compiler by setting CC; such as
>
> CC=xlc ./configure ...
>
> but it can still be convenient for those of us mucking
> with proprietary Unixes.
Can you reveal on which architectures you are mucking with? It would
be interesting to know just how portable Jansson is right now :)
Petri
First is I think there's a pattern for allowing anything like
--without-xyz to be treated as if it were --with-xyz=no
and generally it allows any package name to be used in
the flag.
I know that both Python and Ruby use that flag; though I
don't think they are particularly "standard" configure-based
packages.
Emacs used to support it; though it was seemingly removed
as of version 23.1.
I seem to remember a lot more packages using that than
I can find now. Perhaps it's going out of favor in support
of just setting the $CC variable ??? I may be showing my age.
I wouldn't spend a lot of time on it unless you just want to.
Setting CC works for jansson to keep it from picking up an
unwanted gcc.
> Can you reveal on which architectures you are mucking with? It would
> be interesting to know just how portable Jansson is right now :)
Other than Linux, which is easy, mostly several versions of
both AIX (PowerPC) and HP-UX (both PA-RISC and Itanium).
Both Python and Ruby seem to just set CC=cc if --without-gcc is used.
Furthermore, Python has special cases for AIX (CC=cc_r) and BeOS
(CC=mwcc). So...
> I wouldn't spend a lot of time on it unless you just want to.
> Setting CC works for jansson to keep it from picking up an
> unwanted gcc.
... I believe those users who know that they don't want gcc are also
able to set CC to a correct value before running ./configure :)