[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Check if the compiler supports c99
From: |
Ralf Wildenhues |
Subject: |
Re: Check if the compiler supports c99 |
Date: |
Thu, 20 Apr 2006 08:55:08 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Carlos,
* Carlos Eduardo Rodrigues DiĆ³genes wrote on Thu, Apr 20, 2006 at 01:30:48AM
CEST:
>
> I need to use round () in a part of the code and I saw that in GCC I
> must pass the -std=c99 option to the compiler and the -lm option to the
> linker.
>
> I yet put it in my configure.in:
>
> AC_CHECK_LIB(m, round, [M_LIBS="-lm"], AC_MSG_ERROR([libm is
> required to build gnome-mag. This lib comes with GNU C libraries
> (glibc) and you can find the lastest version from
> http://www.gnu.org/software/libc/]))
> AC_SUBST(M_LIBS)
If you have a bit more patience (or are willing to use alpha releases):
Autoconf-2.59c has a macro AC_PROG_CC_C99 which will try to put the
compiler in C99+extensions mode. Autoconf-2.60 will hopefully not be
too far away. The macro should make your above setup work.
Cheers,
Ralf