From b6980429b95eed061fa6ad0e6bd6dbae4f303a26 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 27 Oct 2005 18:34:18 +0000 Subject: [PATCH] Optimize aoss wrapper - Don't set LD_PRELOAD if no ALSA driver exists. - Inheret the previous LD_PRELOAD setting. --- alsa/aoss.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/alsa/aoss.in b/alsa/aoss.in index ff707c1..c551431 100644 --- a/alsa/aoss.in +++ b/alsa/aoss.in @@ -4,6 +4,11 @@ # Usage: # aoss -prefix=@prefix@ -exec_prefix=@exec_prefix@ -LD_PRELOAD=${exec_prefix}/\$LIB/libaoss.so exec "$@" +if [ -d /proc/asound ]; then + prefix=@prefix@ + exec_prefix=@exec_prefix@ + LD_PRELOAD=${exec_prefix}/\$LIB/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD} exec "$@" +else + exec "$@" +fi +exit 1 -- 2.47.1