⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.ac

📁 linux下优秀的mp3播放软件的源代码
💻 AC
字号:
dnl -*- m4 -*-dnldnl madplay - MPEG audio decoder and playerdnl Copyright (C) 2000-2004 Robert Lesliednldnl This program is free software; you can redistribute it and/or modifydnl it under the terms of the GNU General Public License as published bydnl the Free Software Foundation; either version 2 of the License, ordnl (at your option) any later version.dnldnl This program is distributed in the hope that it will be useful,dnl but WITHOUT ANY WARRANTY; without even the implied warranty ofdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thednl GNU General Public License for more details.dnldnl You should have received a copy of the GNU General Public Licensednl along with this program; if not, write to the Free Softwarednl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USAdnlAC_REVISION([$Id: configure.ac,v 1.17 2004/02/23 21:34:53 rob Exp $])dnldnl Process this file with autoconf to produce a configure script.AC_INIT([MPEG audio decoder and player], [0.15.2b], [rob@mars.org], [madplay])AC_PREREQ(2.53)AC_CONFIG_SRCDIR([madplay.c])AM_INIT_AUTOMAKEAM_CONFIG_HEADER([config.h])dnl System type.AC_CANONICAL_HOSTdnl Checks for programs.# Work-around for autoconf 2.53 bugcase "$host" in    *-apple-darwin*)	: ${CPP="cc -E -traditional-cpp"}	;;esacAC_PROG_CCif test "$GCC" = yesthen    case "$host" in	*-*-mingw*)	    case "$build" in		*-*-cygwin*)		    CPPFLAGS="$CPPFLAGS -mno-cygwin"		    LDFLAGS="$LDFLAGS -mno-cygwin"		    ;;	    esac    esacfidnl Support for libtool.AC_DISABLE_SHAREDAC_PROG_LIBTOOLAC_SUBST(LIBTOOL_DEPS)dnl Compiler options.arch=""debug=""optimize=""profile=""set -- $CFLAGSCFLAGS=""if test "$GCC" = yesthen    CFLAGS="-Wall"fiwhile test $# -gt 0do    case "$1" in	-Wall)	    if test "$GCC" = yes	    then		:	    else		CFLAGS="$CFLAGS $1"	    fi	    shift	    ;;	-g)	    debug="-g"	    shift	    ;;	-mno-cygwin)	    shift	    ;;	-m*)	    arch="$arch $1"	    shift	    ;;	-fomit-frame-pointer)	    shift	    ;;	-O*|-f*)	    optimize="$1"	    shift	    ;;	*)	    CFLAGS="$CFLAGS $1"	    shift	    ;;    esacdoneif test "$GCC" = yesthen    if test -z "$arch"    then	case "$host" in	    i386-*)           ;;	    i?86-*)           arch="-march=i486" ;;	    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" ;;	esac    fi    if test -n "$optimize"    then	: #? optimize="$optimize -funroll-loops"	: #? optimize="$optimize -finline-functions"    fifidnl Internationalization support.ALL_LINGUAS="en es fr hr no"AM_GNU_GETTEXT([use-libtool])AM_GNU_GETTEXT_VERSION(0.14.1)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(assert.h termios.h stropts.h  \		 sys/types.h fcntl.h errno.h  \		 sys/soundcard.h machine/soundcard.h)AC_CHECK_HEADER(mad.h, [], [	AC_MSG_ERROR([mad.h was not found*** You must first install libmad before you can build this package.*** If libmad is already installed, you may need to use the CPPFLAGS*** environment variable to specify its installed location, e.g. -I<dir>.])])AC_CHECK_HEADER(id3tag.h, [], [	AC_MSG_ERROR([id3tag.h was not found*** You must first install libid3tag before you can build this package.*** If libid3tag is already installed, you may need to use the CPPFLAGS*** environment variable to specify its installed location, e.g. -I<dir>.])])dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_C_BIGENDIANdnl Checks for library functions.AC_CHECK_LIB(mad, mad_decoder_run, :, [	AC_MSG_ERROR([libmad was not found*** You must first install libmad before you can build this package.*** If libmad is already installed, you may need to use the LDFLAGS*** environment variable to specify its installed location, e.g. -L<dir>.])])AC_CHECK_LIB(id3tag, id3_tag_parse, :, [	AC_MSG_ERROR([libid3tag was not found*** You must first install libid3tag before you can build this package.*** If libid3tag is already installed, you may need to use the LDFLAGS*** environment variable to specify its installed location, e.g. -L<dir>.])], [-lz])AC_FUNC_VPRINTFAC_CHECK_FUNCS(madvise localeconv)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 ;;esacAC_MSG_CHECKING([whether to use mmap])AC_ARG_ENABLE(mmap, AC_HELP_STRING([--disable-mmap],		    [do not use mmap even if available (lower mem usage)]),[    case "$enableval" in	yes)	    AC_DEFINE(USE_MMAP, 1,		[Define if you have mmap() and you want to use it.])	    ;;    esac], [    AC_DEFINE(USE_MMAP)])AC_MSG_RESULT(${enable_mmap-yes})AC_CACHE_SAVEdnl Select an audio system.depend_audio=""ldadd_audio=""AC_SUBST(depend_audio)AC_SUBST(ldadd_audio)AC_MSG_CHECKING([for audio support])audio="unknown"want_alsa=noAC_ARG_WITH(alsa, AC_HELP_STRING([--with-alsa],		  [use Advanced Linux Sound Architecture as default]),[    case "$withval" in	yes)	    want_alsa=yes	    if test "$audio" = unknown	    then		audio="alsa"	    else		AC_MSG_ERROR([cannot use both --with-$audio and --with-alsa])	    fi	    ;;    esac])want_esd=yesAC_ARG_WITH(esd, AC_HELP_STRING([--with-esd],		 [use Enlightened Sound Daemon (EsounD) as default]),[    case "$withval" in	yes)	    if test "$audio" = unknown	    then		audio="esd"	    else		AC_MSG_ERROR([cannot use both --with-$audio and --with-esd])	    fi	    ;;	no)	    want_esd=no	    ;;    esac])dnl want_nas=yesdnl AC_ARG_WITH(nas, AC_HELP_STRING([--with-nas],dnl 		     [use Network Audio System (NAS) as default]),dnl [dnl     case "$withval" indnl 	yes)dnl 	    if test "$audio" = unknowndnl 	    thendnl 		audio="nas"dnl 	    elsednl 		AC_MSG_ERROR([cannot use both --with-$audio and --with-nas])dnl 	    fidnl 	    ;;dnl 	no)dnl 	    want_nas=nodnl 	    ;;dnl     esacdnl ])if test "$audio" = unknownthen    case "$host" in	arm*-empeg-*) audio="empeg" ;;    esacfidnl if test "$audio" = unknowndnl thendnl     AC_EGREP_CPP(kAudioUnitProperty_SetRenderCallback, [dnl # include <AudioUnit/AudioUnit.h>dnl ], [audio="jaguar";dnl     ldadd_audio="$ldadd_audio -framework AudioUnit -framework CoreServices"])dnl fiif test "$audio" = unknownthen    AC_EGREP_CPP(SndNewChannel, [# include <Carbon/Carbon.h>], [audio="carbon"; ldadd_audio="$ldadd_audio -framework Carbon"])fiif test "$audio" = unknownthen    AC_EGREP_CPP(waveOutOpen, [# include <mmsystem.h>], [audio="win32"; ldadd_audio="$ldadd_audio -lwinmm"])fiif test "$audio" = unknownthen    AC_EGREP_CPP(yes, [# include <sys/soundcard.h># if defined(OPEN_SOUND_SYSTEM) || defined(UNIX_SOUND_SYSTEM) ||  \    defined(VOXWARE)yes# endif], [audio="oss"])fiif test "$audio" = unknownthen    AC_EGREP_CPP(yes, [# include <machine/soundcard.h># if defined(OPEN_SOUND_SYSTEM) || defined(UNIX_SOUND_SYSTEM) ||  \    defined(VOXWARE)yes# endif], [audio="oss"])fiif test "$audio" = unknownthen    AC_EGREP_CPP(audio_info_t, [# include <sys/audioio.h>], [audio="sun"])fiif test "$audio" = unknownthen    AC_EGREP_CPP(yes, [# include <sys/asoundlib.h># if defined(SND_PCM_OPEN_PLAYBACK)yes# endif], [audio="qnx"; ldadd_audio="$ldadd_audio -lasound"])fiAC_MSG_RESULT($audio)if test "$want_alsa" = yesthen    AC_CHECK_LIB(asound, snd_pcm_open, have_libasound=yes, have_libasound=no)    if test "$have_libasound" = yes    then	AC_DEFINE(HAVE_LIBASOUND, 1,	    [Define if you have the asound library (-lasound).])	ldadd_audio="$ldadd_audio -lasound"    fifiif test "$want_esd" = yesthen    AC_CHECK_LIB(esd, esd_open_sound, have_libesd=yes, have_libesd=no)    if test "$have_libesd" = yes    then	AC_DEFINE(HAVE_LIBESD, 1,	    [Define if you have the esd library (-lesd).])	ldadd_audio="$ldadd_audio -lesd"    fifidnl if test "$want_nas" = yesdnl thendnl     AC_PATH_Xdnl     if test "$no_x" = yesdnl     thendnl 	have_libaudio=nodnl     elsednl 	AC_CHECK_LIB(audio, AuOpenServer,dnl 	    have_libaudio=yes, have_libaudio=no, -L$x_libraries -lXau -lXt)dnl dnl 	if test "$have_libaudio" = yesdnl 	thendnl 	    AC_DEFINE(HAVE_LIBAUDIO)dnl 	    ldadd_audio="$ldadd_audio -laudio -L$x_libraries -lXau -lXt"dnl 	fidnl     fidnl fiif test "$audio" = alsathen    if test "$have_libasound" = no    then	AC_MSG_ERROR([cannot use --with-alsa because libasound was not found])    fielse    if test "$want_alsa" = yes && test "$have_libasound" = yes    then	depend_audio="$depend_audio audio_alsa.o"    fifiif test "$audio" = esdthen    if test "$have_libesd" = no    then	AC_MSG_ERROR([cannot use --with-esd because libesd was not found])    fielse    if test "$want_esd" = yes && test "$have_libesd" = yes    then	depend_audio="$depend_audio audio_esd.o"    fifidnl if test "$audio" = nasdnl thendnl     if test "$have_libaudio" = nodnl     thendnl 	AC_MSG_ERROR([cannot use --with-nas because libaudio was not found])dnl     fidnl elsednl     if test "$want_nas" = yes && test "$have_libaudio" = yesdnl     thendnl 	depend_audio="$depend_audio audio_nas.o"dnl     fidnl fiif test "$audio" = unknownthen    AC_MSG_WARN([audio support not available; using null module])    AC_DEFINE(AUDIO_DEFAULT, audio_null,	[Define to be the name of your default audio output module.])else    AC_DEFINE_UNQUOTED(AUDIO_DEFAULT, [audio_$audio])    depend_audio="$depend_audio audio_$audio.o"fidnl madplay options...AC_MSG_CHECKING([whether to enable profiling])AC_ARG_ENABLE(profiling, AC_HELP_STRING([--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, AC_HELP_STRING([--enable-debugging],			 [enable diagnostic debugging support])AC_HELP_STRING([--disable-debugging],			 [do not enable debugging and use more optimization]),[    case "$enableval" in	yes)	    AC_DEFINE(DEBUG, 1,		[Define to enable diagnostic debugging support.])	    optimize=""	    ;;	no)	    if test -n "$profile"	    then    AC_MSG_ERROR([--enable-profiling and --disable-debugging are incompatible])	    fi	    AC_DEFINE(NDEBUG, 1,		[Define to disable debugging assertions.])	    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) ;;esacAC_MSG_CHECKING([whether to enable experimental code])AC_ARG_ENABLE(experimental, AC_HELP_STRING([--enable-experimental],			    [enable experimental code]),[    case "$enableval" in	yes)	    AC_DEFINE(EXPERIMENTAL, 1, [Define to enable experimental code.])	    ;;    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"AC_CONFIG_FILES([Makefile msvc++/Makefile  \	intl/Makefile po/Makefile.in m4/Makefile  \	madplay.list])AC_OUTPUT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -