- some fixes for NetBSD

This commit is contained in:
cebix 1999-10-15 14:50:39 +00:00
parent 775e181963
commit 8edc3aa83c
4 changed files with 176 additions and 93 deletions

View File

@ -2034,7 +2034,52 @@ HAVE_PTHREADS=no
fi
if [ "x$HAVE_PTHREADS" = "xno" ]; then
{ echo "configure: error: You need libpthreads to run Basilisk II." 1>&2; exit 1; }
echo $ac_n "checking for pthread_create in -lPTL""... $ac_c" 1>&6
echo "configure:2039: checking for pthread_create in -lPTL" >&5
ac_lib_var=`echo PTL'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lPTL $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2047 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create();
int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
HAVE_PTHREADS=yes
else
echo "$ac_t""no" 1>&6
HAVE_PTHREADS=no
fi
if [ "x$HAVE_PTHREADS" = "xno" ]; then
{ echo "configure: error: You need pthreads to run Basilisk II." 1>&2; exit 1; }
else
LIBS="$LIBS -lPTL"
fi
else
LIBS="$LIBS -lc_r"
fi
@ -2044,12 +2089,12 @@ fi
for ac_func in pthread_cancel
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2048: checking for $ac_func" >&5
echo "configure:2093: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2053 "configure"
#line 2098 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2072,7 +2117,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2099,7 +2144,7 @@ done
if [ "x$WANT_DGA" = "xyes" ]; then
echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
echo "configure:2103: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
echo "configure:2148: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2107,7 +2152,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXxf86dga $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2111 "configure"
#line 2156 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2118,7 +2163,7 @@ int main() {
XF86DGAQueryExtension()
; return 0; }
EOF
if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2189,7 +2234,7 @@ fi
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2193: checking for $ac_word" >&5
echo "configure:2238: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2224,7 +2269,7 @@ fi
min_gtk_version=1.2.0
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:2228: checking for GTK - version >= $min_gtk_version" >&5
echo "configure:2273: checking for GTK - version >= $min_gtk_version" >&5
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
@ -2247,7 +2292,7 @@ echo "configure:2228: checking for GTK - version >= $min_gtk_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat > conftest.$ac_ext <<EOF
#line 2251 "configure"
#line 2296 "configure"
#include "confdefs.h"
#include <gtk/gtk.h>
@ -2310,7 +2355,7 @@ main ()
}
EOF
if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -2344,7 +2389,7 @@ fi
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
cat > conftest.$ac_ext <<EOF
#line 2348 "configure"
#line 2393 "configure"
#include "confdefs.h"
#include <gtk/gtk.h>
@ -2354,7 +2399,7 @@ int main() {
return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
; return 0; }
EOF
if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
@ -2409,12 +2454,12 @@ SEMSRCS=
for ac_func in sem_init
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2413: checking for $ac_func" >&5
echo "configure:2458: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2418 "configure"
#line 2463 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2437,7 +2482,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2463,7 +2508,7 @@ done
if [ "x$ac_cv_func_sem_init" = "xno" ]; then
echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
echo "configure:2467: checking for sem_init in -lposix4" >&5
echo "configure:2512: checking for sem_init in -lposix4" >&5
ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2471,7 +2516,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2475 "configure"
#line 2520 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2482,7 +2527,7 @@ int main() {
sem_init()
; return 0; }
EOF
if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2511,12 +2556,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2515: checking for ANSI C header files" >&5
echo "configure:2560: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2520 "configure"
#line 2565 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -2524,7 +2569,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2541,7 +2586,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2545 "configure"
#line 2590 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -2559,7 +2604,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2563 "configure"
#line 2608 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -2580,7 +2625,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 2584 "configure"
#line 2629 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -2591,7 +2636,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -2618,17 +2663,17 @@ for ac_hdr in unistd.h fcntl.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2622: checking for $ac_hdr" >&5
echo "configure:2667: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2627 "configure"
#line 2672 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2656,14 +2701,14 @@ done
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:2660: checking whether byte ordering is bigendian" >&5
echo "configure:2705: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 2667 "configure"
#line 2712 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@ -2674,11 +2719,11 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 2682 "configure"
#line 2727 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@ -2689,7 +2734,7 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@ -2709,7 +2754,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 2713 "configure"
#line 2758 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@ -2722,7 +2767,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@ -2746,12 +2791,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2750: checking for working const" >&5
echo "configure:2795: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2755 "configure"
#line 2800 "configure"
#include "confdefs.h"
int main() {
@ -2800,7 +2845,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -2821,21 +2866,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:2825: checking for inline" >&5
echo "configure:2870: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
#line 2832 "configure"
#line 2877 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@ -2861,7 +2906,7 @@ EOF
esac
echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:2865: checking size of short" >&5
echo "configure:2910: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2869,7 +2914,7 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
#line 2873 "configure"
#line 2918 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -2880,7 +2925,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@ -2900,7 +2945,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:2904: checking size of int" >&5
echo "configure:2949: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2908,7 +2953,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
#line 2912 "configure"
#line 2957 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -2919,7 +2964,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@ -2939,7 +2984,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:2943: checking size of long" >&5
echo "configure:2988: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2947,7 +2992,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
#line 2951 "configure"
#line 2996 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -2958,7 +3003,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@ -2978,7 +3023,7 @@ EOF
echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:2982: checking size of long long" >&5
echo "configure:3027: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2986,7 +3031,7 @@ else
ac_cv_sizeof_long_long=8
else
cat > conftest.$ac_ext <<EOF
#line 2990 "configure"
#line 3035 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -2997,7 +3042,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
@ -3017,12 +3062,12 @@ EOF
echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:3021: checking for off_t" >&5
echo "configure:3066: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3026 "configure"
#line 3071 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3050,12 +3095,12 @@ EOF
fi
echo $ac_n "checking for loff_t""... $ac_c" 1>&6
echo "configure:3054: checking for loff_t" >&5
echo "configure:3099: checking for loff_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3059 "configure"
#line 3104 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3083,12 +3128,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3087: checking for size_t" >&5
echo "configure:3132: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3092 "configure"
#line 3137 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3116,12 +3161,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3120: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3165: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3125 "configure"
#line 3170 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -3130,7 +3175,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -3151,12 +3196,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:3155: checking whether struct tm is in sys/time.h or time.h" >&5
echo "configure:3200: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3160 "configure"
#line 3205 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@ -3164,7 +3209,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@ -3188,12 +3233,12 @@ fi
for ac_func in strdup cfmakeraw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3192: checking for $ac_func" >&5
echo "configure:3237: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3197 "configure"
#line 3242 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3216,7 +3261,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3243,12 +3288,12 @@ done
for ac_func in nanosleep clock_gettime timer_create
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3247: checking for $ac_func" >&5
echo "configure:3292: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3252 "configure"
#line 3297 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3271,7 +3316,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3304,7 +3349,7 @@ if MACHINE=`uname -a 2>/dev/null`; then
;;
FreeBSD*3.*)
echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
echo "configure:3308: checking for cam_open_btl in -lcam" >&5
echo "configure:3353: checking for cam_open_btl in -lcam" >&5
ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3312,7 +3357,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcam $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3316 "configure"
#line 3361 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3323,7 +3368,7 @@ int main() {
cam_open_btl()
; return 0; }
EOF
if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3349,17 +3394,17 @@ fi
else
ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
echo "configure:3353: checking for /sys/cam/cam.h" >&5
echo "configure:3398: checking for /sys/cam/cam.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3358 "configure"
#line 3403 "configure"
#include "confdefs.h"
#include </sys/cam/cam.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3392,7 +3437,7 @@ fi
;;
FreeBSD*)
echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
echo "configure:3396: checking for scsi_open in -lscsi" >&5
echo "configure:3441: checking for scsi_open in -lscsi" >&5
ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3400,7 +3445,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lscsi $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3404 "configure"
#line 3449 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3411,7 +3456,7 @@ int main() {
scsi_open()
; return 0; }
EOF
if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3437,17 +3482,17 @@ fi
else
ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
echo "configure:3441: checking for scsi.h sys/scsiio.h" >&5
echo "configure:3486: checking for scsi.h sys/scsiio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3446 "configure"
#line 3491 "configure"
#include "confdefs.h"
#include <scsi.h sys/scsiio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3501,9 +3546,9 @@ CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cp
HAVE_I386=no
echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6
echo "configure:3505: checking for x86 target CPU" >&5
echo "configure:3550: checking for x86 target CPU" >&5
cat > conftest.$ac_ext <<EOF
#line 3507 "configure"
#line 3552 "configure"
#include "confdefs.h"
#ifdef __i386__
@ -3524,7 +3569,7 @@ rm -f conftest*
HAVE_GAS=no
echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
echo "configure:3528: checking for GAS .p2align feature" >&5
echo "configure:3573: checking for GAS .p2align feature" >&5
cat >conftest.S << EOF
.text
.p2align 5
@ -3534,9 +3579,9 @@ echo "$ac_t""$HAVE_GAS" 1>&6
HAVE_GCC27=no
echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
echo "configure:3538: checking for GCC 2.7 or higher" >&5
echo "configure:3583: checking for GCC 2.7 or higher" >&5
cat > conftest.$ac_ext <<EOF
#line 3540 "configure"
#line 3585 "configure"
#include "confdefs.h"
#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
yes

View File

@ -35,7 +35,13 @@ if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
dnl Check even the libc_r (FreeBSD)
AC_CHECK_LIB(c_r, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no)
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
AC_MSG_ERROR([You need libpthreads to run Basilisk II.])
dnl Or maybe the user has PTL (NetBSD)
AC_CHECK_LIB(PTL, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no)
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
AC_MSG_ERROR([You need pthreads to run Basilisk II.])
else
LIBS="$LIBS -lPTL"
fi
else
LIBS="$LIBS -lc_r"
fi

View File

@ -319,7 +319,7 @@ void *Sys_open(const char *name, bool read_only)
#else
fh->cdrom_cap = 0;
#endif
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#elif defined(__FreeBSD__)
fh->is_floppy = ((st.st_rdev >> 16) == 2);
#ifdef CDIOCCAPABILITY
if (is_cdrom) {
@ -329,6 +329,8 @@ void *Sys_open(const char *name, bool read_only)
#else
fh->cdrom_cap = 0;
#endif
#elif defined(__NetBSD__)
fh->is_floppy = ((st.st_rdev >> 16) == 2);
#endif
}
}
@ -655,7 +657,7 @@ bool SysCDReadTOC(void *arg, uint8 *toc)
*toc++ = toc_size >> 8;
*toc++ = toc_size & 0xff;
return true;
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#elif defined(__FreeBSD__)
uint8 *p = toc + 2;
// Header
@ -696,6 +698,30 @@ bool SysCDReadTOC(void *arg, uint8 *toc)
*p++ = entry.entry.addr.msf.second;
*p++ = entry.entry.addr.msf.frame;
// TOC size
int toc_size = p - toc;
*toc++ = toc_size >> 8;
*toc++ = toc_size & 0xff;
return true;
#elif defined(__NetBSD__)
uint8 *p = toc + 2;
// Header
struct ioc_toc_header header;
if (ioctl(fh->fd, CDIOREADTOCHEADER, &header) < 0)
return false;
*p++ = header.starting_track;
*p++ = header.ending_track;
// Tracks (this is nice... :-)
struct ioc_read_toc_entry entries;
entries.address_format = CD_MSF_FORMAT;
entries.starting_track = 1;
entries.data_len = 800;
entries.data = (cd_toc_entry *)p;
if (ioctl(fh->fd, CDIOREADTOCENTRIES, &entries) < 0)
return false;
// TOC size
int toc_size = p - toc;
*toc++ = toc_size >> 8;

View File

@ -54,11 +54,17 @@ const uint32 TIME_OFFSET = 0x7c25b080; // Offset Mac->Unix time in seconds
uint32 TimerDateTime(void)
{
time_t uct_now = time(NULL);
time_t utc_now = time(NULL);
#if defined(__linux__) || defined(__SVR4)
long tz = timezone;
time_t local_now = uct_now - tz;
if (daylight)
local_now += 3600;
#elif defined(__FreeBSD__) || defined(__NetBSD__)
time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff;
#else
time_t local_now = utc_now;
#endif
return (uint32)local_now + TIME_OFFSET;
}