My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
diff --git a/Makefile.am b/Makefile.am
index dd53b1f..ef277b0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
SUBDIRS = autotools include doc liba52 libao src vc++ test

+ACLOCAL_AMFLAGS = -I m4
+
EXTRA_DIST = HISTORY bootstrap
diff --git a/configure.in b/configure.in
index 71fd92b..a230a7c 100644
--- a/configure.in
+++ b/configure.in
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT
AC_CONFIG_SRCDIR([src/a52dec.c])
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_FILES([Makefile autotools/Makefile include/Makefile test/Makefile
doc/Makefile src/Makefile liba52/Makefile libao/Makefile vc++/Makefile])
@@ -21,24 +22,34 @@ if test x"$GCC" = x"yes"; then

dnl -O3
changequote(<<,>>)
- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
+ if test ! "`echo "$CFLAGS" | $GREP "\-O[0-9s]"`" ; then
+ OPT_CFLAGS="-O3 $CFLAGS"
+ else
+ OPT_CFLAGS="$CFLAGS"
+ fi
changequote([,])
- OPT_CFLAGS="$OPT_CFLAGS -O3"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])

+ dnl -fno-tree-vectorize
+ if test "`echo "$CFLAGS" | $GREP "\-O3" | $GREP -v "\-fno-tree-vectorize"`" ; then
+ OPT_CFLAGS="$CFLAGS -fno-tree-vectorize"
+ AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
+ fi
+
dnl -fomit-frame-pointer
OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])

dnl arch-specific flags
+ if test ! "`echo "$CFLAGS" | $EGREP 'march|mcpu|mtune'`" ; then
case "$host" in
- i?86-* | k?-*)
+ i?86-* | k?-*)
case "$host" in
- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
+ i386-*) OPT_CFLAGS="-march=i386 $CFLAGS";;
+ i486-*) OPT_CFLAGS="-march=i486 $CFLAGS";;
+ i586-*) OPT_CFLAGS="-march=i586 $CFLAGS";;
+ i686-*) OPT_CFLAGS="-march=i686 $CFLAGS";;
+ k6-*) OPT_CFLAGS="-march=k6 $CFLAGS";;
esac
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
sparc-* | sparc64-*)
@@ -48,6 +59,7 @@ if test x"$GCC" = x"yes"; then
OPT_CFLAGS="$CFLAGS -mabi=64"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
esac
+ fi
elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
dnl TenDRA portability checking compiler
TENDRA=yes

Change log

2b109f321c85 by Oka Motofumi <chikuzen.mo> on Aug 29, 2011   Diff
a52dec:Avoid unexpected optimize
Go to: 
Project members, sign in to write a code review

Older revisions

223a7501c77e by golgol7777 <golgol7777> on Sep 15, 2010   Diff
Patch autotools stuffs in liba52
source and remove more files before
autoreconf.
All revisions of this file

File info

Size: 2481 bytes, 73 lines
Powered by Google Project Hosting