On 02/12/2010 10:00 AM, Geoff McLane wrote:

> 
> RE: README.OSG UPDATE
> 
> I have now beefed up the FG README.OSG
> information ....
> 
> I think I have tried to cover everything,
> very carefully!

Thank you for your constructive contributions to the
configuration system, both in terms of debugging the
code and debugging the documentation.  I know this is
both tricky and laborious.

As a rule, whenever I see a piece of code that requires
a long stretch of tricky documentation, I have to
suspect that it would be easier and better to upgrade
the code than to upgrade the documentation.

In this case it appears that adding about five lines
of code to acinclude.m4 will remove the need for at
least five paragraphs of documentation.  It turns 
out to be quite possible to each the configuration 
system to search lib64.

I think I've got it to the point where somebody
who wants to compile OSG from source can do so on
a 64-bit machine using the same simple procedures
that have always worked on 32-bit machines.  In
simple cases specifying --with-osg=/some/dir will
now suffice.

The attached patch applies on top of the big patch
I submitted about 12 hours ago.

The attached patch contains only a few lines of
"interesting" code.  The patch looks bigger than
that because I tried to normalize some of the
indentation and other trivial issues.



commit 237265e977cf775c5adbff813517381a2d4abe3c
Author: John Denker <j...@av8n.com>
Date:   Fri Feb 12 13:20:13 2010 -0700

    Fix it so that configuration works (mostly) as easily on
    64-bit machines as on 32-bit machines, even for users who
    have compiled OSG from source and need to specify --with-osg=/some/dir.
    
    Also minor cleanup of the source.
    Also minor improvements to the logging.

diff --git a/acinclude.m4 b/acinclude.m4
index 851e120..0d645d9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -23,6 +23,8 @@ if test -r $incdir ; then
         fi
         echo "   + added -I$incdir" 1>&AS_MESSAGE_LOG_FD
     fi
+else 
+    echo "   + IDIR is not accessible: '$myincdir'" 1>&AS_MESSAGE_LOG_FD
 fi
 ])
 dnl
@@ -49,6 +51,8 @@ if test -r $mylibdir ; then
         fi
         echo "   + added -L$mylibdir" 1>&AS_MESSAGE_LOG_FD
     fi
+else 
+    echo "   + LDIR is not accessible: '$mylibdir'" 1>&AS_MESSAGE_LOG_FD
 fi
 ])
 dnl
@@ -71,6 +75,8 @@ if test -r $progdir ; then
                        echo "   + appended $progdir to \$PATH" 
1>&AS_MESSAGE_LOG_FD
                        ;;
        esac
+else 
+       echo "   + PDIR is not accessible: '$progdir'" 1>&AS_MESSAGE_LOG_FD
 fi
 ])
 dnl
@@ -94,23 +100,32 @@ if test "$subexdirs" = "" ; then
        subexdirs="-"
 fi
 for subexdir in $subexdirs ; do
-if test "$subexdir" = "-" ; then
-       subexdir=""
-else
-       subexdir="/$subexdir"
-fi
-for exdir in $exdirs ; do
-       if test "$exdir" != "/usr" || test "$subexdir" != ""; then
-               incdir="${exdir}/include${subexdir}"
-               wi_EXTRA_IDIR($incdir)
+    if test "$subexdir" = "-" ; then
+            subexdir=""
+    else
+            subexdir="/$subexdir"
+    fi
+    for exdir in $exdirs ; do
+        if test "$exdir" != "/usr" || test "$subexdir" != ""; then
+            incdir="${exdir}/include${subexdir}"
+            wi_EXTRA_IDIR($incdir)
+
+dnl On 64-bit machines, if lib64/ exists and is not identical to lib/
+dnl then it should be listed here, listed ahead of lib/.
+            mylibdir64="${exdir}/lib64${subexdir}"
+            mylibdir="${exdir}/lib${subexdir}"
+
+            if test "x86_64" = $(uname -m) \
+              -a ! ${mylibdir64} -ef ${mylibdir} ; then
+                wi_EXTRA_LDIR($mylibdir64)
+            fi
 
-               mylibdir="${exdir}/lib${subexdir}"
-               wi_EXTRA_LDIR($mylibdir)
+            wi_EXTRA_LDIR($mylibdir)
 
-               progdir="${exdir}/bin${subexdir}"
-               wi_EXTRA_PDIR($progdir)
-       fi
-done
+            progdir="${exdir}/bin${subexdir}"
+            wi_EXTRA_PDIR($progdir)
+        fi
+    done
 done
 ])
 dnl

------------------------------------------------------------------------------
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