From 0534026e217d963042951ca9ba4a7b5aa397a3b3 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 2 Aug 2020 13:02:03 +0200 Subject: [PATCH] update to enable compiling for Linux and Cygwin --- README.wavsim | 6 +++++- configure.ac | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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