shithub: sox

Download patch

ref: e5da2ec9cb795c6247a454b4605adc38f167b9dd
parent: 96948265d372296bdce0c449db80d7547a7612ff
author: cbagwell <cbagwell>
date: Wed Sep 1 18:04:02 EDT 2004

Updates to makefiles for new directory structure

--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,18 @@
 This file contains a list of all changes starting after the release of
 sox-11gamma.
 
+sox-12.17.6
+-----------
+  o Changed comment code to always use copies of strings to
+    fix bug in WAV handlering freeing argv[] memory.
+  o Use calloc() to create ft_t structures so that all
+    memory is initialized before being referenced.
+  o Fixed VOC EOF bug were it thought there was an extra
+    block when there wasn't.
+  o Restructured directory layout so that source code is in
+    a seperate directory.
+   
+
 sox-12.17.5
 -----------
   o Thomas Klausner sent in patches to compile audio drivers under
--- /dev/null
+++ b/Makefile.in
@@ -1,0 +1,79 @@
+#
+# @configure_input@
+#
+
+# Paths
+
+VPATH = @srcdir@
+builddir= @builddir@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+mandir = @mandir@
+includedir = @includedir@
+
+# Shell commands.
+
+INSTALL	= @INSTALL@
+LN_S    = @LN_S@
+
+all: 
+	cd src && $(MAKE) $@
+
+man: $(srcdir)/sox.1 $(srcdir)/soxexam.1 $(srcdir)/libst.3
+	nroff -man $(srcdir)/sox.1 | col -b > sox.txt
+	nroff -man $(srcdir)/soxexam.1 | col -b > soxexam.txt
+	nroff -man $(srcdir)/libst.3 | col -b > libst.txt
+
+install: $(PLAY_INSTALL_$(PLAY_SUPPORT))
+	cd src && $(MAKE) $@
+	$(srcdir)/mkinstalldirs $(mandir)/man1
+	$(INSTALL) -c -m 644 $(srcdir)/sox.1 $(mandir)/man1
+	if [ -f $(mandir)/man1/soxmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
+	$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
+	$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
+
+install-play:
+	if [ -f $(mandir)/man1/rec.1 ]; then $(RM) $(mandir)/man1/rec.1; fi
+	$(srcdir)/mkinstalldirs $(mandir)/man1
+	$(INSTALL) -c -m 644 $(srcdir)/play.1 $(mandir)/man1
+	$(LN_S) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
+
+install-lib:
+	cd src && $(MAKE) $@
+	$(srcdir)/mkinstalldirs $(mandir)/man3
+	$(INSTALL) -c -m 644 $(srcdir)/libst.3 $(mandir)/man3
+
+
+PLAY_UNINSTALL_0    =
+PLAY_UNINSTALL_1    = uninstall-play
+
+uninstall: $(PLAY_UNINSTALL_$(PLAY_SUPPORT))
+	cd src && $(MAKE) $@
+	$(RM) $(mandir)/man1/sox.1
+	$(RM) $(mandir)/man1/soxmix.1
+	$(RM) $(mandir)/man1/soxexam.1
+
+uninstall-play:
+	$(RM) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
+
+uninstall-lib:
+	cd src && $(MAKE) $@
+	$(RM) $(mandir)/man3/libst.3
+
+clean:
+	cd src && $(MAKE) $@
+
+distclean:
+	cd src && $(MAKE) $@
+	$(RM) config.cache config.log config.status config.h Makefile
+	$(RM) -r autom4te*.cache
+
+# Rules to automatically rerun configure tools as needed.
+$(srcdir)/configure: configure.in aclocal.m4
+	cd $(srcdir) && autoconf
+
+config.status: configure
+	./config.status --recheck
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in 1.4.
+# From configure.in 1.5.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for sox 12.17.4.
+# Generated by GNU Autoconf 2.57 for sox 12.17.6.
 #
 # Report bugs to <cbagwell@users.sourceforge.net>.
 #
@@ -268,12 +268,12 @@
 
 # Identity of this package.
 PACKAGE_NAME='sox'
-PACKAGE_TARNAME='"sox-12.17.4"'
-PACKAGE_VERSION='12.17.4'
-PACKAGE_STRING='sox 12.17.4'
+PACKAGE_TARNAME='"sox-12.17.6"'
+PACKAGE_VERSION='12.17.6'
+PACKAGE_STRING='sox 12.17.6'
 PACKAGE_BUGREPORT='cbagwell@users.sourceforge.net'
 
-ac_unique_file="src/sox.c"
+ac_unique_file="sox.1"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -780,7 +780,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sox 12.17.4 to adapt to many kinds of systems.
+\`configure' configures sox 12.17.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -842,7 +842,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sox 12.17.4:";;
+     short | recursive ) echo "Configuration of sox 12.17.6:";;
    esac
   cat <<\_ACEOF
 
@@ -935,7 +935,7 @@
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-sox configure 12.17.4
+sox configure 12.17.6
 generated by GNU Autoconf 2.57
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -950,7 +950,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sox $as_me 12.17.4, which was
+It was created by sox $as_me 12.17.6, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
@@ -6410,7 +6410,7 @@
 EOF
 
 
-                              ac_config_files="$ac_config_files src/libst-config src/Makefile src/gsm/Makefile"
+                                        ac_config_files="$ac_config_files Makefile src/libst-config src/Makefile src/gsm/Makefile"
 
           ac_config_files="$ac_config_files src/play"
 
@@ -6775,7 +6775,7 @@
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by sox $as_me 12.17.4, which was
+This file was extended by sox $as_me 12.17.6, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6835,7 +6835,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-sox config.status 12.17.4
+sox config.status 12.17.6
 configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -6939,6 +6939,7 @@
 do
   case "$ac_config_target" in
   # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "src/libst-config" ) CONFIG_FILES="$CONFIG_FILES src/libst-config" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
   "src/gsm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/gsm/Makefile" ;;
--- a/configure.in
+++ b/configure.in
@@ -3,11 +3,11 @@
 dnl configure.in
 dnl
 
-AC_REVISION(1.4)
+AC_REVISION(1.5)
 
-AC_INIT(sox, 12.17.4, cbagwell@users.sourceforge.net, "sox-12.17.4")
+AC_INIT(sox, 12.17.6, cbagwell@users.sourceforge.net, "sox-12.17.6")
 
-AC_CONFIG_SRCDIR(src/sox.c)
+AC_CONFIG_SRCDIR(sox.1)
 
 dnl Parameters to configure
 
@@ -275,7 +275,7 @@
 AC_CONFIG_HEADER(src/stconfig.h)
 AC_CREATE_STDINT_H(src/ststdint.h)
 
-AC_CONFIG_FILES([src/libst-config src/Makefile src/gsm/Makefile])
+AC_CONFIG_FILES([Makefile src/libst-config src/Makefile src/gsm/Makefile])
 AC_CONFIG_FILES([src/play], [chmod +x src/play])
 
 AC_OUTPUT()
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -7,6 +7,7 @@
 VPATH = @srcdir@
 builddir= @builddir@
 srcdir = @srcdir@
+top_srcdir =@top_srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
@@ -24,14 +25,10 @@
 LN_S    = @LN_S@
 
 # Build macros.
-GSM_LIB_0 =
-GSM_LIB_1 = -lgsm
-GSM_SUPPORT  = @GSM_SUPPORT@
-
 CFLAGS	= @CFLAGS@ -I$(srcdir) -I$(builddir)
 CPPFLAGS = @CPPFLAGS@
-LDFLAGS	= -L. -L./gsm @LDFLAGS@
-LIBS	= -lst $(GSM_LIB_$(GSM_SUPPORT)) @LIBS@
+LDFLAGS	= -L. @LDFLAGS@
+LIBS	= -lst @LIBS@
 
 # Other macros.
 
@@ -39,6 +36,7 @@
 NEED_SUNAU   = @NEED_SUNAU@
 NEED_ALSA    = @NEED_ALSA@
 PLAY_SUPPORT = @PLAY_SUPPORT@
+GSM_SUPPORT  = @GSM_SUPPORT@
 
 # Objects.
 
@@ -55,6 +53,13 @@
 	  rate.o repeat.o resample.o reverb.o reverse.o silence.o speed.o \
 	  stat.o stretch.o swap.o synth.o trim.o vibro.o vol.o
 
+
+GSMOBJ_0 =
+GSMOBJ_1 =  gsm/add.o gsm/code.o gsm/decode.o gsm/long_term.o gsm/lpc.o \
+	    gsm/preprocess.o gsm/rpe.o gsm/gsm_destroy.o \
+	    gsm/gsm_decode.o gsm/gsm_encode.o gsm/gsm_create.o \
+	    gsm/gsm_option.o gsm/short_term.o gsm/table.o
+
 OSSOBJ_0    =
 OSSOBJ_1    = oss.o
 SUNAUOBJ_0  =
@@ -61,10 +66,15 @@
 SUNAUOBJ_1  = sunaudio.o
 ALSAOBJ_0   =
 ALSAOBJ_1   = alsa.o
-EXTRAOBJS   = $(OSSOBJ_$(NEED_OSS)) $(SUNAUOBJ_$(NEED_SUNAU)) $(ALSAOBJ_$(NEED_ALSA))
+EXTRAOBJS   = $(OSSOBJ_$(NEED_OSS)) $(SUNAUOBJ_$(NEED_SUNAU)) $(ALSAOBJ_$(NEED_ALSA)) $(GSMOBJ_$(GSM_SUPPORT))
 
 LIBOBJS = $(FOBJ) $(EOBJ) handlers.o misc.o util.o getopt.o $(EXTRAOBJS)
 
+# Building libgsm.a is kinda a hack.  It switches to a different
+# makefile with hardcoded options.  We really want the object files
+# only so that they can be included inside libst.  This semi-fake
+# target is just an easy way to make sure that makefile builds
+# the objects instead of this makefile.
 GSM_0     =
 GSM_1     = gsm/libgsm.a
 PLAY_0    =
@@ -72,72 +82,45 @@
 
 all: sox soxmix $(PLAY_$(PLAY_SUPPORT))
 
-sox: libst.a $(GSM_$(GSM_SUPPORT)) sox.o
+sox: $(GSM_$(GSM_SUPPORT)) libst.a sox.o
 	$(CC) $(LDFLAGS) -o sox sox.o $(LIBS)
 
 soxmix.o: sox.c
 	$(CC) $(CFLAGS) -DSOXMIX -c $(srcdir)/sox.c -o soxmix.o
 
-soxmix: libst.a $(GSM_$(GSM_SUPPORT)) soxmix.o
+soxmix: $(GSM_$(GSM_SUPPORT)) libst.a soxmix.o
 	$(CC) $(LDFLAGS) -o soxmix soxmix.o $(LIBS)
 
 libst.a: $(LIBOBJS)
-	$(AR) libst.a $(LIBOBJS)
+	$(AR) libst.a $(LIBOBJS) 
 	$(RANLIB) libst.a
 
 gsm/libgsm.a:
 	cd gsm && $(MAKE)
 
-libs: libst.a $(GSM_$(GSM_SUPPORT))
-
-man: $(srcdir)/sox.1 $(srcdir)/soxexam.1 $(srcdir)/libst.3
-	nroff -man $(srcdir)/sox.1 | col -b > sox.txt
-	nroff -man $(srcdir)/soxexam.1 | col -b > soxexam.txt
-	nroff -man $(srcdir)/libst.3 | col -b > libst.txt
-
 PLAY_INSTALL_0    =
 PLAY_INSTALL_1    = install-play
 
 install: sox soxmix $(PLAY_INSTALL_$(PLAY_SUPPORT))
-	$(srcdir)/mkinstalldirs $(bindir)
-	$(srcdir)/mkinstalldirs $(mandir)/man1
+	$(top_srcdir)/mkinstalldirs $(bindir)
 	$(INSTALL) -c -m 755 sox $(bindir)
 	$(INSTALL) -c -m 755 soxmix $(bindir)
-	$(INSTALL) -c -m 644 $(srcdir)/sox.1 $(mandir)/man1
-	if [ -f $(mandir)/man1/soxmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
-	$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
-	$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
 
 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
-	$(srcdir)/mkinstalldirs $(bindir)
+	$(top_srcdir)/mkinstalldirs $(bindir)
 	$(INSTALL) -c -m 755 play $(bindir)
-	$(INSTALL) -c -m 644 $(srcdir)/play.1 $(mandir)/man1
 	$(LN_S) $(bindir)/play $(bindir)/rec
-	$(LN_S) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
 
 install-lib: libst.a
-	$(srcdir)/mkinstalldirs $(libdir)
-	$(srcdir)/mkinstalldirs $(mandir)/man3
-	$(srcdir)/mkinstalldirs $(includedir)
+	$(top_srcdir)/mkinstalldirs $(libdir)
+	$(top_srcdir)/mkinstalldirs $(includedir)
 	$(INSTALL) -c -m 755 libst-config $(bindir)
 	$(INSTALL) -c -m 644 libst.a $(libdir)
 	$(RANLIB) $(libdir)/libst.a
-	$(INSTALL) -c -m 644 $(srcdir)/libst.3 $(mandir)/man3
 	$(INSTALL) -c -m 644 $(srcdir)/st.h $(includedir)
 	$(INSTALL) -c -m 644 ststdint.h $(includedir)
 
-GSM_INSTALL_0       =
-GSM_INSTALL_1       = install-gsmlib
-
-install-gsmlib: gsm/libgsm.a
-		$(INSTALL) -c -m 755 libst-config $(bindir) ; \
-		cd gsm && $(MAKE) install-lib
-
-install-libs: install-lib $(GSM_INSTALL_$(GSM_SUPPORT))
-
 PLAY_UNINSTALL_0    =
 PLAY_UNINSTALL_1    = uninstall-play
 
@@ -144,18 +127,13 @@
 uninstall: $(PLAY_UNINSTALL_$(PLAY_SUPPORT))
 	$(RM) $(bindir)/sox
 	$(RM) $(bindir)/soxmix
-	$(RM) $(mandir)/man1/sox.1
-	$(RM) $(mandir)/man1/soxmix.1
-	$(RM) $(mandir)/man1/soxexam.1
 
 uninstall-play:
 	$(RM) $(bindir)/play
 	$(RM) $(bindir)/rec
-	$(RM) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
 
 uninstall-lib:
 	$(RM) $(libdir)/libst.a
-	$(RM) $(mandir)/man3/libst.3
 	$(RM) $(includedir)/st.h
 	$(RM) $(includedir)/ststdint.h
 
@@ -166,26 +144,4 @@
 distclean:
 	$(RM) *~ *.o *.raw *.sf core sox soxmix libst.a play libst-config
 	cd gsm && $(RM) *~ *.o core libgsm.a Makefile
-	$(RM) config.cache config.log config.status config.h Makefile
-	$(RM) -r autom4te*.cache
 	$(RM) stconfig.h ststdint.h
-
-# Rules to automatically rerun configure tools as needed.
-#$(srcdir)/configure: configure.in aclocal.m4
-#	cd $(srcdir) && autoconf
-
-#stconfig.h: stconfig.h.in config.status
-#	./config.status stconfig.h
-
-#Makefile: Makefile.in config.status
-#	./config.status Makefile
-
-#gsm/Makefile: gsm/Makefile.in config.status
-#	./config.status gsm/Makefile
-
-#libst-config: libst-config.in config.status
-#	./config.status libst-config
-
-#config.status: configure
-#	./config.status --recheck
-
--- a/src/gsm/Makefile.in
+++ b/src/gsm/Makefile.in
@@ -84,6 +84,11 @@
 	$(INSTALL) -c -m 644 gsm.3 $(mandir)/man3
 	$(INSTALL) -c -m 644 gsm_option.3 $(mandir)/man3
 
+uninstall-lib:
+	$(RM) $(libdir)/libgsm.a
+	$(RM) $(mandir)/man3/gsm.3
+	$(RM) $(mandir)/man3/gsm_option.3
+
 clean:
 	$(RM) *.o