📄 configure.in
字号:
dnl Initialize the autoconf settingsAC_INIT(esd.h)ESD_MAJOR_VERSION=0ESD_MINOR_VERSION=2ESD_MICRO_VERSION=8ESD_VERSION=$ESD_MAJOR_VERSION.$ESD_MINOR_VERSION.$ESD_MICRO_VERSIONdnl set version info for libesd.so to package rev - $MAJOR + $MINOR : $MICRO : $MINORESD_VERSION_INFO=2:8:2AC_SUBST(ESD_MAJOR_VERSION)AC_SUBST(ESD_MINOR_VERSION)AC_SUBST(ESD_MICRO_VERSION)AC_SUBST(ESD_VERSION)AC_SUBST(ESD_VERSION_INFO)VERSION=$ESD_VERSIONPACKAGE=esoundAM_INIT_AUTOMAKE($PACKAGE, $VERSION)AM_CONFIG_HEADER(config.h)AM_MAINTAINER_MODEdnl Check for toolsAC_CANONICAL_HOSTAC_PROG_MAKE_SETAC_PROG_CCAC_PROG_CPPAM_PROG_LIBTOOLAC_PROG_INSTALLdnl Check for compiler environmentAC_C_CONSTdnl Check for system libs neededAC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(posix4,nanosleep)])AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)])if test x$ac_cv_func_nanosleep = xno && test x$ac_cv_lib_posix4_nanosleep = xno then :else AC_DEFINE(HAVE_NANOSLEEP)fiif test x$ac_cv_func_inet_aton = xno && test x$ac_cv_lib_resolv_inet_aton = xno then :else AC_DEFINE(HAVE_INET_ATON)fidnl check for getopt_long, substitute the distributed versions if notAC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"])AC_SUBST(LIBOBJS)dnl Needed for FIONBIO on Solaris at leastAC_CHECK_HEADERS(sys/filio.h sys/ioctl.h)dnl see if we want to enable insanely verbose debuggingAC_ARG_ENABLE(debugging,[ --enable-debugging enable verbose diagnostic info [default=no]], , )if test "x$enable_debugging" = "xyes"; then AC_DEFINE(ESDBG)fidnl see if we intentionally want to disable local soundAC_ARG_ENABLE(local_sound,[ --enable-local-sound turn on local sound playing [default=yes]], , enable_local_sound=yes)if test "x$enable_local_sound" = "xyes"; then found_sound=no dnl Check for audio header files needed echo "---------------------------------------------------------------------" echo "--- Checking to see which audio header files your system uses."; echo "--- Most of these checks should fail. Do not be alarmed."; AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h sys/audio.h) AC_CHECK_HEADERS(sys/audioio.h sys/audio.io.h sun/audioio.h) AC_CHECK_HEADERS(dmedia/audio.h sys/soundlib.h sys/asoundlib.h) dnl Define the driver needed based on the first header file found if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \ test "${ac_cv_header_soundcard_h}" = "yes" || \ test "${ac_cv_header_machine_soundcard_h}" = "yes"; then dnl Platform mklinux/powerpc needs special care and feeding if test "${host_cpu}" = "powerpc"; then found_sound=yes AC_DEFINE(DRIVER_MKLINUX) else found_sound=yes AC_DEFINE(DRIVER_OSS) fi fi if test "${ac_cv_header_sys_audio_h}" = "yes"; then case ${host_os} in hpux*) found_sound=yes AC_DEFINE(DRIVER_HPUX) ;; aix*) found_sound=yes AC_DEFINE(DRIVER_AIX) esac fi if test "${ac_cv_header_sys_audioio_h}" = "yes" || \ test "${ac_cv_header_sys_audio_io_h}" = "yes" || \ test "${ac_cv_header_sun_audioio_h}" = "yes"; then case ${host_os} in solaris*) found_sound=yes AC_DEFINE(DRIVER_SOLARIS) esac fi if test "${ac_cv_header_dmedia_audio_h}" = "yes"; then case ${host_os} in irix*) found_sound=yes AC_DEFINE(DRIVER_IRIX) esac fi AC_ARG_ENABLE(alsa,[ --enable-alsa use alsa if available [default=yes]], , enable_alsa=yes) if test "x$enable_alsa" = "xyes"; then if test "${ac_cv_header_sys_soundlib_h}" = "yes"; then found_sound=yes AC_DEFINE(DRIVER_ALSA) fi if test "${ac_cv_header_sys_asoundlib_h}" = "yes"; then found_sound=yes AC_DEFINE(DRIVER_NEWALSA) fi fi if test "$found_sound" = "no"; then AC_MSG_ERROR([Could not find a support sound driver]) fi dnl Check for additional audio libs needed echo "---------------------------------------------------------------------" echo "--- Checking to see which audio libraries are required for linking."; echo "--- Most of these checks should also fail. Do not be alarmed."; AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)]) AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)]) if test "x$enable_alsa" = "xyes"; then AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)]) AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(asound,snd_cards)]) fielse AC_DEFINE(DRIVER_NONE)fidnl make sure we have the library, -laudiofileESDPLAY=AC_ARG_WITH(audiofile,[ --with-audiofile include support for audiofile related utilities and functions ARG = { yes | no | check } [default=check]])if test xno != x$with_audiofile ; thenecho "---------------------------------------------------------------------"echo "--- Checking for the audiofile library. NOTE: This library is now"echo "REQUIRED from proper compilation of the esound package."AM_PATH_AUDIOFILE(0.1.5, [ESDPLAY=esdplayecho "--- libaudiofile found. Building esound with audiofile support"],[echo "--- ERROR: The audiofile library was not found on your system."echo "--- The audiofile library may be obtained from your favourite"echo "--- gnome distribution center, or check the audiofile web page at:"echo "--- http://www.68k.org/~michael/audiofile/"echo "--- NOTE: The audiofile library is now REQUIRED for esound."])else echo "---------------------------------------------------------------------" echo "--- WARNING: Per configuration request, the audiofile library support" echo "--- not be included. This may result in errors using some programs" echo "--- designed to operate with esd." echo "--- The audiofile library may be obtained from your favourite" echo "--- gnome distribution center, or check the audiofile web page at:" echo "--- http://www.68k.org/~michael/audiofile/" echo "--- NOTE: The audiofile library is now REQUIRED for esound."fiecho "---------------------------------------------------------------------"AC_ARG_WITH(libwrap,[ --with-libwrap use tcp wrappers])WRAP_LIB=if test "x$with_libwrap" = "xyes"; then esound_save_LIBS="$LIBS" LIBS="$LIBS -lwrap" AC_MSG_CHECKING([for tcp_wrapper library and headers]) wrap_ok=no AC_TRY_LINK([#include <tcpd.h>#include <syslog.h>int allow_severity = LOG_INFO;int deny_severity = LOG_WARNING;],[struct request_info *request; return hosts_access (request);], [AC_DEFINE(USE_LIBWRAP) WRAP_LIB="-lwrap" wrap_ok=yes], [LIBS="$LIBS -lnsl" AC_TRY_LINK([#include <tcpd.h>#include <syslog.h>int allow_severity = LOG_INFO;int deny_severity = LOG_WARNING;],[struct request_info *request; return hosts_access (request);], [AC_DEFINE(USE_LIBWRAP) WRAP_LIB="-lwrap -lnsl" wrap_ok=yes])]) AC_MSG_RESULT($wrap_ok) LIBS="$esound_save_LIBS"fidnl build the esddsp wrapper for Linux/FreeBSD onlydsp_ok=no ESDDSP= LIBESDDSP= DL_LIB=AC_MSG_CHECKING([if your platform supports esddsp])case "$host_os" in linux* | freebsd* ) dsp_ok=yes ;;esacAC_MSG_RESULT($dsp_ok)if test "$dsp_ok" = "yes"; then AC_CHECK_FUNC(dlopen, dsp_ok=yes, AC_CHECK_LIB(dl, dlopen, dsp_ok=yes DL_LIB=-ldl)) ESDDSP=esddsp LIBESDDSP=libesddsp.lafi# set | sort; # just for double checking the script...AC_SUBST(WRAP_LIB)AC_SUBST(AUDIOFILE_LIBS)AC_SUBST(ESDPLAY)AC_SUBST(LIBESDDSP)AC_SUBST(ESDDSP)AC_SUBST(DL_LIB)AC_OUTPUT([Makefileesd-configesound.specesddsp])dnl , [case "$CONFIG_FILES" in *esd-config*) chmod +x esd-config;; esac])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -