ref: 936818b32ddb701cb5726842fd1d09570270578f
parent: 9cff19e00e55a4998f960deeca36271fc0e0b2e2
author: cbagwell <cbagwell>
date: Thu Jan 4 10:22:57 EST 2007
Don't let real PKG_CHECK_MODULES exit on error.
--- a/configure.ac
+++ b/configure.ac
@@ -134,8 +134,7 @@
AC_HELP_STRING([--with-samplerate],
[Use libsamplerate (aka Rabbit Code) if present (default is YES)]))
if test "$with_samplerate" = yes; then
- SOX_PATH_SAMPLERATE([AC_DEFINE(HAVE_SAMPLERATE, 1,
- [Set to 1 if you have libsamplerate.])],
+ SOX_PATH_SAMPLERATE(,
[with_samplerate=no
AC_MSG_NOTICE([Could not find a usable libsamplerate])])
fi
--- a/m4/samplerate.m4
+++ b/m4/samplerate.m4
@@ -18,7 +18,7 @@
# Step 1: Use pkg-config if available
m4_ifdef([PKG_CHECK_MODULES],
[# PKG_CHECK_MODULES available
- PKG_CHECK_MODULES([SAMPLERATE], [samplerate])
+ PKG_CHECK_MODULES([SAMPLERATE], [samplerate], [$1], [$2])
have_samplerate="maybe"],
[# PKG_CHECK_MODULES is unavailable, search for pkg-config program
AC_PATH_PROG([PKGCONFIG], [pkg-config], [none])
@@ -53,7 +53,7 @@
CFLAGS="$CFLAGS $SAMPLERATE_CFLAGS"
LIBS="$LIBS $SAMPLERATE_LIBS"
AC_CHECK_HEADER([samplerate.h], [
- AC_DEFINE([HAVE_SAMPLERATE_SAMPLERATE_H], 1, [Define if you have <samplerate.h>])
+ AC_DEFINE([HAVE_SAMPLERATE_H], 1, [Define if you have <samplerate.h>])
AC_CHECK_FUNC([src_new], [
ifelse([$1], , :, [$1])
have_samplerate="yes"
--- a/src/handlers.c
+++ b/src/handlers.c
@@ -117,7 +117,7 @@
st_pick_effect_fn,
st_pitch_effect_fn,
st_polyphase_effect_fn,
-#ifdef HAVE_SAMPLERATE
+#ifdef HAVE_SAMPLERATE_H
st_rabbit_effect_fn,
#endif
st_rate_effect_fn,
--- a/src/rabbit.c
+++ b/src/rabbit.c
@@ -24,7 +24,7 @@
#include "st_i.h"
-#ifdef HAVE_SAMPLERATE
+#ifdef HAVE_SAMPLERATE_H
#include <limits.h>
#include <stdlib.h>
--- a/src/st_i.h
+++ b/src/st_i.h
@@ -297,7 +297,7 @@
extern const st_effect_t *st_pick_effect_fn(void);
extern const st_effect_t *st_pitch_effect_fn(void);
extern const st_effect_t *st_polyphase_effect_fn(void);
-#ifdef HAVE_SAMPLERATE
+#ifdef HAVE_SAMPLERATE_H
extern const st_effect_t *st_rabbit_effect_fn(void);
#endif
extern const st_effect_t *st_rate_effect_fn(void);