OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [first/] [mp3/] [sw/] [mad-xess/] [configure.in] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 266 lampret
dnl -*- m4 -*-
2
dnl
3
dnl mad - MPEG audio decoder
4
dnl Copyright (C) 2000-2001 Robert Leslie
5
dnl
6
dnl This program is free software; you can redistribute it and/or modify
7
dnl it under the terms of the GNU General Public License as published by
8
dnl the Free Software Foundation; either version 2 of the License, or
9
dnl (at your option) any later version.
10
dnl
11
dnl This program is distributed in the hope that it will be useful,
12
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
dnl GNU General Public License for more details.
15
dnl
16
dnl You should have received a copy of the GNU General Public License
17
dnl along with this program; if not, write to the Free Software
18
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
dnl
20
AC_REVISION([$Id: configure.in,v 1.1.1.1 2001-11-04 19:00:27 lampret Exp $])dnl
21
 
22
dnl Process this file with autoconf to produce a configure script.
23
 
24
AC_INIT(libmad/decoder.h)
25
AM_INIT_AUTOMAKE(mad, 0.13.0b)
26
 
27
AM_CONFIG_HEADER(config.h)
28
AC_CONFIG_SUBDIRS(libmad)
29
 
30
dnl System type.
31
 
32
AC_CANONICAL_HOST
33
 
34
dnl Checks for programs.
35
AC_PROG_MAKE_SET
36
AC_CHECK_TOOL(CC, cc, :)
37
AC_PROG_INSTALL
38
AC_CHECK_TOOL(RANLIB, ranlib, :)
39
AC_ISC_POSIX
40
 
41
dnl Compiler options.
42
 
43
AC_PROG_GCC_TRADITIONAL
44
 
45
arch=""
46
debug=""
47
optimize=""
48
profile=""
49
 
50
set -- $CFLAGS
51
CFLAGS="-Wall"
52
 
53
while test $# -gt 0
54
do
55
    case "$1" in
56
        -Wall)
57
            shift
58
            ;;
59
        -g)
60
            debug="-g"
61
            shift
62
            ;;
63
        -m*)
64
            arch="$arch $1"
65
            shift
66
            ;;
67
        -fomit-frame-pointer)
68
            shift
69
            ;;
70
        -O*|-f*)
71
            optimize="$1"
72
            shift
73
            ;;
74
        *)
75
            CFLAGS="$CFLAGS $1"
76
            shift
77
            ;;
78
    esac
79
done
80
 
81
case "$host" in
82
    or32*)            AC_DEFINE(EMBED) ;;
83
esac
84
 
85
if test "$GCC" = yes
86
then
87
    if test -z "$arch"
88
    then
89
        case "$host" in
90
            i386-*)           ;;
91
            i?86-*)           arch="-m486" ;;
92
            arm*-empeg-*)     arch="-march=armv4 -mtune=strongarm1100" ;;
93
            armv4*-*)         arch="-march=armv4 -mtune=strongarm" ;;
94
            powerpc-*)        ;;
95
            mips*-agenda-*)   arch="-mcpu=vr4100" ;;
96
            mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
97
            or32*)            arch="-mhard-div -nostdlib" ;;
98
        esac
99
    fi
100
 
101
    if test -n "$optimize"
102
    then
103
        : #? optimize="$optimize -funroll-loops"
104
        : #? optimize="$optimize -finline-functions"
105
    fi
106
fi
107
 
108
dnl Checks for header files.
109
 
110
AC_HEADER_STDC
111
dnl AC_CHECK_HEADERS(termios.h poll.h signal.h)
112
 
113
dnl Checks for typedefs, structures, and compiler characteristics.
114
 
115
AC_C_CONST
116
AC_C_INLINE
117
 
118
dnl Checks for library functions.
119
 
120
AC_FUNC_VPRINTF
121
AC_CHECK_FUNCS(madvise)
122
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
123
AC_SEARCH_LIBS(pow, m)
124
AC_SEARCH_LIBS(log10, m)
125
 
126
case "$host" in
127
    *-linux*) AC_DEFINE(HAVE_MMAP) ;;
128
    *)        AC_FUNC_MMAP ;;
129
esac
130
 
131
AC_MSG_CHECKING(whether to use mmap)
132
AC_ARG_ENABLE(mmap,
133
[  --disable-mmap     \
134
     do not use mmap even if available (lower mem usage)], [
135
    case "$enableval" in
136
        yes) AC_DEFINE(USE_MMAP) ;;
137
    esac
138
], [
139
    AC_DEFINE(USE_MMAP)
140
])
141
AC_MSG_RESULT(${enable_mmap-yes})
142
 
143
AC_CACHE_SAVE
144
 
145
dnl Select an audio system.
146
 
147
AUDIO=""
148
AC_SUBST(AUDIO)
149
 
150
AC_MSG_CHECKING(for audio support)
151
 
152
audio="unknown"
153
 
154
case "$host" in
155
    arm*-empeg-*) audio="empeg" ;;
156
esac
157
 
158
if test "$audio" = unknown
159
then
160
    AC_EGREP_CPP(yes, [
161
# include 
162
# if defined(OPEN_SOUND_SYSTEM) || defined(UNIX_SOUND_SYSTEM) ||  \
163
    defined(VOXWARE)
164
yes
165
# endif
166
], [audio="oss"])
167
fi
168
 
169
if test "$audio" = unknown
170
then
171
    AC_EGREP_CPP(audio_info_t, [
172
# include 
173
], [audio="sun"])
174
fi
175
 
176
AC_MSG_RESULT($audio)
177
 
178
if test "$audio" = unknown
179
then
180
    AC_MSG_WARN(audio support not available; using null module)
181
    AC_DEFINE(AUDIO_DEFAULT, audio_null)
182
else
183
    audio="audio_$audio"
184
    AC_DEFINE_UNQUOTED(AUDIO_DEFAULT, $audio)
185
 
186
    AUDIO="$audio.o"
187
fi
188
 
189
dnl libmad options...
190
 
191
AC_ARG_ENABLE(speed,
192
    [  --enable-speed          optimize for speed over accuracy])
193
AC_ARG_ENABLE(accuracy,
194
    [  --enable-accuracy       optimize for accuracy over speed])
195
AC_ARG_ENABLE(fpm,
196
    [  --enable-fpm=     use -specific fixed-point math routines
197
                          (one of: intel, arm, mips, sparc, ppc,
198
                           64bit, default)])
199
AC_ARG_ENABLE(sso,
200
    [  --enable-sso            use subband synthesis optimization])
201
AC_ARG_ENABLE(aso,
202
    [  --disable-aso           disable architecture-specific optimizations])
203
AC_ARG_ENABLE(strict-iso,
204
    [  --enable-strict-iso     use strict ISO/IEC interpretations])
205
 
206
dnl madplay options...
207
 
208
AC_MSG_CHECKING(whether to enable profiling)
209
AC_ARG_ENABLE(profiling,
210
    [  --enable-profiling      generate profiling code], [
211
    case "$enableval" in
212
        yes) profile="-pg" ;;
213
    esac
214
])
215
AC_MSG_RESULT(${enable_profiling-no})
216
 
217
AC_MSG_CHECKING(whether to enable debugging)
218
AC_ARG_ENABLE(debugging,
219
    [  --enable-debugging      enable diagnostic debugging support
220
  --disable-debugging     do not enable debugging and use more optimization], [
221
    case "$enableval" in
222
        yes)
223
            AC_DEFINE(DEBUG)
224
            AUDIO="$AUDIO audio_hex.o"
225
            optimize=""
226
            ;;
227
        no)
228
            if test -n "$profile"
229
            then
230
    AC_MSG_ERROR(--enable-profiling and --disable-debugging are incompatible)
231
            fi
232
 
233
            AC_DEFINE(NDEBUG)
234
            debug=""
235
            if test "$GCC" = yes
236
            then
237
                optimize="$optimize -fomit-frame-pointer"
238
            fi
239
            ;;
240
    esac
241
])
242
AC_MSG_RESULT(${enable_debugging-default})
243
 
244
case "$enable_debugging" in
245
    yes) AC_CHECK_LIB(efence, malloc) ;;
246
esac
247
 
248
AC_MSG_CHECKING(whether to enable experimental code)
249
AC_ARG_ENABLE(experimental,
250
    [  --enable-experimental   enable experimental code], [
251
    case "$enableval" in
252
        yes) AC_DEFINE(EXPERIMENTAL) ;;
253
    esac
254
])
255
AC_MSG_RESULT(${enable_experimental-no})
256
 
257
dnl Create output files.
258
 
259
test -n "$arch"     && CFLAGS="$CFLAGS $arch"
260
test -n "$debug"    && CFLAGS="$CFLAGS $debug"
261
test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
262
test -n "$profile"  && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
263
dnl CFLAGS="$CFLAGS -S"
264
AC_OUTPUT(Makefile)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.