URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [tags/] [first/] [mp3/] [sw/] [mad-xess/] [configure.in] - Rev 1780
Go to most recent revision | Compare with Previous | Blame | View Log
dnl -*- m4 -*-
dnl
dnl mad - MPEG audio decoder
dnl Copyright (C) 2000-2001 Robert Leslie
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
AC_REVISION([$Id: configure.in,v 1.1.1.1 2001-11-04 19:00:27 lampret Exp $])dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(libmad/decoder.h)
AM_INIT_AUTOMAKE(mad, 0.13.0b)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SUBDIRS(libmad)
dnl System type.
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_CHECK_TOOL(CC, cc, :)
AC_PROG_INSTALL
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_ISC_POSIX
dnl Compiler options.
AC_PROG_GCC_TRADITIONAL
arch=""
debug=""
optimize=""
profile=""
set -- $CFLAGS
CFLAGS="-Wall"
while test $# -gt 0
do
case "$1" in
-Wall)
shift
;;
-g)
debug="-g"
shift
;;
-m*)
arch="$arch $1"
shift
;;
-fomit-frame-pointer)
shift
;;
-O*|-f*)
optimize="$1"
shift
;;
*)
CFLAGS="$CFLAGS $1"
shift
;;
esac
done
case "$host" in
or32*) AC_DEFINE(EMBED) ;;
esac
if test "$GCC" = yes
then
if test -z "$arch"
then
case "$host" in
i386-*) ;;
i?86-*) arch="-m486" ;;
arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
powerpc-*) ;;
mips*-agenda-*) arch="-mcpu=vr4100" ;;
mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
or32*) arch="-mhard-div -nostdlib" ;;
esac
fi
if test -n "$optimize"
then
: #? optimize="$optimize -funroll-loops"
: #? optimize="$optimize -finline-functions"
fi
fi
dnl Checks for header files.
AC_HEADER_STDC
dnl AC_CHECK_HEADERS(termios.h poll.h signal.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(madvise)
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
AC_SEARCH_LIBS(pow, m)
AC_SEARCH_LIBS(log10, m)
case "$host" in
*-linux*) AC_DEFINE(HAVE_MMAP) ;;
*) AC_FUNC_MMAP ;;
esac
AC_MSG_CHECKING(whether to use mmap)
AC_ARG_ENABLE(mmap,
[ --disable-mmap \
do not use mmap even if available (lower mem usage)], [
case "$enableval" in
yes) AC_DEFINE(USE_MMAP) ;;
esac
], [
AC_DEFINE(USE_MMAP)
])
AC_MSG_RESULT(${enable_mmap-yes})
AC_CACHE_SAVE
dnl Select an audio system.
AUDIO=""
AC_SUBST(AUDIO)
AC_MSG_CHECKING(for audio support)
audio="unknown"
case "$host" in
arm*-empeg-*) audio="empeg" ;;
esac
if test "$audio" = unknown
then
AC_EGREP_CPP(yes, [
# include <sys/soundcard.h>
# if defined(OPEN_SOUND_SYSTEM) || defined(UNIX_SOUND_SYSTEM) || \
defined(VOXWARE)
yes
# endif
], [audio="oss"])
fi
if test "$audio" = unknown
then
AC_EGREP_CPP(audio_info_t, [
# include <sys/audioio.h>
], [audio="sun"])
fi
AC_MSG_RESULT($audio)
if test "$audio" = unknown
then
AC_MSG_WARN(audio support not available; using null module)
AC_DEFINE(AUDIO_DEFAULT, audio_null)
else
audio="audio_$audio"
AC_DEFINE_UNQUOTED(AUDIO_DEFAULT, $audio)
AUDIO="$audio.o"
fi
dnl libmad options...
AC_ARG_ENABLE(speed,
[ --enable-speed optimize for speed over accuracy])
AC_ARG_ENABLE(accuracy,
[ --enable-accuracy optimize for accuracy over speed])
AC_ARG_ENABLE(fpm,
[ --enable-fpm=<arch> use <arch>-specific fixed-point math routines
(one of: intel, arm, mips, sparc, ppc,
64bit, default)])
AC_ARG_ENABLE(sso,
[ --enable-sso use subband synthesis optimization])
AC_ARG_ENABLE(aso,
[ --disable-aso disable architecture-specific optimizations])
AC_ARG_ENABLE(strict-iso,
[ --enable-strict-iso use strict ISO/IEC interpretations])
dnl madplay options...
AC_MSG_CHECKING(whether to enable profiling)
AC_ARG_ENABLE(profiling,
[ --enable-profiling generate profiling code], [
case "$enableval" in
yes) profile="-pg" ;;
esac
])
AC_MSG_RESULT(${enable_profiling-no})
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debugging,
[ --enable-debugging enable diagnostic debugging support
--disable-debugging do not enable debugging and use more optimization], [
case "$enableval" in
yes)
AC_DEFINE(DEBUG)
AUDIO="$AUDIO audio_hex.o"
optimize=""
;;
no)
if test -n "$profile"
then
AC_MSG_ERROR(--enable-profiling and --disable-debugging are incompatible)
fi
AC_DEFINE(NDEBUG)
debug=""
if test "$GCC" = yes
then
optimize="$optimize -fomit-frame-pointer"
fi
;;
esac
])
AC_MSG_RESULT(${enable_debugging-default})
case "$enable_debugging" in
yes) AC_CHECK_LIB(efence, malloc) ;;
esac
AC_MSG_CHECKING(whether to enable experimental code)
AC_ARG_ENABLE(experimental,
[ --enable-experimental enable experimental code], [
case "$enableval" in
yes) AC_DEFINE(EXPERIMENTAL) ;;
esac
])
AC_MSG_RESULT(${enable_experimental-no})
dnl Create output files.
test -n "$arch" && CFLAGS="$CFLAGS $arch"
test -n "$debug" && CFLAGS="$CFLAGS $debug"
test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
dnl CFLAGS="$CFLAGS -S"
AC_OUTPUT(Makefile)
Go to most recent revision | Compare with Previous | Blame | View Log