diff --git a/README.wavsim b/README.wavsim index 0b342dfc7..6240de801 100644 --- a/README.wavsim +++ b/README.wavsim @@ -26,6 +26,10 @@ http://gareus.org/oss/spicesound/start A complete package for Windows is available at http://ngspice.sourceforge.net/download.html#wav . -Test on Linux and macOS will follow. + +For Linux you have to install libsamplerate and libsndfile and their development headers. +./compile_linux.sh will then compile and install ngspice with *.wav capability. + +Test on macOS will follow. diff --git a/configure.ac b/configure.ac index 2c4f15457..0b983b846 100644 --- a/configure.ac +++ b/configure.ac @@ -933,6 +933,17 @@ if test "x$with_fftw3" != xno; then LIBS="$LIBS -lfftw3"]) fi +AC_CHECK_HEADERS([sndfile.h]) +AC_CHECK_LIB([sndfile], [sf_command], + [AC_DEFINE([HAVE_LIBSNDFILE], [], [Have libsndfile]) + LIBS="$LIBS -lsndfile"]) + +AC_CHECK_HEADERS([samplerate.h]) +AC_CHECK_LIB([samplerate], [src_process], + [AC_DEFINE([HAVE_LIBSAMPLERATE], [], [Have libsamplerate]) + LIBS="$LIBS -lsamplerate"]) + + # Check for a few mathematical functions: AC_CHECK_FUNCS([erfc logb scalb scalbn asinh acosh atanh finite]) # According POSIX we should look for macros first