issue using round () in gnome-mag



Hi,

I'm with an issue about using the round () function in gnome-mag. I must
pass the option -std=c99 to the compiler and the -lm option to the
linker to get the code working properly.

One thing that I'm in doubt is if every compiler support the -std=c99
option, I must care with it?

One solution that I used was to add the following in the 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)

And then declare round () as an extern function.

I receiveid a response from the autoconf mailing list saying that the
alpha release (Autconf-2.59c) has the macro AC_PROG_CC_C99 that will try
to put the compiler in C99+extensions mode and Autoconf-2.60 will
hopefully not be too far.

Someone can give me any tip what is the best to do. Use the solution
that I exposed above, or jump the gnome-mag requirement for
Autoconf-2.60.

Thanks,
-- 
Carlos Eduardo Rodrigues Diógenes




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