Commit 20ab958b authored by Eric J. Korpela's avatar Eric J. Korpela

*** empty log message ***

svn path=/trunk/boinc/; revision=2387
parent fc0d609f
......@@ -64,6 +64,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -1014,6 +1014,34 @@ AC_LANG_RESTORE
])dnl ACX_PTHREAD
AC_DEFUN([SAH_GRX_LIBS],[
AC_LANG_PUSH(C)
sah_save_libs="$LIBS"
GRXLIBS=
AC_CHECK_LIB([X11], [XCreateGC], [ GRXLIBS="-lX11" ; AC_DEFINE([HAVE_X11],1,[Define to 1 if you have X11 libraries])])
AC_CHECK_LIB([Xaw], [XawTextReplace], GRXLIBS="$GRXLIBS -lXaw")
AC_CHECK_LIB([Xext], [XShmGetImage], GRXLIBS="$GRXLIBS -lXext")
AC_CHECK_LIB([Xmu], [XmuMakeAtom], GRXLIBS="$GRXLIBS -lXmu")
AC_CHECK_LIB([Xt], [XtDisplay], GRXLIBS="$GRXLIBS -lXt")
AC_CHECK_LIB([ICE], [IceProtocolVersion], GRXLIBS="$GRXLIBS -lICE")
AC_CHECK_LIB([SM], [SmsInitialize], GRXLIBS="$GRXLIBS -lSM")
AC_CHECK_LIB([GL], [glCallList], GRXLIBS="$GRXLIBS -lGL")
AC_CHECK_LIB([GLU], [main], GRXLIBS="$GRXLIBS -lGLU")
AC_CHECK_LIB([GLUT], [main], GRXLIBS="$GRXLIBS -lGLUT")
LIBS="$sah_save_libs"
AC_SUBST(GRXLIBS)
AC_LANG_POP
])
AC_DEFUN([SAH_GRX_INCLUDES],[
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h])
AC_LANG_POP
])
dnl $Id$
AC_DEFUN([AC_CHECK_MYSQL],[
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -20,6 +20,8 @@
// The part of the BOINC app lib having to do with graphics.
// This code is NOT linked into the core client.
#include "config.h"
#ifdef _WIN32
#include <afxwin.h>
extern DWORD WINAPI win_graphics_event_loop( LPVOID duff );
......@@ -34,8 +36,6 @@ HANDLE graphics_threadh=NULL;
#include <pthread.h>
#endif
#define HAVE_GL_LIB 1
#include "parse.h"
#include "app_ipc.h"
#include "graphics_api.h"
......@@ -53,6 +53,7 @@ GRAPHICS_INFO gi;
bool graphics_inited = false;
int boinc_init_opengl() {
#ifdef HAVE_GL_LIB
FILE* f;
int retval;
......@@ -137,7 +138,10 @@ int boinc_init_opengl() {
#endif
graphics_inited = true;
return 0;
#else
graphics_inited = false;
#endif
return !graphics_inited;
}
int boinc_finish_opengl() {
......@@ -153,6 +157,7 @@ int boinc_finish_opengl() {
return 0;
}
#ifdef HAVE_GL_LIB
GLvoid glPrint(GLuint font, const char *fmt, ...) // Custom GL "Print" Routine
{
/*
......@@ -226,3 +231,4 @@ GLenum ReSizeGLScene(GLsizei width, GLsizei height) {
return GL_NO_ERROR;
}
#endif
......@@ -2,34 +2,89 @@
#define BOINC_GRAPHICS_API_H
#ifdef __APPLE_CC__
#include <OpenGL/gl.h>
#include <Carbon/Carbon.h>
#ifndef HAVE_GL_LIB
#define HAVE_GL_LIB 1
#endif
#ifndef HAVE_OPENGL_GL_H
#define HAVE_OPENGL_GL_H
#endif
#elif defined(_WIN32)
#ifndef HAVE_GL_LIB
#define HAVE_GL_LIB 1
#endif
#ifndef HAVE_GL_GL_H
#define HAVE_GL_GL_H 1
#endif
#ifndef HAVE_GL_GLU_H
#define HAVE_GL_GLU_H 1
#endif
#ifndef HAVE_GL_GLAUX_H
#define HAVE_GL_GLAUX_H 1
#endif
#ifdef _WIN32
#include <windows.h>
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include <gl\glu.h> // Header File For The GLu32 Library
#include <gl\glaux.h> // Header File For The Glaux Library
extern HANDLE hQuitEvent;
extern HANDLE graphics_threadh;
extern BOOL win_loop_done;
#endif
#ifdef HAVE_GL_LIB
#ifdef HAVE_GL_H
#include <gl.h>
#elif defined(HAVE_GL_GL_H)
#include <GL/gl.h>
#elif defined(HAVE_OPENGL_GL_H)
#include <OpenGL/gl.h>
#elif defined(HAVE_MESAGL_GL_H)
#include <MesaGL/gl.h>
#endif
#ifdef HAVE_GLU_H
#include <glu.h>
#elif defined(HAVE_GL_GLU_H)
#include <GL/glu.h>
#elif defined(HAVE_OPENGL_GLU_H)
#include <OpenGL/glu.h>
#elif defined(HAVE_MESAGL_GLU_H)
#include <MesaGL/glu.h>
#endif
#ifdef HAVE_GLUT_H
#include <glut.h>
#elif defined(HAVE_GL_GLUT_H)
#include <GL/glut.h>
#elif defined(HAVE_OPENGL_GLUT_H)
#include <OpenGL/glut.h>
#elif defined(HAVE_MESAGL_GLUT_H)
#include <MesaGL/glut.h>
#elif defined(HAVE_GLUT_GLUT_H)
#include <GLUT/glut.h>
#endif
#ifdef HAVE_GLAUX_H
#include <glaux.h>
#elif defined(HAVE_GL_GLAUX_H)
#include <GL/glaux.h>
#elif defined(HAVE_OPENGL_GLAUX_H)
#include <OpenGL/glaux.h>
#elif defined(HAVE_MESAGL_GLAUX_H)
#include <MesaGL/glaux.h>
#endif
#if defined(HAVE_GL_LIB) && defined(HAVE_X11)
#include "x_opengl.h"
#endif
#ifdef _WIN32
extern HANDLE hQuitEvent;
extern HANDLE graphics_threadh;
extern BOOL win_loop_done;
#ifdef __APPLE_CC__
#include <Carbon/Carbon.h>
#endif
extern int boinc_init_opengl();
extern int boinc_finish_opengl();
#ifdef HAVE_GL_LIB
extern GLvoid glPrint(GLuint font, const char *fmt, ...);
extern GLenum InitGL(GLvoid);
extern GLenum ReSizeGLScene(GLsizei width, GLsizei height);
#endif
extern bool app_render(int xs, int ys, double time_of_day);
extern void app_init_gl(void);
extern void app_resize(int width, int height);
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -6452,3 +6452,21 @@ David Sept 30 2003
client_state.C
cs_scheduler.C
win/wingui_mainwindow.cpp
Eric Oct 1 2003 11:15 am
- Fixed compile problems on solaris.
- redid graphics_api.h entirely. C'mon people we use automake for a
reason. Use the macros in config.h!
- Moved OpenGL and header and library finding to a macro file
sah_grx.m4 (an identical macro file exists in seti_boinc)
- Will verify it works on windows in the next hour or so
Makefile.in
aclocal.m4
config.h.in
configure
configure.ac
graphics_api.C
graphics_api.h
m4/sah_grx.m4
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -27,6 +27,9 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <glaux.h> header file. */
#undef HAVE_GLAUX_H
/* Define to 1 if you have the <GLUT/glut.h> header file. */
#undef HAVE_GLUT_GLUT_H
......@@ -36,6 +39,9 @@
/* Define to 1 if you have the <glu.h> header file. */
#undef HAVE_GLU_H
/* Define to 1 if you have the <GL/glaux.h> header file. */
#undef HAVE_GL_GLAUX_H
/* Define to 1 if you have the <GL/glut.h> header file. */
#undef HAVE_GL_GLUT_H
......@@ -48,9 +54,6 @@
/* Define to 1 if you have the <gl.h> header file. */
#undef HAVE_GL_H
/* Have libGL */
#undef HAVE_GL_LIB
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......@@ -84,6 +87,18 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <MesaGL/glaux.h> header file. */
#undef HAVE_MESAGL_GLAUX_H
/* Define to 1 if you have the <MesaGL/glut.h> header file. */
#undef HAVE_MESAGL_GLUT_H
/* Define to 1 if you have the <MesaGL/glu.h> header file. */
#undef HAVE_MESAGL_GLU_H
/* Define to 1 if you have the <MesaGL/gl.h> header file. */
#undef HAVE_MESAGL_GL_H
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
......@@ -99,6 +114,9 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
/* Define to 1 if you have the <OpenGL/glaux.h> header file. */
#undef HAVE_OPENGL_GLAUX_H
/* Define to 1 if you have the <OpenGL/glut.h> header file. */
#undef HAVE_OPENGL_GLUT_H
......@@ -230,6 +248,9 @@
/* Define to 1 if you have the `wait4' function. */
#undef HAVE_WAIT4
/* Define to 1 if you have X11 libraries */
#undef HAVE_X11
/* Host for this compilation */
#undef HOSTTYPE
......
This diff is collapsed.
......@@ -84,7 +84,7 @@ AC_CHECK_LIB(z, gzopen)
dnl check for pthread
ACX_PTHREAD(AC_DEFINE(HAVE_PTHREAD,1, [Have pthread]))
dnl check for GL library
AC_CHECK_LIB(GL, glCallList, AC_DEFINE(HAVE_GL_LIB, 1, [Have libGL]))
SAH_GRX_LIBS
AC_CHECK_LIB(socket, setservent)
AC_CHECK_LIB(gen, strfind)
AC_CHECK_LIB(gen, strfind, [ AC_DEFINE(HAVE_STRFIND, 1, [Have strfind]) ] )
......@@ -96,7 +96,7 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(arpa/inet.h dirent.h fcntl.h malloc.h netdb.h netinet/in.h netinet/tcp.h signal.h strings.h sys/file.h sys/ipc.h sys/mount.h sys/resource.h sys/select.h sys/shm.h sys/socket.h sys/statvfs.h sys/swap.h sys/sysctl.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h)
AC_CHECK_HEADERS([gl.h glu.h glut.h GL/gl.h GL/glu.h GL/glut.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h GLUT/glut.h])
SAH_GRX_INCLUDES
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS([map])
AC_LANG_POP
......
......@@ -64,6 +64,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
AC_DEFUN([SAH_GRX_LIBS],[
AC_LANG_PUSH(C)
sah_save_libs="$LIBS"
GRXLIBS=
AC_CHECK_LIB([X11], [XCreateGC], [ GRXLIBS="-lX11" ; AC_DEFINE([HAVE_X11],1,[Define to 1 if you have X11 libraries])])
AC_CHECK_LIB([Xaw], [XawTextReplace], GRXLIBS="$GRXLIBS -lXaw")
AC_CHECK_LIB([Xext], [XShmGetImage], GRXLIBS="$GRXLIBS -lXext")
AC_CHECK_LIB([Xmu], [XmuMakeAtom], GRXLIBS="$GRXLIBS -lXmu")
AC_CHECK_LIB([Xt], [XtDisplay], GRXLIBS="$GRXLIBS -lXt")
AC_CHECK_LIB([ICE], [IceProtocolVersion], GRXLIBS="$GRXLIBS -lICE")
AC_CHECK_LIB([SM], [SmsInitialize], GRXLIBS="$GRXLIBS -lSM")
AC_CHECK_LIB([GL], [glCallList], GRXLIBS="$GRXLIBS -lGL")
AC_CHECK_LIB([GLU], [main], GRXLIBS="$GRXLIBS -lGLU")
AC_CHECK_LIB([GLUT], [main], GRXLIBS="$GRXLIBS -lGLUT")
LIBS="$sah_save_libs"
AC_SUBST(GRXLIBS)
AC_LANG_POP
])
AC_DEFUN([SAH_GRX_INCLUDES],[
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h])
AC_LANG_POP
])
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -64,6 +64,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
......@@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GRXLIBS = @GRXLIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment