📄 configure.in
字号:
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS) LIBS="$LIBS $ALSA_LIBS" AC_CHECK_FUNCS(snd_seq_port_info_set_timestamping) else AC_MSG_WARN(Couldn't configure alsa.) CFLAGS=$KEEPCFLAGS LIBS=$KEEPLIBS LDFLAGS=$KEEPLDFLAGS fielse AC_MSG_RESULT(no)fidnl HP-UX AlibAC_MSG_CHECKING(enable_audio=alib)if test "x$au_enable_alib" = xyes; then case "$target" in *-*-hpux*) AC_MSG_RESULT(yes) ;; *) AC_MSG_WARN(may not work on $target) ;; esac SYSEXTRAS="$SYSEXTRAS hpux_a.c" EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB" if test -d /opt/audio/include; then CPPFLAGS="$CPPFLAGS -I/opt/audio/include" fi if test -d /opt/audio/lib; then EXTRALIBS="$EXTRALIBS -L/opt/audio/lib" fi EXTRALIBS="$EXTRALIBS -lAlib"else AC_MSG_RESULT(no)fidnl nasAC_MSG_CHECKING(enable_audio=nas)if test "x$au_enable_nas" = xyes; then if test "x$with_x" != xyes; then AC_MSG_ERROR(nas: --with-x option must be specified) fi EXTRADEFS="$EXTRADEFS -DAU_NAS" SYSEXTRAS="$SYSEXTRAS nas_a.c" dnl -laudio conflicts another audio library, dnl so I specify NAS library with absolete path. if test "x$with_nas_library" != x; then AC_MSG_RESULT($with_nas_library); EXTRALIBS="$EXTRALIBS $with_nas_library" else AC_MSG_RESULT() MY_SEARCH_LIBS(AuOpenServer, [$x_libraries/libaudio.a \ /usr/lib/libaudio.so \ /usr/lib/libaudio.a ], [ AC_MSG_RESULT(NAS: $timidity_cv_search_AuOpenServer) EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"], [AC_MSG_WARN(NAS library is not found.)]) fi test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes" lib_xt_opt=-lXt if test "x$have_xext" = xyes; then lib_xext_opt=-lXext fi if test "x$have_xprelibs" = xyes; then lib_xprelibs_opt='-lSM -lICE' fielse AC_MSG_RESULT(no)fidnl aRts of KDEAC_MSG_CHECKING(enable_audio=arts)if test "x$au_enable_arts" = xyes; then AC_MSG_RESULT([yes, configuring aRts]) KEEPCFLAGS=$CFLAGS KEEPLIBS=$LIBS KEEPLDFLAGS=$LDFLAGS AM_PATH_ARTS() CFLAGS=$KEEPCFLAGS LIBS=$KEEPLIBS LDFLAGS=$KEEPLDFLAGS if test "x$no_arts" = x; then dnl AC_MSG_RESULT(aRts: Enabled) EXTRADEFS="$EXTRADEFS -DAU_ARTS" SYSEXTRAS="$SYSEXTRAS aRts_a.c" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ARTS_CFLAGS) LIBS="$LIBS $ARTS_LIBS" else AC_MSG_WARN(aRts: Couldn't configure) fielse AC_MSG_RESULT(no)fidnl EsounDAC_MSG_CHECKING(enable_audio=esd)if test "x$au_enable_esd" = xyes; then AC_MSG_RESULT([yes, configuring esd]) KEEPCFLAGS=$CFLAGS KEEPLIBS=$LIBS KEEPLDFLAGS=$LDFLAGS AM_PATH_ESD() CFLAGS=$KEEPCFLAGS LIBS=$KEEPLIBS LDFLAGS=$KEEPLDFLAGS if test "x$no_esd" = x; then dnl AC_MSG_RESULT(EsounD: Enabled) EXTRADEFS="$EXTRADEFS -DAU_ESD" SYSEXTRAS="$SYSEXTRAS esd_a.c" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS) LIBS="$LIBS $ESD_LIBS" else AC_MSG_WARN(EsounD: Couldn't configure) fielse AC_MSG_RESULT(no)fidnl portaudio EAC_MSG_CHECKING(enable_audio=portaudio)if test "x$au_enable_portaudio" = xyes; then AC_MSG_RESULT(yes) if test "x$CYGNUS" = xyes ||test "x$MSYS" = xyes; then SYSEXTRAS="$SYSEXTRAS portaudio_a.c w32_portaudio_dll.c" EXTRALIBS="$EXTRALIBS -lportaudio" EXTRADEFS="$EXTRADEFS -DAU_PORTAUDIO -DAU_PORTAUDIO_DLL" else SYSEXTRAS="$SYSEXTRAS portaudio_a.c" EXTRALIBS="$EXTRALIBS -lportaudio" EXTRADEFS="$EXTRADEFS -DAU_PORTAUDIO" fielse AC_MSG_RESULT(no)fidnl JACKAC_MSG_CHECKING(enable_audio=jack)if test "x$au_enable_jack" = xyes; then AC_MSG_RESULT(yes) SYSEXTRAS="$SYSEXTRAS jack_a.c" EXTRALIBS="$EXTRALIBS $(pkg-config --libs jack)" EXTRADEFS="$EXTRADEFS -DAU_JACK $(pkg-config --cflags jack)"else AC_MSG_RESULT(no)fidnl AOAC_MSG_CHECKING(enable_audio=ao)if test "x$au_enable_ao" = xyes; then AC_MSG_RESULT([yes, configuring ao]) XIPH_PATH_AO() if test "x$no_ao" = "x" ; then # AC_MSG_RESULT(yes) EXTRADEFS="$EXTRADEFS -DAU_AO" SYSEXTRAS="$SYSEXTRAS ao_a.c" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$AO_CFLAGS) LIBS="$LIBS $AO_LIBS" else AC_MSG_WARN(Couldn't configure libao.) fielse AC_MSG_RESULT(no)fidnl ogg's vorbisAC_MSG_CHECKING(enable_audio=vorbis)if test "x$au_enable_vorbis" = xyes; then AC_MSG_RESULT([yes, configuring vorbis]) AM_PATH_OGG([ AM_PATH_VORBIS([ have_vorbis=yes SYSEXTRAS="$SYSEXTRAS vorbis_a.c" EXTRADEFS="$EXTRADEFS -DAU_VORBIS $OGG_CFLAGS $VORBIS_CFLAGS" EXTRALIBS="$EXTRALIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS" if test "x$CYGNUS" = "xyes"; then EXTRADEFS="-DAU_VORBIS_DLL $EXTRADEFS" SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c" fi if test "x$MSYS" = "xyes"; then EXTRADEFS="-DAU_VORBIS_DLL $EXTRADEFS" SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c" fi ],[ AC_MSG_WARN([Unable to configure vorbis, but ogg is there (???)]) ]) ],[ AC_MSG_WARN(Unable to configure vorbis!) have_vorbis=no ])else AC_MSG_RESULT(no)fidnl libFLAC - Free Lossless Audio Codecif test "x$CYGNUS" = xyes || test "x$MSYS" = xyes ; then AC_MSG_CHECKING(enable_audio=flac) if test "x$au_enable_flac" = xyes; then AC_MSG_RESULT([yes, configuring flac]) SYSEXTRAS="$SYSEXTRAS flac_a.c w32_libFLAC_dll.c w32_libOggFLAC_dll.c" AM_PATH_LIBFLAC([ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS) LIBS="$LIBS $LIBFLAC_LIBS" ]) AM_PATH_LIBOGGFLAC([ EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC -DAU_OGGFLAC_DLL" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS) LIBS="$LIBS $LIBOGGFLAC_LIBS" ]) else AC_MSG_RESULT(no) fielse AC_MSG_CHECKING(enable_audio=flac) if test "x$au_enable_flac" = xyes; then AC_MSG_RESULT([yes, configuring flac]) SYSEXTRAS="$SYSEXTRAS flac_a.c" AM_PATH_LIBFLAC([ EXTRADEFS="$EXTRADEFS -DAU_FLAC" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS) LIBS="$LIBS $LIBFLAC_LIBS" ]) AM_PATH_LIBOGGFLAC([ EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC" EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS) LIBS="$LIBS $LIBOGGFLAC_LIBS" ]) else AC_MSG_RESULT(no) fifidnl ogg's speexAC_MSG_CHECKING(enable_audio=speex)if test "x$au_enable_speex" = xyes; then AC_CACHE_VAL(have_speex, [AC_TRY_LINK([ #include <speex.h> #include <ogg/ogg.h> ], [ SpeexBits *dummy; ], [have_speex=yes], [have_speex=no])]) AC_MSG_RESULT($have_speex) if test "x$have_speex" = xyes; then SYSEXTRAS="$SYSEXTRAS speex_a.c" EXTRALIBS="$EXTRALIBS -lspeex -logg" EXTRADEFS="$EXTRADEFS -DAU_SPEEX" fielse AC_MSG_RESULT(no)fidnl Win32 Gogo-no-coderAC_MSG_CHECKING(enable_audio=gogo)if test "x$au_enable_gogo" = xyes; then if test "x$CYGNUS" = "xyes"; then AC_MSG_RESULT(yes, configuring gogo) else if test "x$MSYS" = "xyes"; then AC_MSG_RESULT(yes, configuring gogo) else AC_MSG_WARN(May be gogo is not supported. You need hack the gogo_a.c) fi fi have_gogo=yes SYSEXTRAS="$SYSEXTRAS gogo_a.c w32_gogo.c" EXTRADEFS="$EXTRADEFS -DAU_GOGO -DAU_GOGO_DLL" EXTRALIBS="$EXTRALIBS -lgogo"else AC_MSG_RESULT(no)fidnl Pseudo audio device (Undocumented).if test "x$au_enable_none" = xyes; then EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c"fidnldnl TIMIDITY_OUTPUT_IDdnlAC_MSG_CHECKING(default output mode)if test "x$DEFAULT_PLAYMODE" = x; then DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`ficase ".$DEFAULT_PLAYMODE" in .default) TIMIDITY_OUTPUT_ID=d ;; .oss) TIMIDITY_OUTPUT_ID=d ;; .alsa) TIMIDITY_OUTPUT_ID=s ;; .sun) TIMIDITY_OUTPUT_ID=d ;; .hpux) TIMIDITY_OUTPUT_ID=d ;; .irix) TIMIDITY_OUTPUT_ID=d ;; .mme) TIMIDITY_OUTPUT_ID=d ;; .sb_dsp) TIMIDITY_OUTPUT_ID=d ;; .darwin) TIMIDITY_OUTPUT_ID=d ;; .w32) TIMIDITY_OUTPUT_ID=d ;; .alib) TIMIDITY_OUTPUT_ID=A ;; .nas) TIMIDITY_OUTPUT_ID=n ;; .arts) TIMIDITY_OUTPUT_ID=R ;; .esd) TIMIDITY_OUTPUT_ID=e ;; .portaudio) TIMIDITY_OUTPUT_ID=p ;; .wav) TIMIDITY_OUTPUT_ID=w ;; .au) TIMIDITY_OUTPUT_ID=u ;; .aiff) TIMIDITY_OUTPUT_ID=a ;; .list) TIMIDITY_OUTPUT_ID=l ;; .vorbis) TIMIDITY_OUTPUT_ID=v ;; .flac) TIMIDITY_OUTPUT_ID=F ;; .speex) TIMIDITY_OUTPUT_ID=S ;; .gogo) TIMIDITY_OUTPUT_ID=g ;; .jack) TIMIDITY_OUTPUT_ID=j ;; *) TIMIDITY_OUTPUT_ID= ;;esacAC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)## Interface Section#interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq winsyn winsyng portmidisyng'AC_ARG_ENABLE(interface, [ --enable-interface=[interface_list] Comma separated interface list ], [ for i in `echo $enableval | sed 's/,/ /g'`; do eval "enable_$i=yes" done ])# Dynamic link configurationAC_ARG_ENABLE(dynamic, [ --enable-dynamic Enable dynamic link interface (default is no) --enable-dynamic=dynamic_list Comma separated dynamic interface list], [ dnl --enable-dynamic=yes to --enable-dynamic=dynamic if test "x$enable_dynamic" = xyes; then enable_dynamic=dynamic elif test "x$enable_dynamic" != xno; then for i in `echo $enableval | sed 's/,/ /g'`; do eval "enable_$i=dynamic" done fi])join_targets=for i in $interface_targets; do eval "join_targets=$join_targets\$enable_$i"donecase ".$join_targets" in.*dynamic*) NEEDDLOPEN=yes;;*) NEEDDLOPEN=no;;esacdnl check -fpic option for gccif test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; ficase "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esacdnl Which type of dynamic loader?if test "$NEEDDLOPEN" = "yes"; then have_dl=no WAPI_CHECK_FUNC(LoadLibrary,,[LoadLibrary(0);],have_dl=w32) test $wapi_cv_func_LoadLibrary = yes && have_dl=w32 if test "$have_dl" = "no"; then AC_CHECK_FUNC(shl_load,have_dl=hpux) fi if test "$have_dl" = "no"; then dnl darwin has both dyld and libdl: in case user installed dlcompat. dnl dyld is recommended because libdl is a wrapper for dyld. AC_CHECK_FUNC(NSLinkModule,have_dl=dyld) fi if test "$have_dl" = "no" -a "x$ac_cv_lib_dl_dlopen" = xyes; then have_dl=dlopen fi if test "$have_dl" = "no"; then AC_CHECK_FUNC(dlopen,have_dl=dlopen) fi if test "$have_dl" = "no"; then AC_CHECK_FUNC(dld_init,have_dl=dld) fi if test "$have_dl" = "no"; then AC_CHECK_LIB(dld,dld_init,have_dl=dld;lib_dl_opt=-ldld) fi AC_MSG_CHECKING(dynamic link method) case "$have_dl" in dlopen) AC_MSG_RESULT(use dl_dlopen.c) SYSEXTRAS="$SYSEXTRAS dl_dlopen.c" CHECK_DLSYM_UNDERSCORE(AC_DEFINE(DLSYM_NEEDS_UNDERSCORE,1,Define to 1 if you have to add "_" to every identifiers.)) ;; dld) AC_MSG_RESULT(use dl_dld.c) SYSEXTRAS="$SYSEXTRAS dl_dld.c" ;; hpux) AC_MSG_RESULT(use dl_hpux.c) SYSEXTRAS="$SYSEXTRAS dl_hpux.c" LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS" ;; w32) AC_MSG_RESULT(use dl_w32.c) SYSEXTRAS="$SYSEXTRAS dl_w32.c" ;; dyld) AC_MSG_RESULT(use dl_dyld.c) SYSEXTRAS="$SYSEXTRAS dl_dyld.c" ;; *) NEEDDLOPEN="no" AC_MSG_WARN(no method to open a shared object) ;; esacfiif test "$NEEDDLOPEN" = "yes"; then MY_DEFINE(IA_DYNAMIC) AC_DEFINE_UNQUOTED(SHARED_LIB_EXT,".$so", shared library extention) dnl needless? dnl EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)" test "x$GCC" = xyes -a "x$timidity_cv_ccoption_rdynamic" = xyes && timidity_LDFLAGS="-rdynamic"fiAM_CONDITIONAL(NEEDDLOPEN, test "$NEEDDLOPEN" = "yes")dnldnl Each interface sectiondnldnl ncursesAM_CONDITIONAL(ENABLE_NCURSES, false)CONFIG_INTERFACE(ncurses,NCURSES,n, [ --enable-ncurses Enable ncurses interface (default is no)], [ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9ednl because <ncurses/curses.h> includes <unctrl.h>:dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directorydnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h.dnl configure must check ncurses header with -I/usr/include/ncurses option. case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in *yes*);; *) for i in /usr/include /usr/local/include; do if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later) CPPFLAGS="$CPPFLAGS -I$i/ncurses" break fi done ;; esac AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses, [ dnl checking pdcurses AC_CHECK_LIB(curses,PDC_set_ctrl_break, [ lib_curses_opt=-lcurses AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) lib_user32_opt="$lib_user32_test" ], [ dnl checking libpdcurses AC_CHECK_LIB(pdcurses,PDC_set_ctrl_break, [ lib_curses_opt=-lpdcurses AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) lib_user32_opt="$lib_user32_test" ], [ dnl OpenBSD use -lcurses instead of -lncurses. case "$target" in *openbsd*) AC_CHECK_LIB(curses,initscr,lib_curses_opt=-lcurses, [ AC_MSG_WARN(ncurses interface is not enabled) enable_ncurses=no ]) ;; *) if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes; then lib_curses_opt=libpdcurses.lib AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) else AC_MSG_WARN(ncurses interface is not enabled) enable_ncurses=no fi ;; esac ]) ], $lib_user32_test) ]) ], [ LIBS="$LIBS $lib_curses_opt" case "$target" in *-*-freebsd[123]*) EXTRALIBS="$EXTRALIBS -lmytinfo" ;; esac INTERFACE_SRCS="$INTERFACE_SRCS ncurs_c.c" ], [ n_so_libs="$lib_curses_opt" case "$target" in *-*-freebsd[123]*)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -