|
From: Oliver S. <oli...@gm...> - 2001-11-04 20:16:12
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I had to add some small patches to OpenVRML 0.11.2 to make it compile and
link on Mac OSX 10.1. Here are the diffs
Add to configure.in:
dnl
dnl Some additional Darwin stuff
dnl
AM_CONDITIONAL(DARWIN, test "$host" = "powerpc-apple-darwin1.4")
if test "DARWIN"; then
LDFLAGS="${LDFLAGS} -lobjc -framework OpenGL -framework Foundation"
CFLAGS="${CFLAGS} -lobjc -framework OpenGL -framework Foundation"
CXXFLAGS="${CXXFLAGS} -lobjc -framework OpenGL -framework Foundation"
fi
Diff for macros/gl.m4
127,136c127,129
< if test "$target" = "powerpc-apple-macosx"; then
< GL_CFLAGS=""
< GL_LIBS="-framework OpenGL -framework OpenGL -framework Foundation
- -lm"
< dnl we assume glut always works on mac osx. does it?
< have_gl=yes
< else
< GL_CFLAGS=""
< GL_LIBS=""
< ifelse([$2], , :, [$2])
< fi
- ---
> GL_CFLAGS=""
> GL_LIBS=""
> ifelse([$2], , :, [$2])
diff for macros/glut.m4:
61a62
>
69,76c70,71
< if test "$host" = "powerpc-apple-darwin1.4"; then
< GLUT_CFLAGS="${GL_CFLAGS}"
< GLUT_LIBS="${GL_LIBS} -framework GLUT"
< glut__temp__include=GL/glut.h
< else
< GLUT_LIBS=""
< ifelse([$2], , :, [$2])
< fi
- ---
> GLUT_LIBS=""
> ifelse([$2], , :, [$2])
78c73
<
- ---
>
In macros/jpeg.m4:
65,66c65
< # we are looking for libjpeg, so png is definitely wrong here
< CPPFLAGS="${CPPFLAGS} ${jpeg__Idir}"
- ---
> CPPFLAGS="${CPPFLAGS} ${png__Idir}"
That should do the job.
Regards, Oliver
- --
_____________________________________________________________________
Oliver Strutynski oli...@cs...
oli...@gm...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE75aRguUAlUEFqtKYRAjJrAJ9HHVvv0iVW2RveSfBtaPj2YE4dcwCgkq7O
a92s8obNImEEAepP8GbY8tc=
=CjJ/
-----END PGP SIGNATURE-----
|
|
From: Braden M. <br...@en...> - 2001-11-04 21:34:11
|
On Sun, 2001-11-04 at 15:26, Oliver Strutynski wrote:
> I had to add some small patches to OpenVRML 0.11.2 to make it compile and
> link on Mac OSX 10.1. Here are the diffs
I'm definitely interested in patches to get the GNU build working on Mac
OS X, but the source files for configure have changed substantially in
the main branch in CVS. Your patches are not applicable to the current
version.
> Add to configure.in:
>
> dnl
> dnl Some additional Darwin stuff
> dnl
> AM_CONDITIONAL(DARWIN, test "$host" = "powerpc-apple-darwin1.4")
> if test "DARWIN"; then
> LDFLAGS="${LDFLAGS} -lobjc -framework OpenGL -framework Foundation"
> CFLAGS="${CFLAGS} -lobjc -framework OpenGL -framework Foundation"
> CXXFLAGS="${CXXFLAGS} -lobjc -framework OpenGL -framework Foundation"
> fi
LDFLAGS, CFLAGS, ands CXXFLAGS are user variables which should not be
set in configure. Also, I don't see anything in your patches that
modifies the automake makefiles, so I'm not sure why you're using an
automake conditional here.
--
Braden McDaniel e-mail: <br...@en...>
<http://endoframe.com> Jabber: <br...@ja...>
|
|
From: Oliver S. <oli...@gm...> - 2001-11-04 21:41:50
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 04 November 2001 22:34, Braden McDaniel wrote:
> On Sun, 2001-11-04 at 15:26, Oliver Strutynski wrote:
> > I had to add some small patches to OpenVRML 0.11.2 to make it compile and
> > link on Mac OSX 10.1. Here are the diffs
>
> I'm definitely interested in patches to get the GNU build working on Mac
> OS X, but the source files for configure have changed substantially in
> the main branch in CVS. Your patches are not applicable to the current
> version.
ok
...
> LDFLAGS, CFLAGS, ands CXXFLAGS are user variables which should not be
> set in configure.
I'm not an automake expert. Problem was that I needed to add some flags to
all compiler runs so I decided to add these flags in configure in. Might not
be a good idea, but I don't know how to do it any better.
> Also, I don't see anything in your patches that
> modifies the automake makefiles, so I'm not sure why you're using an
> automake conditional here.
I did not (need to) touch the .am files. That was just the first way I was
able to get a conditional to work.
Anyway, I think it should be mostly clear from the patch what needs to be
added for OpenVRML to compile on MacOSX (the additional frameworks + modified
checks for glut/opengl). I hope this information proves useful for you.
Regards, Oliver
- --
_____________________________________________________________________
Oliver Strutynski oli...@cs...
oli...@gm...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE75bhzuUAlUEFqtKYRAjXIAKCd8oEko4eqih681AZyEBSLJ1rBUACdFbpe
cuRZBogQa7szUl6nBvBr1i8=
=EvLu
-----END PGP SIGNATURE-----
|
|
From: Braden M. <br...@en...> - 2001-11-05 01:49:07
|
On Sun, 2001-11-04 at 16:51, Oliver Strutynski wrote: > Anyway, I think it should be mostly clear from the patch what needs to be > added for OpenVRML to compile on MacOSX (the additional frameworks + modified > checks for glut/opengl). I hope this information proves useful for you. I can try adapting your changes, but I'd like to know a little bit more about them first... What prompts the dependency on the Objective C library? What exactly does the -framework compiler flag do? -- Braden McDaniel e-mail: <br...@en...> <http://endoframe.com> Jabber: <br...@ja...> |
|
From: Michael L. <Mic...@hr...> - 2001-11-05 08:39:22
|
On Monday, November 5, 2001, at 02:47 , Braden McDaniel wrote: > On Sun, 2001-11-04 at 16:51, Oliver Strutynski wrote: >> Anyway, I think it should be mostly clear from the patch what needs to be >> added for OpenVRML to compile on MacOSX (the additional frameworks + >> modified >> checks for glut/opengl). I hope this information proves useful for you. > > I can try adapting your changes, but I'd like to know a little bit more > about them first... > > What prompts the dependency on the Objective C library? I'm not sure whether "Foundation" or objc are needed. I didn't need them to compile OpenVRML and Lookat under Mac OS X 10.0.4. I believe, that the compiler (a modified? gcc 2.95.2) includes the System framework transparently, which should handle any other "wierd" dependencies Mac OS X may have. I haven't tried with Mac OS X 10.1, though. I guess this is something we need to test. OpenGL and GLUT are needed however. In fact, to link Lookat, only GLUT is needed, since declaring that you want to use GLUT "automatically" gives you OpenGL, since GLUT depends on OpenGL. For example (under 10.0.4), this links Lookat to the static libraries from the command-line: c++ -Wall -g -O2 -o lookat -framework GLUT lookat.o ViewerGlut.o ../lib/libopenvrml-gl.a libopenvrml.a ../../jpeg-6b/libjpeg.a ../../libpng-1.0.5/libpng.a -lz (of course, if I'd "installed" OpenVRML, JPEG, and PNG, then I could have just used -L/usr/local/lib and -llibopenvrml-gl, etc.). If it makes modifying the build system easier, OpenGL and GLUT are standard installs under Mac OS X, so you could skip testing them under Mac OS X, and just replace -lglut with -framework GLUT and -lgl with -framework GL when compiling under Mac OS X. > What exactly does the -framework compiler flag do? Frameworks are bundles of header files and libraries (and documentation). -framework is a bit like -l and -L rolled into one where the developer just needs to supply the name of the API/Framework. This means that -lgl and -lglut need to be replaced with -framwork GL and -framework GLUT on Mac OS X. Also, for some reason, Oliver has the OpenGL framework declared twice in the same line in his "Diff for macros/gl.m4". I guess an interesting long-term goal for OpenVRML on Mac OS X, would be to package the Mac OS X distribution as a Framework. Mike. |
|
From: Oliver S. <oli...@gm...> - 2001-11-05 09:02:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 05 November 2001 09:40, Michael Louka wrote: > On Monday, November 5, 2001, at 02:47 , Braden McDaniel wrote: > > What prompts the dependency on the Objective C library? > > I'm not sure whether "Foundation" or objc are needed. I didn't need them > to compile OpenVRML and Lookat under Mac OS X 10.0.4. I believe, that the > compiler (a modified? gcc 2.95.2) includes the System framework > transparently, which should handle any other "wierd" dependencies Mac OS X > may have. I haven't tried with Mac OS X 10.1, though. They were not needed with OS X 10.0.4, but are needed with the latest release 10.1. (There are various postings on the Mac OpenGL list describing this problem => lists.apple.com) > Frameworks are bundles of header files and libraries (and documentation). > -framework is a bit like -l and -L rolled into one where the developer > just needs to supply the name of the API/Framework. This means that -lgl > and -lglut need to be replaced with -framwork GL and -framework GLUT on > Mac OS X. > Also, for some reason, Oliver has the OpenGL framework declared twice in > the same line in his "Diff for macros/gl.m4". No reason for that. It's a mistake. - -- _____________________________________________________________________ Oliver Strutynski oli...@cs... oli...@gm... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE75lf2uUAlUEFqtKYRAqU7AJ9mttWBrL9N//eQ1RxWAX8FkjrDiACeIDLY LMyhOjjCg/SMGJA507iP/yU= =uXuW -----END PGP SIGNATURE----- |