📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.# Autoconf initialization:AC_INIT(mpdroot.h)AC_PREREQ(2.59)# Autoconf header:rm -f ${srcdir}/mpdconf.h mpdconf.hAC_CONFIG_HEADER(mpdconf.h)dnl Process configure argumentsAC_ARG_ENABLE(echo, [--enable-echo - turn on echoing from within configure script], set -x)CONFIGURE_ARGS="$*"if test -n "$CONFIGURE_ARGS" ; then echo "Configuring with args $CONFIGURE_ARGS"fiAC_SUBST(COPTIONS)dnl add --enable-strict and --enable-gAC_ARG_ENABLE(g, [--enable-g - turn on debugging flags ] )if test "$enable_g" = "yes" -o "$enable_g" = "all" ; then COPTIONS="${COPTIONS} -g"fiAC_ARG_ENABLE(totalview,[--enable-totalview - turn on mpd-totalview support],, enable_totalview=default )if test "$enable_totalview" = "no" ; then DO_MTV="no"elif test "$enable_totalview" = "yes" ; then DO_MTV="yes"else AC_CHECK_PROG(TOTALVIEW, totalview, totalview) if test -n "$TOTALVIEW" ; then DO_MTV="yes" fifiAC_SUBST(DO_MTV)dnl Checks for programs.dnl Determine the executable and object file extensions. Thesednl are needed for some operations under cygwinAC_EXEEXTAC_OBJEXT# Checking for programs.AC_PROG_CCAC_PROG_MAKE_SETAC_PROG_LN_S# A quick check to ensure that install-sh has the execute bit set# (we've had some problems with that)if test -f install.sh -a ! -x install.sh ; then chmod +x install.sh ; fiAC_PROG_INSTALLMPD_AC_PROG_CHECK_INSTALL_WORKSif test "$installOk" = "no" ; then # echo "RMB1: SETTING install" INSTALL="${srcdir}/install.sh"fiecho Using INSTALL=$INSTALLAC_ARG_WITH(python, [--with-python=name - Specify a particular python to use for mpd],, with_python="")PYTHON=$with_python# echo "GOT PYTHON", $PYTHONif test -z "$PYTHON" ; then ## user did not give us a python; find one dnl Find a Python AC_CHECK_PROG(PY25, python2.5, python2.5) AC_CHECK_PROG(PY24, python2.4, python2.4) AC_CHECK_PROG(PY23, python2.3, python2.3) AC_CHECK_PROG(PY22, python2.2, python2.2) AC_CHECK_PROG(PY2, python2, python2) AC_CHECK_PROG(PY, python, python) if test -z "$PY25" -a \ -z "$PY24" -a \ -z "$PY23" -a \ -z "$PY22" -a \ -z "$PY2" -a \ -z "$PY" ; then AC_MSG_WARN([Could not find a python executable in path: $PATH]) fi dnl See if one of the pythons has the right modules for pypgm in $PY25 $PY24 $PY23 $PY22 $PY2 $PY ; do \ AC_MSG_CHECKING([that $pypgm is a valid python version]) changequote(,)dnl py_version=`$pypgm -c "import sys;print sys.version_info[0]"` py_subversion=`$pypgm -c "import sys;print sys.version_info[1]"` changequote([,])dnl if test "$py_version" -gt "2" -o "$py_version" -ge "2" -a "$py_subversion" -ge "2" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) continue fi AC_MSG_CHECKING([that the cPickle module is available for $pypgm]) if $pypgm -c 'from cPickle import dumps' >/dev/null 2>&1 ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) continue fi PYTHON="$pypgm" break doneelse ### user-supplied with_python dnl See if the user's python has the right modules continuefi#if test -z "$PYTHON" ; then AC_MSG_ERROR([Python required (version 2.2 or greater, with necessary modules)]) fiCYGWIN_TEST=`uname -a | grep -i cygwin`if test -n "$CYGWIN_TEST" ; then AC_MSG_CHECKING([that rebaseall is ok on this cygwin system]) echo if ! $PYTHON -c 'from socket import socket ; from os import fork ; x = fork()' >/dev/null 2>&1 ; then AC_MSG_ERROR([*** fork may fail on this cygwin system; you may need to run rebaseall]) fifi# echo "RMB PYTHON=" $PYTHONAC_SUBST(PYTHON)# In case clinker is not definedif test -z "$CLINKER" ; then CLINKER="$CC" AC_SUBST(CLINKER)fidnl Checks for libraries.# Searching libraries instead of checkingAC_SEARCH_LIBS(socket, socket)dnl Checks for header files.# Checking headersAC_HEADER_STDCAC_HEADER_SYS_WAITAC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h stdlib.h)dnl Checks for library functions.# Checking library functionsAC_CHECK_FUNCS(putenv socket)dnl Output:# Starting outputMPD_HOME=`pwd`AC_SUBST(MPD_HOME)dnldnl Dependency handlingAC_SUBST(MAKE_DEPEND_C)# AC_OUTPUT_COMMANDS(chmod +x startdaemons)AC_OUTPUT(Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -