Re: Check if the compiler supports c99

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux