diff --git a/Makefile.in b/Makefile.in index 4c027740f0..75482057b1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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@ diff --git a/aclocal.m4 b/aclocal.m4 index 626f4e3e19..e462877c6b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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],[ diff --git a/api/Makefile.in b/api/Makefile.in index af82428793..04d491cc30 100644 --- a/api/Makefile.in +++ b/api/Makefile.in @@ -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@ diff --git a/api/graphics_api.C b/api/graphics_api.C index b584b11681..a49a7692a3 100755 --- a/api/graphics_api.C +++ b/api/graphics_api.C @@ -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 extern DWORD WINAPI win_graphics_event_loop( LPVOID duff ); @@ -34,8 +36,6 @@ HANDLE graphics_threadh=NULL; #include #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 diff --git a/api/graphics_api.h b/api/graphics_api.h index da0c7bf593..456c5c125b 100755 --- a/api/graphics_api.h +++ b/api/graphics_api.h @@ -2,34 +2,89 @@ #define BOINC_GRAPHICS_API_H #ifdef __APPLE_CC__ -#include -#include +#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 -#include // Header File For The OpenGL32 Library -#include // Header File For The GLu32 Library -#include // Header File For The Glaux Library -#endif - -#ifdef HAVE_GL_LIB -#include -#include "x_opengl.h" -#endif - -#ifdef _WIN32 extern HANDLE hQuitEvent; extern HANDLE graphics_threadh; extern BOOL win_loop_done; #endif +#ifdef HAVE_GL_H +#include +#elif defined(HAVE_GL_GL_H) +#include +#elif defined(HAVE_OPENGL_GL_H) +#include +#elif defined(HAVE_MESAGL_GL_H) +#include +#endif +#ifdef HAVE_GLU_H +#include +#elif defined(HAVE_GL_GLU_H) +#include +#elif defined(HAVE_OPENGL_GLU_H) +#include +#elif defined(HAVE_MESAGL_GLU_H) +#include +#endif +#ifdef HAVE_GLUT_H +#include +#elif defined(HAVE_GL_GLUT_H) +#include +#elif defined(HAVE_OPENGL_GLUT_H) +#include +#elif defined(HAVE_MESAGL_GLUT_H) +#include +#elif defined(HAVE_GLUT_GLUT_H) +#include +#endif +#ifdef HAVE_GLAUX_H +#include +#elif defined(HAVE_GL_GLAUX_H) +#include +#elif defined(HAVE_OPENGL_GLAUX_H) +#include +#elif defined(HAVE_MESAGL_GLAUX_H) +#include +#endif + + + +#if defined(HAVE_GL_LIB) && defined(HAVE_X11) +#include "x_opengl.h" +#endif + +#ifdef __APPLE_CC__ +#include +#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); diff --git a/apps/Makefile.in b/apps/Makefile.in index 4c18155290..9e19b2381e 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in @@ -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@ diff --git a/checkin_notes b/checkin_notes index cdef279b20..ce3671ddce 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/Makefile.in b/client/Makefile.in index 8c3eb0bd0d..50c32751b0 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -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@ diff --git a/config.h.in b/config.h.in index e50f798fb7..ed445220b5 100644 --- a/config.h.in +++ b/config.h.in @@ -27,6 +27,9 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY +/* Define to 1 if you have the header file. */ +#undef HAVE_GLAUX_H + /* Define to 1 if you have the header file. */ #undef HAVE_GLUT_GLUT_H @@ -36,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_GLU_H +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLAUX_H + /* Define to 1 if you have the header file. */ #undef HAVE_GL_GLUT_H @@ -48,9 +54,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_GL_H -/* Have libGL */ -#undef HAVE_GL_LIB - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -84,6 +87,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MESAGL_GLAUX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MESAGL_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MESAGL_GLU_H + +/* Define to 1 if you have the 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 header file. */ #undef HAVE_NETINET_TCP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GLAUX_H + /* Define to 1 if you have the 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 diff --git a/configure b/configure index cac952fd61..731428feb5 100755 --- a/configure +++ b/configure @@ -329,7 +329,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAJOR_VERSION MINOR_VERSION CLIENT_BIN_FILENAME TOP_BUILD_DIR TOP_SOURCE_DIR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS MYSQL_CONFIG MYSQL_LIBS MYSQL_CFLAGS EGREP CXXCPP STATIC_FLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAJOR_VERSION MINOR_VERSION CLIENT_BIN_FILENAME TOP_BUILD_DIR TOP_SOURCE_DIR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS GRXLIBS MYSQL_CONFIG MYSQL_LIBS MYSQL_CFLAGS EGREP CXXCPP STATIC_FLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -4403,7 +4403,426 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for glCallList in -lGL" >&5 + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + sah_save_libs="$LIBS" + GRXLIBS= + echo "$as_me:$LINENO: checking for XCreateGC in -lX11" >&5 +echo $ECHO_N "checking for XCreateGC in -lX11... $ECHO_C" >&6 +if test "${ac_cv_lib_X11_XCreateGC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XCreateGC (); +int +main () +{ +XCreateGC (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_X11_XCreateGC=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_X11_XCreateGC=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XCreateGC" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_XCreateGC" >&6 +if test $ac_cv_lib_X11_XCreateGC = yes; then + GRXLIBS="-lX11" ; +cat >>confdefs.h <<\_ACEOF +#define HAVE_X11 1 +_ACEOF + +fi + + echo "$as_me:$LINENO: checking for XawTextReplace in -lXaw" >&5 +echo $ECHO_N "checking for XawTextReplace in -lXaw... $ECHO_C" >&6 +if test "${ac_cv_lib_Xaw_XawTextReplace+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXaw $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XawTextReplace (); +int +main () +{ +XawTextReplace (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xaw_XawTextReplace=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xaw_XawTextReplace=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_XawTextReplace" >&5 +echo "${ECHO_T}$ac_cv_lib_Xaw_XawTextReplace" >&6 +if test $ac_cv_lib_Xaw_XawTextReplace = yes; then + GRXLIBS="$GRXLIBS -lXaw" +fi + + echo "$as_me:$LINENO: checking for XShmGetImage in -lXext" >&5 +echo $ECHO_N "checking for XShmGetImage in -lXext... $ECHO_C" >&6 +if test "${ac_cv_lib_Xext_XShmGetImage+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XShmGetImage (); +int +main () +{ +XShmGetImage (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xext_XShmGetImage=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xext_XShmGetImage=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShmGetImage" >&5 +echo "${ECHO_T}$ac_cv_lib_Xext_XShmGetImage" >&6 +if test $ac_cv_lib_Xext_XShmGetImage = yes; then + GRXLIBS="$GRXLIBS -lXext" +fi + + echo "$as_me:$LINENO: checking for XmuMakeAtom in -lXmu" >&5 +echo $ECHO_N "checking for XmuMakeAtom in -lXmu... $ECHO_C" >&6 +if test "${ac_cv_lib_Xmu_XmuMakeAtom+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXmu $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XmuMakeAtom (); +int +main () +{ +XmuMakeAtom (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xmu_XmuMakeAtom=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xmu_XmuMakeAtom=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuMakeAtom" >&5 +echo "${ECHO_T}$ac_cv_lib_Xmu_XmuMakeAtom" >&6 +if test $ac_cv_lib_Xmu_XmuMakeAtom = yes; then + GRXLIBS="$GRXLIBS -lXmu" +fi + + echo "$as_me:$LINENO: checking for XtDisplay in -lXt" >&5 +echo $ECHO_N "checking for XtDisplay in -lXt... $ECHO_C" >&6 +if test "${ac_cv_lib_Xt_XtDisplay+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XtDisplay (); +int +main () +{ +XtDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xt_XtDisplay=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xt_XtDisplay=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_XtDisplay" >&5 +echo "${ECHO_T}$ac_cv_lib_Xt_XtDisplay" >&6 +if test $ac_cv_lib_Xt_XtDisplay = yes; then + GRXLIBS="$GRXLIBS -lXt" +fi + + echo "$as_me:$LINENO: checking for IceProtocolVersion in -lICE" >&5 +echo $ECHO_N "checking for IceProtocolVersion in -lICE... $ECHO_C" >&6 +if test "${ac_cv_lib_ICE_IceProtocolVersion+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char IceProtocolVersion (); +int +main () +{ +IceProtocolVersion (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ICE_IceProtocolVersion=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ICE_IceProtocolVersion=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceProtocolVersion" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceProtocolVersion" >&6 +if test $ac_cv_lib_ICE_IceProtocolVersion = yes; then + GRXLIBS="$GRXLIBS -lICE" +fi + + echo "$as_me:$LINENO: checking for SmsInitialize in -lSM" >&5 +echo $ECHO_N "checking for SmsInitialize in -lSM... $ECHO_C" >&6 +if test "${ac_cv_lib_SM_SmsInitialize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSM $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SmsInitialize (); +int +main () +{ +SmsInitialize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_SM_SmsInitialize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_SM_SmsInitialize=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmsInitialize" >&5 +echo "${ECHO_T}$ac_cv_lib_SM_SmsInitialize" >&6 +if test $ac_cv_lib_SM_SmsInitialize = yes; then + GRXLIBS="$GRXLIBS -lSM" +fi + + echo "$as_me:$LINENO: checking for glCallList in -lGL" >&5 echo $ECHO_N "checking for glCallList in -lGL... $ECHO_C" >&6 if test "${ac_cv_lib_GL_glCallList+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4458,13 +4877,122 @@ fi echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glCallList" >&5 echo "${ECHO_T}$ac_cv_lib_GL_glCallList" >&6 if test $ac_cv_lib_GL_glCallList = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GL_LIB 1 -_ACEOF - + GRXLIBS="$GRXLIBS -lGL" fi + echo "$as_me:$LINENO: checking for main in -lGLU" >&5 +echo $ECHO_N "checking for main in -lGLU... $ECHO_C" >&6 +if test "${ac_cv_lib_GLU_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGLU $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_GLU_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_GLU_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 +echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6 +if test $ac_cv_lib_GLU_main = yes; then + GRXLIBS="$GRXLIBS -lGLU" +fi + + echo "$as_me:$LINENO: checking for main in -lGLUT" >&5 +echo $ECHO_N "checking for main in -lGLUT... $ECHO_C" >&6 +if test "${ac_cv_lib_GLUT_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGLUT $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_GLUT_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_GLUT_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_GLUT_main" >&5 +echo "${ECHO_T}$ac_cv_lib_GLUT_main" >&6 +if test $ac_cv_lib_GLUT_main = yes; then + GRXLIBS="$GRXLIBS -lGLUT" +fi + + LIBS="$sah_save_libs" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + echo "$as_me:$LINENO: checking for setservent in -lsocket" >&5 echo $ECHO_N "checking for setservent in -lsocket... $ECHO_C" >&6 @@ -5526,163 +6054,6 @@ fi done - - - - - - - - - -for ac_header in 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 -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5915,6 +6286,184 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + + + + + + + + + + + + + + + +for ac_header in 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 +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + for ac_header in map do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -7596,6 +8145,7 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@PTHREAD_CC@,$PTHREAD_CC,;t t s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t +s,@GRXLIBS@,$GRXLIBS,;t t s,@MYSQL_CONFIG@,$MYSQL_CONFIG,;t t s,@MYSQL_LIBS@,$MYSQL_LIBS,;t t s,@MYSQL_CFLAGS@,$MYSQL_CFLAGS,;t t diff --git a/configure.ac b/configure.ac index c804d63237..d23e1d6b9d 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/db/Makefile.in b/db/Makefile.in index 9b966166a9..603f77e07a 100644 --- a/db/Makefile.in +++ b/db/Makefile.in @@ -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@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 3718a364e9..9111420fbb 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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@ diff --git a/m4/sah_grx.m4 b/m4/sah_grx.m4 new file mode 100644 index 0000000000..b9b6deeb57 --- /dev/null +++ b/m4/sah_grx.m4 @@ -0,0 +1,27 @@ + + +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 +]) + diff --git a/py/Boinc/Makefile.in b/py/Boinc/Makefile.in index cad64fe62c..79ccebe7c9 100644 --- a/py/Boinc/Makefile.in +++ b/py/Boinc/Makefile.in @@ -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@ diff --git a/py/Makefile.in b/py/Makefile.in index 36cb119365..940adc0dbf 100644 --- a/py/Makefile.in +++ b/py/Makefile.in @@ -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@ diff --git a/sched/Makefile.in b/sched/Makefile.in index eb6ddf21c6..a037f005aa 100644 --- a/sched/Makefile.in +++ b/sched/Makefile.in @@ -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@ diff --git a/test/Makefile.in b/test/Makefile.in index 9b3b607869..ddd9e305ed 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -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@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 6a6efbfeb2..cd0763afeb 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -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@