1dnl @(#)configure.in 1.13 15/12/14 Copyright 1998-2003,2015 Heiko Ei�feldt 2dnl Process this file with autoconf to produce a configure script. 3AC_INIT(cdda2wav.c) 4AC_CONFIG_HEADER(lconfig.h) 5 6dnl get canonical host 7AC_CANONICAL_HOST 8 9dnl extract cdrtools version from the cdrecord.c file 10dnl CDRTOOLS_VERSION=`sed -n -f ../../version.sed <../../../cdrecord/cdrecord.c` 11dnl AC_SUBST(CDRTOOLS_VERSION) 12 13dnl set object extension needed for AC_CHECK_HEADERS by autoconf 2.57 14dnl _AC_COMPILER_OBJEXT 15 16dnl check for posix4 library on Solaris or SunOS 17case "$host_os" in 18 solaris*|sunos*) 19AC_CHECK_LIB(posix4, sched_get_priority_max) 20;; 21esac 22AC_CHECK_LIB(ossaudio, _oss_ioctl) 23AC_CHECK_LIB(asound, snd_pcm_open) 24AC_CHECK_LIB(sndio, sio_open) 25AC_CHECK_LIB(pulse, pa_strerror) 26AC_CHECK_LIB(pulse-simple, pa_simple_new) 27 28 29EXTRALIBS="$LIBS" 30 31AC_SUBST(EXTRALIBS) 32 33dnl check header files 34AC_CHECK_HEADERS(sys/cdio.h sys/cdrio.h sundev/srreg.h sys/audioio.h sun/audioio.h) 35AC_CHECK_HEADERS(soundcard.h sys/soundcard.h linux/soundcard.h machine/soundcard.h) 36case "${ac_cv_lib_asound_snd_pcm_open}" in 37 *yes*) 38 AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h) 39;; 40esac 41case "${ac_cv_lib_sndio_sio_open}" in 42 *yes*) 43 AC_CHECK_HEADERS(sndio.h) 44;; 45esac 46case "${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in 47 *yesyes*) 48 AC_CHECK_HEADERS(pulse/pulseaudio.h pulse/simple.h) 49;; 50esac 51dnl We no longer include HAVE_WINDOWS_H in lconfig.h but we need the test 52dnl result together with the test for mmsystem.h 53AC_CHECK_HEADERS(windows.h mmsystem.h) 54 55case "${ac_cv_header_sndio_h}""${ac_cv_lib_sndio_sio_open}" in 56 *yes*) 57HAVE_SNDIO=1 58;; 59 *) 60HAVE_SNDIO= 61;; 62esac 63AC_SUBST(HAVE_SNDIO) 64 65case "${ac_cv_header_sys_cdio_h}""${ac_cv_header_sundev_srreg_h}" in 66 *yes*) 67HAVE_SUN_IOCTL=1 68;; 69 *) 70HAVE_SUN_IOCTL= 71;; 72esac 73AC_SUBST(HAVE_SUN_IOCTL) 74 75case "${ac_cv_header_sys_audioio_h}""${ac_cv_header_sun_audioio_h}" in 76 *yes*) 77HAVE_SUNSOUND=1 78;; 79 *) 80HAVE_SUNSOUND= 81;; 82esac 83AC_SUBST(HAVE_SUNSOUND) 84 85case "${ac_cv_header_machine_soundcard_h}""${ac_cv_header_sys_soundcard_h}""${ac_cv_header_linux_soundcard_h}" in 86 *yes*) 87HAVE_OSS=1 88;; 89 *) 90HAVE_OSS= 91;; 92esac 93AC_SUBST(HAVE_OSS) 94 95case "${ac_cv_header_alsa_asoundlib_h}""${ac_cv_header_sys_asoundlib_h}" in 96 *yes*) 97HAVE_ALSA=1 98;; 99 *) 100HAVE_ALSA= 101;; 102esac 103case "${HAVE_ALSA}""${ac_cv_lib_asound_snd_pcm_open}" in 104 1*yes*) 105HAVE_ALSA=1 106;; 107 *) 108HAVE_ALSA= 109HAVE_SYS_ASOUNDLIB_H= 110HAVE_ALSA_ASOUNDLIB_H= 111;; 112esac 113AC_SUBST(HAVE_ALSA) 114 115AC_SUBST(HAVE_SYS_ASOUNDLIB_H) 116AC_SUBST(HAVE_ALSA_ASOUNDLIB_H) 117 118case "${ac_cv_header_windows_h}""${ac_cv_header_mmsystem_h}" in 119 *yesyes*) 120HAVE_WINSOUND=1 121;; 122 *) 123HAVE_WINSOUND= 124;; 125esac 126AC_SUBST(HAVE_WINSOUND) 127 128case "${ac_cv_header_os2_h}""${ac_cv_header_os2me_h}" in 129 *yesyes*) 130HAVE_OS2SOUND=1 131;; 132 *) 133HAVE_OS2SOUND= 134;; 135esac 136AC_SUBST(HAVE_OS2SOUND) 137 138case "${ac_cv_header_pulse_pulseaudio_h}""${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in 139 *yesyesyes*) 140HAVE_PULSE_SIMPLE_H=1 141;; 142 *) 143HAVE_PULSE_SIMPLE_H= 144HAVE_PULSE_PULSEAUDIO_H= 145;; 146esac 147AC_SUBST(HAVE_PULSE_SIMPLE_H) 148 149dnl Checks for library functions. 150 151AC_OUTPUT(local.cnf) 152