configure.in

来自「一个共享源码的音频库6 (编译程序用的 makefile等)」· IN 代码 · 共 441 行

IN
441
字号
dnl Process this file with autoconf to produce a configure script.dnldnl configure.indnlAC_INITAC_CONFIG_SRCDIR([aflib/aflibAudio.cc])AC_CONFIG_AUX_DIR([config])dnl Set host typednl determine system typeAC_CANONICAL_TARGET([])AM_INIT_AUTOMAKE(osalp,0.7.3)AM_CONFIG_HEADER(config.h)dnl AC_DEFINE(_GNU_SOURCE)dnl AC_DEFINE(_POSIX_C_SOURCE,199506L)dnl AC_DEFINE(_XOPEN_SOURCE,500)dnl Arguements for selection of modules oss_dsp="auto"sun_audio="auto"blade="auto"lame="auto"ogg="auto"mpg123="no"AC_ARG_ENABLE(debug,			[  --disable-debug         Disable Debugging ],		 	CXXFLAGS="-O2";CFLAGS="-O2"			)AC_ARG_ENABLE(aifc,			[  --disable-aifc          Don't Compile AIFC File Module ],		 	[aifc=no],			[aifc=yes;audiofile=yes]				)AC_ARG_ENABLE(aiff,			[  --disable-aiff          Don't Compile AIFF File Module ],			[aiff=no],			[aiff=yes;audiofile=yes]			)AC_ARG_ENABLE(au,			[  --disable-au            Don't Compile AU File Module ],			[au=no],			[au=yes;audiofile=yes]			)AC_ARG_ENABLE(wav,			[  --disable-wav           Don't Compile Wav File Module ],			[wav=no],			[wav=yes;audiofile=yes]			)AC_ARG_ENABLE(lame,			[  --enable-lame           Compile Lame(MP3) File Module (default: detect) ],			[lame=yes],			[lame=auto]			)AC_ARG_ENABLE(blade,			[  --enable-blade          Compile Blade(MP3) File Module (default: detect)],			[blade=yes],			[blade=auto]			)AC_ARG_ENABLE(mpg123,			[  --enable-mpg123         Compile Mpg123 File Module (default: no)],			[mpg123=yes],			[mpg123=no]			)AC_ARG_ENABLE(mpg,			[  --disable-mpg           Don't Compile Mpg(standalone) File Module ],			[mpg=no],			[mpg=yes]			)AC_ARG_ENABLE(sox,			[  --enable-sox           Compile Sox File Module (default: auto). ],			[sox=yes],			[sox=auto]			)AC_ARG_ENABLE(fast_sox,			[  --enable-fast-sox       Use fast alaw/ulaw conversion in Sox Module. ],			[fast_sox=yes],			[fast_sox=no]			)AC_ARG_ENABLE(ogg,			[  --enable-ogg            Compile Ogg-Vorbis File Module (default: detect). ],			[ogg=yes],			[ogg=auto]			)AC_ARG_ENABLE(force,			[  --enable-all            Compile all File Modules. ],			[force="yes"],			[force="no"]						)AC_ARG_WITH(libst,			[  --with-libst=DIR            Path to sox library. ],			[SOX_PATH="$withval"]						)dnl set INSTALL to BSD Comaptible install scriptAC_PROG_INSTALLdnl AC_PROG_CC - Determine C compiler to use dnl Some code is compiled as c source (ie aflibSoxFile).dnl CC=program_namednl GCC=yes if GNU dnl CFLAGS=CFLAGS if CFLAGSdnl else CFLAGS=-g -02 if GNUdnl else CFLAGS=-g AC_PROG_CCdnl AC_PROG_CXX - Determine C++ compiler to use dnl GXX=yes if GNU dnl CXX=proram_namednl CXXFLAGS=CXXFLAGS if CXXFLAGSdnl else CXXFLAGS=-g -02 if GNUdnl else CXXFLAGS=-g AC_PROG_CXXdnl C PreprocessorAC_PROG_CPPdnl C++ PreprocessorAC_PROG_CXXCPPdnl use cplusplus for all function testsAC_LANG([C++])AC_AIXcase "$target" in	*solaris* )	if test "$GXX" = yes	then		LD=g++		LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"	fiesacAM_DISABLE_STATICAC_LIBTOOL_DLOPENAM_PROG_LIBTOOLAC_SUBST(LIBTOOL_DEPS)dnl Checks for typedefs, structures, and compiler characteristics.dnl define _POSIX_SOURCE and adds -posix to CC (GNU) or -Xp (OTHER)AC_ISC_POSIXdnl define const empty if unsupporteddnl AC_C_CONSTAC_TYPE_SIZE_Tdnl define TM_IN_SYS_TIME if 'struct tm' in sys/time.h not time.hAC_STRUCT_TMdnl defines WORDS_BIGENDIANAC_C_BIGENDIANdnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h unistd.h getopt.h byteswap.h)dnl Checks for library functions.dnl AC_TYPE_SIGNALdnl AC_FUNC_VPRINTFAC_CHECK_FUNCS(getopt memmove rand mkdir strdup strstr strerror strtol)case "$target" in	*cygwin* )		CFLAGS="$CFLAGS -mno-cygwin"		CXXFLAGS="$CXXFLAGS -mno-cygwin"		LDFLAGS="$LDFLAGS -mno-cygwin"esacdnl Initial values for exported symbols.dnl Extra CFLAGS if we have gccif test "$GCC" = yesthen    CFLAGS="$CFLAGS -Wall "fidnl Extra CXXFLAGS if we have gccif test "$GXX" = yesthen    CXXFLAGS="$CXXFLAGS -Wall "fidnl Check if math library is needed.AS_MESSAGE(checking if math library is required during link...)AC_CHECK_FUNC(pow)if test "$ac_cv_func_pow" = nothen  AC_CHECK_LIB(m, pow)fidnl Checks for which modules to compile.if test "$force" = yesthen	AC_MSG_ERROR([forcing build of all modules])	ogg=yes	mpg=yes	sox=yes	mpg123=yes	lame=yes	blade=yes	audiofile=yes	au=yes	aiff=yes	wav=yes	aifc=yesfiif test "$sox" = autothen	if test -z "$SOX_PATH"	then		AC_CHECK_HEADERS(st.h, st=yes)		if test "$st" = yes 		then			AC_EGREP_HEADER([st_sample_t],st.h,sox=yes,[AC_MSG_WARN([ ---------------WARNING--------------------- ])AC_MSG_WARN([ st_sample_t not defined in st.h header file. ])AC_MSG_WARN([ Make sure you have at least version 12.17 of sox installed ])AC_MSG_WARN([ or use the --with-libst to set the path to the proper version of libst ])AC_MSG_WARN([ or else use the --disable-sox option.])AC_MSG_WARN([ ------------------------------------------ ])])		fi	else 		AC_SUBST(SOX_PATH)		if test -d "$SOX_PATH"		then			sox=yes		fi	fifiif test "$sox" = yesthen	MODULES="$MODULES sox"	AC_MSG_RESULT([compiling sox file module])	if test "$force" = no	then		aifc=no		aiff=no		au=no		wav=no		audiofile=no	fi	if test "$fast_sox" = yes	then		CFLAGS="$CFLAGS -DFAST_ULAW_CONVERSION -DFAST_ALAW_CONVERSION"	fi	if test "$alsa_dsp" = auto	then		AC_CHECK_HEADERS(linux/asound.h, alsa_dsp=yes)	fi	if test "$alsa_dsp" = yes	then		CFLAGS="$CFLAGS -DALSA_PLAYER"		NEED_ALSA=1		PLAY_SUPPORT=1		AC_MSG_RESULT([Using alsa device module])	fifiif test "$oss_dsp" = autothen	AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h, oss_dsp=yes)fiif test "$oss_dsp" = yesthen	CFLAGS="$CFLAGS -DOSS_PLAYER"	NEED_OSS=1	PLAY_SUPPORT=1	if test "$sox" = yes 	then		CFLAGS="$CFLAGS -DOSS_PLAYER"		NEED_OSS=1		PLAY_SUPPORT=1	else		MODULES="$MODULES oss"	fi	AC_MSG_RESULT([Using oss device module])fiif test "$audiofile" = yesthen	AUDIOFILE_PATH="audiofile-0.2.0"	MODULES="$MODULES $AUDIOFILE_PATH"	AC_CONFIG_SUBDIRS([formatlib/audiofile-0.2.0])	AC_MSG_RESULT([compiling static audiofile library])	if test "$aifc" = yes	then		MODULES="$MODULES aifc"		AC_MSG_RESULT([using aifc file module])	fi	if test "$aiff" = yes	then		MODULES="$MODULES aiff"		AC_MSG_RESULT([using aiff file module])	fi	if test "$au" = yes	then		MODULES="$MODULES au"		AC_MSG_RESULT([using au file module])	fi	if test "$wav" = yes	then		MODULES="$MODULES wav"		AC_MSG_RESULT([using wav file module])	fifiif test "$mpg123" = autothen	AC_CHECK_PROGS(MPG123PATH,mpg123,mpg123=yes)fiif test "$mpg123" = yes then	MODULES="$MODULES mpg123"	AC_MSG_RESULT([using mpg123 file module])fiif test "$blade" = auto then	AC_CHECK_PROGS(BLADEPATH,blade,blade=yes)fiif test "$blade" = yes then	MODULES="$MODULES blade"	AC_MSG_RESULT([using blade file module])fiif test "$lame" = autothen	AC_CHECK_PROGS(LAMEPATH,lame,lame=yes)fiif test "$lame" = yesthen	MODULES="$MODULES lame"	AC_MSG_RESULT([using lame file module])fiif test "$sun_audio" = autothen	AC_CHECK_HEADERS(sys/audioio.h sun/audioio.h, sun_audio=yes)fiif test "$sun_audio" = yesthen	CFLAGS="$CFLAGS -DSUNAUDIO_PLAYER"	NEED_SUNAU=1	PLAY_SUPPORT=1	MODULES="$MODULES solaris_dev"	AC_MSG_RESULT([using sun audio file module])fiif test "$ogg" = autothen	AC_CHECK_HEADERS(vorbis/vorbisfile.h, ogg=yes)fiif test "$ogg" = yes then	MODULES="$MODULES ogg"	AC_MSG_RESULT([using ogg-vorbis file module])fiif test "$mpg" = yesthen	MODULES="$MODULES mpg"	AC_MSG_RESULT([using mpg file module])fidnl fi	includedir=$includedir/aflibdatadir=$libdirCXXFLAGS="$CXXFLAGS -DMODULE_INSTALL_DIR=\"\\\"\$(prefix)/lib/aflib\\\"\""AC_SUBST(MODULES)AC_SUBST(AUDIOFILE_PATH)dnl LIBS="-L. $LIBS"dnl Generate output files...AC_CONFIG_FILES([Makefile aflib/Makefile formatlib/Makefile formatlib/aifc/Makefile formatlib/aiff/Makefile formatlib/au/Makefile formatlib/wav/Makefile formatlib/mpg123/Makefile formatlib/mpg/Makefile formatlib/blade/Makefile formatlib/lame/Makefile formatlib/oss/Makefile formatlib/solaris_dev/Makefile formatlib/sox/Makefile formatlib/ogg/Makefile])AC_OUTPUTechoecho "Configure finished.  Do 'make; make install' to compile and install osalp."echodnl Local Variables:dnl comment-start: "dnl "dnl comment-end: ""dnl comment-start-skip: "\\bdnl\\b\\s *"dnl compile-command: "autoconf"dnl End:

⌨️ 快捷键说明

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