octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latest from hg on OSX


From: Thomas Treichl
Subject: Re: Latest from hg on OSX
Date: Wed, 11 Jun 2008 22:50:53 +0200
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

Thomas Treichl schrieb:
John W. Eaton schrieb:
On 10-Jun-2008, Thomas Treichl wrote:

| Finally, I also added "-I/usr/X11R6/include" to my C-,CPP-,CXXFLAGS before | configuring the Octave sources and "-Wl,-framework -Wl,OpenGL" to the LDFLAGS.

There is no need for the duplication.  You should only need to add -I
options to CPPFLAGS (the preprocessor is the only thing that should
need -I, and CPPFLAGS are included in the rules for building object
files that are defined in Octave's Makeconf file).

I just found out that (I must once again correct my last email for the third time now, sorry) we do need "-Wl,-framework -Wl,OpenGL" with LDFLAGS when configuring the Octave sources because when linking gl-render.cc and others together into liboctinterp.dylib it fails if not available. This framework is currently not found automatically on a Mac platform, so I expect we could need a test for that? If no volunteers then I'll try what I can do...

I have included a changeset which checks for Apple's OpenGL framework. But this is not the only change that is needed, I also needed to add $(OPENGL_LIBS) into src/Makefile.in line 277 OCTINTERP_LINK_DEPS. I am not sure if this is the right place, but liboctinterp.dylib can be created now. If yes, then I can send another changeset for this?

  Thomas
# HG changeset patch
# User Thomas Treichl <address@hidden>
# Date 1213212541 -7200
# Node ID 196460d34d22384a46952252bd3542fff8047256
# Parent  7609a985a052aa0eddd09b2f5193f85c4def08f1
Changes to the OCTAVE_OPENGL macro for MacOSX.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 2008-06-05  John W. Eaton  <address@hidden
+2008-06-11  Thomas Treichl  <address@hidden>
+
+       * aclocal.m4: Changes to the OCTAVE_OPENGL macro for MacOSX.
+
 2008-06-05  John W. Eaton  <address@hidden>
 
        * configure.in: Add FT2_CFLAGS to XTRA_CXXFLAGS, not CXXFLAGS.
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1056,8 +1056,6 @@ dnl
 dnl
 dnl Check for OpenGL. If found, define OPENGL_LIBS
 dnl
-dnl FIXME -- add tests for apple
-dnl
 AC_DEFUN([OCTAVE_OPENGL], [
 OPENGL_LIBS=
 case $canonical_host_type in
@@ -1093,6 +1091,16 @@ glEnable(GL_SMOOTH);], OPENGL_LIBS="-lop
       else
         AC_MSG_RESULT(no)
       fi
+      ;;
+    *-apple-darwin*)
+      vlib_flags="-Wl,-framework -Wl,OpenGL"
+      save_LIBS="$LIBS"; LIBS="$vlib_flags $LIBS"
+      AC_MSG_CHECKING([for glEnable in $vlib_flags])
+      AC_LINK_IFELSE([AC_LANG_CALL([], [glEnable])],
+                     [macosx_opengl_ok=yes; OPENGL_LIBS="$vlib_flags"],
+                     [macosx_opengl_ok=no; OPENGL_LIBS=""])
+      AC_MSG_RESULT($macosx_opengl_ok)
+      LIBS="$save_LIBS"
       ;;
     *)
       save_LDFLAGS="$LDFLAGS"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]