[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ac_check_funcs(getloadavg) with gcc 3.3
From: |
Hanspeter Roth |
Subject: |
Re: ac_check_funcs(getloadavg) with gcc 3.3 |
Date: |
Mon, 19 Jan 2004 21:23:03 +0100 |
User-agent: |
Mutt/1.4.1i |
On Jan 19 at 12:58, Thomas Dickey spoke:
> On Mon, 19 Jan 2004, Hanspeter Roth wrote:
>
> > On Jan 19 at 08:58, Bob Friesenhahn spoke:
> >
> > > The key is to not use C++ to execute these tests. Use C while
> > > checking for library functions. Only set the language to C++ while
> > > testing C++ related features.
> >
> > Does it make sense to run test in C while the function getloadavg() is
> > used in a C++ Module?
>
> no. He's telling you how to get some use out of the tool as it is
> written. (Another one for the unwritten autoconf-FAQ). Some of the
> autoconf tests for C functions may happen to work when run from C++.
So should the invokation of getloadavg() be moved to a separate C
module and then call the C function that calls getloadavg() from a
C++ module?
As a test I've included AC_CHECK_FUNCS(getloadavg) between
AC_LANG_C and AC_LANG_CPLUSPLUS:
[...]
AC_LANG_C
AC_CHECK_FUNCS(getloadavg)
AC_LANG_CPLUSPLUS
[...]
On FreeBSD 5.2 with gcc 3.3.3 this
seems to work.
Is this a good idea or can one expect portability problems?
-Hanspeter