mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-29 00:10:21 +02:00
* configure.in (GUILE_FUNC_DECLARED): Name the cache variables
starting with guile_cv_; ac_cv_ is autoconf's namespace. The type of the argument to usleep varies from system to system, as does the return type. We really shouldn't be redefining usleep at all, but I don't have time to clean that up before the 1.3 release. It's on the schedule for afterwards. * configure.in: Cache results from usleep return value test. Test for the type of the usleep argument, and cache that too. * acconfig.h (USLEEP_ARG_TYPE): New macro.
This commit is contained in:
parent
dc70c99868
commit
fc342a63d9
1 changed files with 31 additions and 9 deletions
40
configure.in
40
configure.in
|
@ -119,11 +119,11 @@ AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir
|
|||
### Check for a declaration of FUNCTION in HEADERFILE; if it is
|
||||
### not there, #define MISSING_FUNCTION_DECL.
|
||||
AC_DEFUN(GUILE_FUNC_DECLARED, [
|
||||
AC_CACHE_CHECK(for $1 declaration, ac_cv_func_$1_declared,
|
||||
AC_CACHE_CHECK(for $1 declaration, guile_cv_func_$1_declared,
|
||||
AC_EGREP_HEADER($1, $2,
|
||||
ac_cv_func_$1_declared=yes,
|
||||
ac_cv_func_$1_declared=no))
|
||||
if test [x$ac_cv_func_]$1[_declared] = xno; then
|
||||
guile_cv_func_$1_declared=yes,
|
||||
guile_cv_func_$1_declared=no))
|
||||
if test [x$guile_cv_func_]$1[_declared] = xno; then
|
||||
AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL])
|
||||
fi
|
||||
])
|
||||
|
@ -133,12 +133,34 @@ GUILE_FUNC_DECLARED(bzero, string.h)
|
|||
GUILE_FUNC_DECLARED(sleep, unistd.h)
|
||||
GUILE_FUNC_DECLARED(usleep, unistd.h)
|
||||
|
||||
# On some systems usleep has no return value
|
||||
AC_EGREP_HEADER(changequote(<, >)<void[ ][ ]*usleep>changequote([, ]),
|
||||
/usr/include/unistd.h,
|
||||
AC_DEFINE(USLEEP_RETURNS_VOID)
|
||||
)
|
||||
### On some systems usleep has no return value. Of course, we
|
||||
### shouldn't be doing anything like this at all...
|
||||
AC_CACHE_CHECK([return type of usleep], guile_cv_func_usleep_return_type,
|
||||
[AC_EGREP_HEADER(changequote(<, >)<void[ ][ ]*usleep>changequote([, ]),
|
||||
/usr/include/unistd.h,
|
||||
[guile_cv_func_usleep_return_type=void],
|
||||
[guile_cv_func_usleep_return_type=int])])
|
||||
case "$guile_cv_func_usleep_return_type" in
|
||||
"void" )
|
||||
AC_DEFINE(USLEEP_RETURNS_VOID)
|
||||
;;
|
||||
esac
|
||||
|
||||
### To make things even worse, its argument type varies, which we also
|
||||
### have to know. Ahh, complicity...
|
||||
AC_CACHE_CHECK([type of usleep argument], guile_cv_func_usleep_arg_type,
|
||||
[AC_EGREP_HEADER(changequote(<, >)<usleep[ ]*([ ]*unsigned[ ]*long[ ]*)>changequote([, ]),
|
||||
/usr/include/unistd.h,
|
||||
[guile_cv_func_usleep_arg_type=ulong],
|
||||
[guile_cv_func_usleep_arg_type=uint])])
|
||||
case "$guile_cv_func_usleep_arg_type" in
|
||||
"ulong" )
|
||||
AC_DEFINE(USLEEP_ARG_TYPE, unsigned long)
|
||||
;;
|
||||
"uint" )
|
||||
AC_DEFINE(USLEEP_ARG_TYPE, unsigned)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl <GNU-WIN32 hacks>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue