mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
partial fixes for cross-compiling using mingw32. MIGHT break normal builds
This commit is contained in:
parent
8d3c85349a
commit
733d55603c
8 changed files with 80 additions and 27 deletions
48
configure.in
48
configure.in
|
@ -4,6 +4,12 @@ AC_INIT(source/sv_main.c)
|
||||||
AC_REVISION($Revision$) dnl
|
AC_REVISION($Revision$) dnl
|
||||||
AM_CONFIG_HEADER(include/config.h)
|
AM_CONFIG_HEADER(include/config.h)
|
||||||
AC_CANONICAL_SYSTEM
|
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
|
dnl This is the only place where the package version appears
|
||||||
AM_INIT_AUTOMAKE(quakeforge, 0.2.99beta6)
|
AM_INIT_AUTOMAKE(quakeforge, 0.2.99beta6)
|
||||||
|
@ -26,6 +32,16 @@ AC_SUBST(ISODATE)
|
||||||
|
|
||||||
AC_LANG_C
|
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 ==================================================================
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
dnl ==================================================================
|
dnl ==================================================================
|
||||||
|
@ -94,11 +110,38 @@ AC_TYPE_SIZE_T
|
||||||
AC_STRUCT_ST_BLKSIZE
|
AC_STRUCT_ST_BLKSIZE
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
AC_STRUCT_TM
|
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_MSG_CHECKING(that fnmatch is in fnmatch.h)
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[#include <fnmatch.h>],
|
[#include "fnmatch.h"],
|
||||||
[int (*foo)() = fnmatch;],
|
[int (*foo)() = fnmatch;],
|
||||||
AC_DEFINE(HAVE_FNMATCH_PROTO)
|
AC_DEFINE(HAVE_FNMATCH_PROTO)
|
||||||
AC_MSG_RESULT(yes),
|
AC_MSG_RESULT(yes),
|
||||||
|
@ -1295,6 +1338,7 @@ AC_OUTPUT(
|
||||||
quakeforge.lsm,
|
quakeforge.lsm,
|
||||||
chmod +x RPM/build_rpm
|
chmod +x RPM/build_rpm
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_RESULT([
|
AC_MSG_RESULT([
|
||||||
QuakeForge has been configured successfully.
|
QuakeForge has been configured successfully.
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,7 @@ void S_StopAllSounds(qboolean clear);
|
||||||
void S_ClearBuffer (void);
|
void S_ClearBuffer (void);
|
||||||
void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up);
|
void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up);
|
||||||
void S_ExtraUpdate (void);
|
void S_ExtraUpdate (void);
|
||||||
|
void S_BlockSound (void);
|
||||||
|
|
||||||
sfx_t *S_PrecacheSound (char *sample);
|
sfx_t *S_PrecacheSound (char *sample);
|
||||||
void S_TouchSound (char *sample);
|
void S_TouchSound (char *sample);
|
||||||
|
|
|
@ -64,6 +64,7 @@ extern viddef_t vid; // global video state
|
||||||
extern unsigned short d_8to16table[256];
|
extern unsigned short d_8to16table[256];
|
||||||
extern unsigned int d_8to24table[256];
|
extern unsigned int d_8to24table[256];
|
||||||
extern int scr_width, scr_height;
|
extern int scr_width, scr_height;
|
||||||
|
extern qboolean DDActive;
|
||||||
|
|
||||||
// called at startup and after any gamma correction
|
// called at startup and after any gamma correction
|
||||||
void VID_SetPalette (unsigned char *palette);
|
void VID_SetPalette (unsigned char *palette);
|
||||||
|
@ -101,4 +102,7 @@ void VID_SetCaption (char *text);
|
||||||
|
|
||||||
void VID_GetWindowSize (int def_w, int def_h);
|
void VID_GetWindowSize (int def_w, int def_h);
|
||||||
|
|
||||||
|
int VID_ForceUnlockedAndReturnState (void);
|
||||||
|
void VID_ForceLockState (int lk);
|
||||||
|
|
||||||
#endif // __vid_h_
|
#endif // __vid_h_
|
||||||
|
|
|
@ -35,15 +35,17 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <conio.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 "client.h"
|
||||||
#include "console.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;
|
qboolean is_server = false;
|
||||||
|
|
||||||
|
@ -318,7 +320,7 @@ Sys_ConsoleInput (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Con_Printf ("Stupid: %d\n",
|
Con_Printf ("Stupid: %ld\n",
|
||||||
recs[0].Event.KeyEvent.dwControlKeyState);
|
recs[0].Event.KeyEvent.dwControlKeyState);
|
||||||
if (
|
if (
|
||||||
((ch == 'V' || ch == 'v')
|
((ch == 'V' || ch == 'v')
|
||||||
|
@ -442,7 +444,9 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
|
||||||
MEMORYSTATUS lpBuffer;
|
MEMORYSTATUS lpBuffer;
|
||||||
static char cwd[1024];
|
static char cwd[1024];
|
||||||
int t;
|
int t;
|
||||||
|
#ifdef SPLASH_SCREEN
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* previous instances do not exist in Win32 */
|
/* previous instances do not exist in Win32 */
|
||||||
if (hPrevInstance)
|
if (hPrevInstance)
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
#define SUFFIX "*"
|
#define SUFFIX "*"
|
||||||
#define SLASH "\\"
|
#define SLASH "\\"
|
||||||
|
|
||||||
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
|
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
|
||||||
|
#endif S_ISDIR
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* opendir
|
* opendir
|
||||||
|
|
|
@ -33,29 +33,25 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "console.h"
|
|
||||||
#include "cvar.h"
|
|
||||||
#include "protocol.h"
|
|
||||||
#include "qtypes.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
# define INITGUID
|
# define INITGUID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "winquake.h"
|
#define byte __byte
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
#include "client.h"
|
#undef byte
|
||||||
#include "keys.h"
|
|
||||||
#include "console.h"
|
|
||||||
#include "qargs.h"
|
|
||||||
#include "cmd.h"
|
|
||||||
#include "input.h"
|
|
||||||
#include "cl_input.h"
|
#include "cl_input.h"
|
||||||
#include "view.h"
|
#include "client.h"
|
||||||
|
#include "cmd.h"
|
||||||
|
#include "console.h"
|
||||||
|
#include "cvar.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "keys.h"
|
||||||
|
#include "protocol.h"
|
||||||
|
#include "qargs.h"
|
||||||
|
#include "view.h"
|
||||||
|
|
||||||
// Joystick variables and structures
|
// Joystick variables and structures
|
||||||
cvar_t *joy_device; // Joystick device name
|
cvar_t *joy_device; // Joystick device name
|
||||||
|
|
|
@ -74,7 +74,8 @@
|
||||||
#include "qargs.h"
|
#include "qargs.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include "winquake.h"
|
#include <windows.h>
|
||||||
|
//# include "winquake.h"
|
||||||
# undef EWOULDBLOCK
|
# undef EWOULDBLOCK
|
||||||
# define EWOULDBLOCK WSAEWOULDBLOCK
|
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,9 +30,10 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "winquake.h"
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* This is unused in the client, but we need the symbol there too. */
|
/* This is unused in the client, but we need the symbol there too. */
|
||||||
|
|
Loading…
Reference in a new issue