AC_INIT(vsound.c) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(vsound, 0.5) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_CPP AC_CHECK_HEADERS(endian.h) AC_C_FIND_ENDIAN_NESS AC_ARG_ENABLE(debug, [ --enable-debug enable debugging ], ac_arg_debug="$enableval", ac_arg_debug="N") dnl We only want the shared version of this library. The static one is of dnl no use to us. (If a shared library can't be built, there isn't much dnl chance that this program will work, anyway). AM_DISABLE_STATIC AM_PROG_LIBTOOL AC_PROG_INSTALL AC_CHECK_PROG(SOX, sox, sox, no) if test "$SOX" = "no"; then AC_MSG_ERROR(could not find the sox program) fi AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h) if test "${ac_cv_header_sys_soundcard_h}" = "no" && test "${ac_cv_header_soundcard_h}" = "no" && test "${ac_cv_header_machine_soundcard_h}" = "no"; then AC_MSG_ERROR(could not find required OSS header files) fi dlopen_found=no DL_LIB= AC_CHECK_FUNC(dlopen, dlopen_found=yes, AC_CHECK_LIB(dl, dlopen, dlopen_found=yes DL_LIB=-ldl)) AC_SUBST(DL_LIB) if test "$dlopen_found" = no; then AC_MSG_ERROR(could not find dlopen function) fi if test "$ac_cv_prog_gcc" = yes ; then CFLAGS="-g -O2 -Wall -Wstrict-prototypes -pipe" fi if test "$ac_arg_debug" = yes; then echo "enabling debug" CFLAGS="$CFLAGS -DENABLE_DEBUG " fi AC_OUTPUT(Makefile vsound)