pike.git/
src/
configure.in
Branch:
Tag:
Non-build tags
All tags
No tags
2001-01-19
2001-01-19 19:45:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>
6b15b769ef6a1c6ca6589805c9fce0c94d39509c (
84
lines) (+
75
/-
9
)
[
Show
|
Annotate
]
Branch:
7.9
Improved support for cross-compilation.
Rev: src/configure.in:1.456
1:
-
AC_REVISION("$Id: configure.in,v 1.
455
2001/01/19
14
:
28
:
48
grubba Exp $")
+
AC_REVISION("$Id: configure.in,v 1.
456
2001/01/19
19
:
45
:
00
grubba Exp $")
AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h)
1811:
pthread_join(gazonk,&sune); exit(0); }
-
],pike_cv_posix_threads=yes,pike_cv_posix_threads=no,pike_cv_posix_threads=no)
+
],
[
pike_cv_posix_threads=yes
]
,
[
pike_cv_posix_threads=no
]
,
[
+
AC_TRY_LINK([
+
#define _REENTRANT
+
#define _THREAD_SAFE
+
#define _MIT_POSIX_THREADS 1
+
+
#include <pthread.h>
+
+
void *foo(void *bar) { pthread_exit(0); return 0; }
+
pthread_mutexattr_t attr;
+
pthread_mutex_t tmp;
+
pthread_t gazonk;
+
+
], [
+
{
+
void *sune;
+
#ifdef HAVE_PTHREAD_INIT
+
pthread_init();
+
#endif /* HAVE_PTHREAD_INIT */
+
#ifdef HAVE_PTHREAD_MUTEXATTR_INIT
+
pthread_mutexattr_init(&attr);
+
#else
+
memset(&attr, 0, sizeof(attr));
+
#endif /* HAVE_PTHREAD_MUTEXATTR_INIT */
+
pthread_mutex_init(&tmp, &attr);
+
pthread_mutex_lock(&tmp);
+
pthread_create(&gazonk,0,foo,0);
+
pthread_join(gazonk,&sune);
+
exit(0);
+
}
+
], [
pike_cv_posix_threads=
yes ], [ pike_cv_posix_threads=
no
]
)
])
-
+
])
if test $pike_cv_posix_threads = yes ; then AC_MSG_RESULT(yes)
2417:
gettimeofday(&tv,(void *)0); exit(0); }
-
],
-
pike_cv_func_gettimeofday_has_two_args=yes
,
-
pike_cv_func_gettimeofday_has_two_args=no,
-
pike
_
cv
_
func
_
gettimeofday
_
has
_
two
_
args=no)])
+
],
[
pike_cv_func_gettimeofday_has_two_args=yes
+
]
,
[
pike_cv_func_gettimeofday_has_two_args=no
+
]
,
[
+
AC
_
TRY
_
LINK([
+
#if TIME
_
WITH
_
SYS
_
TIME
+
# include <sys/time.h>
+
# include <time.h>
+
#else
+
# if HAVE
_
SYS_TIME_H
+
# include <sys/time.h>
+
# else
+
# if HAVE_TIME_H
+
# include <time.h>
+
# endif
+
# endif
+
#endif
-
+
#ifndef HAVE_STRUCT_TIMEVAL
+
struct timeval
+
{
+
long tv_sec;
+
long tv_usec;
+
};
+
#endif
+
], [
+
{
+
struct timeval tv;
+
gettimeofday(&tv,(void *)0);
+
exit(0);
+
}
+
], [ pike_cv_func_gettimeofday_has_two_args=yes ], [pike_cv_func_gettimeofday_has_two_args=no])
+
])
+
])
+
if test $pike_cv_func_gettimeofday_has_two_args = yes; then AC_DEFINE(GETTIMEOFDAY_TAKES_TWO_ARGS) fi
2616:
} int main() { void *bar; exit( find_stack_direction(&bar) > 0); }
-
],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up)
+
],
[
pike_cv_hardware_stack_direction=down
+
]
,
[
pike_cv_hardware_stack_direction=up
+
], [
+
AC_MSG_WARN([defaulting to down.]
)
+
pike_cv_hardware_stack_direction=down
])
-
+
])
AC_MSG_RESULT($pike_cv_hardware_stack_direction)