-PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.21,
- HAVE_LIBSNDFILE1="yes", HAVE_LIBSNDFILE1="no")
-
-if test "$HAVE_LIBSNDFILE1" = "yes" ; then
- AC_DEFINE([HAVE_LIBSNDFILE1], [], [Define if libsndfile version 1 found])
- AC_SUBST(SNDFILE_LIBS)
- AC_SUBST(SNDFILE_CFLAGS)
-else
- AC_CHECK_LIB(sndfile, sf_open, HAVE_LIBSNDFILE1="maybe")
- if test "$HAVE_LIBSNDFILE1" = "maybe" ; then
- AC_MSG_ERROR([
-***
-*** libsndfile-1.0.21 or greater seems to exist on your system, however
-*** the pkg-config tool cannot find its build information.
-***
-*** Please set your PKG_CONFIG_PATH environment variable to include the
-*** directory in which sndfile.pc was installed. For example, sndfile.pc
-*** is installed in /usr/local/lib/pkgconfig by default; if that is the
-*** case do:
-***
-*** export PKG_CONFIG_PATH="\$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
-***
-*** then run this ./configure again. If you configured libsndfile with a
-*** different --prefix option, replace /usr/local above with that prefix.
-***
-])
- fi
-fi
-AM_CONDITIONAL(HAVE_LIBSNDFILE1, test "x${HAVE_LIBSNDFILE1}" = xyes)
-