changeset 3089:46e5ece0b15b

detecting nanosleep
author alex
date Fri, 23 Nov 2001 18:25:09 +0000
parents 73c2e9304d08
children 57abb24ac58b
files configure
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <time.h>
+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