First let me say these are the instructions for how I built Openal and alut for
use with SimGear and then with FlightGear. I will also say I am not a Windows
or even a C++ programmer so where this worked for me and I hope it works for
you - it might not or you might have to do your own tweaks. But this might get
you started and ultimately we will end up with a good source. Also I did
receive a response from the OpenAL org on July 5th stating they must have
overlooked my emails regarding the patches and if I would post them via email
and a small explanation they would try to review and incorporate so maybe this
will become part of the OpenAL svn.
If I need to change anything on this or if this document needs more detail
please advise and I will see what I can do about enhancing what I wrote.
1) Check out openal using:
$ svn co http://opensource.creative.com/repos/openal/trunk openal
This will get you the latest source tree (the "trunk"). I performed
this command from the /usr/src directory to I ended up with the whole tree
in /usr/src/openal. You'll see several subdirectories in the openal
directory. The ones you're interested in are OpenAL-Sample and alut.
2) Go into the Openal subdirectory and apply the patch for openal if
needed (until it comes part of the source):
$ cd /usr/src/openal
$ patch -p0 < /tmp/OpenALChanges.patch
3) While in the OpenAL-Sample subdirectory. This contains the code for what
was previously called "portable". Now, you can run "./autogen.sh" and
"./configure" (don't worry about the error messages from the ./autogen.sh).
Personally I do the ./autogen.sh in the source directory and then I create a
build directory where I run the ./configure and do the make and make
install. In my case:
$ cd /usr/src/openal/OpenAL-Sample
$ ./autogen.sh
4) After the ./autogen.sh in the source directory then change to the build
directory and perform the ./configure. Of course if you are building in
the same directory with the source then skip the mkdir commands and simply
do the ./configure --prefix=/usr/local. The commands I used were:
$ mkdir /usr/build
$ mkdir /usr/build/openal
$ cd /usr/build/openal
$ /usr/src/openal/OpenAL-Sample/configure --prefix=/usr/local
The default for configure is /usr/local which will cause the lib, include,
and bin subdirectories for OpenAL to end up in /usr/local. This will cause
a couple tweaks when you get to compiling alut because you will have to
specify the /usr/local includes and libs using LDFLAGS and CC and CXX. That
said you could use --prefix=/usr and circumvent this problems. The OpenAL
group had said they might think of expanding the search logic for lib and
include files.
5) If this works, you should be able to do make and then make install.
$ make
$ make install
6) Now, go into the alut source subdirectory and repeat the ./autogen.sh,
./configure, make, make install process to compile alut. In my case:
$ cd /usr/src/openal/alut
$ ./autogen.sh
$ mkdir /usr/build/alut
$ cd /usr/build/alut
$ LDFLAGS="-O2 -g -L/usr/local/lib/ -L/usr/lib/ -L/lib/"
/usr/src/openal/alut/configure CC="gcc -I/usr/local/include/"
CXX="g++ -I/usr/local/include/" --prefix=/usr/local
$ make
$ make install
7) If all that works, you should be good to go. To test there is an alut
test_suite you can compile and try but I used the ./examples/hello_world.exe
and ./examples/playfile.exe programs under the alut directory to test.
8) Create the ./openalrc file in your home directory. An example can be found
in the openal-sample/doc directory - file name sample.openalrc (IE in my
case - /usr/src/openal/openal-sample/doc/sample.openalrc)
9) Now that you have OpenAL and Alut compiled and installed and hopefully you
have followed the main Flightgear Cygwin instructions and already have pLib
compiled and installed you are now ready to compile SimGear.
http://www.flightgear.org/Docs/Tutorials/fg_cygwin/fgfs_cygwin.htm
10) When I attempted to compile SimGear it still could not find the Library as
it was looking for openal32 (libopenal32) and the library was named
libopenal. The configure for SimGear searches for libopenal32
but openal actually names the library libopenal so you now must apply a
patch for SimGear as well to allow it to look for the OpenAL lib as either
libopenal32 or libopenal - this patch will modify the configure.ac file in
SimGear and you should be sure you have done a make clean in your
SimGear build directory and then you must rerun ./autogen.sh for Simgear.
For me:
$ cd /usr/build/SimGear-0.3
$ make clean
$ cd /usr/src/SimGear-0.3/source
$ patch -p0 < /tmp/SimGearChanges.patch
$ ./autogen.sh
$ cd /usr/build/SimGear-0.3
$ /usr/src/SimGear-0.3/source/configure --prefix=/usr/FlightGear
$ make
$ make install
11) Once this completes you are now ready to recompile FlightGear. As
FlightGear like SimGear looks for libopenal32 you need to apply a patch
here as well. Again make sure your build directory is starting fresh,
apply the patch, rerun ./autogen.sh, then rerun configure and do you make
and make installs. For me:
$ cd /usr/build/FlightGear-0.9
$ make clean
$ cd /usr/src/FlightGear-0.9/source
$ patch -p0 < /tmp/FlightGearChanges.patch
$ ./autogen.sh
$ cd /usr/build/FlightGear-0.9
$ /usr/src/FlightGear-0.9/source/configure --prefix=/usr/FlightGear
$ make
$ make install
And that's all there is too it - I think - I hope - Good luck. The famous last
words: works for me :-).
bk
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users