Update scorealign to SVN r227.
This commit is contained in:
parent
ce00d5b507
commit
e3bea17f16
|
@ -1,58 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
# Makefile(.in) for scorealign using Autotools (but not libtool).
|
||||
# Written by Richard Ash following Gary Vaughan's Autobook
|
||||
|
||||
# tell aclocal that extra macros can be found in autotools/m4/
|
||||
ACLOCAL_AMFLAGS = -I autotools/m4
|
||||
|
||||
# define the output library (link with -lscorealign)
|
||||
lib_LIBRARIES = libscorealign.a
|
||||
|
||||
# define the source files to use
|
||||
libscorealign_a_SOURCES = audiomixerreader.cpp \
|
||||
audioreader.cpp \
|
||||
comp_chroma.cpp \
|
||||
curvefit.cpp \
|
||||
gen_chroma.cpp \
|
||||
hillclimb.cpp \
|
||||
regression.cpp \
|
||||
sautils.cpp \
|
||||
scorealign.cpp \
|
||||
scorealign-glue.cpp \
|
||||
fft3/FFT3.cpp \
|
||||
audiomixerreader.h \
|
||||
audioreader.h \
|
||||
comp_chroma.h \
|
||||
curvefit.h \
|
||||
gen_chroma.h \
|
||||
hillclimb.h \
|
||||
regression.h \
|
||||
sautils.h \
|
||||
fft3/FFT3.h
|
||||
|
||||
# and the header files for the library. At the moment these go into the include
|
||||
# directory directly, it would be much better to have them in a subdirectory
|
||||
# but that would mean re-organising them here (a subdirectory called scorealign to
|
||||
# keep headers in, add -I$(srcdir)/scorealign/ to AM_CXXFLAGS, change the paths
|
||||
# to the headers here and change the name of the variable to nobase_include_...
|
||||
include_HEADERS = scorealign-glue.h \
|
||||
scorealign.h \
|
||||
ScoreAlignParams.h
|
||||
|
||||
override CXXFLAGS += -I../portsmf
|
||||
|
||||
# files that only really viscous cleans remove
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# other distributed files in case users don't have a complete set of auto*
|
||||
AUX_DIST = $(ac_aux_dir)/config.guess \
|
||||
$(ac_aux_dir)/config.sub \
|
||||
$(ac_aux_dir)/install-sh \
|
||||
$(ac_aux_dir)/mdate-sh \
|
||||
$(ac_aux_dir)/missing \
|
||||
$(ac_aux_dir)/mkinstalldirs \
|
||||
$(MAINTAINERCLEANFILES)
|
||||
|
||||
# Documentation files that should be both distributed and installed in the doc
|
||||
# directory,
|
||||
dist_doc_DATA = README.txt license.txt
|
|
@ -1,763 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Makefile(.in) for scorealign using Autotools (but not libtool).
|
||||
# Written by Richard Ash following Gary Vaughan's Autobook
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = .
|
||||
DIST_COMMON = $(am__configure_deps) $(dist_doc_DATA) \
|
||||
$(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/scorealign-uninstalled.pc.in \
|
||||
$(srcdir)/scorealign.pc.in $(top_srcdir)/configure \
|
||||
autotools/depcomp autotools/install-sh autotools/missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES = scorealign.pc scorealign-uninstalled.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
AR = ar
|
||||
ARFLAGS = cru
|
||||
libscorealign_a_AR = $(AR) $(ARFLAGS)
|
||||
libscorealign_a_LIBADD =
|
||||
am_libscorealign_a_OBJECTS = audiomixerreader.$(OBJEXT) \
|
||||
audioreader.$(OBJEXT) comp_chroma.$(OBJEXT) curvefit.$(OBJEXT) \
|
||||
gen_chroma.$(OBJEXT) hillclimb.$(OBJEXT) regression.$(OBJEXT) \
|
||||
sautils.$(OBJEXT) scorealign.$(OBJEXT) \
|
||||
scorealign-glue.$(OBJEXT) FFT3.$(OBJEXT)
|
||||
libscorealign_a_OBJECTS = $(am_libscorealign_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libscorealign_a_SOURCES)
|
||||
DIST_SOURCES = $(libscorealign_a_SOURCES)
|
||||
DATA = $(dist_doc_DATA)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# tell aclocal that extra macros can be found in autotools/m4/
|
||||
ACLOCAL_AMFLAGS = -I autotools/m4
|
||||
|
||||
# define the output library (link with -lscorealign)
|
||||
lib_LIBRARIES = libscorealign.a
|
||||
|
||||
# define the source files to use
|
||||
libscorealign_a_SOURCES = audiomixerreader.cpp \
|
||||
audioreader.cpp \
|
||||
comp_chroma.cpp \
|
||||
curvefit.cpp \
|
||||
gen_chroma.cpp \
|
||||
hillclimb.cpp \
|
||||
regression.cpp \
|
||||
sautils.cpp \
|
||||
scorealign.cpp \
|
||||
scorealign-glue.cpp \
|
||||
fft3/FFT3.cpp \
|
||||
audiomixerreader.h \
|
||||
audioreader.h \
|
||||
comp_chroma.h \
|
||||
curvefit.h \
|
||||
gen_chroma.h \
|
||||
hillclimb.h \
|
||||
regression.h \
|
||||
sautils.h \
|
||||
fft3/FFT3.h
|
||||
|
||||
|
||||
# and the header files for the library. At the moment these go into the include
|
||||
# directory directly, it would be much better to have them in a subdirectory
|
||||
# but that would mean re-organising them here (a subdirectory called scorealign to
|
||||
# keep headers in, add -I$(srcdir)/scorealign/ to AM_CXXFLAGS, change the paths
|
||||
# to the headers here and change the name of the variable to nobase_include_...
|
||||
include_HEADERS = scorealign-glue.h \
|
||||
scorealign.h \
|
||||
ScoreAlignParams.h
|
||||
|
||||
|
||||
# files that only really viscous cleans remove
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# other distributed files in case users don't have a complete set of auto*
|
||||
AUX_DIST = $(ac_aux_dir)/config.guess \
|
||||
$(ac_aux_dir)/config.sub \
|
||||
$(ac_aux_dir)/install-sh \
|
||||
$(ac_aux_dir)/mdate-sh \
|
||||
$(ac_aux_dir)/missing \
|
||||
$(ac_aux_dir)/mkinstalldirs \
|
||||
$(MAINTAINERCLEANFILES)
|
||||
|
||||
|
||||
# Documentation files that should be both distributed and installed in the doc
|
||||
# directory,
|
||||
dist_doc_DATA = README.txt license.txt
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
scorealign.pc: $(top_builddir)/config.status $(srcdir)/scorealign.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
scorealign-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/scorealign-uninstalled.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
$(am__strip_dir) \
|
||||
echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
|
||||
( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
|
||||
cd "$(DESTDIR)$(libdir)" && rm -f $$files
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
libscorealign.a: $(libscorealign_a_OBJECTS) $(libscorealign_a_DEPENDENCIES)
|
||||
-rm -f libscorealign.a
|
||||
$(libscorealign_a_AR) libscorealign.a $(libscorealign_a_OBJECTS) $(libscorealign_a_LIBADD)
|
||||
$(RANLIB) libscorealign.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FFT3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiomixerreader.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audioreader.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comp_chroma.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curvefit.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_chroma.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hillclimb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regression.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sautils.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scorealign-glue.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scorealign.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
FFT3.o: fft3/FFT3.cpp
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FFT3.o -MD -MP -MF $(DEPDIR)/FFT3.Tpo -c -o FFT3.o `test -f 'fft3/FFT3.cpp' || echo '$(srcdir)/'`fft3/FFT3.cpp
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FFT3.Tpo $(DEPDIR)/FFT3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fft3/FFT3.cpp' object='FFT3.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FFT3.o `test -f 'fft3/FFT3.cpp' || echo '$(srcdir)/'`fft3/FFT3.cpp
|
||||
|
||||
FFT3.obj: fft3/FFT3.cpp
|
||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FFT3.obj -MD -MP -MF $(DEPDIR)/FFT3.Tpo -c -o FFT3.obj `if test -f 'fft3/FFT3.cpp'; then $(CYGPATH_W) 'fft3/FFT3.cpp'; else $(CYGPATH_W) '$(srcdir)/fft3/FFT3.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FFT3.Tpo $(DEPDIR)/FFT3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fft3/FFT3.cpp' object='FFT3.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FFT3.obj `if test -f 'fft3/FFT3.cpp'; then $(CYGPATH_W) 'fft3/FFT3.cpp'; else $(CYGPATH_W) '$(srcdir)/fft3/FFT3.cpp'; fi`
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_docDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(docdir)" && rm -f $$files
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(includedir)" && rm -f $$files
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_docDATA install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_docDATA uninstall-includeHEADERS \
|
||||
uninstall-libLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-generic clean-libLIBRARIES ctags dist dist-all \
|
||||
dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
|
||||
dist-zip distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-dist_docDATA install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLIBRARIES install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-dist_docDATA uninstall-includeHEADERS \
|
||||
uninstall-libLIBRARIES
|
||||
|
||||
|
||||
override CXXFLAGS += -I../portsmf
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,107 +1,107 @@
|
|||
# Linux makefile for scorealign
|
||||
# please use either make -f Makfile.linux
|
||||
# -OR- ln -s Makfile.linux Makefile
|
||||
|
||||
# profile = -pg
|
||||
profile =
|
||||
|
||||
DEBUGFLAGS =
|
||||
|
||||
optimize = -g $(DEBUGFLAGS) $(profile)
|
||||
# optimize = -O
|
||||
|
||||
#PORTSMF LIBRARY PATH:
|
||||
# (set this to the location of allegro.cpp, allegrosmfrd.cpp, allegrosmfwr.cpp, etc.)
|
||||
# (if you do not have this directory, look for portsmf in the portmedia project
|
||||
# on sourceforge)
|
||||
PORTSMF = ../portsmf
|
||||
|
||||
INCLUDES = -Isnd -Ifft3 -I$(PORTSMF)
|
||||
|
||||
#OPTIONS FOR LINUX:
|
||||
c_opts = $(optimize) -DLINUX $(INCLUDES)
|
||||
|
||||
cc = gcc $(c_opts)
|
||||
c++ = g++ $(c_opts)
|
||||
cclink = gcc
|
||||
c++link = g++
|
||||
syslibs = -lm
|
||||
|
||||
scorealign_o = comp_chroma.o gen_chroma.o scorealign.o snd/audionone.o \
|
||||
snd/sndcvt.o snd/sndheader.o snd/sndio.o snd/snd.o \
|
||||
snd/ieeecvt.o snd/sndlinux.o snd/sndfaillinux.o \
|
||||
fft3/FFT.o $(PORTSMF)/mfmidi.o $(PORTSMF)/allegro.o \
|
||||
$(PORTSMF)/allegrosmfrd.o $(PORTSMF)/allegrosmfwr.o \
|
||||
$(PORTSMF)/allegrord.o $(PORTSMF)/strparse.o trace.o \
|
||||
regression.o sautils.o curvefit.o hillclimb.o
|
||||
|
||||
.SUFFIXES: .cpp .c .h .aur .o
|
||||
|
||||
.cpp.o:
|
||||
$(c++) -c $< -o $*.o
|
||||
|
||||
.c.o:
|
||||
$(cc) -c $< -o $*.o
|
||||
|
||||
all: scorealign
|
||||
|
||||
header:
|
||||
echo "**********************************************************"
|
||||
echo "**********************************************************"
|
||||
|
||||
clean:
|
||||
echo "removing objects"
|
||||
find . -name "*~" | xargs rm -f
|
||||
rm -f $(scorealign_o)
|
||||
rm -f core*
|
||||
|
||||
cleaner: clean
|
||||
rm -f TAGS
|
||||
|
||||
cleanest: cleaner
|
||||
rm -f scorealign
|
||||
rm -f scorealign.ncb
|
||||
rm -f scorealign.opt
|
||||
rm -f scorealign.plg
|
||||
|
||||
TAGS:
|
||||
find . \( -name "*.cpp" -o -name "*.h" \) -print | etags -
|
||||
|
||||
tags: TAGS
|
||||
|
||||
backup: cleanest
|
||||
tar cvf ../scorealign.tar .
|
||||
gzip ../scorealign.tar
|
||||
echo "please rename ../scorealign.tar.gz"
|
||||
|
||||
|
||||
scorealign: $(scorealign_o)
|
||||
$(c++link) $(scorealign_o) -o scorealign $(syslibs)
|
||||
|
||||
test0:
|
||||
./scorealign /home/rbd/wdh/music/nyquist-temp.wav /home/rbd/wdh/music/chrom_nyquist-temp.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
test:
|
||||
./scorealign /home/rbd/scorealign/data/live-beeth-s5m1-25s-mono.wav /home/rbd/scorealign/data/midi-beeth-s5m1-25s-mono.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
bigtest:
|
||||
./scorealign data/live-Beethoven_Symphony_No5_Mvt1.wav data/midi-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
bigtest2:
|
||||
./scorealign data/midi-Beethoven_Symphony_No5_Mvt1.wav data/live-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
|
||||
# DEPENDENCIES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Linux makefile for scorealign
|
||||
# please use either make -f Makfile.linux
|
||||
# -OR- ln -s Makfile.linux Makefile
|
||||
|
||||
# profile = -pg
|
||||
profile =
|
||||
|
||||
DEBUGFLAGS =
|
||||
|
||||
optimize = -g $(DEBUGFLAGS) $(profile)
|
||||
# optimize = -O
|
||||
|
||||
#PORTSMF LIBRARY PATH:
|
||||
# (set this to the location of allegro.cpp, allegrosmfrd.cpp, allegrosmfwr.cpp, etc.)
|
||||
# (if you do not have this directory, look for portsmf in the portmedia project
|
||||
# on sourceforge)
|
||||
PORTSMF = ../portsmf
|
||||
|
||||
INCLUDES = -Isnd -Ifft3 -I$(PORTSMF)
|
||||
|
||||
#OPTIONS FOR LINUX:
|
||||
c_opts = $(optimize) -DLINUX $(INCLUDES)
|
||||
|
||||
cc = gcc $(c_opts)
|
||||
c++ = g++ $(c_opts)
|
||||
cclink = gcc
|
||||
c++link = g++
|
||||
syslibs = -lm
|
||||
|
||||
scorealign_o = comp_chroma.o gen_chroma.o scorealign.o snd/audionone.o \
|
||||
snd/sndcvt.o snd/sndheader.o snd/sndio.o snd/snd.o \
|
||||
snd/ieeecvt.o snd/sndlinux.o snd/sndfaillinux.o \
|
||||
fft3/FFT.o $(PORTSMF)/mfmidi.o $(PORTSMF)/allegro.o \
|
||||
$(PORTSMF)/allegrosmfrd.o $(PORTSMF)/allegrosmfwr.o \
|
||||
$(PORTSMF)/allegrord.o $(PORTSMF)/strparse.o trace.o \
|
||||
regression.o sautils.o curvefit.o hillclimb.o
|
||||
|
||||
.SUFFIXES: .cpp .c .h .aur .o
|
||||
|
||||
.cpp.o:
|
||||
$(c++) -c $< -o $*.o
|
||||
|
||||
.c.o:
|
||||
$(cc) -c $< -o $*.o
|
||||
|
||||
all: scorealign
|
||||
|
||||
header:
|
||||
echo "**********************************************************"
|
||||
echo "**********************************************************"
|
||||
|
||||
clean:
|
||||
echo "removing objects"
|
||||
find . -name "*~" | xargs rm -f
|
||||
rm -f $(scorealign_o)
|
||||
rm -f core*
|
||||
|
||||
cleaner: clean
|
||||
rm -f TAGS
|
||||
|
||||
cleanest: cleaner
|
||||
rm -f scorealign
|
||||
rm -f scorealign.ncb
|
||||
rm -f scorealign.opt
|
||||
rm -f scorealign.plg
|
||||
|
||||
TAGS:
|
||||
find . \( -name "*.cpp" -o -name "*.h" \) -print | etags -
|
||||
|
||||
tags: TAGS
|
||||
|
||||
backup: cleanest
|
||||
tar cvf ../scorealign.tar .
|
||||
gzip ../scorealign.tar
|
||||
echo "please rename ../scorealign.tar.gz"
|
||||
|
||||
|
||||
scorealign: $(scorealign_o)
|
||||
$(c++link) $(scorealign_o) -o scorealign $(syslibs)
|
||||
|
||||
test0:
|
||||
./scorealign /home/rbd/wdh/music/nyquist-temp.wav /home/rbd/wdh/music/chrom_nyquist-temp.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
test:
|
||||
./scorealign /home/rbd/scorealign/data/live-beeth-s5m1-25s-mono.wav /home/rbd/scorealign/data/midi-beeth-s5m1-25s-mono.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
bigtest:
|
||||
./scorealign data/live-Beethoven_Symphony_No5_Mvt1.wav data/midi-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
bigtest2:
|
||||
./scorealign data/midi-Beethoven_Symphony_No5_Mvt1.wav data/live-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
|
||||
# DEPENDENCIES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,100 +1,100 @@
|
|||
# OS X Makefile for scorealign
|
||||
# NOTE: This is out of date. See the score-align.vcproj -OR- Makefile.linux
|
||||
|
||||
# profile = -pg
|
||||
profile =
|
||||
|
||||
DEBUGFLAGS =
|
||||
|
||||
#optimize = -g $(DEBUGFLAGS) $(profile)
|
||||
optimize = -O
|
||||
|
||||
#PORTSMF LIBRARY PATH:
|
||||
# (set this to the location of allegro.cpp, allegrosmfrd.cpp, allegrosmfwr.cpp, etc.)
|
||||
# (if you do not have this directory, look for portsmf in the portmedia project
|
||||
# on sourceforge)
|
||||
PORTSMF = ../portsmf
|
||||
|
||||
INCLUDES = -Isnd -Ifft3 -I$(PORTSMF)
|
||||
|
||||
#OPTIONS FOR LINUX:
|
||||
c_opts = $(optimize) -DLINUX $(INCLUDES)
|
||||
|
||||
cc = gcc $(c_opts)
|
||||
c++ = g++ $(c_opts)
|
||||
cclink = gcc
|
||||
c++link = g++
|
||||
syslibs = -lm
|
||||
|
||||
scorealign_o = comp_chroma.o gen_chroma.o scorealign.o snd/audionone.o snd/sndcvt.o snd/sndheader.o snd/sndio.o snd/snd.o snd/ieeecvt.o snd/sndlinux.o snd/sndfaillinux.o fft3/FFT.o mfmidi.o $(PORTSMF)/allegro.o $(PORTSMF)/allegrosmfrd.o $(PORTSMF)/allegrosmfwr.o $(PORTSMF)/allegrord.o $(PORTSMF)/strparse.o trace.o regression.o
|
||||
|
||||
.SUFFIXES: .cpp .c .h .aur .o
|
||||
|
||||
.cpp.o:
|
||||
$(c++) -c $< -o $*.o
|
||||
|
||||
.c.o:
|
||||
$(cc) -c $< -o $*.o
|
||||
|
||||
all: scorealign
|
||||
|
||||
header:
|
||||
echo "**********************************************************"
|
||||
echo "**********************************************************"
|
||||
|
||||
clean:
|
||||
echo "removing objects"
|
||||
find . -name "*~" | xargs rm -f
|
||||
rm -f $(scorealign_o)
|
||||
rm -f core*
|
||||
|
||||
cleaner: clean
|
||||
rm -f TAGS
|
||||
|
||||
cleanest: cleaner
|
||||
rm -f scorealign
|
||||
rm -f scorealign.ncb
|
||||
rm -f scorealign.opt
|
||||
rm -f scorealign.plg
|
||||
|
||||
TAGS:
|
||||
find . \( -name "*.cpp" -o -name "*.h" \) -print | etags -
|
||||
|
||||
tags: TAGS
|
||||
|
||||
backup: cleanest
|
||||
tar cvf ../scorealign.tar .
|
||||
gzip ../scorealign.tar
|
||||
echo "please rename ../scorealign.tar.gz"
|
||||
|
||||
|
||||
scorealign: $(scorealign_o)
|
||||
$(c++link) $(scorealign_o) -o scorealign $(syslibs)
|
||||
|
||||
test0:
|
||||
./scorealign /home/rbd/wdh/music/nyquist-temp.wav /home/rbd/wdh/music/chrom_nyquist-temp.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
test:
|
||||
./scorealign /home/rbd/scorealign/data/live-beeth-s5m1-25s-mono.wav /home/rbd/scorealign/data/midi-beeth-s5m1-25s-mono.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
bigtest:
|
||||
./scorealign data/live-Beethoven_Symphony_No5_Mvt1.wav data/midi-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
bigtest2:
|
||||
./scorealign data/midi-Beethoven_Symphony_No5_Mvt1.wav data/live-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
|
||||
# DEPENDENCIES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# OS X Makefile for scorealign
|
||||
# NOTE: This is out of date. See the score-align.vcproj -OR- Makefile.linux
|
||||
|
||||
# profile = -pg
|
||||
profile =
|
||||
|
||||
DEBUGFLAGS =
|
||||
|
||||
#optimize = -g $(DEBUGFLAGS) $(profile)
|
||||
optimize = -O
|
||||
|
||||
#PORTSMF LIBRARY PATH:
|
||||
# (set this to the location of allegro.cpp, allegrosmfrd.cpp, allegrosmfwr.cpp, etc.)
|
||||
# (if you do not have this directory, look for portsmf in the portmedia project
|
||||
# on sourceforge)
|
||||
PORTSMF = ../portsmf
|
||||
|
||||
INCLUDES = -Isnd -Ifft3 -I$(PORTSMF)
|
||||
|
||||
#OPTIONS FOR LINUX:
|
||||
c_opts = $(optimize) -DLINUX $(INCLUDES)
|
||||
|
||||
cc = gcc $(c_opts)
|
||||
c++ = g++ $(c_opts)
|
||||
cclink = gcc
|
||||
c++link = g++
|
||||
syslibs = -lm
|
||||
|
||||
scorealign_o = comp_chroma.o gen_chroma.o scorealign.o snd/audionone.o snd/sndcvt.o snd/sndheader.o snd/sndio.o snd/snd.o snd/ieeecvt.o snd/sndlinux.o snd/sndfaillinux.o fft3/FFT.o mfmidi.o $(PORTSMF)/allegro.o $(PORTSMF)/allegrosmfrd.o $(PORTSMF)/allegrosmfwr.o $(PORTSMF)/allegrord.o $(PORTSMF)/strparse.o trace.o regression.o
|
||||
|
||||
.SUFFIXES: .cpp .c .h .aur .o
|
||||
|
||||
.cpp.o:
|
||||
$(c++) -c $< -o $*.o
|
||||
|
||||
.c.o:
|
||||
$(cc) -c $< -o $*.o
|
||||
|
||||
all: scorealign
|
||||
|
||||
header:
|
||||
echo "**********************************************************"
|
||||
echo "**********************************************************"
|
||||
|
||||
clean:
|
||||
echo "removing objects"
|
||||
find . -name "*~" | xargs rm -f
|
||||
rm -f $(scorealign_o)
|
||||
rm -f core*
|
||||
|
||||
cleaner: clean
|
||||
rm -f TAGS
|
||||
|
||||
cleanest: cleaner
|
||||
rm -f scorealign
|
||||
rm -f scorealign.ncb
|
||||
rm -f scorealign.opt
|
||||
rm -f scorealign.plg
|
||||
|
||||
TAGS:
|
||||
find . \( -name "*.cpp" -o -name "*.h" \) -print | etags -
|
||||
|
||||
tags: TAGS
|
||||
|
||||
backup: cleanest
|
||||
tar cvf ../scorealign.tar .
|
||||
gzip ../scorealign.tar
|
||||
echo "please rename ../scorealign.tar.gz"
|
||||
|
||||
|
||||
scorealign: $(scorealign_o)
|
||||
$(c++link) $(scorealign_o) -o scorealign $(syslibs)
|
||||
|
||||
test0:
|
||||
./scorealign /home/rbd/wdh/music/nyquist-temp.wav /home/rbd/wdh/music/chrom_nyquist-temp.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
test:
|
||||
./scorealign /home/rbd/scorealign/data/live-beeth-s5m1-25s-mono.wav /home/rbd/scorealign/data/midi-beeth-s5m1-25s-mono.wav > output.txt
|
||||
diff output.txt /home/rbd/wdh/music/output.txt | less
|
||||
|
||||
bigtest:
|
||||
./scorealign data/live-Beethoven_Symphony_No5_Mvt1.wav data/midi-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
bigtest2:
|
||||
./scorealign data/midi-Beethoven_Symphony_No5_Mvt1.wav data/live-Beethoven_Symphony_No5_Mvt1.wav
|
||||
|
||||
|
||||
# DEPENDENCIES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
scorealign -- a program for audio-to-audio and audio-to-midi alignment
|
||||
|
||||
Last updated July 17, 2008 by RBD
|
||||
Last updated 10 May 2013 by RBD
|
||||
|
||||
Contributors include:
|
||||
Ning Hu
|
||||
|
@ -32,8 +32,12 @@ install libsndfile to build scorealign.
|
|||
|
||||
For Macintosh OS X, use Xcode to open scorealign.xcodeproj
|
||||
For Linux, use "make -f Makefile.linux"
|
||||
For Windows, open score-align.vcproj (probably out of date now -- please
|
||||
update the project following Makefile.linux, or contact rbd at cs.cmu.edu)
|
||||
For Windows, open scorealign-vc2010.sln (This is set up to use my locally built
|
||||
copies of libsndfile, libogg, libvorbis, and libFLAC. These are such a pain on
|
||||
Windows, that I actually used a different Visual C++ solution file for Nyquist
|
||||
that includes projects to build all these libraries. You can find Nyquist on
|
||||
SourceForge, or you can build the libraries some other way. Note that my
|
||||
projects are set up to use 8-bit ASCII rather than Unicode or other.)
|
||||
|
||||
Command line parameters:
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ScoreAlignParams.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_SCORE_ALIGN_PARAMS__
|
||||
#define __AUDACITY_SCORE_ALIGN_PARAMS__
|
||||
|
||||
struct ScoreAlignParams {
|
||||
double mFramePeriod;
|
||||
double mWindowSize;
|
||||
double mSilenceThreshold;
|
||||
double mForceFinalAlignment;
|
||||
double mIgnoreSilence;
|
||||
double mPresmoothTime;
|
||||
double mLineTime;
|
||||
double mSmoothTime;
|
||||
// information returned from score alignment:
|
||||
int mStatus; // wxID_OK or not?
|
||||
double mAudioStart;
|
||||
double mAudioEnd;
|
||||
double mMidiStart;
|
||||
double mMidiEnd;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,87 @@
|
|||
/* alignfiles.cpp -- do alignment on files
|
||||
*
|
||||
* 14-Jul-08 RBD
|
||||
*
|
||||
* This is an intermediate layer between main.cpp, the client, and
|
||||
* scorealign.cpp, where the real work is done.
|
||||
*/
|
||||
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "sndfile.h"
|
||||
#include <fstream>
|
||||
#include "allegro.h"
|
||||
#include "audioreader.h"
|
||||
#include "audiofilereader.h"
|
||||
#include "alignfiles.h"
|
||||
#include "scorealign.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/* is_midi_file -- see if file name ends in .mid */
|
||||
/**/
|
||||
bool is_midi_file(const char *filename)
|
||||
{
|
||||
size_t len = strlen(filename);
|
||||
return (len > 4 && strcmp(filename + len - 4, ".mid") == 0);
|
||||
}
|
||||
|
||||
|
||||
bool align_files(const char *infilename1, const char *infilename2,
|
||||
Scorealign &sa, bool verbose)
|
||||
{
|
||||
sa.verbose = verbose;
|
||||
if (verbose) printf("opening %s\n", infilename1);
|
||||
if (is_midi_file(infilename1)) {
|
||||
// get sequence from infilename1
|
||||
Alg_seq seq(infilename1, true);
|
||||
if (seq.get_read_error()) { // error opening file
|
||||
if (verbose)
|
||||
printf ("Error: Not able to open input file %s\n",
|
||||
infilename1);
|
||||
return false;
|
||||
}
|
||||
if (verbose) printf("opening %s\n", infilename2);
|
||||
if (is_midi_file(infilename2)) {
|
||||
// get sequence from infilename2
|
||||
Alg_seq seq2(infilename2, true);
|
||||
if (seq2.get_read_error()) { // error opening file
|
||||
if (verbose)
|
||||
printf ("Error: Not able to open input file %s\n",
|
||||
infilename2);
|
||||
return false;
|
||||
}
|
||||
sa.align_midi_to_midi(seq, seq2);
|
||||
return true;
|
||||
} else {
|
||||
// get audio from infilename2
|
||||
Audio_file_reader reader;
|
||||
if (!reader.open(infilename2, sa, verbose)) {
|
||||
if (verbose)
|
||||
printf ("Error: Not able to open input file %s\n",
|
||||
infilename2);
|
||||
return false;
|
||||
}
|
||||
sa.align_midi_to_audio(seq, reader);
|
||||
return true;
|
||||
}
|
||||
} else { // if first file is audio, so is second file
|
||||
Audio_file_reader reader1;
|
||||
if (!reader1.open(infilename1, sa, verbose)) {
|
||||
if (verbose)
|
||||
printf ("Error: Not able to open input file %s\n",
|
||||
infilename1);
|
||||
return false;
|
||||
}
|
||||
if (verbose) printf("opening %s\n", infilename2);
|
||||
Audio_file_reader reader2;
|
||||
if (!reader2.open(infilename2, sa, verbose)) {
|
||||
if (verbose)
|
||||
printf ("Error: Not able to open input file %s\n",
|
||||
infilename2);
|
||||
return false;
|
||||
}
|
||||
sa.align_audio_to_audio(reader1, reader2);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/* alignfiles.h -- perform alignment given filenames
|
||||
*
|
||||
* this module is an intermediate between the command-line interface
|
||||
* main.cpp and the alignment code in scorealign.cpp. The scorealign.cpp
|
||||
* module is supposed to work on data from any source, e.g. it could be
|
||||
* a file, or it could be an object that sucks samples out of an
|
||||
* Audacity wave track. This module is supposed to not assume a command
|
||||
* line, type-script based interface, but *does* assume that you want
|
||||
* to read data from files, so you pass filenames into this module and
|
||||
* it reads the files and calls scorealign.cpp to do the alignment work.
|
||||
*
|
||||
* 14-Jul-08 RBD
|
||||
*/
|
||||
|
||||
bool align_files(const char *infilename1, const char *infilename2,
|
||||
Scorealign &sa, bool verbose);
|
||||
|
||||
bool is_midi_file(const char *filename);
|
|
@ -0,0 +1,83 @@
|
|||
/* audiofilereader.cpp -- implements a class to read samples
|
||||
*
|
||||
* 14-Jun-08 RBD
|
||||
*/
|
||||
#include "assert.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "snd.h"
|
||||
#include "audioreader.h"
|
||||
#include "audiofilereader.h"
|
||||
|
||||
double Audio_file_reader::get_sample_rate()
|
||||
{
|
||||
return snd.format.srate;
|
||||
}
|
||||
|
||||
|
||||
long Audio_file_reader::get_frames()
|
||||
{
|
||||
return (snd.u.file.end_offset - snd.u.file.byte_offset) /
|
||||
snd_bytes_per_frame(&snd);
|
||||
}
|
||||
|
||||
|
||||
long Audio_file_reader::read(float *data, long n)
|
||||
{
|
||||
// note that "samples_per_frame" is really "frames_per_window" in this
|
||||
// context, so we're computing bytes per window
|
||||
char *input_data = (char *) alloca(bytes_per_frame * samples_per_frame);
|
||||
assert(input_data != NULL) ;
|
||||
|
||||
// read into the end of data
|
||||
long frames_read = snd_read(&snd, input_data, n);
|
||||
// now convert and move to beginning of data
|
||||
snd_node float_sound;
|
||||
float_sound.format = snd.format;
|
||||
float_sound.format.channels = 1; // make sure we convert to mono
|
||||
float_sound.format.mode = SND_MODE_FLOAT; // and convert to float
|
||||
float_sound.format.bits = 32;
|
||||
// note: snd_convert takes a frame count; divide samples by channels
|
||||
int converted = snd_convert(&float_sound, data, &snd, input_data, n);
|
||||
if (frames_read == n) assert(converted == n);
|
||||
return frames_read;
|
||||
}
|
||||
|
||||
|
||||
bool Audio_file_reader::open(char *filename, Scorealign &sa, bool verbose)
|
||||
{
|
||||
bytes_per_frame = 0; // initialize now in case an error occurs
|
||||
snd.device = SND_DEVICE_FILE;
|
||||
snd.write_flag = SND_READ;
|
||||
strcpy(snd.u.file.filename, filename);
|
||||
long flags;
|
||||
int infile = snd_open(&snd, &flags);
|
||||
if (infile == SND_SUCCESS) {
|
||||
bytes_per_frame = snd_bytes_per_frame(&snd);
|
||||
calculate_parameters(sa, verbose);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Audio_file_reader::close()
|
||||
{
|
||||
snd_close(&snd);
|
||||
}
|
||||
|
||||
|
||||
void Audio_file_reader::print_info()
|
||||
{
|
||||
printf(" file name = %s\n", snd.u.file.filename);
|
||||
double sample_rate = snd.format.srate;
|
||||
printf(" sample rate = %g\n", sample_rate);
|
||||
printf(" channels = %d\n", snd.format.channels);
|
||||
/*=============================================================*/
|
||||
long frames =(snd.u.file.end_offset - snd.u.file.byte_offset) /
|
||||
snd_bytes_per_frame(&snd);
|
||||
printf(" total frames number is = %d\n", frames);
|
||||
printf(" bits per sample is %d\n", snd.format.bits);
|
||||
printf(" audio duration = %g seconds\n", (frames) / sample_rate);
|
||||
/*=============================================================*/
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
class Audio_file_reader : public Audio_reader {
|
||||
public:
|
||||
virtual long read(float *data, long n);
|
||||
snd_node snd;
|
||||
int bytes_per_frame;
|
||||
bool open(char *filename, Scorealign &sa, bool verbose);
|
||||
void close();
|
||||
snd_type get_snd() { return &snd; }
|
||||
double Audio_file_reader::get_sample_rate();
|
||||
long get_frames();
|
||||
void print_info();
|
||||
};
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
/* audiofilereader.cpp -- implements a class to read samples
|
||||
*
|
||||
* 14-Jun-08 RBD
|
||||
* 16-Jun-08 RBD revised to use libsndfile
|
||||
*/
|
||||
#include "assert.h"
|
||||
#include "stdlib.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "sndfile.h"
|
||||
#include "audioreader.h"
|
||||
#include "audiofilereader.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <malloc.h>
|
||||
#include <windows.h>
|
||||
#define bzero(addr, siz) memset(addr, 0, siz)
|
||||
#define alloca _alloca
|
||||
#endif
|
||||
|
||||
double Audio_file_reader::get_sample_rate()
|
||||
{
|
||||
return sf_info.samplerate;
|
||||
}
|
||||
|
||||
|
||||
long Audio_file_reader::get_frames()
|
||||
{
|
||||
return total_frames;
|
||||
}
|
||||
|
||||
|
||||
long Audio_file_reader::read(float *data, long n)
|
||||
{
|
||||
// note that "samples_per_frame" is really "frames_per_window" in this
|
||||
// context, so we're computing bytes per window
|
||||
float *input_data = (float *) alloca(bytes_per_frame * samples_per_frame);
|
||||
assert(input_data != NULL) ;
|
||||
|
||||
long frames_read = (long) sf_readf_float(sf, input_data, n);
|
||||
long chans = sf_info.channels;
|
||||
// now convert to mono and move to data
|
||||
for (int frame = 0; frame < frames_read; frame++) {
|
||||
float sum = 0;
|
||||
for (int chan = 0; chan < sf_info.channels; chan++) {
|
||||
// sum over channels within a frame
|
||||
sum += input_data[frame * chans + chan];
|
||||
}
|
||||
// write the frame sum to result array
|
||||
data[frame] = sum;
|
||||
}
|
||||
return frames_read;
|
||||
}
|
||||
|
||||
|
||||
bool Audio_file_reader::open(const char *filename, Scorealign &sa, bool verbose)
|
||||
{
|
||||
bytes_per_frame = 0; // initialize now in case an error occurs
|
||||
name[0] = 0;
|
||||
bzero(&sf_info, sizeof(sf_info));
|
||||
sf = sf_open(filename, SFM_READ, &sf_info);
|
||||
if (!sf) {
|
||||
#ifdef WIN32
|
||||
/* windows-specific code to report error opening file */
|
||||
char *msg;
|
||||
DWORD code = GetLastError();
|
||||
DWORD code2 = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, code, 0, (LPSTR) &msg, 0, 0);
|
||||
printf("Error string: %s\n", msg);
|
||||
LocalFree(msg);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
strncpy(name, filename, MAX_NAME_LEN);
|
||||
name[MAX_NAME_LEN] = 0; // just in case
|
||||
total_frames = (long) sf_seek(sf, 0, SEEK_END);
|
||||
sf_seek(sf, 0, SEEK_SET);
|
||||
// we're going to read floats, but they might be multi-channel...
|
||||
bytes_per_frame = sf_info.channels * sizeof(float);
|
||||
calculate_parameters(sa, verbose);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Audio_file_reader::close()
|
||||
{
|
||||
sf_close(sf);
|
||||
}
|
||||
|
||||
|
||||
void Audio_file_reader::print_info()
|
||||
{
|
||||
printf(" file name = %s\n", name);
|
||||
double sample_rate = sf_info.samplerate;
|
||||
printf(" sample rate = %g\n", sample_rate);
|
||||
printf(" channels = %d\n", sf_info.channels);
|
||||
/*=============================================================*/
|
||||
printf(" total frames number is = %ld\n", total_frames);
|
||||
printf(" audio duration = %g seconds\n", total_frames / sample_rate);
|
||||
/*=============================================================*/
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
#define MAX_NAME_LEN 255
|
||||
|
||||
class Audio_file_reader : public Audio_reader {
|
||||
public:
|
||||
virtual long read(float *data, long n);
|
||||
SNDFILE *sf;
|
||||
SF_INFO sf_info;
|
||||
char name[MAX_NAME_LEN + 1];
|
||||
int bytes_per_frame;
|
||||
long total_frames;
|
||||
bool open(const char *filename, Scorealign &sa, bool verbose);
|
||||
void close();
|
||||
double get_sample_rate();
|
||||
long get_frames();
|
||||
void print_info();
|
||||
};
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
/* audiomixerreader.cpp -- implements a class to read samples from Audacity
|
||||
*
|
||||
* 17-Jun-08 RBD created based on audiofilereader.cpp
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "audioreader.h"
|
||||
#include "allegro.h"
|
||||
#include "scorealign.h"
|
||||
#include "scorealign-glue.h"
|
||||
#include "audiomixerreader.h"
|
||||
|
||||
double Audio_mixer_reader::get_sample_rate()
|
||||
{
|
||||
return sample_rate;
|
||||
}
|
||||
|
||||
|
||||
Audio_mixer_reader::Audio_mixer_reader(void *mixer_,
|
||||
mixer_process_fn fn_ptr, int chans,
|
||||
double srate, double end_time)
|
||||
{
|
||||
mixer = mixer_; // store in member variable
|
||||
mixer_process = fn_ptr;
|
||||
buffer = NULL;
|
||||
buffer_len = 0;
|
||||
index = 0;
|
||||
channels = chans;
|
||||
sample_rate = srate;
|
||||
total_frames = (long) (end_time * srate + 0.5 /* for rounding */);
|
||||
}
|
||||
|
||||
|
||||
long Audio_mixer_reader::get_frames()
|
||||
{
|
||||
// precondition: mixer is valid and no samples have been read
|
||||
return total_frames;
|
||||
}
|
||||
|
||||
|
||||
long Audio_mixer_reader::read(float *data, long n)
|
||||
{
|
||||
for (int i = 0; i < n; i++) { // fill data
|
||||
float sum = 0;
|
||||
// note: assume mixer returns stereo (interleaved)
|
||||
for (int chan = 0; chan < channels; chan++) {
|
||||
// sum over channels within a frame
|
||||
if (index >= buffer_len * channels) {
|
||||
buffer_len =
|
||||
(*mixer_process) (mixer, &buffer, AMR_BUFFER_FRAMES);
|
||||
// frame_count = mixer->Process(AMR_BUFFER_FRAMES);
|
||||
// buffer = (float *) mixer->GetBuffer();
|
||||
index = 0;
|
||||
if (buffer_len == 0) { // no more samples to read
|
||||
// but we processed i
|
||||
return i;
|
||||
}
|
||||
}
|
||||
sum += buffer[index++];
|
||||
}
|
||||
data[i] = sum;
|
||||
}
|
||||
return n; // when end is reached, n will be 0, but the caller shouldn't
|
||||
// be asking for samples beyond the end because the caller knows
|
||||
// how many samples to ask for.
|
||||
}
|
||||
|
||||
void Audio_mixer_reader::close()
|
||||
{
|
||||
// mixer is deleted by the creator of this object, so don't delete here
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
void Audio_mixer_reader::print_info()
|
||||
{
|
||||
printf(" Audacity mixer at @ %p\n", mixer);
|
||||
printf(" sample rate %g\n", get_sample_rate());
|
||||
printf(" total frames %ld\n", get_frames());
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* audiomixerreader.h -- reads samples from an Audacity mixer on behalf of scorealign
|
||||
*
|
||||
* 21-Jul-08 RBD
|
||||
*/
|
||||
|
||||
#define AMR_BUFFER_FRAMES 4096
|
||||
|
||||
class Audio_mixer_reader : public Audio_reader {
|
||||
public:
|
||||
virtual long read(float *data, long n);
|
||||
// Mixer *mixer;
|
||||
void *mixer;
|
||||
mixer_process_fn mixer_process;
|
||||
float *buffer;
|
||||
int channels;
|
||||
long buffer_len; // number of samples pointed to by buffer
|
||||
long index; // index into buffer
|
||||
long total_frames; // number of frames in input audio
|
||||
// (returned by get_frames)
|
||||
double sample_rate;
|
||||
Audio_mixer_reader(void *mixer, mixer_process_fn fn_ptr, int chans,
|
||||
double srate, double end_time);
|
||||
void close();
|
||||
double get_sample_rate();
|
||||
long get_frames();
|
||||
void print_info();
|
||||
};
|
|
@ -1,589 +0,0 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,519 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,173 +0,0 @@
|
|||
##### http://autoconf-archive.cryp.to/ax_cflags_strict_prototypes.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Try to find a compiler option that requires strict prototypes.
|
||||
#
|
||||
# The sanity check is done by looking at sys/signal.h which has a set
|
||||
# of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
|
||||
# signal-handler type. If that signal-handler type is not fully
|
||||
# qualified then the system headers are not seen as strictly
|
||||
# prototype clean.
|
||||
#
|
||||
# For the GNU CC compiler it will be -fstrict-prototypes
|
||||
# -Wstrict-prototypes The result is added to the shellvar being
|
||||
# CFLAGS by default.
|
||||
#
|
||||
# DEFAULTS:
|
||||
#
|
||||
# - $1 shell-variable-to-add-to : CFLAGS
|
||||
# - $2 add-value-if-not-found : nothing
|
||||
# - $3 action-if-found : add value to shellvariable
|
||||
# - $4 action-if-not-found : nothing
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-12-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
"-pedantic % -Wstrict-prototypes" dnl try to warn atleast
|
||||
"-pedantic % -Wmissing-prototypes" dnl or another warning
|
||||
"-pedantic % -Werror-implicit-function-declaration" dnl
|
||||
"-pedantic % -Wimplicit-function-declaration" dnl
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
case ".$VAR" in
|
||||
.|.no|.no,*) ;;
|
||||
*) # sanity check with signal() from sys/signal.h
|
||||
cp config.log config.tmp
|
||||
AC_TRY_COMPILE([#include <signal.h>],[
|
||||
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
dnl the original did use test -n `$CC testprogram.c`
|
||||
[if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
[VAR="no, suppressed, signal.h"])
|
||||
rm config.tmp
|
||||
;;
|
||||
esac
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
"-pedantic -Werror % -Wstrict-prototypes" dnl try to warn atleast
|
||||
"-pedantic -Werror % -Wmissing-prototypes" dnl try to warn atleast
|
||||
"-pedantic -Werror % -Werror-implicit-function-declaration" dnl
|
||||
"-pedantic -Werror % -Wimplicit-function-declaration" dnl
|
||||
"-pedantic % -Wstrict-prototypes %% no, unsupported in C++" dnl oops
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
case ".$VAR" in
|
||||
.|.no|.no,*) ;;
|
||||
*) # sanity check with signal() from sys/signal.h
|
||||
cp config.log config.tmp
|
||||
AC_TRY_COMPILE([#include <signal.h>],[
|
||||
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
dnl the original did use test -n `$CC testprogram.c`
|
||||
[if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
[VAR="no, suppressed, signal.h"])
|
||||
rm config.tmp
|
||||
;;
|
||||
esac
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
|
@ -1,158 +0,0 @@
|
|||
##### http://autoconf-archive.cryp.to/ax_cflags_warn_all.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Try to find a compiler option that enables most reasonable
|
||||
# warnings. This macro is directly derived from VL_PROG_CC_WARNINGS
|
||||
# which is split up into two AX_CFLAGS_WARN_ALL and
|
||||
# AX_CFLAGS_WARN_ALL_ANSI
|
||||
#
|
||||
# For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
|
||||
# result is added to the shellvar being CFLAGS by default.
|
||||
#
|
||||
# Currently this macro knows about GCC, Solaris C compiler, Digital
|
||||
# Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
|
||||
# compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
|
||||
# 10.0.0.8) C compiler.
|
||||
#
|
||||
# - $1 shell-variable-to-add-to : CFLAGS
|
||||
# - $2 add-value-if-not-found : nothing
|
||||
# - $3 action-if-found : add value to shellvariable
|
||||
# - $4 action-if-not-found : nothing
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-12-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall" dnl GCC
|
||||
"-xstrconst % -v" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
"-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall" dnl GCC
|
||||
"-xstrconst % -v" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
"-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl implementation tactics:
|
||||
dnl the for-argument contains a list of options. The first part of
|
||||
dnl these does only exist to detect the compiler - usually it is
|
||||
dnl a global option to enable -ansi or -extrawarnings. All other
|
||||
dnl compilers will fail about it. That was needed since a lot of
|
||||
dnl compilers will give false positives for some option-syntax
|
||||
dnl like -Woption or -Xoption as they think of it is a pass-through
|
||||
dnl to later compile stages or something. The "%" is used as a
|
||||
dnl delimimiter. A non-option comment can be given after "%%" marks
|
||||
dnl which will be shown but not added to the respective C/CXXFLAGS.
|
|
@ -1,90 +0,0 @@
|
|||
##### http://autoconf-archive.cryp.to/ax_cxx_check_flag.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tests if the C++ compiler supports the flag
|
||||
# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
# used as in AC_LANG_PROGRAM macro.
|
||||
#
|
||||
# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2007-11-26
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CXX_CHECK_FLAG],[
|
||||
AC_PREREQ([2.61])
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
|
||||
AC_CACHE_CHECK([whether the C++ compiler accepts the $1 flag],
|
||||
[ax_cv_cxx_check_flag_$flag],[
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([$2],[$3])
|
||||
],[
|
||||
eval "ax_cv_cxx_check_flag_$flag=yes"
|
||||
],[
|
||||
eval "ax_cv_cxx_check_flag_$flag=no"
|
||||
])
|
||||
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
])
|
||||
|
||||
AS_IF([eval "test \"`echo '$ax_cv_cxx_check_flag_'$flag`\" = yes"],[
|
||||
:
|
||||
$4
|
||||
],[
|
||||
:
|
||||
$5
|
||||
])
|
||||
])
|
|
@ -1,90 +0,0 @@
|
|||
##### http://autoconf-archive.cryp.to/ax_cxxcpp_check_flag.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXXCPP_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tests if the C++ preprocessor supports the flag
|
||||
# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
# used as in AC_LANG_PROGRAM macro.
|
||||
#
|
||||
# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2007-11-26
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CXXCPP_CHECK_FLAG],[
|
||||
AC_PREREQ([2.61])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
|
||||
AC_CACHE_CHECK([whether the C++ preprocessor accepts the $1 flag],
|
||||
[ax_cv_cxxcpp_check_flag_$flag],[
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
AC_PREPROC_IFELSE([
|
||||
AC_LANG_PROGRAM([$2],[$3])
|
||||
],[
|
||||
eval "ax_cv_cxxcpp_check_flag_$flag=yes"
|
||||
],[
|
||||
eval "ax_cv_cxxcpp_check_flag_$flag=no"
|
||||
])
|
||||
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
])
|
||||
|
||||
AS_IF([eval "test \"`echo '$ax_cv_cxxcpp_check_flag_'$flag`\" = yes"],[
|
||||
:
|
||||
$4
|
||||
],[
|
||||
:
|
||||
$5
|
||||
])
|
||||
])
|
|
@ -1,367 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -0,0 +1,5 @@
|
|||
Change Log for scorealign
|
||||
|
||||
03-Jul-2008 RBD modified to use latest changes to portsmf
|
||||
added this file and license.txt
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="compare_transcripts"
|
||||
ProjectGUID="{C7876B12-4C66-4C26-9318-3363CD9A3FE9}"
|
||||
RootNamespace="compare_transcripts"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\compare_transcripts\compare.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,70 @@
|
|||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "math.h"
|
||||
|
||||
bool read_stuff(FILE *f, int &p, float &start, float &dur)
|
||||
{
|
||||
int n, chan, vel;
|
||||
int c;
|
||||
while ((c = getc(f)) == '#') {
|
||||
while ((c = getc(f)) != '\n' && c != EOF) ;
|
||||
}
|
||||
ungetc(c, f);
|
||||
int fields = fscanf(f, "%d %d %d %d %f %f", &n, &chan, &p, &vel, &start, &dur);
|
||||
if (fields == EOF) {
|
||||
return false;
|
||||
} else if (fields != 6) {
|
||||
printf("Error scanning file\n");
|
||||
exit(1);
|
||||
}
|
||||
while ((c = getc(f)) != '\n' && c != EOF) ;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void print_usage(char *progname)
|
||||
{
|
||||
printf("%s file1 file2\n", progname);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *file1;
|
||||
char *file2;
|
||||
char *progname = strrchr(argv[0], '/');
|
||||
progname = progname ? progname + 1 : argv[0];
|
||||
if (argc < 3) {
|
||||
print_usage(progname);
|
||||
return 1;
|
||||
}
|
||||
file1 = argv[1];
|
||||
file2 = argv[2];
|
||||
FILE *f1 = fopen(file1, "r");
|
||||
FILE *f2 = fopen(file2, "r");
|
||||
int count = 0;
|
||||
float sum = 0.0;
|
||||
float sumsqr = 0.0;
|
||||
while (true) {
|
||||
int p1, p2;
|
||||
float start1, start2;
|
||||
float dur1, dur2;
|
||||
bool ok1 = read_stuff(f1, p1, start1, dur1);
|
||||
bool ok2 = read_stuff(f2, p2, start2, dur2);
|
||||
if (ok1 != ok2 || p1 != p2) {
|
||||
printf("Transcripts are not compatible\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!ok1) break;
|
||||
count++;
|
||||
float diff = start2 - start1;
|
||||
sum += diff;
|
||||
sumsqr += diff * diff;
|
||||
}
|
||||
float avg = sum / count;
|
||||
float stddev = sqrt((sumsqr / count) - (avg * avg));
|
||||
printf("average error = %g\nstandard deviation = %g\n", avg, stddev);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compare_transcripts", "compare_transcripts.vcproj", "{C7876B12-4C66-4C26-9318-3363CD9A3FE9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C7876B12-4C66-4C26-9318-3363CD9A3FE9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C7876B12-4C66-4C26-9318-3363CD9A3FE9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C7876B12-4C66-4C26-9318-3363CD9A3FE9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C7876B12-4C66-4C26-9318-3363CD9A3FE9}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
|
@ -1,136 +0,0 @@
|
|||
dnl
|
||||
dnl scorealign configure.in script - version not using libtool
|
||||
dnl
|
||||
dnl Joshua Haberman
|
||||
dnl Dominic Mazzoni
|
||||
dnl Richard Ash
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Instructions: to create "configure" from "configure.in", run:
|
||||
dnl aclocal
|
||||
dnl autoconf
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Require autoconf >= 2.61
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl Init autoconf and automake
|
||||
AC_INIT([scorealign],[0.1])
|
||||
dnl check that we have some source code
|
||||
AC_CONFIG_SRCDIR([scorealign.h])
|
||||
dnl keep autools files in a subdirectory
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
# which also contains a subdir containing macros
|
||||
AC_CONFIG_MACRO_DIR([autotools/m4])
|
||||
dnl set up automake
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
dnl Audacity policy: don't enable automatic rebuild of configure et al if
|
||||
dnl sources change
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------
|
||||
dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2"
|
||||
dnl if $CFLAGS is blank and it finds GCC
|
||||
cflags_save="$CFLAGS"
|
||||
cppflags_save="$CPPFLAGS"
|
||||
cxxflags_save="$CXXFLAGS"
|
||||
AC_PROG_CC
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
dnl we will need an "install" program to be available
|
||||
AC_PROG_INSTALL
|
||||
dnl and ranlib for static libraries
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Make the install prefix available to the program so that the pkg-config file
|
||||
dnl can be created correctly
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
if [[ $prefix = "NONE" ]] ; then
|
||||
AC_DEFINE(INSTALL_PREFIX, "/usr/local",
|
||||
[define as prefix where Audacity is installed])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix")
|
||||
fi
|
||||
|
||||
dnl Build Options
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[enable debug support [default=no]])],
|
||||
debug_preference="$enableval",
|
||||
debug_preference="no")
|
||||
|
||||
dnl ----------------------------------------------------
|
||||
dnl If user asked for debug, put debug in compiler flags
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
dnl we want debuging on
|
||||
AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -g "
|
||||
CXXFLAGS="${CXXFLAGS} -g "
|
||||
fi
|
||||
|
||||
dnl --------------------------------------------------------------------------
|
||||
dnl We would like warnings enabled on the builds, but different compilers need
|
||||
dnl different options for these. This bit tries to work out what flags we
|
||||
dnl should add to the compiler we are using.
|
||||
dnl --------------------------------------------------------------------------
|
||||
|
||||
dnl Strict prototypes flags for C (only C because doesn't work for C++)
|
||||
AX_CFLAGS_STRICT_PROTOTYPES(CFLAGS)
|
||||
|
||||
dnl Sensible warnings for C
|
||||
AX_CFLAGS_WARN_ALL(wall_flags)
|
||||
CFLAGS="${CFLAGS} $wall_flags"
|
||||
dnl try and use it on C++ as well
|
||||
AX_CXX_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cxx_does_wall="yes", cxx_does_wall="no")
|
||||
if test "x$cxx_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ compiler
|
||||
CXXFLAGS="${CXXFLAGS} $wall_flags"
|
||||
fi
|
||||
AX_CXXCPP_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cpp_does_wall="yes", cpp_does_wall="no")
|
||||
if test "x$cpp_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ pre-processor
|
||||
CPPFLAGS="${CPPFLAGS} $wall_flags"
|
||||
fi
|
||||
|
||||
dnl --- check for required libraries ---
|
||||
dnl system libraries
|
||||
AC_CHECK_FUNCS([strchr memmove])
|
||||
AC_FUNC_MALLOC
|
||||
AC_HEADER_STDBOOL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CONFIG_FILES([Makefile scorealign.pc scorealign-uninstalled.pc])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo ""
|
||||
echo "Run 'configure --help' for an explanation of the possible options,"
|
||||
echo "otherwise run 'make' to build scorealign."
|
||||
|
||||
dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
dnl version control system. Please do not modify past this point.
|
||||
# Local Variables:
|
||||
# c-basic-offset: 3
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
#
|
||||
# vim: et sts=3 sw=3
|
|
@ -196,7 +196,6 @@ double Curvefit::distance_xy(double x, double y)
|
|||
printf("FATAL INTERNAL ERROR IN distance_xy: neither x nor y is "
|
||||
"an integer\n");
|
||||
assert(false);
|
||||
return 100.0; // to make the compiler happy
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,6 +219,7 @@ double Curvefit::compute_dist(int i)
|
|||
for (int y = (int) y1; y < y2; y++) {
|
||||
double x = interpolate(y1, x1, y2, x2, y);
|
||||
sum += distance_xy(x, y);
|
||||
// printf("dist %g %d = %g\n", x, y, distance_xy(x, y));
|
||||
}
|
||||
}
|
||||
// normalize using line length: sum/n is average distance. Multiply
|
||||
|
@ -231,7 +231,7 @@ double Curvefit::compute_dist(int i)
|
|||
double rslt = sqrt(dx*dx + dy*dy) * sum / n;
|
||||
// printf("compute_dist %d: x1 %g y1 %g x2 %g y2 %g sum %g rslt %g\n",
|
||||
// i, x1, y1, x2, y2, sum, rslt);
|
||||
if (rslt < 0 || rslt > 20 * n) { // DEBUGGING
|
||||
if (rslt < 0 || rslt > 24 * n) { // DEBUGGING
|
||||
printf("internal error");
|
||||
}
|
||||
return rslt;
|
||||
|
|
|
@ -206,10 +206,10 @@ int Scorealign::gen_chroma_audio(Audio_reader &reader, int hcutoff,
|
|||
// allocate some buffers for use in the loop
|
||||
int full_data_size = nextPowerOf2(reader.samples_per_frame);
|
||||
if (verbose) {
|
||||
printf(" samples per frame is %d \n", reader.samples_per_frame);
|
||||
printf(" total chroma frames %d\n", reader.frame_count);
|
||||
printf(" samples per frame is %ld \n", reader.samples_per_frame);
|
||||
printf(" total chroma frames %ld\n", reader.frame_count);
|
||||
// printf(" Window size %g second \n", reader.window_size);
|
||||
printf(" hopsize in samples %d \n", reader.hop_samples);
|
||||
printf(" hopsize in samples %ld \n", reader.hop_samples);
|
||||
printf(" fft size %d\n", full_data_size);
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ int Scorealign::gen_chroma_midi(Alg_seq &seq, float dur, int nnotes,
|
|||
float velocity = item->note->loud;
|
||||
float weight = overlap * velocity;
|
||||
#if DEBUG_LOG
|
||||
fprintf(dbf, "%3d pitch %g starting %g key %d overlap %g velocity %g\n",
|
||||
fprintf(dbf, "%3d pitch %g starting %g key %ld overlap %g velocity %g\n",
|
||||
cv_index, item->note->pitch, item->note->time,
|
||||
item->note->get_identifier(), overlap, velocity);
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
/* main.cpp -- the command line interface for scorealign
|
||||
*
|
||||
* 14-Jul-08 RBD
|
||||
*/
|
||||
|
||||
#include "stdio.h"
|
||||
#include "main.h"
|
||||
#include <fstream>
|
||||
#include "allegro.h"
|
||||
#include "audioreader.h"
|
||||
#include "scorealign.h"
|
||||
#include "sautils.h"
|
||||
#include "alignfiles.h"
|
||||
#include "gen_chroma.h"
|
||||
#include "comp_chroma.h"
|
||||
|
||||
// a global object with score alignment parameters and data
|
||||
Scorealign sa;
|
||||
|
||||
static void print_usage(const char *progname)
|
||||
{
|
||||
printf("\nUsage: %s [-<flags> [<period> <windowsize> <path> <smooth> "
|
||||
"<trans> <midi> <beatmap> <image>]] <file0> [<file1>]\n", progname);
|
||||
printf(" specifying only <file0> simply transcribes MIDI in <file0> "
|
||||
"to\n");
|
||||
printf(" transcription.txt. Otherwise, align <file0> and <file1>.\n");
|
||||
printf(" -h 0.25 indicates a frame period of 0.25 seconds\n");
|
||||
printf(" -w 0.25 indicates a window size of 0.25 seconds.\n");
|
||||
printf(" -d 0.1 indicates a silence threshold of RMS=0.1.\n");
|
||||
printf(" -r indicates filename to write raw alignment path to "
|
||||
"(default path.data)\n");
|
||||
printf(" -s is filename to write smoothed alignment path(default is "
|
||||
"smooth.data)\n");
|
||||
printf(" -t is filename to write the time aligned transcription "
|
||||
"(default is transcription.txt)\n");
|
||||
printf(" -m is filename to write the time aligned midi file "
|
||||
"(default is midi.mid)\n");
|
||||
printf(" -b is filename to write the time aligned beat times "
|
||||
"(default is beatmap.txt)\n");
|
||||
printf(" -i is filename to write an image of the distance matrix "
|
||||
"(default is distance.pnm)\n");
|
||||
printf(" -o 2.0 indicates a smoothing window time of 2.0s\n");
|
||||
printf(" -p 3.0 indicates presmoothing with a 3s window\n");
|
||||
printf(" -x 6.0 indicates 6s line segment approximation\n");
|
||||
#if (defined (_WIN32) || defined (WIN32))
|
||||
printf(" This is a Unix style command line application which\n"
|
||||
" should be run in a MSDOS box or Command Shell window.\n\n");
|
||||
printf(" Type RETURN to exit.\n") ;
|
||||
getchar();
|
||||
#endif
|
||||
} /* print_usage */
|
||||
|
||||
|
||||
/* SAVE_SMOOTH_FILE
|
||||
saves the smooth time map in SMOOTH_FILENAME
|
||||
|
||||
*/
|
||||
void save_smooth_file(const char *smooth_filename, Scorealign &sa) {
|
||||
FILE *smoothf = fopen(smooth_filename, "w");
|
||||
assert(smoothf);
|
||||
for (int i = 0; i < sa.file0_frames; i++) {
|
||||
fprintf(smoothf, "%g \t%g\n", i * sa.actual_frame_period_0,
|
||||
sa.smooth_time_map[i] * sa.actual_frame_period_1);
|
||||
}
|
||||
fclose(smoothf);
|
||||
}
|
||||
|
||||
|
||||
/* PRINT_BEAT_MAP
|
||||
prints the allegro beat_map (for debugging) which contain
|
||||
the time, beat pair for a song
|
||||
*/
|
||||
void print_beat_map(Alg_seq &seq, const char *filename) {
|
||||
|
||||
FILE *beatmap_print = fopen(filename, "w");
|
||||
|
||||
Alg_beats &b = seq.get_time_map()->beats;
|
||||
long num_beats = seq.get_time_map()->length();
|
||||
|
||||
for(int i = 0; i < num_beats; i++) {
|
||||
fprintf(beatmap_print," %f %f \n", b[i].beat, b[i].time);
|
||||
}
|
||||
fclose(beatmap_print);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* EDIT_TRANSCRIPTION
|
||||
edit the allegro time map structure according
|
||||
to the warping and output a midi file and transcription
|
||||
file
|
||||
|
||||
*/
|
||||
void edit_transcription(Alg_seq &seq , bool warp, FILE *outf,
|
||||
const char *midi_filename, const char *beat_filename) {
|
||||
int note_x = 1;
|
||||
seq.convert_to_seconds();
|
||||
Alg_iterator iter(&seq, false); // no note-offs
|
||||
iter.begin();
|
||||
Alg_event_ptr e = iter.next();
|
||||
|
||||
while (e) {
|
||||
if (e->is_note()) {
|
||||
Alg_note_ptr n = (Alg_note_ptr) e;
|
||||
fprintf(outf, "%d %ld %d %d ",
|
||||
note_x++, n->chan, ROUND(n->pitch), ROUND(n->loud));
|
||||
// now compute onset time mapped to audio time
|
||||
double start = n->time;
|
||||
double finish = n->time + n->dur;
|
||||
if (warp) {
|
||||
start = sa.map_time(start);
|
||||
finish = sa.map_time(finish);
|
||||
}
|
||||
fprintf(outf, "%.3f %.3f\n", start, finish-start);
|
||||
}
|
||||
e = iter.next();
|
||||
}
|
||||
iter.end();
|
||||
fclose(outf);
|
||||
if (warp) {
|
||||
// align the midi file and write out
|
||||
sa.midi_tempo_align(seq);
|
||||
seq.smf_write(midi_filename);
|
||||
print_beat_map(seq, beat_filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// save image of distance matrix
|
||||
void save_image(const char *image_filename, Scorealign &sa)
|
||||
{
|
||||
FILE *outf = fopen(image_filename, "wb");
|
||||
if (!outf) {
|
||||
fprintf(stderr, "Error: could not open %s for write.\n",
|
||||
image_filename);
|
||||
}
|
||||
float max_d = 0.0;
|
||||
float min_d = 999999.0;
|
||||
fputs("P5\n", outf);
|
||||
fprintf(outf, "%d %d 255\n", sa.file1_frames, sa.file0_frames);
|
||||
for (int row = 0; row < sa.file0_frames; row++) {
|
||||
for (int col = 0; col < sa.file1_frames; col++) {
|
||||
float d = sa.gen_dist(row, col);
|
||||
#ifdef DEBUG_LOG
|
||||
fprintf(dbf, "%d %d %g\n", row, col, d);
|
||||
#endif
|
||||
if (d > max_d) max_d = d;
|
||||
if (d < min_d) min_d = d;
|
||||
int pixel = (int) (255 * (d / 6.0) + 0.5);
|
||||
if (pixel > 255) pixel = 255;
|
||||
putc(pixel, outf);
|
||||
}
|
||||
}
|
||||
fclose(outf);
|
||||
printf("max distance %g, min distance %g\n", max_d, min_d);
|
||||
}
|
||||
|
||||
|
||||
/* SAVE_TRANSCRIPTION
|
||||
write note data corresponding to audio file
|
||||
|
||||
assume audio file is file 1 and midi file is file 2
|
||||
so pathx is index into audio, pathy is index into MIDI
|
||||
|
||||
If warp is false, simply write a transcription of the midi file.
|
||||
|
||||
Every note has 6 fields separated by a space character. The fields are:
|
||||
<sequence number> <channel> <pitch> <velocity> <onset> <duration>
|
||||
Where
|
||||
<sequence number> is just an integer note number, e.g. 1, 2, 3, ...
|
||||
<channel> is MIDI channel from 0 to 15
|
||||
<pitch> is MIDI key number (60 = middle C)
|
||||
<velocity> is MIDI key velocity (1 to 127)
|
||||
<onset> is time in seconds, rounded to 3 decimal places (milliseconds)
|
||||
<duration> is time in seconds, rounded to 3 decimal places
|
||||
*/
|
||||
void save_transcription(const char *file0, const char *file1,
|
||||
bool warp, const char *filename, const char *smooth_filename,
|
||||
const char *midi_filename, const char *beat_filename)
|
||||
{
|
||||
|
||||
const char *midiname; //midi file to be read
|
||||
const char *audioname; //audio file to be read
|
||||
|
||||
if (warp) save_smooth_file(smooth_filename, sa);
|
||||
|
||||
//If either is a midifile
|
||||
if (is_midi_file(file0) || is_midi_file(file1)) {
|
||||
|
||||
if (is_midi_file(file0)) {
|
||||
midiname=file0;
|
||||
audioname=file1;
|
||||
} else {
|
||||
midiname=file1;
|
||||
audioname=file0;
|
||||
}
|
||||
|
||||
Alg_seq seq(midiname, true);
|
||||
|
||||
FILE *outf = fopen(filename, "w");
|
||||
if (!outf) {
|
||||
printf("Error: could not open %s\n", filename);
|
||||
return;
|
||||
}
|
||||
fprintf(outf, "# transcription of %s\n", midiname);
|
||||
if (warp) {
|
||||
fprintf(outf, "# note times are aligned to %s\n", audioname);
|
||||
} else {
|
||||
fprintf(outf, "# times are unmodified from those in MIDI file\n");
|
||||
}
|
||||
fprintf(outf, "# transcription format : <sequence number> "
|
||||
"<channel> <pitch> <velocity> <onset> <duration>\n");
|
||||
|
||||
edit_transcription(seq, warp, outf, midi_filename, beat_filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* SAVE_PATH
|
||||
write the alignment path to FILENAME
|
||||
*/
|
||||
void save_path(const char *filename, int pathlen, short* pathx, short *pathy,
|
||||
float actual_frame_period_0, float actual_frame_period_1)
|
||||
{
|
||||
// print the path to a (plot) file
|
||||
FILE *pathf = fopen(filename, "w");
|
||||
assert(pathf);
|
||||
int p;
|
||||
for (p = 0; p < pathlen; p++) {
|
||||
fprintf(pathf, "%g %g\n", pathx[p] * actual_frame_period_0,
|
||||
pathy[p] * actual_frame_period_1);
|
||||
}
|
||||
fclose(pathf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Prints the chroma table (for debugging)
|
||||
*/
|
||||
|
||||
void print_chroma_table(const float *chrom_energy, int frames)
|
||||
{
|
||||
int i, j;
|
||||
for (j = 0; j < frames; j++) {
|
||||
for (i = 0; i <= CHROMA_BIN_COUNT; i++) {
|
||||
printf("%5.2f | ", AREF2(chrom_energy, j, i));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv [])
|
||||
{
|
||||
const char *progname, *infilename0, *infilename1;
|
||||
const char *smooth_filename, *path_filename, *trans_filename;
|
||||
const char *midi_filename, *beat_filename, *image_filename;
|
||||
|
||||
//just transcribe if trasncribe == 1
|
||||
int transcribe = 0;
|
||||
|
||||
// Default for the user definable parameters
|
||||
|
||||
path_filename = "path.data";
|
||||
smooth_filename = "smooth.data";
|
||||
trans_filename = "transcription.txt";
|
||||
midi_filename = "midi.mid";
|
||||
beat_filename = "beatmap.txt";
|
||||
image_filename = "distance.pnm";
|
||||
|
||||
progname = strrchr(argv [0], '/');
|
||||
progname = progname ? progname + 1 : argv[0] ;
|
||||
|
||||
// If no arguments, return usage
|
||||
if (argc < 2) {
|
||||
print_usage(progname);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******PARSING CODE BEGINS*********/
|
||||
int i = 1;
|
||||
while (i < argc) {
|
||||
//expected flagged argument
|
||||
if (argv[i][0] == '-') {
|
||||
char flag = argv[i][1];
|
||||
if (flag == 'h') {
|
||||
sa.frame_period = atof(argv[i+1]);
|
||||
} else if (flag == 'w') {
|
||||
sa.window_size = atof(argv[i+1]);
|
||||
} else if (flag == 'r') {
|
||||
path_filename = argv[i+1];
|
||||
} else if (flag == 's') {
|
||||
smooth_filename = argv[i+1];
|
||||
} else if (flag == 't') {
|
||||
trans_filename = argv[i+1];
|
||||
} else if (flag == 'm') {
|
||||
midi_filename = argv[i+1];
|
||||
} else if (flag == 'i') {
|
||||
image_filename = argv[i+1];
|
||||
} else if (flag == 'b') {
|
||||
beat_filename = argv[i+1];
|
||||
} else if (flag == 'o') {
|
||||
sa.smooth_time = atof(argv[i+1]);
|
||||
} else if (flag == 'p') {
|
||||
sa.presmooth_time = atof(argv[i+1]);
|
||||
} else if (flag == 'x') {
|
||||
sa.line_time = atof(argv[i+1]);
|
||||
} else if (flag == 'd') {
|
||||
sa.silence_threshold = atof(argv[i+1]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// When aligning audio to midi we must force file0 to be midi
|
||||
else {
|
||||
// file 1 is midi
|
||||
if (transcribe == 0) {
|
||||
infilename0 = argv[i];
|
||||
transcribe++;
|
||||
}
|
||||
// file 2 is audio or a second midi
|
||||
else {
|
||||
infilename1 = argv[i];
|
||||
transcribe++;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
/**********END PARSING ***********/
|
||||
if (sa.presmooth_time > 0 && sa.line_time > 0) {
|
||||
printf("WARNING: both -p and -x options selected.\n");
|
||||
}
|
||||
|
||||
if (transcribe == 1) {
|
||||
// if only one midi file, just write transcription and exit,
|
||||
// no alignment
|
||||
save_transcription(infilename0, "", false, trans_filename,NULL, NULL, NULL);
|
||||
printf("Wrote %s\n", trans_filename);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
||||
// if midi only in infilename1, make it infilename0
|
||||
if (is_midi_file(infilename1) && !is_midi_file(infilename0)) {
|
||||
const char *temp;
|
||||
temp = infilename0;
|
||||
infilename0 = infilename1;
|
||||
infilename1 = temp;
|
||||
}
|
||||
|
||||
if (!align_files(infilename0, infilename1, sa, true /* verbose */)) {
|
||||
printf("An error occurred, not saving path and transcription data\n");
|
||||
goto finish;
|
||||
}
|
||||
if (sa.file0_frames <= 2 || sa.file1_frames <= 2) {
|
||||
printf("Error: file frame counts are low: %d (for input 1) and %d "
|
||||
"for input 2)\n...not saving path and transcription data\n",
|
||||
sa.file0_frames, sa.file1_frames);
|
||||
goto finish;
|
||||
}
|
||||
// save path
|
||||
save_path(path_filename, sa.pathlen, sa.pathx, sa.pathy,
|
||||
sa.actual_frame_period_0, sa.actual_frame_period_1);
|
||||
// save image of distance matrix
|
||||
save_image(image_filename, sa);
|
||||
// save smooth, midi, transcription
|
||||
save_transcription(infilename0, infilename1, true, trans_filename,
|
||||
smooth_filename, midi_filename, beat_filename);
|
||||
|
||||
// print what the chroma matrix looks like
|
||||
/*
|
||||
printf("file0 chroma table: \n");
|
||||
print_chroma_table(chrom_energy0,file0_frames);
|
||||
printf("\nfile1 chroma table: \n");
|
||||
print_chroma_table(chrom_energy1, file1_frames);
|
||||
*/
|
||||
|
||||
// only path and smooth are written when aligning two audio files
|
||||
if (is_midi_file(infilename0) || is_midi_file(infilename1))
|
||||
printf("Wrote %s, %s, %s, and %s.\n", path_filename, smooth_filename,
|
||||
trans_filename, beat_filename);
|
||||
else
|
||||
printf("Wrote %s and %s.", path_filename, smooth_filename);
|
||||
|
||||
finish:
|
||||
|
||||
#ifdef WIN32
|
||||
printf("Type RETURN to exit\n");
|
||||
getchar();
|
||||
#endif
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
|
||||
/* print_path_range -- debugging output */
|
||||
/**/
|
||||
void print_path_range(const short *pathx, const short *pathy, int i, int j)
|
||||
{
|
||||
while (i <= j) {
|
||||
printf("%d %d\n", pathx[i], pathy[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/* main.h -- declarations of some command-line functions
|
||||
*
|
||||
* If VERBOSE is on in some files, some print functions are called.
|
||||
* Since these are only appropriate for the command-line interface,
|
||||
* there are some print functions declared in main.cpp. main.h
|
||||
* declares these functions for use in scorealign.cpp (and maybe others)
|
||||
*
|
||||
* 14-Jul-08 RBD
|
||||
*/
|
||||
|
||||
void print_path_range(const short *pathx, const short *pathy, int i, int j);
|
||||
void print_chroma_table(const float *chrom_energy, int frames);
|
|
@ -0,0 +1,28 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "score-align", "score-align.vcproj", "{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{AB1E315A-3503-4EA6-8888-9652EA4A11E6} = {AB1E315A-3503-4EA6-8888-9652EA4A11E6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsndfile", "libsndfile\libsndfile.vcproj", "{AB1E315A-3503-4EA6-8888-9652EA4A11E6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}.Release|Win32.Build.0 = Release|Win32
|
||||
{AB1E315A-3503-4EA6-8888-9652EA4A11E6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AB1E315A-3503-4EA6-8888-9652EA4A11E6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AB1E315A-3503-4EA6-8888-9652EA4A11E6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AB1E315A-3503-4EA6-8888-9652EA4A11E6}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
300
lib-src/libscorealign/libscorealign.vcproj → lib-src/libscorealign/score-align.vcproj
Normal file → Executable file
300
lib-src/libscorealign/libscorealign.vcproj → lib-src/libscorealign/score-align.vcproj
Normal file → Executable file
|
@ -2,7 +2,7 @@
|
|||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="libscorealign"
|
||||
Name="score-align"
|
||||
ProjectGUID="{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}"
|
||||
RootNamespace="scorealign"
|
||||
Keyword="Win32Proj"
|
||||
|
@ -20,8 +20,8 @@
|
|||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
|
@ -42,7 +42,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""..\..\lib-src\portsmf""
|
||||
AdditionalIncludeDirectories="fft3;libsndfile;..\portsmf"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
@ -63,11 +63,23 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\portsmf\Debug\portsmf.lib Debug\libsndfile.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="libsndfile"
|
||||
AddModuleNamesToAssembly=""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -77,6 +89,9 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
@ -85,133 +100,7 @@
|
|||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="fft3;..\portsmf;snd"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Unicode Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""..\..\lib-src\portsmf""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Unicode Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
|
@ -232,9 +121,9 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="fft3;..\portsmf;snd"
|
||||
AdditionalIncludeDirectories="fft3;libsndfile;..\portsmf"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
|
@ -250,11 +139,23 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\portsmf\Release\portsmf.lib Release\libsndfile.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -264,6 +165,9 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
@ -273,14 +177,84 @@
|
|||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\audiomixerreader.h"
|
||||
RelativePath=".\alignfiles.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audioreader.h"
|
||||
RelativePath=".\audiofilereader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audioreader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\comp_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\curvefit.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gen_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hillclimb.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\regression.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sautils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="fft3"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\alignfiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audiofilereader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -292,7 +266,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.h"
|
||||
RelativePath=".\fft3\FFT.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -311,60 +285,16 @@
|
|||
RelativePath=".\sautils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign-glue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\audiomixerreader.cpp"
|
||||
RelativePath=".\snd\snd\switches.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audioreader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\comp_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\curvefit.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gen_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hillclimb.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\regression.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sautils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign-glue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign.cpp"
|
||||
RelativePath=".\snd\snd\swlogic.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
|
@ -1,46 +0,0 @@
|
|||
/* scorealign-glue.cpp -- interface between Audacity and scorealign library
|
||||
*
|
||||
* 21-Jul-08 RBD
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "allegro.h"
|
||||
#include "audioreader.h"
|
||||
#include "scorealign.h"
|
||||
#include "scorealign-glue.h"
|
||||
#include "audiomixerreader.h"
|
||||
|
||||
|
||||
int scorealign(void *mixer, mixer_process_fn fn_ptr, int chans, double srate,
|
||||
double end_time, Alg_seq *seq, SAProgress *progress,
|
||||
ScoreAlignParams ¶ms)
|
||||
{
|
||||
Scorealign sa;
|
||||
sa.frame_period = params.mFramePeriod;
|
||||
sa.window_size = params.mWindowSize;
|
||||
sa.silence_threshold = params.mSilenceThreshold;
|
||||
sa.force_final_alignment = (params.mForceFinalAlignment != 0.0);
|
||||
sa.ignore_silence = (params.mIgnoreSilence != 0.0);
|
||||
sa.presmooth_time = params.mPresmoothTime;
|
||||
sa.line_time = params.mLineTime;
|
||||
sa.smooth_time = params.mSmoothTime;
|
||||
|
||||
Audio_mixer_reader reader(mixer, fn_ptr, chans, srate, end_time);
|
||||
reader.calculate_parameters(sa, false);
|
||||
sa.progress = progress;
|
||||
int result = sa.align_midi_to_audio(*seq, reader);
|
||||
|
||||
params.mMidiStart = sa.first_x * sa.actual_frame_period_0;
|
||||
params.mMidiEnd = (sa.last_x + 1) * sa.actual_frame_period_0;
|
||||
params.mAudioStart = sa.first_y * sa.actual_frame_period_1;
|
||||
params.mAudioEnd = (sa.last_y + 1) * sa.actual_frame_period_1;
|
||||
|
||||
if (result != SA_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
sa.midi_tempo_align(*seq);
|
||||
// seq has now been modified to conform to audio provided by mixer
|
||||
return SA_SUCCESS; // success
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
typedef long (*mixer_process_fn)(void *mix, float **buffer, long n);
|
||||
|
||||
#include "ScoreAlignParams.h"
|
||||
|
||||
int scorealign(void *mixer, mixer_process_fn fn_ptr,
|
||||
int chans, double srate,
|
||||
double end_time, Alg_seq *seq, SAProgress *progress,
|
||||
ScoreAlignParams ¶ms);
|
|
@ -1,16 +0,0 @@
|
|||
# This pkg-config file lets you use the compiled lib without having to first
|
||||
# install it anywhere. Simply put the directory the pkg-config file is in on the
|
||||
# PKG_CONFIG_PATH and look for libscorealign as normal - the uninstalled file
|
||||
# is prefered to the installed one if both are found
|
||||
libdir=@abs_builddir@
|
||||
# The library always ends up in the build dir.
|
||||
includedir=@abs_srcdir@
|
||||
# The headers are always in the source dir
|
||||
|
||||
Name: libscorealign
|
||||
Description: Score to Audio Alignment Library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lscorealign @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "score-align", "score-align.vcproj", "{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scorealign-vc2010", "scorealign-vc2010.vcxproj", "{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -0,0 +1,304 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="scorealign-vc2010"
|
||||
ProjectGUID="{5F04DE5D-0A34-496E-8A34-BE30BA9C70A1}"
|
||||
RootNamespace="scorealign"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="fft3;libsndfile;..\portsmf"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\portsmf\Debug\portsmf.lib Debug\libsndfile.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="libsndfile"
|
||||
AddModuleNamesToAssembly=""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="fft3;libsndfile;..\portsmf"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\portsmf\Release\portsmf.lib Release\libsndfile.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\alignfiles.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audiofilereader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audioreader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\comp_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\curvefit.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gen_chroma.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hillclimb.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\regression.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sautils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="fft3"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT3.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\alignfiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\audiofilereader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\comp_chroma.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\curvefit.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\fft3\FFT.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gen_chroma.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hillclimb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\regression.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sautils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scorealign.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\snd\snd\switches.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\snd\snd\swlogic.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -478,8 +478,13 @@ void Scorealign::presmooth()
|
|||
{
|
||||
int n = ROUND(presmooth_time / actual_frame_period_1);
|
||||
n = (n + 3) & ~3; // round up to multiple of 4
|
||||
if (n < 4) {
|
||||
SA_V(printf("presmooth time %g rounded to zero %gs frame periods.\n",
|
||||
presmooth_time, actual_frame_period_1););
|
||||
return;
|
||||
}
|
||||
int i = 0;
|
||||
while (i < pathlen - 1 && pathx[i] + n <= last_x) {
|
||||
while (i < pathlen - n && pathx[i] + n <= last_x) {
|
||||
/* line goes from i to i+n-1 */
|
||||
int x1 = pathx[i];
|
||||
int xmid = x1 + n/2;
|
||||
|
@ -495,6 +500,10 @@ void Scorealign::presmooth()
|
|||
break;
|
||||
}
|
||||
}
|
||||
// this should not happen, but this guarantees that we found
|
||||
// y2 and it is within the path:
|
||||
if (j >= pathlen) break;
|
||||
|
||||
Regression regr;
|
||||
/* see if line fits the data */
|
||||
int k = i;
|
||||
|
|
|
@ -195,7 +195,7 @@ class Scorealign {
|
|||
void midi_tempo_align(Alg_seq &seq);
|
||||
};
|
||||
|
||||
//#define DEBUG_LOG 1
|
||||
// #define DEBUG_LOG 1
|
||||
#if DEBUG_LOG
|
||||
extern FILE *dbf;
|
||||
#endif
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libscorealign
|
||||
Description: Score to Audio Alignment Library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lscorealign @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
|
@ -200,9 +200,18 @@
|
|||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "scorealign" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* scorealign */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* scorealign */,
|
||||
);
|
||||
|
@ -261,13 +270,14 @@
|
|||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
OTHER_LDFLAGS = (
|
||||
"-L/usr/local/lib",
|
||||
"-lsndfile",
|
||||
);
|
||||
PRODUCT_NAME = scorealign;
|
||||
USER_HEADER_SEARCH_PATHS = ../portsmf/;
|
||||
};
|
||||
|
@ -279,7 +289,7 @@
|
|||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT = "";
|
||||
USER_HEADER_SEARCH_PATHS = ../portsmf/;
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -290,7 +300,7 @@
|
|||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
T0 -tempor:120.0
|
||||
c4 q
|
||||
d4
|
||||
e4
|
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
mv path.data $1.path.data
|
||||
mv smooth.data $1.smooth.data
|
||||
mv beatmap.txt $1.beatmap.txt
|
||||
mv debug-log.txt $1.debug-log.txt
|
||||
mv midi.mid $1.midi.mid
|
||||
mv transcription.txt $1.transcription.txt
|
||||
echo "moved outputs to backup files prefixed with $1."
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#include "stdarg.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#define _vsnprintf vsnprintf
|
||||
#elif defined(__MACH__)
|
||||
#define _vsnprintf vsnprintf
|
||||
#else
|
||||
#include "crtdbg.h"
|
||||
#endif
|
||||
|
||||
void trace(char *format, ...)
|
||||
{
|
||||
char msg[256];
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
_vsnprintf(msg, 256, format, args);
|
||||
va_end(args);
|
||||
|
||||
#if defined(_DEBUG) && !defined(__linux__)
|
||||
_CrtDbgReport(_CRT_WARN, NULL, NULL, NULL, msg);
|
||||
#else
|
||||
printf(msg);
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
void trace(char *format, ...);
|
||||
|
|
@ -152,10 +152,6 @@
|
|||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\lib-src\libscorealign\audiomixerreader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\lib-src\libscorealign\audioreader.cpp"
|
||||
>
|
||||
|
@ -188,10 +184,6 @@
|
|||
RelativePath="..\..\..\lib-src\libscorealign\sautils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\lib-src\libscorealign\scorealign-glue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\lib-src\libscorealign\scorealign.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue