ref: b7396ccef8da152b40f0ebcbf6e9dfbe231e2411
parent: 98352ac0fbbbc8d42700237a96fdcf2c1ae36bb1
author: cbagwell <cbagwell>
date: Sat Jan 25 21:05:48 EST 2003
Updating configure to modify play.in script instead of using sed.
--- a/configure
+++ b/configure
@@ -2536,47 +2536,7 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-for ac_prog in sed
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$SED"; then
- ac_cv_prog_SED="$SED" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_SED="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-fi
-fi
-SED=$ac_cv_prog_SED
-if test -n "$SED"; then
- echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$SED" && break
-done
-
-
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
fi
@@ -5986,7 +5946,7 @@
EOF
-ac_config_files="$ac_config_files libst-config Makefile gsm/Makefile"
+ac_config_files="$ac_config_files libst-config play Makefile gsm/Makefile"
cat >confcache <<\_ACEOF
@@ -6461,6 +6421,7 @@
case "$ac_config_target" in
# Handling of arguments.
"libst-config" ) CONFIG_FILES="$CONFIG_FILES libst-config" ;;
+ "play" ) CONFIG_FILES="$CONFIG_FILES play" ;;
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"gsm/Makefile" ) CONFIG_FILES="$CONFIG_FILES gsm/Makefile" ;;
"stconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS stconfig.h" ;;
@@ -6571,7 +6532,6 @@
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
s,@CPP@,$CPP,;t t
-s,@SED@,$SED,;t t
s,@NEED_OSS@,$NEED_OSS,;t t
s,@NEED_SUNAU@,$NEED_SUNAU,;t t
s,@NEED_ALSA@,$NEED_ALSA,;t t
--- a/configure.in
+++ b/configure.in
@@ -73,7 +73,6 @@
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CPP
-AC_CHECK_PROGS(SED, sed)
dnl Extra CFLAGS if we have gcc
if test "$GCC" = yes; then
@@ -263,7 +262,7 @@
AC_CONFIG_HEADER(stconfig.h)
AC_CREATE_STDINT_H(ststdint.h)
-AC_CONFIG_FILES([libst-config Makefile gsm/Makefile])
+AC_CONFIG_FILES([libst-config play Makefile gsm/Makefile])
AC_OUTPUT()
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -20,7 +20,6 @@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
AR = ar r
-SED = @SED@
TAR = tar
RM = rm -f
LN_S = @LN_S@
@@ -80,9 +79,6 @@
soxmix: libst.a $(GSM_$(GSM_SUPPORT)) soxmix.o
$(CC) $(LDFLAGS) -o soxmix soxmix.o $(LIBS)
-play: play.in
- $(SED) -e 's|@PREFIX@|$(bindir)|g' < $(srcdir)/play.in > play
-
libst.a: $(LIBOBJS)
$(AR) libst.a $(LIBOBJS)
$(RANLIB) libst.a
@@ -110,7 +106,7 @@
$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
-install-play: play
+install-play:
if [ -f $(bindir)/rec ] ; then $(RM) $(bindir)/rec; fi
if [ -f $(mandir)/man1/rec.1 ]; then $(RM) $(mandir)/man1/rec.1; fi
$(srcdir)/mkinstalldirs $(mandir)/man1
--- a/src/play.in
+++ b/src/play.in
@@ -14,7 +14,10 @@
# Set up path so that it can find Sox if user's path doesn't already
# include it.
-PATH=$PATH:@PREFIX@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
program_name=`basename $0`
program_version="2.0"
@@ -204,8 +207,8 @@
else
echo "Send break (control-c) to end recording"
fi
- sox $volume $arch_defines $fopts $device $fopts2 "$filename" $effects
+ $bindir/sox $volume $arch_defines $fopts $device $fopts2 "$filename" $effects
else
- sox $volume $fopts $fopts2 "$filename" $arch_defines $device $effects
+ $bindir/sox $volume $fopts $fopts2 "$filename" $arch_defines $device $effects
fi