[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile on Mac OS X
From: |
Rob Browning |
Subject: |
Re: Guile on Mac OS X |
Date: |
Mon, 05 Aug 2002 00:24:16 -0500 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-pc-linux-gnu) |
Michael Tuexen <address@hidden> writes:
> ### GUILE_FUNC_DECLARED(function, headerfile)
> ### 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, guile_cv_func_$1_declared,
> AC_EGREP_HEADER($1, $2,
> 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
> ])
>
> GUILE_FUNC_DECLARED(strptime, time.h)
> GUILE_FUNC_DECLARED(sleep, unistd.h)
> GUILE_FUNC_DECLARED(usleep, unistd.h)
Looks like usleep and sleep are in unistd.h on (most?) platforms, but
on yours they're in time.h.
Unfortunately GUILE_FUNC_DECLARED may not make it easy to test a
second location since it looks like if the function isn't found the
first time, it takes actions that wouldn't be undone by a later
successful test.
One option would be to change GUILE_FUNC_DECLARED to allow multiple
headers like this:
GUILE_FUNC_DECLARED([sleep], [unistd.h time.h])
or can m4, etc. handle ... args?
GUILE_FUNC_DECLARED([sleep], [unistd.h], [time.h])
I'll look in to a solution of some kind unless someone else knows how
to write this up off the top of their head.
Alternately I suppose we could use two functions, one to check a
header and one to call later to take action if none of the checks
succeeded:
GUILE_CHECK_HEADER_FOR_FUNC([sleep], [unistd.h])
GUILE_CHECK_HEADER_FOR_FUNC([sleep], [time.h])
GUILE_CHECK_FOR_MISSING_FUNC_DECLARATION([sleep])
not a big deal to me either way.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD
- Guile on Mac OS X, Michael Tuexen, 2002/08/04
- Re: Guile on Mac OS X, Michael Tuexen, 2002/08/04
- Re: Guile on Mac OS X,
Rob Browning <=
- Re: Guile on Mac OS X, Michael Tuexen, 2002/08/05
- Re: Guile on Mac OS X, Rob Browning, 2002/08/05
- Re: Guile on Mac OS X, Michael Tuexen, 2002/08/05
- Re: Guile on Mac OS X, Rob Browning, 2002/08/05
- Re: Guile on Mac OS X, Michael Tuexen, 2002/08/05