configure first checks whether it is possible to compile IPX code with

Glibc headers. If it fails, next check determines whether direct inclusion
of <linux/ipx.h> works.
This commit is contained in:
Pavel Roskin 1998-12-26 11:52:51 +00:00 committed by Alexandre Julliard
parent 0149b20b6e
commit 94d99642bd
6 changed files with 221 additions and 108 deletions

222
configure vendored
View File

@ -2469,21 +2469,91 @@ else
X_LIBS=""
fi
echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6
echo "configure:2474: checking "for GNU style IPX support"" >&5
if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2479 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <netipx/ipx.h>
int main() {
((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
; return 0; }
EOF
if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_IPX_GNU 1
EOF
ac_cv_c_ipx_gnu="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_ipx_gnu="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
if test "$ac_cv_c_ipx_gnu" = "no"
then
echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6
echo "configure:2509: checking "for linux style IPX support"" >&5
if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2514 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <asm/types.h>
#include <linux/ipx.h>
int main() {
((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
; return 0; }
EOF
if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_IPX_LINUX 1
EOF
ac_cv_c_ipx_linux="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_ipx_linux="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_ipx_linux" 1>&6
fi
for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2477: checking for $ac_hdr" >&5
echo "configure:2547: 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 2482 "configure"
#line 2552 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2511,12 +2581,12 @@ done
echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
echo "configure:2515: checking "for Open Sound System"" >&5
echo "configure:2585: checking "for Open Sound System"" >&5
if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2520 "configure"
#line 2590 "configure"
#include "confdefs.h"
#if defined(HAVE_SYS_SOUNDCARD_H)
@ -2537,7 +2607,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:2541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_opensoundsystem="yes"
else
@ -2561,12 +2631,12 @@ fi
echo $ac_n "checking "for union semun"""... $ac_c" 1>&6
echo "configure:2565: checking "for union semun"" >&5
echo "configure:2635: checking "for union semun"" >&5
if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2570 "configure"
#line 2640 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/sem.h>
@ -2574,7 +2644,7 @@ int main() {
union semun foo
; return 0; }
EOF
if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_union_semun="yes"
else
@ -2602,7 +2672,7 @@ if test "x${GCC}" = "xyes"
then
CFLAGS="$CFLAGS -Wall"
echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
echo "configure:2606: checking "for gcc strength-reduce bug"" >&5
echo "configure:2676: checking "for gcc strength-reduce bug"" >&5
if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2610,7 +2680,7 @@ else
ac_cv_c_gcc_strength_bug="yes"
else
cat > conftest.$ac_ext <<EOF
#line 2614 "configure"
#line 2684 "configure"
#include "confdefs.h"
int main(void) {
@ -2621,7 +2691,7 @@ int main(void) {
exit( Array[1] != -2 );
}
EOF
if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_gcc_strength_bug="no"
else
@ -2644,7 +2714,7 @@ fi
echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
echo "configure:2648: checking "whether external symbols need an underscore prefix"" >&5
echo "configure:2718: checking "whether external symbols need an underscore prefix"" >&5
if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2656,14 +2726,14 @@ _ac_test:
.long 0
EOF
cat > conftest.$ac_ext <<EOF
#line 2660 "configure"
#line 2730 "configure"
#include "confdefs.h"
extern int ac_test;
int main() {
if (ac_test) return 1
; return 0; }
EOF
if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_c_extern_prefix="yes"
else
@ -2687,7 +2757,7 @@ fi
echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
echo "configure:2691: checking "whether assembler accepts .string"" >&5
echo "configure:2761: checking "whether assembler accepts .string"" >&5
if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2697,14 +2767,14 @@ cat > conftest_asm.s <<EOF
.string "test"
EOF
cat > conftest.$ac_ext <<EOF
#line 2701 "configure"
#line 2771 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_c_asm_string="yes"
else
@ -2732,21 +2802,21 @@ LDSHARED=""
if test "$LIB_TARGET" = "libwine.so.1.0"
then
echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
echo "configure:2736: checking "whether we can build a Linux dll"" >&5
echo "configure:2806: checking "whether we can build a Linux dll"" >&5
if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
cat > conftest.$ac_ext <<EOF
#line 2743 "configure"
#line 2813 "configure"
#include "confdefs.h"
int main() {
return 1
; return 0; }
EOF
if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_c_dll_linux="yes"
else
@ -2767,21 +2837,21 @@ echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so"
else
echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
echo "configure:2771: checking "whether we can build a NetBSD dll"" >&5
echo "configure:2841: checking "whether we can build a NetBSD dll"" >&5
if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
cat > conftest.$ac_ext <<EOF
#line 2778 "configure"
#line 2848 "configure"
#include "confdefs.h"
int main() {
return 1
; return 0; }
EOF
if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_c_dll_netbsd="yes"
else
@ -2812,7 +2882,7 @@ fi
echo $ac_n "checking "for reentrant libc"""... $ac_c" 1>&6
echo "configure:2816: checking "for reentrant libc"" >&5
echo "configure:2886: checking "for reentrant libc"" >&5
if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2820,14 +2890,14 @@ else
wine_cv_libc_reentrant=yes
else
cat > conftest.$ac_ext <<EOF
#line 2824 "configure"
#line 2894 "configure"
#include "confdefs.h"
int myerrno = 0;
char buf[256];
int *__errno_location(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);}
EOF
if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
wine_cv_libc_reentrant=yes
else
@ -2852,7 +2922,7 @@ fi
echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
echo "configure:2856: checking "for reentrant X libraries"" >&5
echo "configure:2926: checking "for reentrant X libraries"" >&5
if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2897,12 +2967,12 @@ fi
for ac_func in clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2901: checking for $ac_func" >&5
echo "configure:2971: 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 2906 "configure"
#line 2976 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2925,7 +2995,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2949,21 +3019,21 @@ else
fi
done
for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h linux/ipx.h
for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2957: checking for $ac_hdr" >&5
echo "configure:3027: 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 2962 "configure"
#line 3032 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2990,12 +3060,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
echo "configure:2994: checking whether stat file-mode macros are broken" >&5
echo "configure:3064: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2999 "configure"
#line 3069 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -3046,12 +3116,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3050: checking for working const" >&5
echo "configure:3120: 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 3055 "configure"
#line 3125 "configure"
#include "confdefs.h"
int main() {
@ -3100,7 +3170,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -3121,12 +3191,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3125: checking for ANSI C header files" >&5
echo "configure:3195: 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 3130 "configure"
#line 3200 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -3134,7 +3204,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3151,7 +3221,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 3155 "configure"
#line 3225 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -3169,7 +3239,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 3173 "configure"
#line 3243 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -3190,7 +3260,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3194 "configure"
#line 3264 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -3201,7 +3271,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@ -3225,12 +3295,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3229: checking for size_t" >&5
echo "configure:3299: 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 3234 "configure"
#line 3304 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3258,7 +3328,7 @@ EOF
fi
echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:3262: checking size of long long" >&5
echo "configure:3332: 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
@ -3266,7 +3336,7 @@ else
ac_cv_sizeof_long_long=0
else
cat > conftest.$ac_ext <<EOF
#line 3270 "configure"
#line 3340 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -3277,7 +3347,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
@ -3300,7 +3370,7 @@ EOF
if test $ac_cv_func_sendmsg = no; then
echo $ac_n "checking for sendmsg in -lsocket""... $ac_c" 1>&6
echo "configure:3304: checking for sendmsg in -lsocket" >&5
echo "configure:3374: checking for sendmsg in -lsocket" >&5
ac_lib_var=`echo socket'_'sendmsg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3308,7 +3378,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3312 "configure"
#line 3382 "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
@ -3319,7 +3389,7 @@ int main() {
sendmsg()
; return 0; }
EOF
if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3352,12 +3422,12 @@ fi
if test "$ac_cv_header_sys_vfs_h" = "yes"
then
echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
echo "configure:3356: checking "whether sys/vfs.h defines statfs"" >&5
echo "configure:3426: checking "whether sys/vfs.h defines statfs"" >&5
if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3361 "configure"
#line 3431 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3374,7 +3444,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_vfs_has_statfs=yes
else
@ -3401,12 +3471,12 @@ fi
if test "$ac_cv_header_sys_statfs_h" = "yes"
then
echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
echo "configure:3405: checking "whether sys/statfs.h defines statfs"" >&5
echo "configure:3475: checking "whether sys/statfs.h defines statfs"" >&5
if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3410 "configure"
#line 3480 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3421,7 +3491,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_statfs_has_statfs=yes
else
@ -3448,12 +3518,12 @@ fi
if test "$ac_cv_header_sys_mount_h" = "yes"
then
echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
echo "configure:3452: checking "whether sys/mount.h defines statfs"" >&5
echo "configure:3522: checking "whether sys/mount.h defines statfs"" >&5
if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3457 "configure"
#line 3527 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3468,7 +3538,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_mount_has_statfs=yes
else
@ -3494,7 +3564,7 @@ fi
echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
echo "configure:3498: checking "for statfs.f_bfree"" >&5
echo "configure:3568: checking "for statfs.f_bfree"" >&5
if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3503,7 +3573,7 @@ else
wine_cv_statfs_bfree=no
else
cat > conftest.$ac_ext <<EOF
#line 3507 "configure"
#line 3577 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3530,7 +3600,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_statfs_bfree=yes
else
@ -3554,7 +3624,7 @@ EOF
fi
echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
echo "configure:3558: checking "for statfs.f_bavail"" >&5
echo "configure:3628: checking "for statfs.f_bavail"" >&5
if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3563,7 +3633,7 @@ else
wine_cv_statfs_bavail=no
else
cat > conftest.$ac_ext <<EOF
#line 3567 "configure"
#line 3637 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -3590,7 +3660,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_statfs_bavail=yes
else
@ -3615,7 +3685,7 @@ fi
echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
echo "configure:3619: checking "for working sigaltstack"" >&5
echo "configure:3689: checking "for working sigaltstack"" >&5
if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3624,7 +3694,7 @@ else
else
cat > conftest.$ac_ext <<EOF
#line 3628 "configure"
#line 3698 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -3662,7 +3732,7 @@ else
}
EOF
if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_working_sigaltstack="yes"
else
@ -3689,12 +3759,12 @@ fi
echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
echo "configure:3693: checking "for msg_accrights in struct msghdr"" >&5
echo "configure:3763: checking "for msg_accrights in struct msghdr"" >&5
if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3698 "configure"
#line 3768 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -3702,7 +3772,7 @@ int main() {
struct msghdr hdr; hdr.msg_accrights=0
; return 0; }
EOF
if { (eval echo configure:3706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_msg_accrights="yes"
else

View File

@ -116,6 +116,31 @@ else
X_LIBS=""
fi
dnl **** Check for IPX (currently Linux only) ****
AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
AC_TRY_COMPILE(
[#include <sys/socket.h>
#include <netipx/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
[AC_DEFINE(HAVE_IPX_GNU)
ac_cv_c_ipx_gnu="yes"],
[ac_cv_c_ipx_gnu="no"])
)
if test "$ac_cv_c_ipx_gnu" = "no"
then
AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
AC_TRY_COMPILE(
[#include <sys/socket.h>
#include <asm/types.h>
#include <linux/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
[AC_DEFINE(HAVE_IPX_LINUX)
ac_cv_c_ipx_linux="yes"],
[ac_cv_c_ipx_linux="no"])
)
fi
dnl **** Check for Open Sound System ****
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
@ -311,7 +336,7 @@ fi
dnl **** Check for functions and header files ****
AC_CHECK_FUNCS(clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf)
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h linux/ipx.h)
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h)
AC_HEADER_STAT()
AC_C_CONST()
AC_TYPE_SIZE_T()

View File

@ -59,3 +59,10 @@
/* Define if we want to use ncurses instead of the TTY terminal */
#undef WINE_NCURSES
/* Define if IPX should use netipx/ipx.h from libc */
#undef HAVE_IPX_GNU
/* Define if IPX includes are taken from Linux kernel */
#undef HAVE_IPX_LINUX

View File

@ -72,6 +72,12 @@
/* Define if we want to use ncurses instead of the TTY terminal */
#undef WINE_NCURSES
/* Define if IPX should use netipx/ipx.h from libc */
#undef HAVE_IPX_GNU
/* Define if IPX includes are taken from Linux kernel */
#undef HAVE_IPX_LINUX
/* The number of bytes in a long long. */
#undef SIZEOF_LONG_LONG
@ -126,9 +132,6 @@
/* Define if you have the <linux/cdrom.h> header file. */
#undef HAVE_LINUX_CDROM_H
/* Define if you have the <linux/ipx.h> header file. */
#undef HAVE_LINUX_IPX_H
/* Define if you have the <linux/ucdrom.h> header file. */
#undef HAVE_LINUX_UCDROM_H

View File

@ -13,11 +13,19 @@
#include <sys/time.h>
#include <fcntl.h>
#include <netdb.h>
#ifdef HAVE_LINUX_IPX_H
#include <sys/socket.h>
#ifdef HAVE_IPX_GNU
# include <netipx/ipx.h>
# define HAVE_IPX
#endif
#ifdef HAVE_IPX_LINUX
# include <asm/types.h>
# include <linux/ipx.h>
# define HAVE_IPX
#endif
#include <sys/socket.h>
#include "windows.h"
#include "task.h"

View File

@ -554,7 +554,7 @@ SOCKET32 WINAPI WINSOCK_accept32(SOCKET32 s, struct sockaddr *addr,
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR((SOCKET16)s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* addr2 = (struct ws_sockaddr_ipx *)addr;
#endif
@ -580,7 +580,7 @@ SOCKET32 WINAPI WINSOCK_accept32(SOCKET32 s, struct sockaddr *addr,
WSAAsyncSelect32( s, pws->psop->hWnd, pws->psop->uMsg,
pws->flags & ~WS_FD_ACCEPT );
}
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (addr && ((struct sockaddr_ipx *)addr)->sipx_family == AF_IPX) {
addr = (struct sockaddr *)
malloc(addrlen32 ? *addrlen32 : sizeof(*addr2));
@ -600,7 +600,7 @@ SOCKET32 WINAPI WINSOCK_accept32(SOCKET32 s, struct sockaddr *addr,
}
else pwsi->err = wsaErrno();
}
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (addr && ((struct sockaddr_ipx *)addr)->sipx_family == AF_IPX) {
addr = (struct sockaddr *)
malloc(addrlen32 ? *addrlen32 : sizeof(*addr2));
@ -635,7 +635,7 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* name2 = (struct ws_sockaddr_ipx *)name;
#endif
@ -650,7 +650,7 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
/* FIXME: what family does this really map to on the Unix side? */
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == WS_AF_PUP)
((struct ws_sockaddr_ipx *)name)->sipx_family = AF_UNSPEC;
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
else if (name &&
((struct ws_sockaddr_ipx *)name)->sipx_family == WS_AF_IPX)
{
@ -667,7 +667,7 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
if ( namelen >= sizeof(*name) )
{
if ( name && (((struct ws_sockaddr_in *)name)->sin_family == AF_INET
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
|| ((struct sockaddr_ipx *)name)->sipx_family == AF_IPX
#endif
))
@ -685,7 +685,7 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
}
}
else {
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (((struct sockaddr_ipx *)name)->sipx_family == AF_IPX)
free(name);
#endif
@ -695,7 +695,7 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
else pwsi->err = WSAEAFNOSUPPORT;
}
else pwsi->err = WSAEFAULT;
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (name && ((struct sockaddr_ipx *)name)->sipx_family == AF_IPX)
free(name);
#endif
@ -753,7 +753,7 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* name2 = (struct ws_sockaddr_ipx *)name;
#endif
@ -767,7 +767,7 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
{
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == WS_AF_PUP)
((struct ws_sockaddr_ipx *)name)->sipx_family = AF_UNSPEC;
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
else if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == WS_AF_IPX)
{
name = (struct sockaddr *) malloc(sizeof(struct sockaddr_ipx));
@ -806,7 +806,7 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
}
pws->flags |= WS_FD_CONNECTED;
pws->flags &= ~(WS_FD_INACTIVE | WS_FD_CONNECT | WS_FD_LISTENING);
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (((struct sockaddr_ipx *)name)->sipx_family == AF_IPX)
free(name);
#endif
@ -814,7 +814,7 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
}
pwsi->err = (errno == EINPROGRESS) ? WSAEWOULDBLOCK : wsaErrno();
}
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (name && ((struct sockaddr_ipx *)name)->sipx_family == AF_IPX)
free(name);
#endif
@ -837,7 +837,7 @@ INT32 WINAPI WINSOCK_getpeername32(SOCKET32 s, struct sockaddr *name,
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* name2 = (struct ws_sockaddr_ipx *)name;
#endif
@ -846,7 +846,7 @@ INT32 WINAPI WINSOCK_getpeername32(SOCKET32 s, struct sockaddr *name,
if( _check_ws(pwsi, pws) )
{
if (getpeername(pws->fd, name, namelen) == 0) {
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
name = (struct sockaddr *)
malloc(namelen ? *namelen : sizeof(*name2));
@ -863,7 +863,7 @@ INT32 WINAPI WINSOCK_getpeername32(SOCKET32 s, struct sockaddr *name,
}
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
name = (struct sockaddr *) malloc(namelen ? *namelen : sizeof(*name2));
memcpy(name, name2, namelen ? *namelen : sizeof(*name2));
@ -903,7 +903,7 @@ INT32 WINAPI WINSOCK_getsockname32(SOCKET32 s, struct sockaddr *name,
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* name2 = (struct ws_sockaddr_ipx *)name;
#endif
@ -912,7 +912,7 @@ INT32 WINAPI WINSOCK_getsockname32(SOCKET32 s, struct sockaddr *name,
if( _check_ws(pwsi, pws) )
{
if (getsockname(pws->fd, name, namelen) == 0) {
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (((struct sockaddr_ipx *)name)->sipx_family == AF_IPX) {
name = (struct sockaddr *)
malloc(namelen ? *namelen : sizeof(*name2));
@ -929,7 +929,7 @@ INT32 WINAPI WINSOCK_getsockname32(SOCKET32 s, struct sockaddr *name,
}
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
name = (struct sockaddr *) malloc(namelen ? *namelen : sizeof(*name2));
memcpy(name, name2, namelen ? *namelen : sizeof(*name2));
@ -1205,7 +1205,7 @@ INT32 WINAPI WINSOCK_recvfrom32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* from2 = (struct ws_sockaddr_ipx *)from;
#endif
@ -1228,7 +1228,7 @@ INT32 WINAPI WINSOCK_recvfrom32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
if( pws->psop && (pws->flags & (WS_FD_READ | WS_FD_CLOSE)) )
EVENT_AddIO( pws->fd, EVENT_IO_READ ); /* reenabler */
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (from && ((struct sockaddr_ipx *)from)->sipx_family == AF_IPX) {
from = (struct sockaddr *)
malloc(fromlen32 ? *fromlen32 : sizeof(*from2));
@ -1247,7 +1247,7 @@ INT32 WINAPI WINSOCK_recvfrom32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
}
else if( pwsi ) pwsi->err = WSAENOTSOCK;
WARN(winsock, " -> ERROR\n");
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (from && ((struct sockaddr_ipx *)from)->sipx_family == AF_IPX) {
from = (struct sockaddr *)
malloc(fromlen32 ? *fromlen32 : sizeof(*from2));
@ -1401,7 +1401,7 @@ INT32 WINAPI WINSOCK_sendto32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
{
ws_socket* pws = (ws_socket*)WS_HANDLE2PTR(s);
LPWSINFO pwsi = wsi_find(GetCurrentTask());
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
struct ws_sockaddr_ipx* to2 = (struct ws_sockaddr_ipx *)to;
#endif
@ -1413,7 +1413,7 @@ INT32 WINAPI WINSOCK_sendto32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
if (to && ((struct ws_sockaddr_ipx *)to)->sipx_family == WS_AF_PUP)
((struct ws_sockaddr_ipx *)to)->sipx_family = AF_UNSPEC;
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
else if (to &&
((struct ws_sockaddr_ipx *)to)->sipx_family == WS_AF_IPX)
{
@ -1435,7 +1435,7 @@ INT32 WINAPI WINSOCK_sendto32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
EVENT_AddIO( pws->fd, EVENT_IO_WRITE ); /* reenabler */
}
else {
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (to && ((struct sockaddr_ipx *)to)->sipx_family == AF_IPX) {
free(to);
}
@ -1444,7 +1444,7 @@ INT32 WINAPI WINSOCK_sendto32(SOCKET32 s, char *buf, INT32 len, INT32 flags,
}
}
else if( pwsi ) pwsi->err = WSAENOTSOCK;
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
if (to && ((struct sockaddr_ipx *)to)->sipx_family == AF_IPX) {
free(to);
}
@ -1587,7 +1587,7 @@ SOCKET32 WINAPI WINSOCK_socket32(INT32 af, INT32 type, INT32 protocol)
/* check the socket family */
switch(af)
{
#ifdef HAVE_LINUX_IPX_H
#ifdef HAVE_IPX
case WS_AF_IPX: af = AF_IPX;
#endif
case AF_INET: