dnl Process this file with autoconf to produce a configure script. AC_INIT(src/audio_out.c) AM_INIT_AUTOMAKE(libao,0.9.0) AM_DISABLE_STATIC dnl Library versioning LIB_CURRENT=1 LIB_REVISION=1 LIB_AGE=1 AC_SUBST(LIB_CURRENT) AC_SUBST(LIB_REVISION) AC_SUBST(LIB_AGE) AC_CANONICAL_HOST plugindir=$libdir/ao AC_SUBST(plugindir) dnl ==================================== dnl Check for programs dnl ==================================== AC_PROG_CC AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL dnl ==================================== dnl Set some general compile options dnl ==================================== cflags_save="$CFLAGS" ldflags_save="$LDFLAGS" if test -z "$GCC"; then case $host in *-*-irix*) if test -z "$CC"; then CC=cc fi DEBUG="-g -signed" CFLAGS="-O2 -w -signed" PROFILE="-p -g3 -O2 -signed" ;; sparc-sun-solaris*) DEBUG="-v -g" CFLAGS="-xO4 -fast -w -fsimple -native -xcg92" PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;; *) DEBUG="-g" CFLAGS="-O" PROFILE="-g -p" ;; esac else case $host in *-*-linux*) DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char" PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";; sparc-sun-*) DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8" CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; *) DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char" PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; esac fi CFLAGS="$CFLAGS $cflags_save" LDFLAGS="$LDFLAGS $ldflags_save" AC_SUBST(DEBUG) AC_SUBST(PROFILE) dnl ============================== dnl Check for libraries dnl ============================== # we link to libpthread just in case one of our plugins does # in which case this is required to avoid problems on dlclose() AC_CHECK_LIB(pthread, pthread_kill) dnl ============================== dnl Checks for header files dnl ============================== dnl ============================== dnl Checks for types dnl ============================== AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) case 2 in $ac_cv_sizeof_short) SIZE16="short";; $ac_cv_sizeof_int) SIZE16="int";; esac case 4 in $ac_cv_sizeof_short) SIZE32="short";; $ac_cv_sizeof_int) SIZE32="int";; $ac_cv_sizeof_long) SIZE32="long";; esac if test -z "$SIZE16"; then AC_MSG_ERROR(No 16 bit type found on this platform!) fi if test -z "$SIZE32"; then AC_MSG_ERROR(No 32 bit type found on this platform!) fi AC_SUBST(SIZE16) AC_SUBST(SIZE32) dnl ====================================== dnl Detect possible output devices dnl ====================================== dnl Check for ESD AC_ARG_ENABLE(esd, [ --enable-esd include ESD output plugin ], [ BUILD_ESD="$enableval" ],[ BUILD_ESD="yes" ]) if test "$BUILD_ESD" = "yes"; then AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no) AM_CONDITIONAL(HAVE_ESD,test "x$have_esd" = xyes) fi dnl Check for OSS AC_CHECK_HEADERS(sys/soundcard.h) AC_CHECK_HEADERS(machine/soundcard.h) AM_CONDITIONAL(HAVE_OSS,test "${ac_cv_header_sys_soundcard_h}" = "yes" || test "${ac_cv_header_machine_soundcard_h}" = "yes") dnl Check for ALSA AC_ARG_ENABLE(alsa, [ --enable-alsa include alsa 0.5 output plugin ], [ BUILD_ALSA="$enableval" ],[ BUILD_ALSA="yes" ]) if test "$BUILD_ALSA" = "yes"; then AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) AC_CHECK_HEADER(sys/asoundlib.h, , have_alsa=no) AM_CONDITIONAL(HAVE_ALSA,test "x$have_alsa" = xyes) fi if test "x$have_alsa" = xyes; then ALSA_LIBS="-lasound" else ALSA_LIBS="" fi AC_SUBST(ALSA_LIBS) dnl Check for Sun audio AC_CHECK_HEADERS(sys/audioio.h) AM_CONDITIONAL(HAVE_SUN_AUDIO,test "${ac_cv_header_sys_audioio_h}" = yes) dnl Check for aRts AC_ARG_ENABLE(arts, [ --enable-arts include aRts output plugin ], [ BUILD_ARTS="$enableval" ],[ BUILD_ARTS="yes" ]) if test "$BUILD_ARTS" = "yes"; then AC_PATH_PROG(ARTSC_CONFIG, artsc-config) AM_CONDITIONAL(HAVE_ARTS,test "x$ac_cv_path_ARTSC_CONFIG" != x) if test "x$ac_cv_path_ARTSC_CONFIG" != x then ARTS_CFLAGS=`$ac_cv_path_ARTSC_CONFIG --cflags` ARTS_LIBS=`$ac_cv_path_ARTSC_CONFIG --libs` fi fi AC_SUBST(ARTS_CFLAGS) AC_SUBST(ARTS_LIBS) dnl Check for IRIX case $host in *-*-irix*) AC_CHECK_LIB(audio, ALwritesamps, have_irix=yes, have_irix=no) ;; esac AM_CONDITIONAL(HAVE_IRIX,test "x$have_irix" = xyes) AM_CONDITIONAL(HAVE_SOLARIS,test "x$have_solaris" = xyes) CFLAGS="$CFLAGS -DAO_PLUGIN_PATH=\\\"$plugindir\\\"" AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/sun/Makefile src/plugins/irix/Makefile src/plugins/arts/Makefile debian/Makefile)