Hi,

Again thank you Erik for updating
the configure.ac files... This continues
to work fine...

RE: README.OSG UPDATE

I have now beefed up the FG README.OSG
information per the attached patch.

I think I have tried to cover everything,
very carefully!

But someone in the 'know' should check that
OSG 2.7.8 is still the earliest acceptable 
OSG version! Maybe this has changed too!

Note, if acceptable, this amended file 
should also be added to SimGear.

Strangely, I tried to experiment with
the option advised by cmake, namely :-
 $ sudo make install_ld_conf
BUT 'make' advised no such target exists!
And make help does _NOT_ list it as a
target ;=(). cmake advises of the target
but then does not seem to generate it???

Digging deeper into the OSG source, there is
a generated file available for copy :-
<OSG>/packaging/ld.so.conf.d/openscenegraph.conf
which shows even if such a make target did existed,
and this was copied to /etc/ld.so.conf.d,
it would be INCORRECT, not only for my case,
where I use a strictly local-to-source install
directory, but in _ALL_ cases. It contains the
lines -

# openscenegraph library configuration
/usr/locallib64

which is _REAL_ screwy!!! Surely that should be
/usr/local/lib64
But I most certainly do NOT want to get into 
BUGS in the OSG cmake process... but will try,
if I find the time, to send something to their
'bug' list...

You will see my amended README.OSG has a note
to this effect, at least saying 'If' this target
exists... Can others find this 'target'?
Anyone tried it?

I did experiment a little with adding my own
/etc/ld.so.conf.d/openscenegraph.conf
file, containing the single line -
/home/geoff/fg/fg8/install/OSG282/lib
(I had used the '-D LIB_POSTFIX=' on this build)
and then tried using -
 $ sudo ldconfig -v
but it seems this ONLY helps at runtime!

That is, I could now run 'fgfs', and others,
without '$ export LD_LIBRARY_PATH=/path/to/lib'
and they would find the OSG shared libraries, and
 $ ldconfig -p | grep libosg
showed these shared libraries now in the cache,
but it did _NOT_ help with ./configure
AC_CHECK_LIB(osg,osgGetVersion, ,...)

I still had to add --with-osg=$prefix
for this, which perhaps makes sense... the
auto-conf tools do _NOT_ use the ld runtime
cache for their library search!

Anyway, I hope it is seen fit to add this 
README.OSG update soonest to FG and SG CVS.

RE: FG configure.ac

_ALSO_, this diff contains the changes to
FG configure.ac to allow for the correct
build of tests/gl-info.cxx. This has been
discussed before, and I think Jari has
tested to MAC host option as well.

Regards,

Geoff.

attached: fg200-diff03.patch

Index: README.OSG
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/README.OSG,v
retrieving revision 1.2
diff -u -r1.2 README.OSG
--- README.OSG	20 Dec 2008 09:12:31 -0000	1.2
+++ README.OSG	12 Feb 2010 14:54:18 -0000
@@ -3,8 +3,11 @@
 You *must* have OpenSceneGraph (OSG) installed to build this version of 
 FlightGear.
 
-Notice that FlightGear 1.9.0 requires at least version 2.7.8. Using earlier 
-versions of OSG will yield serious rendering bugs. 
+Notice that from FlightGear version 1.9.0, OSG version 2.7.8 or later
+*must* be used. Using earlier versions of OSG will yield serious 
+rendering bugs. If you are using an 'older' distribution, this may mean
+a suitable version of OSG may not be availble through the usual package
+repositories.
 
 You can get the latest version of OSG from:
 
@@ -25,3 +28,66 @@
 make 
 sudo make install
 
+Also later release versions of OpenSceneGraph can be obtained by
+svn, or you can use the OSG development svn 'trunk', but be warned,
+OSG is always in heavy development, and at certain moments
+in time, it may not compile completely, so, as usual, it is
+recommended that you stay with released versions.
+
+Installation notes:
+
+In some unix/linux distributions, particularly 64-bit
+systems, OSG may install its shared libraries in other than
+/usr/lib, /usr/local/lib or $prefix/lib!
+
+This does not seem to effect binary installation, which is
+to $prefix/bin, nor header installation, which remains
+$prefix/include. Just the shared libraries, and perhaps
+only for 64-bit systems, or higher as, and when available.
+
+The default is /usr/local/lib64 or $prefix/lib64 in
+64-bit systems. This may cause problems with the auto-conf 
+tools when configuring and compiling FlighGear, since
+even using the configure option --with-osg=$prefix 
+will not 'fix' the problem.
+
+The are various ways to deal with this, which mainly depend
+on whether you just want one version of OSG 'globally'
+installed, or desire to be able to build, and run, FlightGear
+against 'different' versions of OSG.
+
+There is a parameter, -D LIB_POSTFIX= or -D LIB_POSTFIX=""
+which can be passed to cmake OSG to force the OSG library
+installation into the 'standard' "$prefix/lib".
+
+OSG cmake advises of a post installation step -
+ $ sudo make install_ld_conf
+which, if available, will add an openscenegraph.conf file
+to the /etc/ld.so.conf.d folder, with the line -
+${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX}
+and run 'ldconfig' to add this to the 'cache'. But this
+option does not always seem available.
+
+Configuring SimGear and Flightgear notes:
+
+If you install OSG in other than the 'standard' directories,
+you must add --with-osg=$prefix when configuring
+SimGear and FlightGear. This will cause the auto-conf
+tools to look in $prefix/include for headers, and
+$prefix/lib for libraries, but _NOT_ in 'lib64'!
+
+If the OSG is installed to a unique $prefix directory, then
+it is also possible to make a 'link' entry lib -> lib64 to 
+get over this, but obviously this is not available if
+$prefix/lib already exists, and contains entries.
+
+Running fgfs, and others, with OSG shared libraries:
+
+You must also deal with the executable loader being
+able to find the OSG shared libraries when running fgfs, 
+and others, through perhaps using :-
+ $ export LD_LIBRARY_PATH=/path/to/osg/lib[64][:/other/paths]
+or more permanently using a '.conf' file in the
+/etc/ld.so.conf.d directory, and running
+ $ sudo ldconfig -v to update the 'cache'.
+
+EOF - 2010-02-12
Index: configure.ac
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/configure.ac,v
retrieving revision 1.167
diff -u -r1.167 configure.ac
--- configure.ac	9 Feb 2010 09:47:41 -0000	1.167
+++ configure.ac	12 Feb 2010 14:54:19 -0000
@@ -750,7 +750,7 @@
 LIBS=""
 CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes`"
 AC_CHECK_LIB(svn_client-1, svn_client_checkout3)
-AC_CHECK_HEADERS([svn_client.h glut.h])
+AC_CHECK_HEADERS(svn_client.h)
 if test "x$ac_cv_header_svn_client_h" != "xyes"; then
   echo "TerraSync will shell out for command line subversion"
   svn_LIBS=""
@@ -775,6 +775,16 @@
 
 dnl Checks for header files.
 AC_HEADER_STDC
+case "${host}" in
+*-apple-darwin*)
+AC_CHECK_HEADER([GLUT/glut.h],
+                [AC_DEFINE([HAVE_GLUT_H], 1,
+                [Defined to 1 if <GLUT/glut.h> found.])]) ;;
+*)
+AC_CHECK_HEADER([GL/glut.h],
+                [AC_DEFINE([HAVE_GLUT_H], 1,
+                [Defined to 1 if <GL/glut.h> found.])]) ;;
+esac
 AC_CHECK_HEADERS( \
 	fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \
 	sys/time.h sys/timeb.h unistd.h windows.h values.h )
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to