📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(xmms/main.c)AC_CANONICAL_HOSTcflags_set=${CFLAGS+set}AM_CONFIG_HEADER(config.h xmms/i18n.h)AM_INIT_AUTOMAKE(xmms, 1.2.10)AC_ARG_ENABLE( one-plugin-dir,[ --enable-one-plugin-dir use a single plugin dir [default=no]],, enable_one_plugin_dir="no")AC_ARG_ENABLE( user-plugin-dir,[ --disable-user-plugin-dir disable per-user plugin dir],, enable_user_plugin_dir="yes")AC_ARG_WITH(dev-dsp, [ --with-dev-dsp=path Path to OSS DSP data pipe, default is /dev/dsp.], dev_dsp="$withval", dev_dsp="/dev/dsp")AC_DEFINE_UNQUOTED(DEV_DSP,"$dev_dsp", [Path to OSS DSP, really just a data pipe, default is /dev/dsp.])AC_ARG_WITH(dev-mixer, [ --with-dev-mixer=path Path to OSS sound mixer, default is /dev/mixer.], dev_mixer="$withval", dev_mixer="/dev/mixer")AC_DEFINE_UNQUOTED(DEV_MIXER,"$dev_mixer", [Path to OSS mixer, default is /dev/mixer.])AC_ARG_WITH(cdda-device, [ --with-cdda-device=path Path to default cdaudio device.], AC_DEFINE_UNQUOTED(CDDA_DEVICE,"$withval", [Path to default cdaudio device.]))AC_ARG_WITH(cdda-dir, [ --with-cdda-dir=path Path to default cdaudio directory.], AC_DEFINE_UNQUOTED(CDDA_DIRECTORY,"$withval", [Path to default cdaudio directory.]))prefix_save=$prefixAC_PREFIX_PROGRAM(xmms)dnl work around a bug in AC_PREFIX_PROGRAM in autoconf 2.53-2.57prefix_new=`echo $prefix | sed 's/^\(.\).*$/\1/'`if test "x$prefix_new" != "x/"; then prefix=$prefix_savefidnl Various compiler setup.AC_PROG_CCAC_ISC_POSIXdnl AC_PROG_CXXAC_C_BIGENDIANAC_C_INLINEAC_C_CONSTdnl Set assembler and assembler flags for automake > 1.4ifdef([AM_PROG_AS], [AM_PROG_AS])dnl Checks for programs.AC_PROG_INSTALLAC_PROG_LN_SAC_PROG_MAKE_SETAM_DISABLE_STATICAM_PROG_LIBTOOLAC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))AM_PATH_GLIB(1.2.2,,AC_MSG_ERROR([*** GLIB >= 1.2.2 not installed - please install first ***]))AM_PATH_GTK(1.2.2,,AC_MSG_ERROR([*** GTK+ >= 1.2.2 not installed - please install first ***]),gthread)AC_PATH_PROG(XMMS_PATH,xmms,no)LIBS_save=$LIBSLIBS="$LIBS $GTK_LIBS"SM_LIBS=""AC_CHECK_LIB(SM, SmcOpenConnection,[AC_DEFINE(WITH_SM, , [Define if building with support for X11R6 session management])SM_LIBS="-lSM -lICE"])AC_SUBST(SM_LIBS)LIBS=$LIBS_saveAC_PATH_XAM_ICONVCFLAGS_save=$CFLAGSLIBS_save=$LIBSCFLAGS="$CFLAGS $GTK_CFLAGS"LIBS="$LIBS $GTK_LIBS"AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,[ AC_DEFINE(XF86VIDMODE,1,[XF86VidMode extension is present]) VM_LIBS="-lXxf86vm"],, -L$x_libraries -lXext)CFLAGS=$CFLAGS_saveLIBS=$LIBS_saveAC_SUBST(VM_LIBS)PTHREAD_LIBS=errorAC_MSG_CHECKING(for old style FreeBSD -pthread flag)AC_EGREP_CPP(yes, [#if (defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001) || defined(__OpenBSD__) yes #endif ], AC_MSG_RESULT(yes) CFLAGS="$CFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread", AC_MSG_RESULT(no))if test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_LIB(pthread, pthread_attr_init, PTHREAD_LIBS="-lpthread")fiif test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_LIB(pthreads, pthread_attr_init, PTHREAD_LIBS="-lpthreads")fiif test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_LIB(c_r, pthread_attr_init, PTHREAD_LIBS="-lc_r")fiif test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")fiif test "x$PTHREAD_LIBS" = xerror; then AC_MSG_ERROR(*** Unable to locate working posix thread library ***)fiAC_SUBST(PTHREAD_LIBS)dnl *** OpenGLAC_ARG_ENABLE( opengl,[ --disable-opengl Disable OpenGL plugin(s) [default=enabled]],, enable_opengl="yes")if test "x$enable_opengl" = xyes; then LIBS_save=$LIBS LIBS="$LIBS $GTK_LIBS" OPENGL_LIBS=error AC_CHECK_LIB(GL, glBegin, OPENGL_LIBS="-lGL") if test "x$OPENGL_LIBS" = xerror; then AC_CHECK_LIB(MesaGL, glBegin,OPENGL_LIBS="-lMesaGL") fi CPPFLAGS_save=$CPPFLAGS CPPFLAGS="$GTK_CFLAGS $CPPFLAGS" have_opengl_headers=yes AC_CHECK_HEADERS(GL/gl.h GL/glx.h,,have_opengl_headers=no) if test "x$OPENGL_LIBS" = xerror || test "x$have_opengl_headers" = xno; then have_opengl=no else have_opengl=yes fi CPPFLAGS=$CPPFLAGS_save LIBS=$LIBS_saveelse AC_MSG_RESULT([*** Disabling OpenGL plugins per user request ***]) have_opengl=nofiAC_SUBST(OPENGL_LIBS)AM_CONDITIONAL(HAVE_OPENGL, test "x$have_opengl" = xyes)dnl *** zlibLIBS_save=$LIBSZ_LIBS=""AC_CHECK_LIB(z, inflate, [Z_LIBS="-lz" AC_DEFINE(HAVE_LIBZ,,[Define if zlib is available])])AC_SUBST(Z_LIBS)LIBS=$LIBS_savednl *** esoundAC_ARG_ENABLE( esd,[ --disable-esd Disable esound output plugin [default=enabled]],, enable_esd="yes")if test "x$enable_esd" = xyes; then AM_PATH_ESD(0.2.8, [have_esd=yes AC_CHECK_LIB(esd, esd_get_latency, AC_DEFINE(HAVE_ESD_GET_LATENCY,, [Define if libesd has the esd_get_latency function]))], have_esd=no)else AC_MSG_RESULT([*** esound plugin disabled per user request ***]) have_esd=nofiAM_CONDITIONAL(HAVE_ESD,test "x$have_esd" = xyes)dnl *** mikmodAC_ARG_ENABLE( mikmod,[ --disable-mikmod Disable mikmod input plugin [default=enabled]],, enable_mikmod="yes")if test "x$enable_mikmod" = xyes; then AM_PATH_LIBMIKMOD(3.1.5,have_mikmod=yes, have_mikmod=no)else AC_MSG_RESULT([*** mikmod plugin disabled per user request ***]) have_mikmod=nofiAM_CONDITIONAL(HAVE_MIKMOD,test "x$have_mikmod" = xyes)dnl *** Ogg VorbisAC_ARG_ENABLE( vorbis,[ --disable-vorbis Disable Ogg Vorbis input plugin [default=enabled]],, enable_vorbis="yes")if test "x$enable_vorbis" = xyes; then XIPH_PATH_OGG(have_ogg=yes, have_ogg=no) XIPH_PATH_VORBIS(have_vorbis=yes, have_vorbis=no) if test "x$have_vorbis" = xyes; then AC_MSG_CHECKING(if Vorbis is sufficiently new) CFLAGS_save=$CFLAGS LIBS_save=$LIBS CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS" LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" AC_TRY_COMPILE( [#include <vorbis/vorbisfile.h>], [OggVorbis_File vf; float **pcm; ov_read_float(&vf, &pcm, 1024, 0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT([no (need atleast 1.0)]) have_vorbis=no]) CFLAGS=$CFLAGS_save LIBS=$LIBS_save fi have_oggvorbis=no if test "x$have_ogg" = xyes then if test "x$have_vorbis" = xyes then have_oggvorbis=yes fi fielse AC_MSG_RESULT([*** Ogg Vorbis plugin disabled per user request ***]) have_oggvorbis=nofiAM_CONDITIONAL(HAVE_OGGVORBIS,test $have_oggvorbis = yes)dnl *** Thread-safe xlib checkCFLAGS_save=$CFLAGSLIBS_save=$LIBSCFLAGS="$CFLAGS $GTK_CFLAGS"LIBS="$LIBS $GTK_LIBS"AC_CACHE_CHECK(for thread-safe Xlib, xmms_cv_lib_xlibs_threadsafe,[AC_TRY_RUN([#include <X11/Xlib.h>int main(){ exit(!(XInitThreads()));}],xmms_cv_lib_xlibs_threadsafe=yes,xmms_cv_lib_xlibs_threadsafe=no,xmms_cv_lib_xlibs_threadsafe=yes)])CFLAGS=$CFLAGS_saveLIBS=$LIBS_savednl This is just a copy of po/LINGUAS and is here to avoid breakingdnl compatibility with automake 1.4ALL_LINGUAS="af az be bg bs ca cs cy da de el en eo es et eu fi fr ga gl hr hu id it ja ka ko lt lv mk ms nn nl no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv tg th tr uk uz vi wa zh_CN zh_TW"AM_GNU_GETTEXTlocaledir=${datadir}/localeAC_SUBST(localedir)dnl If {type}_PLUGINS is defined, it should be a comma or space separateddnl list of plugins that should be built, e.g.,dnl INPUT_PLUGINS="mpg123,cdaudio cdin". If variable is not defined, alldnl buildable plugins are compiled. This stuff makes life easier fordnl automated builds that want to disable certain plugins.for class in EFFECT GENERAL INPUT OUTPUT VISUALIZATION; do value=`eval echo "\\$${class}_PLUGINS"` if test "x${value}" = x; then eval ${class}_PLUGINS="\$\(ALL_PLUGINS\)" else value=`echo ${value} | sed -e 's/,/ /g'` eval ${class}_PLUGINS="\${value}" fidoneAC_SUBST(EFFECT_PLUGINS)AC_SUBST(GENERAL_PLUGINS)AC_SUBST(INPUT_PLUGINS)AC_SUBST(OUTPUT_PLUGINS)AC_SUBST(VISUALIZATION_PLUGINS)dnl x86 SIMD(3DNow!/MMX) instructions supportdnl ========================AC_ARG_ENABLE(simd, [ --enable-simd build with x86 SIMD(3DNow!/MMX) instructions support (default=no)], USE_SIMD=$enableval, USE_SIMD=no)if test "x$USE_SIMD" = xyes; then AC_DEFINE(USE_SIMD, , [Define if building with ia32 SIMD support])fiAM_CONDITIONAL(USE_SIMD,test "x$USE_SIMD" = xyes)AC_SUBST(USE_SIMD_TRUE)dnl ========================dnl IPv6 supportAC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable IPv6 support (default=no)], enable_ipv6=$enableval, enable_ipv6=no)if test "x$enable_ipv6" = xyes; then AC_DEFINE(USE_IPV6, , [Define if building with ipv6 support])fiAM_CONDITIONAL(USE_IPV6,test "x$enable_ipv6" = xyes)AC_SUBST(USE_IPV6)AC_CACHE_CHECK(for socklen_t, xmms_cv_type_socklen_t,[AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[socklen_t s;], xmms_cv_type_socklen_t=yes, xmms_cv_type_socklen_t=no)])if test "x$xmms_cv_type_socklen_t" = "xno"; then AC_DEFINE(socklen_t, int, [Define to int if the socklen_t type is missing])fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -