root/trunk/liba52/configure.in

Revision 1, 3.4 kB (checked in by gbooker, 3 years ago)

Initial Import

Line 
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.52)
3 AC_INIT
4 AC_CONFIG_SRCDIR([src/a52dec.c])
5 AC_CONFIG_AUX_DIR(autotools)
6 AC_CONFIG_FILES([Makefile autotools/Makefile include/Makefile test/Makefile
7     doc/Makefile src/Makefile liba52/Makefile libao/Makefile vc++/Makefile])
8 AM_INIT_AUTOMAKE([a52dec],[0.7.4])
9 AM_CONFIG_HEADER(include/config.h)
10 AM_MAINTAINER_MODE
11 AC_CANONICAL_HOST
12
13 dnl Checks for compiler
14 AC_PROG_CC
15 AC_PROG_GCC_TRADITIONAL
16
17 if test x"$GCC" = x"yes"; then
18
19     dnl GCC-specific flags - try to optimize them sometime
20     dnl -Wall -Werror moved to the end to not disturb the configure script
21
22     dnl -O3
23     changequote(<<,>>)
24     OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
25     changequote([,])
26     OPT_CFLAGS="$OPT_CFLAGS -O3"
27     AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
28
29     dnl -fomit-frame-pointer
30     OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
31     AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
32
33     dnl arch-specific flags
34     case "$host" in
35     i?86-* | k?-*)
36         case "$host" in
37         i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
38         i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
39         i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
40         i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
41         k6-*)   OPT_CFLAGS="$CFLAGS -mcpu=k6";;
42         esac
43         AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
44     sparc-* | sparc64-*)
45         OPT_CFLAGS="$CFLAGS -mtune=ultrasparc"
46         AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
47     mips-sgi-irix6.*)   dnl do we need to be that specific ?
48         OPT_CFLAGS="$CFLAGS -mabi=64"
49         AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
50     esac
51 elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
52     dnl TenDRA portability checking compiler
53     TENDRA=yes
54     CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE"
55     enable_mlib=no
56     enable_oss=no
57     enable_solaris_audio=no
58 elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
59     dnl Intel C++ compiler
60     CFLAGS="-g -O3 -unroll -ip"
61 else
62     dnl non-gcc flags - we probably need exact configuration triplets here.
63     case "$host" in
64     mips-sgi-irix6.*)
65         OPT_CFLAGS="$CFLAGS -64"
66         AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
67     sparc-sun-solaris*)
68         OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
69         AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
70     esac
71 fi
72
73 dnl Checks for libtool - this must be done after we set cflags
74 AC_DISABLE_SHARED
75 AC_LIBTOOL_WIN32_DLL
76 AC_PROG_LIBTOOL
77
78 dnl Checks for libraries.
79
80 dnl Checks for header files.
81 INCLUDES='-I$(top_srcdir)/include -I$(top_builddir)/include'
82 AC_SUBST([INCLUDES])
83 AC_CHECK_HEADERS([sys/time.h sys/timeb.h io.h])
84 AC_CHECK_GENERATE_INTTYPES([include])
85
86 dnl Checks for typedefs, structures, and compiler characteristics.
87 AC_C_CONST
88 AC_C_ALWAYS_INLINE
89 AC_C_RESTRICT
90 AC_TYPE_SIZE_T
91 AC_C_BIGENDIAN
92
93 dnl Checks for library functions.
94 AC_CHECK_FUNCS([memalign gettimeofday ftime])
95 AC_TYPE_SIGNAL
96
97 builtin([include],[liba52/configure.incl])
98 builtin([include],[libao/configure.incl])
99
100 AC_ARG_ENABLE([warnings],
101     [  --enable-warnings       treat warnings as errors])
102 if test x"$enable_warnings" = x"yes" -a x"$GCC" = x"yes"; then
103     dnl compiler warnings
104     OPT_CFLAGS="$CFLAGS -Wall -Werror"
105     AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
106 elif test x"$TENDRA" = x"yes"; then
107     dnl TenDRA portability checking compiler
108     CFLAGS="$CFLAGS -DTenDRA_check"
109 fi
110
111 builtin([include],[src/configure.incl])
112
113 AC_C_ATTRIBUTE_ALIGNED
114
115 AC_OUTPUT
Note: See TracBrowser for help on using the browser.