+### Some systems don't declare some functions. On such systems, we
+### need to at least provide our own K&R-style declarations.
+
+### GUILE_FUNC_DECLARED(function, headerfile)
+
+### Check for a declaration of FUNCTION in HEADERFILE; if it is
+### not there, #define MISSING_FUNCTION_DECL.
+
+
+
+ echo $ac_n "checking for strptime declaration""... $ac_c" 1>&6
+echo "configure:3267: checking for strptime declaration" >&5
+if eval "test \"`echo '$''{'guile_cv_func_strptime_declared'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3272 "configure"
+#include "confdefs.h"
+#include <time.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "strptime" >/dev/null 2>&1; then
+ rm -rf conftest*
+ guile_cv_func_strptime_declared=yes
+else
+ rm -rf conftest*
+ guile_cv_func_strptime_declared=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$guile_cv_func_strptime_declared" 1>&6
+ if test x$guile_cv_func_strptime_declared = xno; then
+ cat >> confdefs.h <<\EOF
+#define MISSING_STRPTIME_DECL 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for bzero declaration""... $ac_c" 1>&6
+echo "configure:3298: checking for bzero declaration" >&5
+if eval "test \"`echo '$''{'guile_cv_func_bzero_declared'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3303 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "bzero" >/dev/null 2>&1; then
+ rm -rf conftest*
+ guile_cv_func_bzero_declared=yes
+else
+ rm -rf conftest*
+ guile_cv_func_bzero_declared=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$guile_cv_func_bzero_declared" 1>&6
+ if test x$guile_cv_func_bzero_declared = xno; then
+ cat >> confdefs.h <<\EOF
+#define MISSING_BZERO_DECL 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for sleep declaration""... $ac_c" 1>&6
+echo "configure:3329: checking for sleep declaration" >&5
+if eval "test \"`echo '$''{'guile_cv_func_sleep_declared'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3334 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sleep" >/dev/null 2>&1; then
+ rm -rf conftest*
+ guile_cv_func_sleep_declared=yes
+else
+ rm -rf conftest*
+ guile_cv_func_sleep_declared=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$guile_cv_func_sleep_declared" 1>&6
+ if test x$guile_cv_func_sleep_declared = xno; then
+ cat >> confdefs.h <<\EOF
+#define MISSING_SLEEP_DECL 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for usleep declaration""... $ac_c" 1>&6
+echo "configure:3360: checking for usleep declaration" >&5
+if eval "test \"`echo '$''{'guile_cv_func_usleep_declared'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3365 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "usleep" >/dev/null 2>&1; then
+ rm -rf conftest*
+ guile_cv_func_usleep_declared=yes
+else
+ rm -rf conftest*
+ guile_cv_func_usleep_declared=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$guile_cv_func_usleep_declared" 1>&6
+ if test x$guile_cv_func_usleep_declared = xno; then
+ cat >> confdefs.h <<\EOF
+#define MISSING_USLEEP_DECL 1
+EOF
+
+ fi
+
+
+### On some systems usleep has no return value. If it does have one,
+### we'd like to return it; otherwise, we'll fake it.
+echo $ac_n "checking return type of usleep""... $ac_c" 1>&6
+echo "configure:3393: checking return type of usleep" >&5
+if eval "test \"`echo '$''{'guile_cv_func_usleep_return_type'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3398 "configure"
+#include "confdefs.h"
+#include </usr/include/unistd.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "void[ ]+usleep" >/dev/null 2>&1; then
+ rm -rf conftest*
+ guile_cv_func_usleep_return_type=void
+else
+ rm -rf conftest*
+ guile_cv_func_usleep_return_type=int
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$guile_cv_func_usleep_return_type" 1>&6
+case "$guile_cv_func_usleep_return_type" in
+ "void" )
+ cat >> confdefs.h <<\EOF
+#define USLEEP_RETURNS_VOID 1
+EOF
+
+ ;;
+esac
+