Re: configure/autoconf is missing getloadavg on 5.2

2004-01-17 Thread Hanspeter Roth
  On Jan 17 at 00:29, Melvyn Sopacua spoke:

> On Friday 16 January 2004 19:51, Hanspeter Roth wrote:
> 
> > in icewm-1.2.14pre8 configure on FreeBSD 5.2 claims that
> > getloadavg() be not available:
> >
> >
> > configure:6804: checking for getloadavg
> > configure:6847: gcc -o conftest -fpermissive -Wall -Wpointer-arith
> > -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W
> > -fno-exceptions -fno-rtti -I/usr/local/include -I/usr/local/include
> > -L/usr/local/lib conftest.cc  >&5 configure:6819: error: declaration of C
> > function `char getloadavg()' conflicts with
> > /usr/include/stdlib.h:258: error: previous declaration `int
> > getloadavg(double*, int)' here
> > [...]
> >
> > However when trying a tiny configure.in getloadavg() is found:
> >
> > AC_INIT(configure.in)
> > AC_PREREQ([2.50])
> 
> Insert here:
> 
> AC_LANG(C++)
> 
> > AC_CHECK_FUNCS(failed getloadavg sysctlbyname)
> > AC_OUTPUT(Makefile)
> 
> Then try again.
> I think this is the gcc 3.x compiler getting stricter about types (char and 
> int conflict, but gcc 2.9x which is in -STABLE doesn't care).

Yes AC_LANG(C++) makes the difference. After inserting this
getloadavg() is no more found. The same result is achieved with
AC_LANG_CPLUSPLUS.
So is getloadavg() useless in a gcc 3.x environment?
Or else how does one check for/use getloadavg() with gcc 3.x?

-Hanspeter
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: configure/autoconf is missing getloadavg on 5.2

2004-01-16 Thread Melvyn Sopacua
On Friday 16 January 2004 19:51, Hanspeter Roth wrote:

> in icewm-1.2.14pre8 configure on FreeBSD 5.2 claims that
> getloadavg() be not available:
>
>
> configure:6804: checking for getloadavg
> configure:6847: gcc -o conftest -fpermissive -Wall -Wpointer-arith
> -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W
> -fno-exceptions -fno-rtti -I/usr/local/include -I/usr/local/include
> -L/usr/local/lib conftest.cc  >&5 configure:6819: error: declaration of C
> function `char getloadavg()' conflicts with
> /usr/include/stdlib.h:258: error: previous declaration `int
> getloadavg(double*, int)' here
> [...]
>
> However when trying a tiny configure.in getloadavg() is found:
>
> AC_INIT(configure.in)
> AC_PREREQ([2.50])

Insert here:

AC_LANG(C++)

> AC_CHECK_FUNCS(failed getloadavg sysctlbyname)
> AC_OUTPUT(Makefile)

Then try again.
I think this is the gcc 3.x compiler getting stricter about types (char and 
int conflict, but gcc 2.9x which is in -STABLE doesn't care).

-- 
Melvyn

===
FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Tue Dec 30 
14:31:47 CET 2003 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG  i386
===


pgp0.pgp
Description: signature


configure/autoconf is missing getloadavg on 5.2

2004-01-16 Thread Hanspeter Roth
Hello,

in icewm-1.2.14pre8 configure on FreeBSD 5.2 claims that
getloadavg() be not available:


configure:6804: checking for getloadavg
configure:6847: gcc -o conftest -fpermissive -Wall -Wpointer-arith -Wconversion 
-Wwrite-strings -Winline -Woverloaded-virtual -W -fno-exceptions -fno-rtti 
-I/usr/local/include -I/usr/local/include -L/usr/local/lib conftest.cc  >&5
configure:6819: error: declaration of C function `char getloadavg()' conflicts 
   with
/usr/include/stdlib.h:258: error: previous declaration `int getloadavg(double*, 
   int)' here
[...]

However when trying a tiny configure.in getloadavg() is found:

AC_INIT(configure.in)
AC_PREREQ([2.50])
AC_CHECK_FUNCS(failed getloadavg sysctlbyname)
AC_OUTPUT(Makefile)


On FreeBSD 4.9 getloadavg() is found.
Why doesn't icewm's configure find getloadavg() on 5.2?

Icewm-1.2.14pre8 may be found at:
http://prdownloads.sourceforge.net/icewm/icewm-1.2.14pre8.tar.gz?download


-Hanspeter
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"