- Applied soem FreeBSD patches that I had lying around, that

were waiting for me to get library detection in configure
  going.  Thanks to Faried Nawaz and Ulrich Spoerlein.
  (Closes: #36)
This commit is contained in:
Jamie Wilkinson 2002-07-01 06:21:38 +00:00
parent 378f0601d4
commit c78029a65a
6 changed files with 28 additions and 14 deletions

View file

@ -76,7 +76,7 @@ endif
# ref_sdlgl
if BUILD_SDLGL
ref_sdlgl_so_SOURCES = $(REF_GL_COMMON) rw_sdl.c
ref_sdlgl_so_CFLAGS = -fPIC @SDL_CFLAGS@ -DOPENGL @OPENGL_CFLAGS@
ref_sdlgl_so_CFLAGS = -fPIC -DOPENGL @SDL_CFLAGS@ @OPENGL_CFLAGS@
ref_sdlgl_so_LDFLAGS = -shared
ref_sdlgl_so_LDADD = @SDL_LIBS@ @OPENGL_LIBS@
endif
@ -85,7 +85,7 @@ endif
if BUILD_SOFT
if ASM_ARCH
SOFT_ASM=$(REF_SOFT_ASM) d_copy.S
rgreelse
else
SOFT_ASM=$(REF_SOFT_ASM)
endif
ref_soft_so_SOURCES = $(REF_SOFT_COMMON) $(SOFT_ASM) \

View file

@ -47,7 +47,7 @@
/* merged from sys_*.c -- jaq */
#if defined(__linux__) || defined(__sgi)
#include <mntent.h>
#elif defined(__bsd__)
#elif defined(__FreeBSD__) || defined(__bsd__)
#include <fstab.h>
#elif defined(sun)
#include <sys/file.h>

View file

@ -53,7 +53,7 @@ void *Hunk_Begin (int maxsize)
/* merged in from q_sh*.c -- jaq */
#if defined(__linux__)
membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
#elif defined(__bsd__)
#elif defined(__FreeBSD__) || defined(__bsd__)
membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
#elif defined(sun) || defined(__sgi)
membase = malloc(maxhunksize);

View file

@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CPUSTRING "AXP"
#endif
*/
#elif defined __linux__ || defined __bsd__
#elif defined(__linux__) || defined(__bsd__) || defined (__FreeBSD__)
#define BUILDSTRING "Linux"
/*

View file

@ -70,7 +70,7 @@ static FILE * log_fp = NULL;
#endif
/* merged in from qgl_bsd.c -- jaq */
#ifdef __bsd__
#if defined(__bsd__) || defined(__FreeBSD__)
/*
//FX Mesa Functions
fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
@ -81,7 +81,11 @@ fxMesaContext (*qfxMesaGetCurrentContext)(void);
void (*qfxMesaSwapBuffers)(void);
*/
XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );+GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glx.h>
XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
void (*qglXDestroyContext)( Display *dpy, GLXContext ctx );
Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask );
@ -98,8 +102,8 @@ void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfl
void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
void ( APIENTRY * qglCallList )(GLuint list);
void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
void ( APIENTRY * qglClear )(GLbitfield mask);
void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void ( APIENTRY * qglClear )(GLbitfield mask);void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
void ( APIENTRY * qglClearDepth )(GLclampd depth);
void ( APIENTRY * qglClearIndex )(GLfloat c);
@ -3015,7 +3019,7 @@ void QGL_Shutdown( void )
qglVertexPointer = NULL;
qglViewport = NULL;
/* merged in from qgl_bsd.c -- jaq */
#ifdef __bsd__
#if defined(__bsd__) || defined(__FreeBSD__)
/*
qfxMesaCreateContext = NULL;
qfxMesaCreateBestContext = NULL;
@ -3035,7 +3039,7 @@ void QGL_Shutdown( void )
}
/* merged in from qgl_bsd.c -- jaq */
#ifdef __linux__
#if defined(__linux__) || defined (__FreeBSD__)
#define GPA( a ) dlsym( glw_state.OpenGLLib, a )
void *qwglGetProcAddress(char *symbol)
@ -3434,7 +3438,7 @@ qboolean QGL_Init( const char *dllname )
qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" );
qglViewport = dllViewport = GPA( "glViewport" );
/* merged in from qgl_bsd.c -- jaq */
#ifdef __bsd__
#if defined(__bsd__) || defined(__FreeBSD__)
/*
qfxMesaCreateContext = GPA("fxMesaCreateContext");
qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext");

View file

@ -40,7 +40,7 @@ void QGL_Shutdown( void );
#endif
/*
#ifdef __OpenBSD__
#ifdef __OpenBSD__ || __FreeBSD__
#define GPA(X) dlsym(glw_state.OpenGLLib, "_"##X)
#else
#define GPA(X) dlsym(glw_state.OpenGLLib, X)
@ -51,6 +51,10 @@ void QGL_Shutdown( void );
#endif
*/
#ifdef __FreeBSD__
extern void *qwglGetProcAddress(char *symbol);
#endif
extern void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
extern void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
extern GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
@ -447,7 +451,6 @@ extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed,
extern void * qwglGetProcAddress(char *symbol);
//#endif
extern void (*qgl3DfxSetPaletteEXT)(GLuint *);
// 3dfxSetPaletteEXT shunt
void APIENTRY Fake_glColorTableEXT( GLenum target, GLenum internalformat,
@ -456,6 +459,13 @@ void APIENTRY Fake_glColorTableEXT( GLenum target, GLenum internalformat,
#endif // linux
#if defined(__linux__) || defined(__bsd__) || defined(__FreeBSD__)
extern void (*qgl3DfxSetPaletteEXT)(GLuint *);
#endif
/* deprecated */
#define GL_TEXTURE0_SGIS 0x835E
#define GL_TEXTURE1_SGIS 0x835F