From 09f987eeb1c5de94385d2934628b2514295f2216 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 30 Apr 2001 17:17:01 +0000 Subject: [PATCH] Separate test for GLU and GL... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- configh.in | 13 +++++++++++-- configure.in | 17 +++++++++++++---- test/CubeView.h | 5 ++--- test/fractals.cxx | 8 ++++---- test/glpuzzle.cxx | 8 ++++---- visualc/config.h | 13 +++++++++++-- 6 files changed, 45 insertions(+), 19 deletions(-) diff --git a/configh.in b/configh.in index c0781359f..22e9a0c49 100644 --- a/configh.in +++ b/configh.in @@ -1,5 +1,5 @@ /* - * "$Id: configh.in,v 1.11.2.10 2001/04/27 17:00:23 easysw Exp $" + * "$Id: configh.in,v 1.11.2.11 2001/04/30 17:17:01 easysw Exp $" * * Configuration file for the Fast Light Tool Kit (FLTK). * @configure_input@ @@ -49,6 +49,15 @@ #define HAVE_GL 0 +/* + * HAVE_GL_GLU_H: + * + * Do you have the OpenGL Utility Library header file? + * (many broken Mesa RPMs do not...) + */ + +#undef HAVE_GL_GLU_H + /* * USE_COLORMAP: * @@ -168,5 +177,5 @@ #define USE_POLL 0 /* - * End of "$Id: configh.in,v 1.11.2.10 2001/04/27 17:00:23 easysw Exp $". + * End of "$Id: configh.in,v 1.11.2.11 2001/04/30 17:17:01 easysw Exp $". */ diff --git a/configure.in b/configure.in index c0da00f6f..d87775aa2 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl -*- sh -*- dnl the "configure" script is made from this by running GNU "autoconf" dnl -dnl "$Id: configure.in,v 1.33.2.29 2001/04/27 17:00:23 easysw Exp $" +dnl "$Id: configure.in,v 1.33.2.30 2001/04/30 17:17:01 easysw Exp $" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl @@ -179,11 +179,20 @@ GLLIB= if test x$enable_gl != xno; then AC_CHECK_HEADER(GL/gl.h, - AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \ - AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGLU -lMesaGL",,\ + AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \ + AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGL",,\ -lX11 -lXext $X_EXTRA_LIBS -lm), \ -lX11 -lXext $X_EXTRA_LIBS -lm) ) + AC_CHECK_HEADER(GL/glu.h, + AC_DEFINE(HAVE_GL_GLU_H) + if test $ac_cv_lib_GL_glXMakeCurrent = yes; then + GLLIB="-lGLU $GLLIB" + fi + if test $ac_cv_lib_MesaGL_glXMakeCurrent = yes; then + GLLIB="-lMesaGLU $GLLIB" + fi + ) fi AC_SUBST(GLLIB) @@ -372,5 +381,5 @@ AC_CONFIG_HEADER(config.h:configh.in) AC_OUTPUT(makeinclude) dnl -dnl End of "$Id: configure.in,v 1.33.2.29 2001/04/27 17:00:23 easysw Exp $". +dnl End of "$Id: configure.in,v 1.33.2.30 2001/04/30 17:17:01 easysw Exp $". dnl diff --git a/test/CubeView.h b/test/CubeView.h index 3678bd244..a022eb6a1 100644 --- a/test/CubeView.h +++ b/test/CubeView.h @@ -1,5 +1,5 @@ // -// "$Id: CubeView.h,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $" +// "$Id: CubeView.h,v 1.4.2.4 2001/04/30 17:17:01 easysw Exp $" // // CubeView class definitions for the Fast Light Tool Kit (FLTK). // @@ -30,7 +30,6 @@ #if HAVE_GL # include # include -# include #else # include #endif /* HAVE_GL */ @@ -119,5 +118,5 @@ private: #endif // -// End of "$Id: CubeView.h,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $". +// End of "$Id: CubeView.h,v 1.4.2.4 2001/04/30 17:17:01 easysw Exp $". // diff --git a/test/fractals.cxx b/test/fractals.cxx index d94d5be86..bbe87ea34 100644 --- a/test/fractals.cxx +++ b/test/fractals.cxx @@ -1,5 +1,5 @@ // -// "$Id: fractals.cxx,v 1.5.2.5 2001/03/14 17:35:47 spitzak Exp $" +// "$Id: fractals.cxx,v 1.5.2.6 2001/04/30 17:17:01 easysw Exp $" // // Fractal drawing demo for the Fast Light Tool Kit (FLTK). // @@ -28,11 +28,11 @@ // #include -#if !HAVE_GL +#if !HAVE_GL || !HAVE_GL_GLU_H #include #include int main(int, char**) { - fl_alert("This demo does not work without GL"); + fl_alert("This demo does not work without GL and GLU"); return 1; } #else @@ -806,5 +806,5 @@ int main(int argc, char** argv) #endif // -// End of "$Id: fractals.cxx,v 1.5.2.5 2001/03/14 17:35:47 spitzak Exp $". +// End of "$Id: fractals.cxx,v 1.5.2.6 2001/04/30 17:17:01 easysw Exp $". // diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx index cf8cf5c9c..5a6bc9dd7 100644 --- a/test/glpuzzle.cxx +++ b/test/glpuzzle.cxx @@ -1,5 +1,5 @@ // -// "$Id: glpuzzle.cxx,v 1.8.2.4 2001/03/14 17:35:47 spitzak Exp $" +// "$Id: glpuzzle.cxx,v 1.8.2.5 2001/04/30 17:17:01 easysw Exp $" // // OpenGL puzzle demo for the Fast Light Tool Kit (FLTK). // @@ -28,11 +28,11 @@ // this block added for fltk's distribtion so it will compile w/o OpenGL: #include -#if !HAVE_GL +#if !HAVE_GL || !HAVE_GL_GLU_H #include #include int main(int, char**) { - fl_alert("This demo does not work without GL"); + fl_alert("This demo does not work without GL and GLU"); return 1; } #else @@ -1480,5 +1480,5 @@ main(int argc, char **argv) #endif // added for fltk's distribution // -// End of "$Id: glpuzzle.cxx,v 1.8.2.4 2001/03/14 17:35:47 spitzak Exp $". +// End of "$Id: glpuzzle.cxx,v 1.8.2.5 2001/04/30 17:17:01 easysw Exp $". // diff --git a/visualc/config.h b/visualc/config.h index 938ffb832..d2f8a9438 100644 --- a/visualc/config.h +++ b/visualc/config.h @@ -1,5 +1,5 @@ /* - * "$Id: config.h,v 1.5.2.4 2001/01/22 15:13:41 easysw Exp $" + * "$Id: config.h,v 1.5.2.5 2001/04/30 17:17:01 easysw Exp $" * * Configuration file for the Fast Light Tool Kit (FLTK) for Visual C++. * @@ -44,6 +44,15 @@ #define HAVE_GL 1 +/* + * HAVE_GL_GLU_H: + * + * Do you have the OpenGL Utility Library header file? + * (many broken Mesa RPMs do not...) + */ + +#define HAVE_GL_GLU_H 1 + /* * USE_COLORMAP: * @@ -144,5 +153,5 @@ #define HAVE_POLL 0 /* - * End of "$Id: config.h,v 1.5.2.4 2001/01/22 15:13:41 easysw Exp $". + * End of "$Id: config.h,v 1.5.2.5 2001/04/30 17:17:01 easysw Exp $". */