Revision: 42315
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42315&view=rev
Author:   brlcad
Date:     2011-01-16 07:22:48 +0000 (Sun, 16 Jan 2011)

Log Message:
-----------
really can't think of a better way to do this.  suggestions?  still need to 
verify, but different versions of Mac OS X use different debug symbols types 
and are not in sync with gdb (i.e., -ggdb3 doesn't work across library 
boundaries on 10.4).  cheat and call the sw_vers command to get the system 
version, used that to test for a debug debug flag type.

Modified Paths:
--------------
    brlcad/trunk/configure.ac

Modified: brlcad/trunk/configure.ac
===================================================================
--- brlcad/trunk/configure.ac   2011-01-16 06:02:03 UTC (rev 42314)
+++ brlcad/trunk/configure.ac   2011-01-16 07:22:48 UTC (rev 42315)
@@ -2047,7 +2047,25 @@
 
 dnl debug flags
 if test "x$bc_use_debug" != "xno" ; then
-       BC_COMPILER_AND_LINKER_RECOGNIZES([-ggdb3], [debug_flag])
+
+       dnl FIXME: fugly workaround as there is no known
+       dnl feature-specific way to detect -ggdb3 or -gstabs+ is
+       dnl preferred and libtool+Mac 10.4 will work with -ggdb3.
+
+       AC_CHECK_PROGS(SW_VERS, sw_vers)
+       if test "x$SW_VERS" != "x"; then
+               AC_MSG_CHECKING(Mac OS X version for debugging)
+               MACOSX_VERSION=`$SW_VERS | sed -n 
"s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
+               AC_MSG_RESULT([$MACOSX_VERSION])
+       fi
+       case "x$MACOSX_VERSION" in
+           x10.[1234])
+               BC_COMPILER_AND_LINKER_RECOGNIZES([-gstabs+], [debug_flag])
+               ;;
+           *)
+               BC_COMPILER_AND_LINKER_RECOGNIZES([-ggdb3], [debug_flag])
+               ;;
+       esac
        if test "x$bc_debug_flag_works" = "xno" ; then
                BC_COMPILER_AND_LINKER_RECOGNIZES([-g], [debug_flag])
        fi


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to