Author: rolf
Date: 2008-02-19 09:30:52 -0500 (Tue, 19 Feb 2008)
New Revision: 96149

Modified:
   trunk/moon/ChangeLog
   trunk/moon/configure.ac
Log:
* configure.ac: Fix --with-debug to not be confused with --with-ffmpeg.
  If --with-debug is defined, disable inlining and -O2 optimizations.

Modified: trunk/moon/ChangeLog
===================================================================
--- trunk/moon/ChangeLog        2008-02-19 14:23:41 UTC (rev 96148)
+++ trunk/moon/ChangeLog        2008-02-19 14:30:52 UTC (rev 96149)
@@ -1,3 +1,8 @@
+2008-02-19  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * configure.ac: Fix --with-debug to not be confused with --with-ffmpeg. 
If
+         --with-debug is defined, disable inlining and -O2 optimizations.
+
 2008-02-06  Michael Dominic K.  <[EMAIL PROTECTED]> 
 
        * configure.ac: Configure embedded cairo with '--diable-png' since now

Modified: trunk/moon/configure.ac
===================================================================
--- trunk/moon/configure.ac     2008-02-19 14:23:41 UTC (rev 96148)
+++ trunk/moon/configure.ac     2008-02-19 14:30:52 UTC (rev 96149)
@@ -68,10 +68,10 @@
 
 DEBUG=yes
 AC_ARG_WITH(debug, [ --with-debug=yes,no.   If you want to enable debug 
support (default=yes)],[
-       if test x$with_ffmpeg = xyes; then
+       if test x$with_debug = xyes; then
                DEBUG=yes
        fi
-       if test x$with_ffmpeg = xno; then
+       if test x$with_debug = xno; then
                DEBUG=no
        fi
 ])
@@ -364,12 +364,20 @@
 MOON_PROG_LIBS=`pkg-config --libs $MOON_PKGS $MONO_PKGS $FFMPEG_PKGS`
 AC_SUBST(MOON_PROG_LIBS)
 
+if test x$DEBUG = xyes; then
+       DEBUG_OPTIONS="-fno-inline -O1 -g -fno-inline-functions"
+       CFLAGS=`echo $CFLAGS | sed 's/-O2//'`
+       CFLAGS+=$DEBUG_OPTIONS
+       CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//'`
+       CXXFLAGS+=$DEBUG_OPTIONS
+fi
+
 #CFLAGS="$CFLAGS `pkg-config --cflags gtk+-2.0 libavcodec libavformat 
gthread-2.0 libswscale alsa $mozilla_nspr $mozilla_nss`"
 #CXXFLAGS="$CXXFLAGS `pkg-config --libs gtk+-2.0 libavcodec libavformat 
gthread-2.0 libswscale alsa $mozilla_nspr $mozilla_nss`"
 #LIBS="$LIBS `pkg-config --libs gtk+-2.0 libavcodec libavformat gthread-2.0 
libswscale alsa $mozilla_nspr $mozilla_nss`"
 
-#AC_SUBST(CFLAGS)
-#AC_SUBST(CXXFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
 #AC_SUBST(LIBS)
 
 AC_OUTPUT([

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to