Mercurial > hg > octave-lojdl
changeset 7954:3ffc34caec65
configure fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 21 Jul 2008 11:47:30 -0400 |
parents | efabe34cce70 |
children | 645ced9fa838 |
files | ChangeLog aclocal.m4 configure.in src/ChangeLog src/DLD-FUNCTIONS/fltk_backend.cc src/Makefile.in src/gl-render.cc |
diffstat | 7 files changed, 56 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-07-21 John W. Eaton <jwe@octave.org> + + * aclocal.m4 (OCTAVE_OPENGL): Fix shell syntax problems. + Handle HAVE_GL_GL_H and HAVE_OPENGL_GL_H in link test. + + * configure.in: Don't define and substitute FLTK_BACKEND_SRC or + GL_RENDER_SRC. + (HAVE_FLTK): AC_DEFINE if FLTK is available. + (HAVE_OPENGL): AC_DEFINE if OpenGL is available. + 2008-07-21 Jaroslav Hajek <highegg@gmail.com> * configure.in: Extend FTGL test to test for both ftgl.h and FTGL.h.
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -1066,15 +1066,19 @@ ;; esac have_opengl_incs=no -AC_CHECK_HEADERS(GL/gl.h OpenGL/gl.h, [ - AC_CHECK_HEADERS(GL/glu.h OpenGL/glu.h, [ - have_opengl_incs=yes, break], [], [ +AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [ + AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [ + have_opengl_incs=yes; break], [], [ #ifdef HAVE_WINDOWS_H -# include <windows.h> -#endif ]), break], [], [ +#include <windows.h> +#endif +]) +break +], [], [ #ifdef HAVE_WINDOWS_H -# include <windows.h> -#endif]) +#include <windows.h> +#endif +]) if test "$have_opengl_incs" = "yes"; then case $canonical_host_type in *-*-msdosmsvc) @@ -1083,9 +1087,14 @@ AC_MSG_CHECKING([for glEnable in -lopengl32]) AC_TRY_LINK([ #if HAVE_WINDOWS_H -# include <windows.h> +#include <windows.h> #endif -#include <GL/gl.h>], [ +#if defined (HAVE_GL_GL_H) +#include <GL/gl.h> +#elif defined (HAVE_OPENGL_GL_H) +#include <OpenGL/gl.h> +#endif +], [ glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32") LIBS="$save_LIBS" if test "x$OPENGL_LIBS" != "x"; then
--- a/configure.in +++ b/configure.in @@ -652,12 +652,11 @@ warn_freetype="" warn_ftgl="" -GL_RENDER_SRC= GRAPHICS_OPENGL= OCTAVE_OPENGL if test -n "$OPENGL_LIBS"; then GRAPHICS_OPENGL="opengl" - GL_RENDER_SRC="gl-render.cc" + AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is available]) ## ftgl (needs freetype 2) AC_CHECK_FT2([9.0.3],[], @@ -710,7 +709,6 @@ GRAPHICS_LIBS= GRAPHICS_CFLAGS= -FLTK_BACKEND_SRC= ## fltk (www.fltk.org) AC_ARG_WITH(fltk-prefix, @@ -757,10 +755,10 @@ if test -z "$warn_fltk_opengl"; then AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) GRAPHICS_CFLAGS="$FLTK_CFLAGS" GRAPHICS_LIBS="$FLTK_LDFLAGS" GRAPHICS_OPENGL="$GRAPHICS_OPENGL fltk_backend" - FLTK_BACKEND_SRC="fltk_backend.cc" else AC_MSG_RESULT(no) fi @@ -769,8 +767,6 @@ AC_SUBST(GRAPHICS_CFLAGS) AC_SUBST(GRAPHICS_LIBS) AC_SUBST(GRAPHICS_OPENGL) -AC_SUBST(GL_RENDER_SRC) -AC_SUBST(FLTK_BACKEND_SRC) OCTAVE_IEEE754_DATA_FORMAT
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2008-07-21 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/fltk_backend.cc: Don't include oct.h. + Make compilation of entire file conditional on HAVE_FLTK. + + * gl-render.cc: Make compilation of entire file conditional on + HAVE_OPENGL. + + * Makefile.in (GL_RENDER_SRC, FLTK_BACKEND_SRC): Delete variables. + (DLD_XSRC): Always include fltk_backend.cc in the list. + (DIST_SRC): Always include gl-render.cc in the list. + 2008-07-19 John W. Eaton <jwe@octave.org> * version.h (OCTAVE_VERSION): Now 3.1.50+.
--- a/src/DLD-FUNCTIONS/fltk_backend.cc +++ b/src/DLD-FUNCTIONS/fltk_backend.cc @@ -35,13 +35,13 @@ #include <config.h> #endif +#if defined (HAVE_FLTK) + #include <map> #include <set> #include <sstream> #include <iostream> -#include "gl-render.h" - #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Output.H> @@ -51,9 +51,11 @@ #include <FL/fl_draw.H> #include <FL/gl.h> -#include "oct.h" +#include "defun-dld.h" +#include "error.h" +#include "gl-render.h" +#include "graphics.h" #include "parse.h" -#include "graphics.h" #define FLTK_BACKEND_NAME "fltk" @@ -804,6 +806,8 @@ return retval; } +#endif + /* ;;; Local Variables: *** ;;; mode: C++ ***
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -34,9 +34,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -GL_RENDER_SRC = @GL_RENDER_SRC@ -FLTK_BACKEND_SRC = @FLTK_BACKEND_SRC@ - PT_FLAGS = -fexternal-templates -fno-implicit-templates CXXFLAGS_NO_PT_FLAGS = $(filter-out $(PT_FLAGS), $(ALL_CXXFLAGS)) @@ -69,7 +66,7 @@ chol.cc ccolamd.cc colamd.cc colloc.cc conv2.cc convhulln.cc daspk.cc \ dasrt.cc dassl.cc det.cc dispatch.cc dlmread.cc dmperm.cc eig.cc \ expm.cc fft.cc fft2.cc fftn.cc fftw.cc filter.cc find.cc \ - $(FLTK_BACKEND_SRC) fsolve.cc \ + fltk_backend.cc fsolve.cc \ gammainc.cc gcd.cc getgrent.cc getpwent.cc getrusage.cc \ givens.cc hess.cc hex2num.cc inv.cc kron.cc lookup.cc lsode.cc \ lu.cc luinc.cc matrix_type.cc max.cc md5sum.cc pinv.cc qr.cc \ @@ -200,7 +197,7 @@ DIST_SRC := Cell.cc bitfcns.cc c-file-ptr-stream.cc comment-list.cc \ cutils.c data.cc debug.cc defaults.cc defun.cc dirfns.cc \ - dynamic-ld.cc error.cc file-io.cc $(GL_RENDER_SRC) graphics.cc \ + dynamic-ld.cc error.cc file-io.cc gl-render.cc graphics.cc \ gripes.cc help.cc input.cc lex.l load-path.cc load-save.cc \ ls-hdf5.cc ls-mat-ascii.cc ls-mat4.cc ls-mat5.cc ls-oct-ascii.cc \ ls-oct-binary.cc ls-utils.cc main.c mappers.cc matherr.c \