Mercurial > octave-antonio
diff m4/acinclude.m4 @ 20153:3b3579ad7e46 stable
Check for a modern version of sndfile in configure scripts (bug #44976).
* configure.ac: Call OCTAVE_CHECK_LIB_SNDFILE_OK after first determining that
sndfile library exists.
* m4/acinclude.m4 (OCTAVE_CHECK_LIB_SNDFILE_OK): New macro to check for a modern
version of lib sndfile with Ogg support.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 01 May 2015 21:39:09 -0700 |
parents | 81078b0e39e8 |
children |
line wrap: on
line diff
--- a/m4/acinclude.m4 Fri May 01 13:37:26 2015 -0700 +++ b/m4/acinclude.m4 Fri May 01 21:39:09 2015 -0700 @@ -1059,6 +1059,28 @@ : fi ]) +dnl +dnl Check whether sndfile library is modern enough to include things like Ogg +dnl +AC_DEFUN([OCTAVE_CHECK_LIB_SNDFILE_OK], [ + AC_CACHE_CHECK([whether sndfile library is modern enough], + [octave_cv_lib_sndfile_ok], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include <sndfile.h> + ]], [[ + int x = SF_FORMAT_OGG; + ]])], + octave_cv_lib_sndfile_ok=yes, + octave_cv_lib_sndfile_ok=no) + ]) + if test $octave_cv_lib_sndfile_ok = yes; then + $1 + : + else + $2 + : + fi +]) dnl dnl Find a suitable termlib to use. dnl