mccdo
Joined: 02 Sep 2005 Posts: 204 Location: Ames, IA
|
Posted: Sat Dec 22, 2007 5:19 pm Post subject: VE-Suite Dependencies on Darwin |
|
|
To compile osgAL on Darwin/Mac OS 10.x requires a little bit of work.
1. Install ogg and vorbis via MacPorts (www.macports.org)
| Code: | | sudo port install ogg vorbis |
2. Download and install freealut 1.1 (www.openal.org/downloads.html) since it is not included with the OpenAL framework included with Mac OS 10.5.
| Code: | mkdir build-mac
cd build-mac
../configure --prefix=<where to install freealut> LDFLAGS="-framework OpenAL"
make
make install |
You will then need to edit the resulting freealut.pc file to not have it depend upon OpenAL. Also, the build will fail but it fails on the examples so does not cause a problem when using the freealut library.
3. Download and install osgAL (www.vrlab.umu.se/research/osgAL/). Currently the svn version of the library is needed to enable osgAL to work across dynamically loaded plugins on the Windows platform. Also, the autogen.sh script does not work correctly so the following commands are needed to make the build system.
| Code: | aclocal -I /opt/local/share/aclocal
glibtoolize --force
automake --foreign --add-missing
autoconf
mkdir build-mac
cd build-mac
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:<install location of osg>/lib/pkgconfig
../configure OPENAL_CFLAGS="-F/System/Library/Frameworks/OpenAL -D__APPLE__=1" OPENAL_LIBS="-framework OpenAL" FREEALUT_CFLAGS="-I<location of freealut>/include" FREEALUT_LIBS="-L/<location of freealut>/lib -lalut" CXXFLAGS="-I/opt/local/include -I<location of freealut>/include -I<location of osg>/include" LDFLAGS="-framework OpenAL" --prefix=<location to install osgAL>
make
make install |
To enable the osgAL build to work you must copy | Code: | | cp -R <osg>/packaging/pkgconfig directory <osg>/lib/. |
the OSG pc files into the OSG install directory.
One last change to build osgAL. You must change the include directives to something like:
| Code: | #ifdef _WIN32
#include <al.h>
#include <alut.h>
#include <alc.h>
#else
# ifdef __APPLE__ // _WIN32
# include <OpenAL/al.h>
# include <AL/alut.h>
# include <OpenAL/alc.h>
# else
# include <AL/al.h>
# include <AL/alut.h>
# include <AL/alc.h>
# endif
#endif // _WIN32 |
In Event change this:
| Code: | #ifndef _WIN32
# ifdef __APPLE__
# include <limits.h>
# define INFINITE 0xFFFFFFFF
# else
# include <values.h>
# ifndef INFINITE
# define INFINITE MAXINT
# endif // INFINITE
# endif |
in these files:
| Code: | M include/openalpp/StreamUpdater
M include/openalpp/Event
M include/openalpp/AudioBase
M include/openalpp/AudioConvert |
|
|