]> git.videolan.org Git - x264.git/commitdiff
configure: --enable-debug reduces optimization to -O1
authorLoren Merritt <pengvado@videolan.org>
Wed, 16 Aug 2006 20:13:06 +0000 (20:13 +0000)
committerLoren Merritt <pengvado@videolan.org>
Wed, 16 Aug 2006 20:13:06 +0000 (20:13 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@553 df754926-b1dd-0310-bc7b-ec298dee348c

configure

index afe3eab58bcdc55828b205802a56e004102c03b1..130a1c996523bb2ad2d4db28d1ce1fda85aa1604 100755 (executable)
--- a/configure
+++ b/configure
@@ -57,7 +57,7 @@ vis="no"
 shared="no"
 
 CC="${CC-gcc}"
-CFLAGS="-Wall -I. -O4 -ffast-math -D__X264__"
+CFLAGS="-Wall -I. -D__X264__"
 LDFLAGS=""
 HAVE_GETOPT_LONG=1
 
@@ -240,7 +240,6 @@ for opt do
             pthread="no"
             ;;
         --enable-debug)
-            CFLAGS="$CFLAGS -g"
             debug="yes"
             ;;
         --enable-gprof)
@@ -339,6 +338,12 @@ if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
     VFW_LDFLAGS="$VFW_LDFLAGS -s"
 fi
 
+if [ "$debug" == "yes" ]; then
+    CFLAGS="-O1 -g $CFLAGS"
+else
+    CFLAGS="-O4 -ffast-math $CFLAGS"
+fi
+
 if cc_check "stdio.h" "" "fseeko(stdin,0,0);" ; then
     echo "#define fseek fseeko" >> config.h
     echo "#define ftell ftello" >> config.h