ref: fc20c26b2500acb6690f03d610d406bffb8944a9
parent: 9ce4a4abbea00c1ef12be901441b83dff458f8b8
author: Mans Rullgard <mans@mansr.com>
date: Mon Aug 10 17:38:11 EDT 2020
build: fix symlink selection The configure test whether to enable the play/rec links is broken, and the makefile uses the same condition for both play/rec and soxi. Fix both problems.
--- a/configure.ac
+++ b/configure.ac
@@ -647,13 +647,13 @@
enable_playrec_symlinks=no
if test "$enable_symlinks" = "yes"; then
SYMLINKS=yes
- if test false \
- -o "$enable_alsa" = yes \
- -o "$enable_ao" = yes \
- -o "$enable_coreaudio" = yes \
- -o "$enable_oss" = yes \
- -o "$enable_pulseaudio" = yes \
- -o "$enable_sndio" = yes \
+ if test "" \
+ -o "$using_alsa" = yes \
+ -o "$using_ao" = yes \
+ -o "$using_coreaudio" = yes \
+ -o "$using_oss" = yes \
+ -o "$using_pulseaudio" = yes \
+ -o "$using_sndio" = yes \
; then
PLAYRECLINKS=yes
enable_playrec_symlinks=yes
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -145,8 +145,13 @@
all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT)
-play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT)
+play$(EXEEXT) rec$(EXEEXT): sox$(EXEEXT)
if test "$(PLAYRECLINKS)" = "yes"; then \
+ test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
+ fi
+
+soxi$(EXEEXT): sox$(EXEEXT)
+ if test "$(SYMLINKS)" = "yes"; then \
test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
fi