ref: c43d5e33ca19ee20ee84cc49d9b2c19edf80ace4
parent: d6e54dcfbae1d2bd1b118a881e97534fbad65c90
author: rrt <rrt>
date: Tue Apr 10 08:57:54 EDT 2007
Allow play/rec symlinks not to be installed (closes #1667835). Check for /usr/include/gsm.h as well as /usr/include/gsm/gsm.h (closes #1666612). Use "$enable_silent_libtool" instead of "$enableval" in configure.ac for consistency, to avoid maintainers having to read up on yet another corner of autotools.
--- a/configure.ac
+++ b/configure.ac
@@ -61,12 +61,22 @@
AC_MSG_CHECKING([whether libtool should be silenced])
AC_ARG_ENABLE(silent-libtool,
AC_HELP_STRING([--enable-silent-libtool], [Pass --silent to libtool.]),
- [if test $enableval = yes; then
+ [if test "$enable_silent_libtool" = "yes"; then
LIBTOOLFLAGS=--silent
fi])
AC_MSG_RESULT($enable_silent_libtool)
AC_SUBST(LIBTOOLFLAGS)
+dnl Check if we want play/rec links
+AC_MSG_CHECKING([whether to make play and rec symlinks])
+AC_ARG_ENABLE(playrec-symlinks,
+ AC_HELP_STRING([--disable-playrec-symlinks], [Don't make play and rec symlinks to sox.]),,enable_playrec_symlinks=yes)
+AC_MSG_RESULT($enable_playrec_symlinks)
+if test "$enable_playrec_symlinks" = "yes"; then
+ PLAYRECLINKS=yes
+fi
+AC_SUBST(PLAYRECLINKS)
+
dnl Check for ALSA
AC_MSG_CHECKING([whether to try building ALSA sound driver])
AC_ARG_ENABLE(alsa,
@@ -110,7 +120,8 @@
fi
dnl Check for libgsm
-AC_CHECK_HEADERS(gsm/gsm.h, found_libgsm=yes)
+AC_CHECK_HEADERS(gsm/gsm.h, found_libgsm=yes,
+ [AC_CHECK_HEADERS(gsm.h, found_libgsm=yes)])
if test "$found_libgsm" = yes; then
AC_CHECK_LIB(gsm, gsm_create, LIBS="$LIBS -lgsm")
AC_DEFINE(EXTERNAL_GSM, 1, [Define if you are using an external GSM library])
@@ -205,9 +216,11 @@
dnl Report configuration.
echo
+echo "Debugging build................... $enable_debug"
echo "ALSA driver....................... $enable_alsa"
echo "OSS driver........................ $enable_oss"
echo "SUN audio driver.................. $enable_sun_audio"
+echo "play and rec symlinks............. $enable_playrec_symlinks"
echo "libgsm............................ $gsm_option"
echo "libsndfile formats................ $with_sndfile"
echo "Ogg Vorbis format................. $with_ogg_vorbis"
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,8 +49,9 @@
test -f .libs/lt-sox && ( $(RM) $@ && $(LN_S) .libs/lt-sox $@ ) || $(LN_S) sox$(EXEEXT) $@
install-exec-hook:
- cd $(DESTDIR)$(bindir) && $(RM) play && $(LN_S) sox play
- cd $(DESTDIR)$(bindir) && $(RM) rec && $(LN_S) sox rec
+ if test "$(PLAYRECLINKS)" = "yes"; then \
+ cd $(DESTDIR)$(bindir); $(RM) play rec; $(LN_S) sox play; $(LN_S) sox rec; \
+ fi
clean-local:
$(RM) play rec