Browse code

handle --enable-small same way as other CONFIG_* options (almost)

Originally committed as revision 9509 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2007/07/07 03:41:59
Showing 1 changed files
... ...
@@ -602,6 +602,7 @@ CONFIG_LIST='
602 602
     powerpc_perf
603 603
     pp
604 604
     protocols
605
+    small
605 606
     swscaler
606 607
     vhook
607 608
     v4l
... ...
@@ -947,8 +948,6 @@ for opt do
947 947
   ;;
948 948
   --disable-opts) optimize="no"
949 949
   ;;
950
-  --enable-small) optimize="small"
951
-  ;;
952 950
   --enable-sunmlib) mlib="yes"
953 951
   ;;
954 952
   --disable-strip) dostrip="no"
... ...
@@ -1731,10 +1730,10 @@ enabled extra_warnings && check_cflags -Winline
1731 1731
 check_ldflags -Wl,--warn-common
1732 1732
 check_ldflags $LDLATEFLAGS
1733 1733
 
1734
-# not all compilers support -Os
1735
-test "$optimize" = "small" && check_cflags -Os
1736
-
1737
-if enabled optimize; then
1734
+if enabled small; then
1735
+    check_cflags -Os            # not all compilers support -Os
1736
+    optimize="small"
1737
+elif enabled optimize; then
1738 1738
     if test -n "`$cc -v 2>&1 | grep xlc`"; then
1739 1739
         add_cflags  "-O5"
1740 1740
         add_ldflags "-O5"
... ...
@@ -1964,9 +1963,8 @@ fi
1964 1964
 
1965 1965
 echo "#define restrict $_restrict" >> $TMPH
1966 1966
 
1967
-if test "$optimize" = "small"; then
1967
+if enabled small; then
1968 1968
   echo "#define always_inline"  >> $TMPH
1969
-  echo "#define CONFIG_SMALL 1" >> $TMPH
1970 1969
 fi
1971 1970
 
1972 1971
 echo "SRC_PATH=\"$source_path\"" >> config.mak