# HG changeset patch # User alex # Date 1006539909 0 # Node ID 46e5ece0b15b9785bf7d9d259deab9c430692cb7 # Parent 73c2e9304d08a0476d773b8738a609e7addb0638 detecting nanosleep diff -r 73c2e9304d08 -r 46e5ece0b15b configure --- a/configure Fri Nov 23 17:16:43 2001 +0000 +++ b/configure Fri Nov 23 18:25:09 2001 +0000 @@ -309,6 +309,9 @@ # gcc-3.0 merges optimizations coming from egcs, pgcc, agcc, ... if test "$_skip_cc_check" != yes ; then echocheck "$_cc version" + # also check for name (the version checking is only for _gcc_ up for now) + # FIXME implement this in ver. check. + cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'` case $cc_version in '') @@ -998,6 +1001,22 @@ echores "$_posix4" +echocheck "nanosleep" +# also check for nanosleep +cat > $TMPC << EOF +#include +int main(void) { (void) nanosleep(0, 0); return 0; } +EOF +_nanosleep=no +cc_check $_ld_arch && _nanosleep=yes +if test "$_nanosleep" = yes ; then + _def_nanosleep='#define HAVE_NANOSLEEP 1' +else + _def_nanosleep='#undef HAVE_NANOSLEEP' +fi +echores "$_nanosleep" + + echocheck "socklib" # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl): cat > $TMPC << EOF @@ -2637,6 +2656,9 @@ ** *---------------------------------------------------------------------------*/ +/* nanosleep support */ +$_def_nanosleep + /* termcap flag for getch2.c */ $_def_termcap