Respect host system settings from configure.
git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@374 0420edf4-82e4-42fc-9478-35b55e6d67a3master
parent
9a65d93fdf
commit
de81dfb6ed
47
bh.h
47
bh.h
|
@ -57,21 +57,33 @@ GNU General Public License for more details.
|
|||
#include "SDL/SDL_image.h"
|
||||
#include "SDL/SDL_mixer.h"
|
||||
|
||||
#ifndef HAVE_CONFIG_H
|
||||
#ifdef _WIN32 // Windows platform
|
||||
#ifdef _MSC_VER // MSVC compiler
|
||||
#include <windows.h>
|
||||
#include "glext.h"
|
||||
#define OS_WIN32_MSC
|
||||
#pragma warning (disable:4244)
|
||||
#pragma warning (disable:4305)
|
||||
#define SEP "\\"
|
||||
#undef DrawText
|
||||
#else // Assume MinGW compiler
|
||||
#include <dirent.h>
|
||||
#include <GL/glext.h>
|
||||
#define OS_WIN32_MINGW
|
||||
#define SEP "/"
|
||||
#endif
|
||||
#ifdef _MSC_VER // MSVC compiler
|
||||
#define OS_WIN32_MSC
|
||||
#else // Assume MinGW compiler
|
||||
#define OS_WIN32_MINGW
|
||||
#endif
|
||||
#else // Assume Unix platform (Linux, Mac OS X, BSD, ...)
|
||||
#ifdef __APPLE__
|
||||
#define OS_MAC
|
||||
#elif defined(__linux__)
|
||||
#define OS_LINUX
|
||||
#endif
|
||||
#endif
|
||||
#endif // CONFIG_H
|
||||
|
||||
#if defined OS_WIN32_MSC // Windows platform
|
||||
#include <windows.h>
|
||||
#include "glext.h"
|
||||
#pragma warning (disable:4244)
|
||||
#pragma warning (disable:4305)
|
||||
#define SEP "\\"
|
||||
#undef DrawText
|
||||
#elif defined OS_WON32_MINGW
|
||||
#include <dirent.h>
|
||||
#include <GL/glext.h>
|
||||
#define SEP "/"
|
||||
#else // Assume Unix platform (Linux, Mac OS X, BSD, ...)
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -80,11 +92,6 @@ GNU General Public License for more details.
|
|||
#include <sys/time.h>
|
||||
#include <GL/glx.h>
|
||||
#define SEP "/"
|
||||
#ifdef __APPLE__
|
||||
#define OS_MAC
|
||||
#elif defined(__linux__)
|
||||
#define OS_LINUX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@ -105,4 +112,4 @@ using namespace std;
|
|||
|
||||
extern TGameData g_game;
|
||||
|
||||
#endif
|
||||
#endif // BH_H
|
||||
|
|
|
@ -31,7 +31,11 @@ AC_TYPE_SIZE_T
|
|||
#
|
||||
case "$host_os" in
|
||||
*linux*)
|
||||
CXXFLAGS="$CXXFLAGS -DOS_LINUX" ;;
|
||||
AC_DEFINE([OS_LINUX], [1], [Linux build]) ;;
|
||||
*mingw32*)
|
||||
AC_DEFINE([OS_WIN32_MINGW], [1], [MinGW build]) ;;
|
||||
*darwin*)
|
||||
AC_DEFINE([OS_MAC], [1], [Mac OS X build]) ;;
|
||||
esac
|
||||
|
||||
# Checks for library functions.
|
||||
|
|
Loading…
Reference in New Issue