From 8e27422c72190a08114d9c608beb7cb42b5ea996 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 28 Sep 2001 16:03:45 +0000 Subject: [PATCH] partial fixes for mingw cross builds. still have issues with ar :( --- configure.ac | 10 +++++++++- libs/console/server.c | 8 ++++++-- qw/source/cl_sys_sdl.c | 9 ++++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5f4558373..801626513 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,9 @@ case "$host_os" in CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources" if test $host != $build; then CC=$host_cpu-$host_os-gcc + AS=$host_cpu-$host_os-gcc + AR=$host_cpu-$host_os-ar + RANLIB=$host_cpu-$host_os-ranlib endian="little" fi ;; @@ -59,6 +62,7 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_CPP AC_PROG_LN_S +AC_PROG_RANLIB AM_PROG_LIBTOOL AC_PROG_YACC AM_PROG_LEX @@ -102,7 +106,7 @@ AC_CHECK_HEADERS( stdlib.h string.h strings.h sys/asoundlib.h sys/audioio.h sys/filio.h \ sys/ioctl.h sys/io.h sys/ipc.h sys/mman.h sys/param.h sys/poll.h \ sys/shm.h sys/signal.h sys/socket.h sys/soundcard.h sys/stat.h \ - sys/time.h sys/types.h sys/wait.h time.h unistd.h vga.h \ + sys/time.h sys/types.h sys/wait.h termios.h time.h unistd.h vga.h \ vgakeyboard.h vgamouse.h windows.h winsock.h zlib.h ) if test "x$mingw" = xyes; then @@ -1451,6 +1455,10 @@ AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) +AC_SUBST(AS) +AC_SUBST(AR) +AC_SUBST(RANLIB) + dnl Output files AC_OUTPUT( Makefile diff --git a/libs/console/server.c b/libs/console/server.c index fb61781f8..e80b0ea63 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -46,8 +46,12 @@ static const char rcsid[] = # include #endif -#include -#include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif +#ifdef HAVE_TERMIOS_H +# include +#endif #include #include diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index ea20a7531..dfce5bc48 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -24,12 +24,15 @@ Boston, MA 02111-1307, USA */ -static const char rcsid[] = +static const char rcsid[] = "$Id$"; #ifdef HAVE_CONFIG_H # include "config.h" #endif +#ifdef _WIN32 +# define shutdown win32_shutdown +#endif #ifdef HAVE_CONIO_H # include #endif @@ -62,6 +65,10 @@ static const char rcsid[] = #include #include +#ifdef _WIN32 +# undef shutdown +#endif + #include "QF/sys.h" #include "QF/qargs.h"