partial fixes for cross-compiling using mingw32. MIGHT break normal builds

This commit is contained in:
Bill Currie 2001-01-24 00:06:58 +00:00
parent 8d3c85349a
commit 733d55603c
8 changed files with 80 additions and 27 deletions

View file

@ -4,6 +4,12 @@ AC_INIT(source/sv_main.c)
AC_REVISION($Revision$) dnl
AM_CONFIG_HEADER(include/config.h)
AC_CANONICAL_SYSTEM
AC_VALIDATE_CACHED_SYSTEM_TUPLE(
rm $cache_file
echo restart configure
exit 1
)
dnl This is the only place where the package version appears
AM_INIT_AUTOMAKE(quakeforge, 0.2.99beta6)
@ -26,6 +32,16 @@ AC_SUBST(ISODATE)
AC_LANG_C
endian=""
case "$host_os" in
mingw32*)
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources"
CC=i386-mingw32msvc-gcc
endian="little"
;;
esac
dnl ==================================================================
dnl Checks for programs.
dnl ==================================================================
@ -94,11 +110,38 @@ AC_TYPE_SIZE_T
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_BIGENDIAN
if test "x$cross_compiling" = xyes; then
AC_MSG_CHECKING(whether byte ordering is bigendian)
AC_ARG_WITH(endian,
[ --with-endian=TYPE set endian of target system for
cross-compiling. TYPE = little or big.],
endian="$withval",
)
case "x$endian" in
xbig)
AC_DEFINE(WORDS_BIGENDIAN)
AC_MSG_RESULT(yes)
;;
xlittle)
AC_MSG_RESULT(no)
;;
x)
AC_MSG_RESULT(unspecified, use --with-endian={big,little})
exit 1
;;
x*)
AC_MSG_RESULT(unregognized endianess)
exit 1
;;
esac
else
AC_C_BIGENDIAN
fi
AC_MSG_CHECKING(that fnmatch is in fnmatch.h)
AC_TRY_COMPILE(
[#include <fnmatch.h>],
[#include "fnmatch.h"],
[int (*foo)() = fnmatch;],
AC_DEFINE(HAVE_FNMATCH_PROTO)
AC_MSG_RESULT(yes),
@ -1295,6 +1338,7 @@ AC_OUTPUT(
quakeforge.lsm,
chmod +x RPM/build_rpm
)
AC_MSG_RESULT([
QuakeForge has been configured successfully.

View file

@ -111,6 +111,7 @@ void S_StopAllSounds(qboolean clear);
void S_ClearBuffer (void);
void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up);
void S_ExtraUpdate (void);
void S_BlockSound (void);
sfx_t *S_PrecacheSound (char *sample);
void S_TouchSound (char *sample);

View file

@ -64,6 +64,7 @@ extern viddef_t vid; // global video state
extern unsigned short d_8to16table[256];
extern unsigned int d_8to24table[256];
extern int scr_width, scr_height;
extern qboolean DDActive;
// called at startup and after any gamma correction
void VID_SetPalette (unsigned char *palette);
@ -101,4 +102,7 @@ void VID_SetCaption (char *text);
void VID_GetWindowSize (int def_w, int def_h);
int VID_ForceUnlockedAndReturnState (void);
void VID_ForceLockState (int lk);
#endif // __vid_h_

View file

@ -35,15 +35,17 @@
#include <limits.h>
#include <io.h>
#include <conio.h>
#include <windows.h>
#include "host.h"
#include "winquake.h"
#include "resource.h"
#include "sys.h"
#include "screen.h"
#include "qargs.h"
#include "client.h"
#include "console.h"
#include "host.h"
#include "qargs.h"
#include "resource.h"
#include "screen.h"
#include "sound.h"
#include "sys.h"
#include "vid.h"
qboolean is_server = false;
@ -318,7 +320,7 @@ Sys_ConsoleInput (void)
break;
default:
Con_Printf ("Stupid: %d\n",
Con_Printf ("Stupid: %ld\n",
recs[0].Event.KeyEvent.dwControlKeyState);
if (
((ch == 'V' || ch == 'v')
@ -442,7 +444,9 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
MEMORYSTATUS lpBuffer;
static char cwd[1024];
int t;
#ifdef SPLASH_SCREEN
RECT rect;
#endif
/* previous instances do not exist in Win32 */
if (hPrevInstance)

View file

@ -25,7 +25,9 @@
#define SUFFIX "*"
#define SLASH "\\"
#ifndef S_ISDIR
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
#endif S_ISDIR
/*
* opendir

View file

@ -33,29 +33,25 @@
# include "config.h"
#endif
#include "console.h"
#include "cvar.h"
#include "protocol.h"
#include "qtypes.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef __MINGW32__
# define INITGUID
#endif
#include "winquake.h"
#define byte __byte
#include <dinput.h>
#include "client.h"
#include "keys.h"
#include "console.h"
#include "qargs.h"
#include "cmd.h"
#include "input.h"
#undef byte
#include "cl_input.h"
#include "view.h"
#include "client.h"
#include "cmd.h"
#include "console.h"
#include "cvar.h"
#include "host.h"
#include "input.h"
#include "keys.h"
#include "protocol.h"
#include "qargs.h"
#include "view.h"
// Joystick variables and structures
cvar_t *joy_device; // Joystick device name

View file

@ -74,7 +74,8 @@
#include "qargs.h"
#ifdef _WIN32
# include "winquake.h"
#include <windows.h>
//# include "winquake.h"
# undef EWOULDBLOCK
# define EWOULDBLOCK WSAEWOULDBLOCK
#endif

View file

@ -30,9 +30,10 @@
# include "config.h"
#endif
#include "winquake.h"
#include <limits.h>
#include <direct.h>
#include <windows.h>
#include "server.h"
/* This is unused in the client, but we need the symbol there too. */