Add OpenFST 1.6.9 Windows + README.mozilla
This commit is contained in:
parent
de279168ec
commit
bca54d3f03
30
native_client/ctcdecode/third_party/openfst-1.6.9-win/.gitignore
vendored
Normal file
30
native_client/ctcdecode/third_party/openfst-1.6.9-win/.gitignore
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# Ignore extensionless files
|
||||
!*.*
|
||||
!*/
|
||||
|
||||
# Other patterns
|
||||
/config.h
|
||||
/config.log
|
||||
/config.status
|
||||
.deps/
|
||||
.libs/
|
||||
.dirstamp
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
|
||||
# Windows-specific files
|
||||
.vs/
|
||||
*.VC.db
|
||||
Win32/
|
||||
x64/
|
||||
Debug/
|
||||
Release/
|
||||
obj/
|
||||
/bin/
|
||||
*.binlog
|
||||
*proj.user
|
||||
/cmake
|
||||
/cmake64
|
||||
/CMakeSettings.json
|
||||
/*.zip
|
28
native_client/ctcdecode/third_party/openfst-1.6.9-win/AUTHORS
vendored
Normal file
28
native_client/ctcdecode/third_party/openfst-1.6.9-win/AUTHORS
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
Principal Contacts:
|
||||
|
||||
Cyril Allauzen <allauzen@google.com>
|
||||
Michael Riley <riley@google.com>
|
||||
|
||||
Contributors:
|
||||
|
||||
These contributions range from fundamental algorithmic contributions (e.g.,
|
||||
Mehryar Mohri) to implementation of core components and extensions.
|
||||
|
||||
Tom Bagby
|
||||
Dan Bikel
|
||||
Kyle Gorman
|
||||
Martin Jansche
|
||||
Boulos Harb
|
||||
Mehryar Mohri
|
||||
Dan Povey
|
||||
Kasturi Raghavan
|
||||
Jacob Ratkiewicz
|
||||
Jesse Rosenstock
|
||||
Johan Schalkwyk
|
||||
Masha Shugrina
|
||||
Wojtek Skut
|
||||
Jeffrey Sorensen
|
||||
Richard Sproat
|
||||
Ananda Theertha Suresh
|
||||
Terry Tai
|
||||
Ke Wu
|
51
native_client/ctcdecode/third_party/openfst-1.6.9-win/CMakeLists.txt
vendored
Normal file
51
native_client/ctcdecode/third_party/openfst-1.6.9-win/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
project(openfst)
|
||||
include(CTest)
|
||||
find_package(ICU COMPONENTS data i18n io test tu uc)
|
||||
if (ICU_FOUND)
|
||||
include_directories(${ICU_INCLUDE_DIRS})
|
||||
set(LIBS ${LIBS} ${ICU_LIBRARIES})
|
||||
endif (ICU_FOUND)
|
||||
|
||||
find_package(ZLIB)
|
||||
if (ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIRECTORIES})
|
||||
set(ZLIBS ${ZLIB_LIBRARIES})
|
||||
endif (ZLIB_FOUND)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
set(CMAKE_MACOSX_RPATH 1)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
if (WIN32)
|
||||
add_definitions(/bigobj)
|
||||
set(WHOLEFST "/WHOLEARCHIVE:fst")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WHOLEFST}")
|
||||
#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
|
||||
#this must be disabled unless the previous option (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS) is enabled
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
else()
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
endif (WIN32)
|
||||
|
||||
set(SOVERSION "10")
|
||||
OPTION(BUILD_USE_SOLUTION_FOLDERS "Enable grouping of projects in VS" ON)
|
||||
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ${BUILD_USE_SOLUTION_FOLDERS})
|
||||
|
||||
|
||||
option(HAVE_BIN "Build the fst binaries" ON)
|
||||
option(HAVE_SCRIPT "Build the fstscript" ON)
|
||||
option(HAVE_COMPACT "Build compact" ON)
|
||||
option(HAVE_COMPRESS "Build compress" OFF)
|
||||
option(HAVE_CONST "Build const" ON)
|
||||
option(HAVE_FAR "Build far" ON)
|
||||
option(HAVE_GRM "Build grm" ON)
|
||||
option(HAVE_PDT "Build pdt" ON)
|
||||
option(HAVE_MPDT "Build mpdt" ON)
|
||||
option(HAVE_LINEAR "Build linear" ON)
|
||||
option(HAVE_LOOKAHEAD "Build lookahead" ON)
|
||||
option(HAVE_NGRAM "Build ngram" ON)
|
||||
option(HAVE_PYTHON "Build python" OFF)
|
||||
option(HAVE_SPECIAL "Build special" ON)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/COPYING
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/COPYING
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use these files except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Copyright 2005-2018 Google, Inc.
|
237
native_client/ctcdecode/third_party/openfst-1.6.9-win/INSTALL
vendored
Normal file
237
native_client/ctcdecode/third_party/openfst-1.6.9-win/INSTALL
vendored
Normal file
@ -0,0 +1,237 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
2
native_client/ctcdecode/third_party/openfst-1.6.9-win/Makefile.am
vendored
Normal file
2
native_client/ctcdecode/third_party/openfst-1.6.9-win/Makefile.am
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SUBDIRS = src
|
||||
ACLOCAL_AMFLAGS = -I m4
|
841
native_client/ctcdecode/third_party/openfst-1.6.9-win/Makefile.in
vendored
Normal file
841
native_client/ctcdecode/third_party/openfst-1.6.9-win/Makefile.in
vendored
Normal file
@ -0,0 +1,841 @@
|
||||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 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@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
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 = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h $(top_builddir)/src/include/fst/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/src/include/fst/config.h.in AUTHORS COPYING \
|
||||
INSTALL NEWS README ar-lib compile config.guess config.sub \
|
||||
install-sh ltmain.sh missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
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@
|
||||
PYTHON = @PYTHON@
|
||||
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
|
||||
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
|
||||
PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
|
||||
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
|
||||
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
|
||||
PYTHON_PLATFORM = @PYTHON_PLATFORM@
|
||||
PYTHON_PREFIX = @PYTHON_PREFIX@
|
||||
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
|
||||
PYTHON_VERSION = @PYTHON_VERSION@
|
||||
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_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
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 = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
libfstdir = @libfstdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgpyexecdir = @pkgpyexecdir@
|
||||
pkgpythondir = @pkgpythondir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
pyexecdir = @pyexecdir@
|
||||
pythondir = @pythondir@
|
||||
runstatedir = @runstatedir@
|
||||
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@
|
||||
SUBDIRS = src
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(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
|
||||
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: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
src/include/fst/config.h: src/include/fst/stamp-h2
|
||||
@test -f $@ || rm -f src/include/fst/stamp-h2
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/include/fst/stamp-h2
|
||||
|
||||
src/include/fst/stamp-h2: $(top_srcdir)/src/include/fst/config.h.in $(top_builddir)/config.status
|
||||
@rm -f src/include/fst/stamp-h2
|
||||
cd $(top_builddir) && $(SHELL) ./config.status src/include/fst/config.h
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1 src/include/fst/config.h src/include/fst/stamp-h2
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
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-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
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"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
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
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| 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) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_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*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(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/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(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__post_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:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { 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-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
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."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# 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:
|
252
native_client/ctcdecode/third_party/openfst-1.6.9-win/NEWS
vendored
Normal file
252
native_client/ctcdecode/third_party/openfst-1.6.9-win/NEWS
vendored
Normal file
@ -0,0 +1,252 @@
|
||||
OpenFst: Release 1.6
|
||||
* Optimized label lookup in SymbolTable (1.6.9)
|
||||
* Fixed PROGRAM_FLAGS documentation string in binaries (1.6.8)
|
||||
* Fixed handling of symbol tables in EpsNormalize (1.6.8)
|
||||
* Fixed HashMatcher issues with SetState() and Find() consistency (1.6.8)
|
||||
* Fixed error reporting when FST arc type unknown (1.6.8)
|
||||
* The `first_path` option to ShortestPath is now optimal for A* (1.6.7)
|
||||
* Renames SymbolTable::kNoSymbol to kNoSymbol (1.6.7)
|
||||
* Exposes PowerMapper to the scripting API (1.6.7)
|
||||
* Fixes linking of the special SOs (1.6.7)
|
||||
* Fixes error handling in HashMatcher (1.6.6)
|
||||
* Adds kShortestDelta for operations dependent on shortest-distance (1.6.6)
|
||||
* Adds Python methods for (un)pickling and (de)serializing FSTs (1.6.6)
|
||||
* Adds constructive variants of Invert and Project (1.6.6)
|
||||
* Increases code sharing in MemoryPool/MemoryArena (1.6.6)
|
||||
* Improves consistency of matcher FST ownership (1.6.6)
|
||||
* Adds non-trivial A* estimator class (1.6.6)
|
||||
* Prevents unreachable code generation in libfstscript (1.6.5)
|
||||
* Adds move constructors for non-trivial weight types (1.6.5)
|
||||
* Standardizes method names for tuple weight types (1.6.5)
|
||||
* Eliminates undefined behavior in weight hashing (1.6.5)
|
||||
* Optimizes binary search in SortedMatcher (1.6.5)
|
||||
* Adds SetWeight (1.6.5)
|
||||
* Fixes typing error in Python FAR reader (1.6.4)
|
||||
* Removes restriction that Prune argument have commutative weights (1.6.3)
|
||||
* Improves configuration of CompositeWeight readers and writers (1.6.3)
|
||||
* Improves accuracy of ShortestDistance summation (1.6.3)
|
||||
* SetFinal now "moves" its weight argument (1.6.3)
|
||||
* Exposes ArcIterator and EncodeMapper flags in Python (1.6.3)
|
||||
* Properly sets return codes in FST binaries (1.6.3)
|
||||
* Eliminates StringWeight macros (1.6.3)
|
||||
* Finalizes most virtual method overrides (1.6.2)
|
||||
* Fixes missing includes of <fst/log.h> (1.6.1)
|
||||
* Adds float format support to FST drawing (1.6.1)
|
||||
* Extensive modernization for C++11 style (1.6.0)
|
||||
* Many classes and constants moved into an internal namespace (1.6.0)
|
||||
* Adds HashMatcher (1.6.0)
|
||||
* Adds Member method to SymbolTable (1.6.0)
|
||||
* Adds the "special" extension and the fstspecial binary; this is similar to
|
||||
fstconvert but accepts arguments for specifying special labels (phi, rho,
|
||||
and sigma) of FSTs (1.6.0)
|
||||
* Exposes allow_negative_label option for Python symbol tables (1.6.0)
|
||||
|
||||
OpenFst: Release 1.5
|
||||
* Added p-subsequential determinization (1.5.0)
|
||||
* Generalized epsilon normalization to non-functional case (1.5.0)
|
||||
* Added general gallic (plus is union) semiring (1.5.0)
|
||||
* Added FST compression extension (1.5.0)
|
||||
* Added Python extension (1.5.0)
|
||||
* Added multiple pushdown transducer (MPDT) support (1.5.0)
|
||||
* Fixed Isomorphic function (1.5.0)
|
||||
* Added final method to matchers (1.5.0)
|
||||
* Fixed various compiler issues (1.5.0)
|
||||
* Fixed missing Isomorphic components (1.5.0)
|
||||
* Added UnionWeight (1.5.0)
|
||||
* Added InputEpsilonMapper and OutputEpsilonMapper arc mappers (1.5.1)
|
||||
* Added TrivialComposeFilter for more efficient composition when one
|
||||
of the arguments is epsilon-free (1.5.1)
|
||||
* Added properties bits kUnweightedCycles and kWeightedCycles (1.5.1)
|
||||
* Added missing const qualification to (1.5.1):
|
||||
- SymbolTableIterator access
|
||||
- EncodeMapper writing to file
|
||||
- EncodeMapper SymbolTable access
|
||||
* Replaced internal custom reference-counting (RefCounter) with
|
||||
C++11 smart pointers where possible, and fixed associated
|
||||
reference-counting bugs (1.5.1)
|
||||
* When calling DeleteStates on a MutableFst with a shared impl, the impl
|
||||
is set to a new empty impl rather than copying and deleting (1.5.1)
|
||||
* Prepended `Pdt` to the Expand libraries and classes in the PDT
|
||||
extension, and prepended `MPdt` to the Expand libraries and classes
|
||||
in the MPDT extension, so that both can be used in the same compilation
|
||||
unit (1.5.1)
|
||||
* Added option to PDT Replace for compiling a strongly-regular RTN into a
|
||||
bounded-stack PDT (1.5.1)
|
||||
* Improved symbol table support for PDT Replace, including automatic
|
||||
generation of parentheses symbols (1.5.1)
|
||||
* Improvements to scripting API (1.5.1):
|
||||
- Added methods for FST access and mutation
|
||||
- Added additional checks for arc/weight compatibility
|
||||
- WeightClass::One and WeightClass::Zero now require a specified weight
|
||||
type at time of construction
|
||||
- Improved VectorFstClass constructors
|
||||
- Added linear-time check for cyclic dependencies in Replace
|
||||
- Added EncodeMapperClass, a template-free box for an EncodeMapper
|
||||
* Improvements to the binaries (1.5.1):
|
||||
- Fixed no-op --precision flag to fstdraw (1.5.1)
|
||||
- Fixed no-op --file_list_input flag to farcreate (1.5.1)
|
||||
* Improvements to the Python extension (1.5.1):
|
||||
- Added methods for creating an empty mutable FST
|
||||
- Added methods for FST access via state and arc iteration
|
||||
- Added FST compilation from arclists (cf. fstcompile)
|
||||
- Added FST printing and drawing
|
||||
- Added FarReader and FarWriter classes.
|
||||
* FarReader's GetFst method now returns a pointer (1.5.2)
|
||||
* Fixed FSTERROR macro (1.5.2)
|
||||
* Fixed build flags for dlopen (1.5.2)
|
||||
* Consolidated Python extension into single module (1.5.2)
|
||||
* Python add_arc now takes an Arc object (1.5.2)
|
||||
* Adds optional minimization of non-deterministic FSTs (1.5.3)
|
||||
* Mutation methods of the Python Fst object now support chaining (1.5.3)
|
||||
* Scripting API and Python weight objects now support semiring arithmetic
|
||||
(1.5.3)
|
||||
* Adds RemoveSymbol method to SymbolTable (1.5.4)
|
||||
* Prevents underflow when using LogProbArcSelector in random generation
|
||||
(1.5.4)
|
||||
* Makes random weight generators a single template class (1.5.4)
|
||||
* Makes weight Properties constexpr where possible (1.5.4)
|
||||
* Adds check for error when opening files when compiling strings into FARs
|
||||
(1.5.4)
|
||||
* Adds routines for parsing string flags to the scripting API (1.5.4)
|
||||
|
||||
OpenFst: Release 1.4
|
||||
* Port to C++11 (1.4.0)
|
||||
* Disambiguate function added (1.4.0)
|
||||
* Isomorphic function added (1.4.0)
|
||||
* Matcher interface augmented with Priority method.
|
||||
* Special matchers (rho/sigma/phi) can match special symbols
|
||||
on both input FSTs in composition/intersection provided at each
|
||||
state pair they only match one side (1.4.0)
|
||||
* Added ExplicitMatcher to suppress implicit matches (e.g. epsilon
|
||||
self-loops) (1.4.0)
|
||||
* Linear{Tagger,Classifier}Fst extensions added (1.4.0).
|
||||
* Generalized state-reachable to work when input is cyclic (so long as no
|
||||
final state is in a cycle). This ensures label-reachable (and hence label
|
||||
lookahead) works with cyclic input (1.4.0)
|
||||
* Added Condense to build the condensation graph (SCCs condensed to single
|
||||
states) of an FST (1.4.0).
|
||||
* Added an option to Reverse to specify whether a super-initial state
|
||||
should always be created (1.4.0).
|
||||
* Fixed bugs in FirstCacheStore, PowerWeight, and StringCompiler (1.4.0).
|
||||
* Changed SymbolTable to use faster data structure (1.4.0).
|
||||
* Added 'min' disambiguation in determinizaton to keep only the minimum
|
||||
output in a non-functional transducer when plus=min/max
|
||||
(flag --disambiguate_output) (1.4.1)
|
||||
* Compiler issues in linear-fst fixed (1.4.1)
|
||||
|
||||
OpenFst: Release 1.3
|
||||
* Support for non-fatal exits on errors: (1.3.1)
|
||||
- Added FLAGS_fst_error_fatal: FST errors are
|
||||
fatal if true (default); o.w. return objects flagged as bad:
|
||||
e.g., FSTs - kError
|
||||
prop. true, FST weights - not a Member().
|
||||
- Added kError property bit signifying bad FST
|
||||
- Added NoWeight() method to FST weight requirements that returns
|
||||
weight that is not a Member().
|
||||
* Various improvements to the FAR extensions (1.3.1)
|
||||
- a single FST is now a FAR type
|
||||
- FLAGS_initial_symbols: Uses the symbol table from the
|
||||
first FST in the archive for all entries"
|
||||
- Input/output to standard input/output for some FAR and arc types
|
||||
* --with-icu configuration option no longer needed (1.3.1)
|
||||
* Improved flags usage esp. if use SET_FLAGS not SetFlags/InitFst (1.3.2)
|
||||
* Added 'fst' as possible far writer type (1.3.2)
|
||||
* phi matcher can now accept 0 as the phi label (1.3.2)
|
||||
* Added ngram-fst extension (1.3.2)
|
||||
* Improved performance of PDT composition (1.3.3)
|
||||
* Memory-map support (1.3.3)
|
||||
* Fixed cross-FST serialization issues (1.3.3)
|
||||
* Fixed NGramFst off-by-one issue (1.3.3)
|
||||
* farextract now allows one to specify a list of comma-separated keys,
|
||||
including key ranges (1.3.3)
|
||||
* Fixed bug in PDT replace that could cause close paren IDs to collide
|
||||
with open paren IDs (1.3.4)
|
||||
|
||||
OpenFst: Release 1.2
|
||||
* Added lookahead matching and filtering for faster composition
|
||||
* Added EditFst for mutation of o.w. immutable FSTs
|
||||
* Added script sub-namespace defining type FstClass, a non-templated
|
||||
Fst<Arc> to hold the arc template type internally. This and FST
|
||||
operations on it allow easier I/O and scripting at the cost of some
|
||||
runtime dispatching.
|
||||
* Added per-arc-iterator control of Fst caching.
|
||||
* Added PowerWeight and Power Arc.
|
||||
* Added SparsePowerWeight and SparsePowerArc (1.2.4)
|
||||
* Added SignedLogWeight and SignedLogArc (1.2.4)
|
||||
* Added ExpectationWeight and ExpectationArc (1.2.4)
|
||||
* Added AStarQueue, PruneQueue and NaturalPruneQueue disciplines (1.2.6)
|
||||
* Added Log64Weight and Log64Arc to FST library throughout, including
|
||||
support throughout scripts/bins/dsos (1.2.8)
|
||||
* Added delayed RandGenFst that outputs tree of paths weighted
|
||||
by count (1.2.8)
|
||||
* Added fstsymbols shell-level command
|
||||
* Added total weight removal option to pushing
|
||||
* Changed methods for symbol table mutation:
|
||||
use MutableInputSymbols()/MutableOutputSymbols().
|
||||
* Numerous efficiency improvements esp in composition, replace, and caching
|
||||
* Made "fstmap" handle semiring conversion by adding "to_std", "to_log"
|
||||
and "to_log64" as supported 'map_type' arguments (1.2.8).
|
||||
* Made the destructive implementation of RmEpsilon skip over states
|
||||
admitting no non-epsilon incoming transition (1.2.8).
|
||||
* Fixed numerous bugs (1.2 through 1.2.9) including:
|
||||
- improper types of some approximation deltas
|
||||
- sub-optimal hashing functions
|
||||
- issues in internal reuse of shortest distance
|
||||
- hashing bug in FloatWeight
|
||||
- bug in shortest path queue
|
||||
- symbol table checksumming issues
|
||||
- various C++ standards issues
|
||||
- Visit() behavior when visitation aborted
|
||||
- Decode() hash performance bug (1.2.1)
|
||||
- EditFst::Copy(bool) method when the boolean parameter is true (1.2.7)
|
||||
- SymbolTable memory leak in Invert() (1.2.8)
|
||||
- Added escaping of " and \ in labels in fstdraw, needed for dot to
|
||||
function properly (1.2.8)
|
||||
- Fixed handling of final weight of start state in fstpush (1.2.8)
|
||||
- Added FST_LL_FORMAT to fix 64-bit integer printf issues (1.2.9)
|
||||
- Fixed missing <functional> includes (1.2.9)
|
||||
- Fixed reused local variable names (1.2.9)
|
||||
- Fixed passing string by reference in FstDraw args (1.2.9)
|
||||
* Added extensions directories including:
|
||||
- finite-state archive (FAR) utilities,
|
||||
added stlist format supporting writing/reading to/from standard out/in
|
||||
at the library-level (1.2.8)
|
||||
- compact fsts
|
||||
- lookahead fsts
|
||||
- pushdown transducers (improved in 1.2.1 through 1.2.7).
|
||||
* Added StateMap/StateMapFst; renamed Map/MapFst to ArcMap/ArcMapFst;
|
||||
map/MapFst retained (but deprecated) (1.2.9)
|
||||
* Deleted ArcSum() and ArcMerge; use StateMap w/ ArcSumMapper and
|
||||
ArcUniqueMapper (1.2.9).
|
||||
* Incremented version of ConstFst/CompactFsts to stop memory alignment
|
||||
that fails on pipes. Made old version raises errors when read on
|
||||
pipes (1.2.9).
|
||||
* Improved determinize hash (1.2.9)
|
||||
* Removed stdio uses (1.2.10)
|
||||
* Fixed library ordering issues esp. with newer GNU build tools (1.2.10)
|
||||
|
||||
OpenFst: Release 1.1
|
||||
* Added compat.h to src/include/fst to fix missing defines
|
||||
* Fixed bug in acyclic minimization that led to non-minimal
|
||||
(but equivalent) results
|
||||
* Fixed missing FST typedef in various matchers in matcher.h
|
||||
so that they can be cascaded
|
||||
* Opened file streams binary where appropriate
|
||||
|
||||
OpenFst: Release 1.0 (Additions to beta version):
|
||||
* Matcher class added for matching labels at FST states. Includes
|
||||
special matchers for sigma (any), rho ('rest'), and phi ('fail')
|
||||
labels.
|
||||
* Composition generalized with arbitrary filters, matchers, and state
|
||||
tables.
|
||||
* Sequence and matching composition filters provided. (see compose.h,
|
||||
compose-filter.h, matcher.h, state-table.h)
|
||||
* Unique n-best (see shortest-path.h)
|
||||
* Pruning in determinization and epsilon removal (see determinize.h,
|
||||
rmepsilon.h)
|
||||
* New Fst class:
|
||||
* Compact Fsts for space-efficient representation (see compact-fst.h)
|
||||
* New Weight classes:
|
||||
* MinMax
|
||||
* Lexicographic
|
||||
* Miscellaneous bug fixes
|
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/README
vendored
Normal file
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/README
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
OpenFst: Release 1.6.9.
|
||||
|
||||
OpenFst is a library for constructing, combining, optimizing, and searching
|
||||
weighted finite-state transducers (FSTs).
|
||||
|
||||
REQUIREMENTS:
|
||||
This version is known to work under Linux using g++ (>= 4.7) and OS X using
|
||||
XCode (>= 5). It is expected to work wherever adequate POSIX (dlopen,
|
||||
ssize_t, basename), C99 (snprintf, strtoll, <stdint.h>), and C++11
|
||||
(<unordered_set>, <unordered_map>, <forward_list>) support is available.
|
||||
|
||||
INSTALLATION:
|
||||
Follow the generic GNU build system instructions in ./INSTALL. We
|
||||
recommend configuring with --enable-static=no for faster compiles.
|
||||
|
||||
Optional features:
|
||||
|
||||
--enable-bin Enable fst::script and executables (def: yes)
|
||||
--enable-compact-fsts Enable CompactFst extensions (def: no)
|
||||
--enable-compress Enable compression extension (def: no)
|
||||
--enable-const-fsts Enable ConstFst extensions (def: no)
|
||||
--enable-far Enable FAR extensions (def: no)
|
||||
--enable-grm Enable all dependencies of OpenGrm (def: no)
|
||||
--enable-linear-fsts Enable LinearTagger/ClassifierFst extensions (def: no)
|
||||
--enable-lookahead-fsts Enable LookAheadFst extensions (def: no)
|
||||
--enable-mpdt Enable MPDT extensions (def: no)
|
||||
--enable-ngram-fsts Enable NGramFst extensions (def: no)
|
||||
--enable-pdt Enable PDT extensions (def: no)
|
||||
--enable-python Enable Python extension (def: no)
|
||||
--enable-special Enable special-matcher extensions (def: no)
|
||||
|
||||
Configuring with --enable-bin=no gives very fast compiles, but excludes the
|
||||
command line utilities.
|
||||
|
||||
Configuring with --enable-python will attempt to install the Python module to
|
||||
whichever site-packages (or dist-packages, on Debian or Ubuntu) is found
|
||||
during configuration.
|
||||
|
||||
The flag --with-libfstdir specifies where FST extensions should be installed;
|
||||
it defaults to ${libdir}/fst.
|
||||
|
||||
Compiling with -Wall -Wno-sign-compare under g++ should give no warnings from
|
||||
this library.
|
||||
|
||||
If you encounter an error about loading shared objects when attempting to use
|
||||
the library immediately after installation, (e.g, `...cannot open shared
|
||||
object file...`) you may need to refresh your system's shared object cache.
|
||||
On Linux, this is accomplished by invoking ldconfig; the corresponding command
|
||||
on OS X is called update_dyld_shared_cache. Both of these require superuser
|
||||
privileges (and so should be executed with sudo).
|
||||
|
||||
USAGE:
|
||||
Assuming you've installed under the default /usr/local, the FST binaries are
|
||||
found on /usr/local/bin.
|
||||
|
||||
To use in your own program, include <fst/fstlib.h> and compile with
|
||||
-I/usr/local/include. The compiler must support C++11 (for g++ add the flag
|
||||
-std=c++11). Link against /usr/local/lib/libfst.so and -ldl. Set your
|
||||
LD_LIBRARY_PATH (or equivalent) to contain /usr/local/lib. The linking is,
|
||||
by default, dynamic so that the Fst and Arc type DSO extensions can be used
|
||||
correctly if desired. Any extensions will be found under /usr/local/lib/fst
|
||||
or /usr/local/include/fst/extensions.
|
||||
|
||||
DOCUMENTATION:
|
||||
See www.openfst.org for general documentation.
|
||||
See ./NEWS for updates since the last release.
|
113
native_client/ctcdecode/third_party/openfst-1.6.9-win/README.md
vendored
Normal file
113
native_client/ctcdecode/third_party/openfst-1.6.9-win/README.md
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
# OpenFST port for Windows
|
||||
|
||||
OpenFst is a library for constructing, combining, optimizing, and searching
|
||||
weighted finite-state transducers (FSTs), maintained by Google and released
|
||||
under the [Apache 2.0 license](./COPYING). The home page for the library is
|
||||
located at http://openfst.org/. Check the [original README file](./README)
|
||||
for the current version, as we are not updating this file with the current
|
||||
release version. Make sure also to check the [NEWS](./NEWS) file for the
|
||||
latest changes.
|
||||
|
||||
## Releases
|
||||
|
||||
We track [original releases](http://www.openfst.org/twiki/bin/view/FST/FstDownload)
|
||||
of the library, and try to keep [ours](https://github.com/kkm000/openfst/releases)
|
||||
in step. Sometimes we may skip a release, but we strive for that to be rather an
|
||||
exception. With each release, we drop a set of pre-built .exe files compiled for
|
||||
the x64 architecture and optimized for execution speed. We use the latest
|
||||
Microsoft compilers for it, so you may find you need to download and install the
|
||||
latest Microsoft C runtime. See [Microsoft KB2977003](https://support.microsoft.com/help/2977003/)
|
||||
for instructions.
|
||||
|
||||
We do not release pre-built libraries, however, because Microsoft compiler ABI
|
||||
changes between versions, and is different for Debug and Release builds. You
|
||||
must build a library matching your toolset on your own.
|
||||
|
||||
## Build
|
||||
|
||||
There are two build options: Visual Studio and CMake. We maintain a set of
|
||||
build scripts for both. You will need a recent enough Visual Studio for either
|
||||
build flavor. Microsoft provides an option to download the free Visual Studio
|
||||
[Community Edition](https://visualstudio.microsoft.com/downloads/), which is
|
||||
adequate.
|
||||
|
||||
### Visual Studio
|
||||
|
||||
Open `openfst.sln`, then read the comments in files under the "READ ME BEFORE
|
||||
BUILD" solution folder. Generally, you may just hit Build and get the
|
||||
libraries, unless you need fine-tuning, such as selecting a different toolset,
|
||||
or want to build with MSBuild from command line. The solutions builds only
|
||||
static libraries, with debug information embedded in C7 format for the
|
||||
simplicity of use. Set the platform to `x86` or `x64` to build a respective
|
||||
32- or 64-bit version of the library and tools.
|
||||
|
||||
The `bin` project builds multiple executable files by invoking itself
|
||||
recursively once for each executable. All .vcxproj files have been scripted and
|
||||
are maintained by hand. It takes a long time to build in Release mode. If you
|
||||
only need the libfst library, build it alone from the Project Explorer.
|
||||
|
||||
All build outputs are placed into the `build_output` directory under the
|
||||
solution root.
|
||||
|
||||
### CMake
|
||||
|
||||
Follow the normal CMake build procedure to generate build files. With CMake you
|
||||
have an option of building dynamic libraries shared by the executables.
|
||||
|
||||
## Limitations
|
||||
|
||||
* Memory-mapped files are not supported (we may add the support in the future
|
||||
though), because it is very system-dependent. OpenFST supports reading e. g.
|
||||
CompactFST files into allocated memoty when memory mapping is not compiled in.
|
||||
* Dynamic registration of arc and FST types is not supported in the Visual Studio
|
||||
project versions (as they build only static libraries). CMake build does not
|
||||
have this limitation. Due to ABI being specific to Microsoft compiler version,
|
||||
dynamically registered types must be compiled with strictly the same compiler
|
||||
of the same major version, and mostly same build flags. This is quite hard to
|
||||
get right, and is not recommended.
|
||||
|
||||
## Structure of the repository and tagging
|
||||
|
||||
The `original` branch contains only imported original OpenFST files, with one
|
||||
exception of .gitignore file added. Tags of the form `orig/1.6.9.1` specify the
|
||||
version and revision number of the library. Every commit on the `orignal` branch
|
||||
contains the source URL for the tarball release of OpenFST that was committed.
|
||||
The last version point corresponds to the revision of OpenFST version. Most (but
|
||||
not all) of the versions has had only one revision, and therefore end in `.1`.
|
||||
The `winport` branch contains the port, with corresponding tags of the form
|
||||
`win/1.6.9.1`.
|
||||
|
||||
You can review the changes to source code only with the git command e. g.
|
||||
|
||||
`git diff orig/1.6.9.1..win/1.6.9.1 -- "*.cc" "*.h"`
|
||||
|
||||
The GitHub interface does not provide filtering by extension, so you will see
|
||||
all CMakefiles and MSBuild files added, but it may be useful if you want to
|
||||
examine changes in a particular file.
|
||||
|
||||
We try to keep changes to an absolute minimum. Most of them are due to
|
||||
incompatibilities between the gcc and cl compilers, and only a minor portion
|
||||
is due to the differences between the Linux and Windows platforms.
|
||||
|
||||
## Maintainers
|
||||
|
||||
The repository is maintained by [@kkm000](https://github.com/kkm000) and
|
||||
[@jtrmal](https://github.com/jtrmal).
|
||||
|
||||
Open an issue to let us know if you discover a problem with the port. We react
|
||||
to them promptly. Be sure to include a problem description, error text id any,
|
||||
and the compiler or Visual Studio version (and CMake version, if you use it).
|
||||
Do not hesitate to ask questions. We will try to help you.
|
||||
|
||||
Since we do not (by the definition of port) extend the OpenFST library itself,
|
||||
please contact its authors with questions and suggestions related to the
|
||||
original library. If in doubt, contact both teams.
|
||||
|
||||
Also let us know if you have a related development that you believe should be
|
||||
linked to from this file.
|
||||
|
||||
---
|
||||
|
||||
_Copyright (c) 2008-current Google Inc._
|
||||
_Copyright (c) 2016-current SmartAction LLC (kkm)_
|
||||
_Copyright (c) 2016-current Johns Hopkins University (J. Trmal)_
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/README.mozilla
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/README.mozilla
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
openfst-1.6.9-win source downloaded from https://github.com/kkm000/openfst on 2018/12/10
|
||||
|
||||
This corresponds to https://github.com/kkm000/openfst/commit/d4dd88e17393454e252d4644b39cf496a8cd9cac
|
||||
|
||||
The following procedure was needed to compile with BAZEL 0.17.2:
|
||||
|
||||
Used VS CODE to rename the following types:
|
||||
uint64 -> uint64_t
|
||||
uint32 -> uint32_t
|
||||
uint16 -> uint16_t
|
1454
native_client/ctcdecode/third_party/openfst-1.6.9-win/aclocal.m4
vendored
Normal file
1454
native_client/ctcdecode/third_party/openfst-1.6.9-win/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
270
native_client/ctcdecode/third_party/openfst-1.6.9-win/ar-lib
vendored
Normal file
270
native_client/ctcdecode/third_party/openfst-1.6.9-win/ar-lib
vendored
Normal file
@ -0,0 +1,270 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
|
||||
# Copyright (C) 2010-2017 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
347
native_client/ctcdecode/third_party/openfst-1.6.9-win/compile
vendored
Normal file
347
native_client/ctcdecode/third_party/openfst-1.6.9-win/compile
vendored
Normal file
@ -0,0 +1,347 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# 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-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1463
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.guess
vendored
Normal file
1463
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
61
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.h.in
vendored
Normal file
61
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.h.in
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
1848
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.sub
vendored
Normal file
1848
native_client/ctcdecode/third_party/openfst-1.6.9-win/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19427
native_client/ctcdecode/third_party/openfst-1.6.9-win/configure
vendored
Normal file
19427
native_client/ctcdecode/third_party/openfst-1.6.9-win/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
147
native_client/ctcdecode/third_party/openfst-1.6.9-win/configure.ac
vendored
Normal file
147
native_client/ctcdecode/third_party/openfst-1.6.9-win/configure.ac
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
AC_INIT([OpenFst], [1.6.9], [help@www.openfst.org])
|
||||
AM_INIT_AUTOMAKE([foreign nostdinc -Wall -Werror subdir-objects])
|
||||
AM_PROG_AR
|
||||
|
||||
# OpenFst does not throw exceptions, so we do not generate exception handling
|
||||
# code. However, users are free to re-enable exception handling.
|
||||
# OpenFst assumes char is unsigned; -fsigned-char is likely unsafe.
|
||||
CPPFLAGS="$CPPFLAGS -fno-exceptions -funsigned-char"
|
||||
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_CONFIG_HEADERS([config.h src/include/fst/config.h])
|
||||
AC_CONFIG_SRCDIR([src/lib/fst.cc])
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/include/Makefile
|
||||
src/lib/Makefile
|
||||
src/bin/Makefile
|
||||
src/test/Makefile
|
||||
src/extensions/Makefile
|
||||
src/extensions/compact/Makefile
|
||||
src/extensions/compress/Makefile
|
||||
src/extensions/const/Makefile
|
||||
src/extensions/far/Makefile
|
||||
src/extensions/linear/Makefile
|
||||
src/extensions/lookahead/Makefile
|
||||
src/extensions/mpdt/Makefile
|
||||
src/extensions/ngram/Makefile
|
||||
src/extensions/pdt/Makefile
|
||||
src/extensions/python/Makefile
|
||||
src/extensions/special/Makefile
|
||||
src/script/Makefile
|
||||
])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_LANG([C++])
|
||||
|
||||
AC_ARG_ENABLE([compact-fsts],
|
||||
[AS_HELP_STRING([--enable-compact-fsts],
|
||||
[enable CompactFst extensions])],
|
||||
[],
|
||||
[enable_compact_fsts=no])
|
||||
AM_CONDITIONAL([HAVE_COMPACT], [test "x$enable_compact_fsts" != xno])
|
||||
|
||||
AC_ARG_ENABLE([compress],
|
||||
[AS_HELP_STRING([--enable-compress],
|
||||
[enable compression extension])],
|
||||
[],
|
||||
[enable_compress=no])
|
||||
AM_CONDITIONAL([HAVE_COMPRESS], [test "x$enable_compress" != xno])
|
||||
|
||||
AC_ARG_ENABLE([const-fsts],
|
||||
[AS_HELP_STRING([--enable-const-fsts],
|
||||
[enable ConstFst extensions])],
|
||||
[],
|
||||
[enable_const_fsts=no])
|
||||
AM_CONDITIONAL([HAVE_CONST], [test "x$enable_const_fsts" != xno])
|
||||
|
||||
AC_ARG_ENABLE([far],
|
||||
[AS_HELP_STRING([--enable-far], [enable FAR extensions])],
|
||||
[],
|
||||
[enable_far=no])
|
||||
AM_CONDITIONAL([HAVE_FAR], [test "x$enable_far" != xno])
|
||||
|
||||
AC_ARG_ENABLE([linear-fsts],
|
||||
[AS_HELP_STRING([--enable-linear-fsts],
|
||||
[enable LinearTagger/ClassifierFst extensions])],
|
||||
[],
|
||||
[enable_linear_fsts=no])
|
||||
AM_CONDITIONAL([HAVE_LINEAR], [test "x$enable_linear_fsts" != xno])
|
||||
|
||||
AC_ARG_ENABLE([lookahead-fsts],
|
||||
[AS_HELP_STRING([--enable-lookahead-fsts],
|
||||
[enable LookAheadFst extensions])],
|
||||
[],
|
||||
[enable_lookahead_fsts=no])
|
||||
AM_CONDITIONAL([HAVE_LOOKAHEAD], [test "x$enable_lookahead_fsts" != xno])
|
||||
|
||||
AC_ARG_ENABLE([mpdt],
|
||||
[AS_HELP_STRING([--enable-mpdt],
|
||||
[enable MPDT extensions])],
|
||||
[],
|
||||
[enable_mpdt=no])
|
||||
AM_CONDITIONAL([HAVE_MPDT], [test "x$enable_mpdt" != xno])
|
||||
|
||||
AC_ARG_ENABLE([ngram-fsts],
|
||||
[AS_HELP_STRING([--enable-ngram-fsts],
|
||||
[enable NGramFst extension])],
|
||||
[],
|
||||
[enable_ngram_fsts=no])
|
||||
AM_CONDITIONAL([HAVE_NGRAM], [test "x$enable_ngram_fsts" != xno])
|
||||
|
||||
AC_ARG_ENABLE([pdt],
|
||||
[AS_HELP_STRING([--enable-pdt],
|
||||
[enable PDT extensions])],
|
||||
[],
|
||||
[enable_pdt=no])
|
||||
AM_CONDITIONAL([HAVE_PDT], [test "x$enable_pdt" != xno])
|
||||
|
||||
AC_ARG_ENABLE([python],
|
||||
[AS_HELP_STRING([--enable-python],
|
||||
[enable Python extensions])],
|
||||
[],
|
||||
[enable_python=no])
|
||||
AM_CONDITIONAL([HAVE_PYTHON], [test "x$enable_python" != xno])
|
||||
if test "x$enable_python" != xno; then
|
||||
AM_PATH_PYTHON(2.7)
|
||||
AC_PYTHON_DEVEL([>= '2.7'])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([special],
|
||||
[AS_HELP_STRING([--enable-special],
|
||||
[enable special-matcher extensions])],
|
||||
[],
|
||||
[enable_special=no])
|
||||
AM_CONDITIONAL([HAVE_SPECIAL], [test "x$enable_special" != xno])
|
||||
|
||||
# --enable-bin enables script and bin "extensions".
|
||||
AC_ARG_ENABLE([bin],
|
||||
[AS_HELP_STRING([--enable-bin],
|
||||
[enable fst::script and command-line binaries])],
|
||||
[],
|
||||
[enable_bin=yes])
|
||||
AM_CONDITIONAL([HAVE_BIN], [test "x$enable_bin" != xno])
|
||||
AM_CONDITIONAL([HAVE_SCRIPT], [test "x$enable_bin" != xno])
|
||||
|
||||
# --enable-grm enables dependencies of OpenGrm: far, mpdt, and pdt.
|
||||
AC_ARG_ENABLE([grm],
|
||||
[AS_HELP_STRING([--enable-grm],
|
||||
[enable all dependencies of OpenGrm])],
|
||||
[],
|
||||
[enable_grm=no])
|
||||
AM_CONDITIONAL([HAVE_GRM], [test "x$enable_grm" != xno])
|
||||
|
||||
AC_ARG_WITH([libfstdir],
|
||||
[--with-libfstdir[=DIR] fst dynamic extensions [[LIBDIR/fst]]],
|
||||
[], [with_libfstdir=[${libdir}/fst]])
|
||||
|
||||
AC_SUBST([libfstdir], $with_libfstdir)
|
||||
|
||||
AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl])
|
||||
AC_SUBST([DL_LIBS])
|
||||
|
||||
AC_OUTPUT
|
791
native_client/ctcdecode/third_party/openfst-1.6.9-win/depcomp
vendored
Normal file
791
native_client/ctcdecode/third_party/openfst-1.6.9-win/depcomp
vendored
Normal file
@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2016-01-11.22; # UTC
|
||||
|
||||
# Copyright (C) 1999-2017 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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 outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
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"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# 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
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
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 -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## 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). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - 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 -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# 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.
|
||||
## 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. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then
|
||||
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 ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# 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
|
||||
;;
|
||||
|
||||
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.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
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 -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
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.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
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 -ne 0; then
|
||||
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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_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.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool 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$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# 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
|
||||
;;
|
||||
|
||||
#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 "X$1" != 'X--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|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| 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 "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
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.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$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"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| 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 "X$1" != 'X--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.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# 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
|
||||
;;
|
||||
|
||||
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-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
508
native_client/ctcdecode/third_party/openfst-1.6.9-win/install-sh
vendored
Normal file
508
native_client/ctcdecode/third_party/openfst-1.6.9-win/install-sh
vendored
Normal file
@ -0,0 +1,508 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2014-09-12.12; # UTC
|
||||
|
||||
# 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.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# 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_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
|
||||
is_target_a_directory=possibly
|
||||
|
||||
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
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
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
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
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
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities.
|
||||
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
|
||||
|
||||
# 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 "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
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.
|
||||
;;
|
||||
*)
|
||||
# $RANDOM is not portable (e.g. dash); use it when possible to
|
||||
# lower collision chance
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
|
||||
# create the $tmpdir first (and fail if unsuccessful) to make sure
|
||||
# that nobody tries to guess the $tmpdir name.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 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
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && 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` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
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-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
11156
native_client/ctcdecode/third_party/openfst-1.6.9-win/ltmain.sh
vendored
Normal file
11156
native_client/ctcdecode/third_party/openfst-1.6.9-win/ltmain.sh
vendored
Normal file
File diff suppressed because it is too large
Load Diff
230
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ac_python_devel.m4
vendored
Normal file
230
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ac_python_devel.m4
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
dnl @synopsis AC_PYTHON_DEVEL([version])
|
||||
dnl
|
||||
dnl Note: Defines as a precious variable "PYTHON_VERSION". Don't
|
||||
dnl override it in your configure.ac.
|
||||
dnl
|
||||
dnl This macro checks for Python and tries to get the include path to
|
||||
dnl 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and
|
||||
dnl $(PYTHON_LDFLAGS) output variables. It also exports
|
||||
dnl $(PYTHON_EXTRA_LIBS) and $(PYTHON_EXTRA_LDFLAGS) for embedding
|
||||
dnl Python in your code.
|
||||
dnl
|
||||
dnl You can search for some particular version of Python by passing a
|
||||
dnl parameter to this macro, for example ">= '2.3.1'", or "== '2.4'".
|
||||
dnl Please note that you *have* to pass also an operator along with the
|
||||
dnl version to match, and pay special attention to the single quotes
|
||||
dnl surrounding the version number. Don't use "PYTHON_VERSION" for
|
||||
dnl this: that environment variable is declared as precious and thus
|
||||
dnl reserved for the end-user.
|
||||
dnl
|
||||
dnl This macro should work for all versions of Python >= 2.1.0. As an
|
||||
dnl end user, you can disable the check for the python version by
|
||||
dnl setting the PYTHON_NOVERSIONCHECK environment variable to something
|
||||
dnl else than the empty string.
|
||||
dnl
|
||||
dnl If you need to use this macro for an older Python version, please
|
||||
dnl contact the authors. We're always open for feedback.
|
||||
dnl
|
||||
dnl @category InstalledPackages
|
||||
dnl @author Sebastian Huber <sebastian-huber@web.de>
|
||||
dnl @author Alan W. Irwin <irwin@beluga.phys.uvic.ca>
|
||||
dnl @author Rafael Laboissiere <laboissiere@psy.mpg.de>
|
||||
dnl @author Andrew Collier <colliera@nu.ac.za>
|
||||
dnl @author Matteo Settenvini <matteo@member.fsf.org>
|
||||
dnl @author Horst Knorr <hk_classes@knoda.org>
|
||||
dnl @version 2006-05-27
|
||||
dnl @license GPLWithACException
|
||||
|
||||
AC_DEFUN([AC_PYTHON_DEVEL],[
|
||||
#
|
||||
# Allow the use of a (user set) custom python version
|
||||
#
|
||||
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
|
||||
version to use, for example '2.3'. This string
|
||||
will be appended to the Python interpreter
|
||||
canonical name.])
|
||||
|
||||
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
|
||||
if test -z "$PYTHON"; then
|
||||
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for a version of Python >= 2.1.0
|
||||
#
|
||||
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
|
||||
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
|
||||
ver = string.split(sys.version)[[0]]; \
|
||||
print ver >= '2.1.0'"`
|
||||
if test "$ac_supports_python_ver" != "True"; then
|
||||
if test -z "$PYTHON_NOVERSIONCHECK"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([
|
||||
This version of the AC@&t@_PYTHON_DEVEL macro
|
||||
doesn't work properly with versions of Python before
|
||||
2.1.0. You may need to re-run configure, setting the
|
||||
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
|
||||
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
||||
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||
to something else than an empty string.
|
||||
])
|
||||
else
|
||||
AC_MSG_RESULT([skip at user request])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
#
|
||||
# if the macro parameter ``version'' is set, honour it
|
||||
#
|
||||
if test -n "$1"; then
|
||||
AC_MSG_CHECKING([for a version of Python $1])
|
||||
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
|
||||
ver = string.split(sys.version)[[0]]; \
|
||||
print ver $1"`
|
||||
if test "$ac_supports_python_ver" = "True"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([this package requires Python $1.
|
||||
If you have it installed, but it isn't the default Python
|
||||
interpreter in your system path, please pass the PYTHON_VERSION
|
||||
variable to configure. See ``configure --help'' for reference.
|
||||
])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if you have distutils, else fail
|
||||
#
|
||||
AC_MSG_CHECKING([for the distutils Python package])
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
if test -z "$ac_distutils_result"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([cannot import Python module "distutils".
|
||||
Please check your Python installation. The error was:
|
||||
$ac_distutils_result])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for Python include path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python include path])
|
||||
if test -z "$PYTHON_CPPFLAGS"; then
|
||||
python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print distutils.sysconfig.get_python_inc();"`
|
||||
if test -n "${python_path}"; then
|
||||
python_path="-I$python_path"
|
||||
fi
|
||||
PYTHON_CPPFLAGS=$python_path
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
|
||||
AC_SUBST([PYTHON_CPPFLAGS])
|
||||
|
||||
#
|
||||
# Check for Python library path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python library path])
|
||||
if test -z "$PYTHON_LDFLAGS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
|
||||
from string import join; \
|
||||
print join(get_config_vars('VERSION'))"`
|
||||
if test "$py_version" == "[None]"; then
|
||||
if test -n "$PYTHON_VERSION"; then
|
||||
py_version=$PYTHON_VERSION
|
||||
else
|
||||
py_version=`$PYTHON -c "import sys; \
|
||||
print sys.version[[:3]]"`
|
||||
fi
|
||||
fi
|
||||
|
||||
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
|
||||
from string import join; \
|
||||
print '-L' + get_python_lib(0,1), \
|
||||
'-lpython';"`$py_version
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_LDFLAGS])
|
||||
AC_SUBST([PYTHON_LDFLAGS])
|
||||
|
||||
#
|
||||
# Check for site packages
|
||||
#
|
||||
AC_MSG_CHECKING([for Python site-packages path])
|
||||
if test -z "$PYTHON_SITE_PKG"; then
|
||||
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print distutils.sysconfig.get_python_lib(0,0);"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
||||
AC_SUBST([PYTHON_SITE_PKG])
|
||||
|
||||
#
|
||||
# libraries which must be linked in when embedding
|
||||
#
|
||||
AC_MSG_CHECKING(python extra libraries)
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print conf('LOCALMODLIBS'), conf('LIBS')"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
|
||||
AC_SUBST(PYTHON_EXTRA_LIBS)
|
||||
|
||||
#
|
||||
# linking flags needed when embedding
|
||||
#
|
||||
AC_MSG_CHECKING(python extra linking flags)
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print conf('LINKFORSHARED')"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
||||
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
|
||||
|
||||
#
|
||||
# final check to see if everything compiles alright
|
||||
#
|
||||
AC_MSG_CHECKING([consistency of all components of python development environment])
|
||||
AC_LANG_PUSH([C])
|
||||
# save current global flags
|
||||
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
AC_TRY_LINK([
|
||||
#include <Python.h>
|
||||
],[
|
||||
Py_Initialize();
|
||||
],[pythonexists=yes],[pythonexists=no])
|
||||
|
||||
AC_MSG_RESULT([$pythonexists])
|
||||
|
||||
if test ! "$pythonexists" = "yes"; then
|
||||
AC_MSG_ERROR([
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
via the LDFLAGS environment variable.
|
||||
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
||||
============================================================================
|
||||
ERROR!
|
||||
You probably have to install the development version of the Python package
|
||||
for your distribution. The exact name of this package varies among them.
|
||||
============================================================================
|
||||
])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
AC_LANG_POP
|
||||
# turn back to default flags
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
#
|
||||
# all done!
|
||||
#
|
||||
])
|
8387
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/libtool.m4
vendored
Normal file
8387
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
437
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltoptions.m4
vendored
Normal file
437
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltoptions.m4
vendored
Normal file
@ -0,0 +1,437 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
124
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltsugar.m4
vendored
Normal file
124
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltsugar.m4
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
23
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltversion.m4
vendored
Normal file
23
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/ltversion.m4
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
99
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/lt~obsolete.m4
vendored
Normal file
99
native_client/ctcdecode/third_party/openfst-1.6.9-win/m4/lt~obsolete.m4
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
215
native_client/ctcdecode/third_party/openfst-1.6.9-win/missing
vendored
Normal file
215
native_client/ctcdecode/third_party/openfst-1.6.9-win/missing
vendored
Normal file
@ -0,0 +1,215 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
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
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
68
native_client/ctcdecode/third_party/openfst-1.6.9-win/openfst.sln
vendored
Normal file
68
native_client/ctcdecode/third_party/openfst-1.6.9-win/openfst.sln
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2026
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfst", "src\lib\libfst.vcxproj", "{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Control and build files", "Control and build files", "{F14A9AF0-0D79-4553-AA8E-B3905A9B6431}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
src\openfst-multibin.targets = src\openfst-multibin.targets
|
||||
src\openfst.props = src\openfst.props
|
||||
src\openfst.targets = src\openfst.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfstscript", "src\script\libfstscript.vcxproj", "{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin", "src\bin\bin.vcxproj", "{84657A19-CAF2-49E8-8DB3-A428C19F460D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6} = {111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "!! READ ME BEFORE BUILD !!", "!! READ ME BEFORE BUILD !!", "{3BAF0BB0-34BF-4E28-BC17-A80D7CF4130F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\openfst.user.props = src\openfst.user.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Debug|x64.Build.0 = Debug|x64
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Release|x64.ActiveCfg = Release|x64
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Release|x64.Build.0 = Release|x64
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{DE80EFEC-9ED9-4631-BD96-8568C31ED26D}.Release|x86.Build.0 = Release|Win32
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Debug|x64.Build.0 = Debug|x64
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Debug|x86.Build.0 = Debug|Win32
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Release|x64.ActiveCfg = Release|x64
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Release|x64.Build.0 = Release|x64
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Release|x86.ActiveCfg = Release|Win32
|
||||
{111F46ED-DA1F-469B-B912-BA2ACC2FF8E6}.Release|x86.Build.0 = Release|Win32
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Debug|x64.Build.0 = Debug|x64
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Release|x64.ActiveCfg = Release|x64
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Release|x64.Build.0 = Release|x64
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{84657A19-CAF2-49E8-8DB3-A428C19F460D}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {14CFFA93-2ED0-43D3-A3E9-5203D4CB19BF}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/package.cmd
vendored
Normal file
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/package.cmd
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
@echo off
|
||||
setlocal enableextensions
|
||||
|
||||
:: Locate winrar.exe
|
||||
set winrar="%ProgramFiles%\winrar\winrar.exe"
|
||||
if not exist %winrar% set winrar="%ProgramFiles(x86)%\winrar\winrar.exe"
|
||||
if not exist %winrar% (
|
||||
echo ERROR: Cannot find winrar.exe 1>&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Get head tag and make sure it is sane.
|
||||
for /f %%i in ('git describe --long --dirty') do set longtag=%%i
|
||||
set insane=0
|
||||
if not %longtag:-dirty=%.==%longtag%. set insane=1
|
||||
if %longtag:-0-g=%.==%longtag%. set insane=1
|
||||
if %longtag:win/=%.==%longtag%. set insane=1
|
||||
if %insane%==1 (
|
||||
echo ERROR: Best HEAD description '%longtag%' is not at a clean tag on winport branch 1>&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Get short description now, strip "win/" for version only
|
||||
for /f %%i in ('git describe') do set tag=%%i
|
||||
set tag=%tag:win/=%
|
||||
|
||||
:: Create archive with a comment
|
||||
set cmtfile=%TEMP%\openfst-package-comment.txt
|
||||
del /q %cmtfile% 2>nul
|
||||
echo OpenFST binaries for Windows x64, optimized build. >>%cmtfile%
|
||||
echo Copyright 2005-2018 Google, Inc. (Original source). >>%cmtfile%
|
||||
echo Copyright 2016-2018 SmartAction LLC (Windows port). >>%cmtfile%
|
||||
echo Copyright 2016-2018 Johns Hopkins Uni (Windows port). >>%cmtfile%
|
||||
echo.>>%cmtfile%
|
||||
echo OpenFST home page: http://www.openfst.org/ >>%cmtfile%
|
||||
echo Git Repository: https://github.com/kkm000/openfst/ >>%cmtfile%
|
||||
echo Build tag: %longtag% >>%cmtfile%
|
||||
|
||||
set zipfile=openfst-bin-win-x64-%tag%.zip
|
||||
del /q %zipfile% 2>nul
|
||||
%winrar% a -ep -m5 -z%cmtfile% %zipfile% NEWS COPYING build_output\x64\Release\bin\*.exe
|
||||
if errorlevel 1 (
|
||||
echo "ERROR: Cannot create archive '%zipfile%' 1>&2
|
||||
del /q %cmtfile% 2>nul
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo SUCCESS: Created archive '%zipfile%' 1>&2
|
||||
del /q %cmtfile% 2>nul
|
||||
exit /b 0
|
18
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/CMakeLists.txt
vendored
Normal file
18
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
#-DHAVE_CONFIG_H -I./../include -fno-exceptions -funsigned-char -std=c++11 -MT symbol-table.lo -MD -MP -MF .deps/symbol-table.Tpo -c symbol-table.cc -fno-common -DPIC -o .libs/symbol-table.o
|
||||
|
||||
include_directories(./include/)
|
||||
install(DIRECTORY include/ DESTINATION include/
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(script)
|
||||
|
||||
if(HAVE_BIN)
|
||||
add_subdirectory(bin)
|
||||
endif(HAVE_BIN)
|
||||
|
||||
add_subdirectory(extensions)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
1
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/Makefile.am
vendored
Normal file
1
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/Makefile.am
vendored
Normal file
@ -0,0 +1 @@
|
||||
SUBDIRS = include lib script bin test extensions
|
638
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/Makefile.in
vendored
Normal file
638
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/Makefile.in
vendored
Normal file
@ -0,0 +1,638 @@
|
||||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 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@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
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 = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h \
|
||||
$(top_builddir)/src/include/fst/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
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@
|
||||
PYTHON = @PYTHON@
|
||||
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
|
||||
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
|
||||
PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
|
||||
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
|
||||
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
|
||||
PYTHON_PLATFORM = @PYTHON_PLATFORM@
|
||||
PYTHON_PREFIX = @PYTHON_PREFIX@
|
||||
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
|
||||
PYTHON_VERSION = @PYTHON_VERSION@
|
||||
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_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
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 = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
libfstdir = @libfstdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgpyexecdir = @pkgpyexecdir@
|
||||
pkgpythondir = @pkgpythondir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
pyexecdir = @pyexecdir@
|
||||
pythondir = @pythondir@
|
||||
runstatedir = @runstatedir@
|
||||
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@
|
||||
SUBDIRS = include lib script bin test extensions
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
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-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
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"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@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
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
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."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||
ctags-am distclean distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# 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:
|
86
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/CMakeLists.txt
vendored
Normal file
86
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
function (add_executable2 _name)
|
||||
add_executable(${ARGV})
|
||||
if (TARGET ${_name})
|
||||
target_link_libraries(${_name} fstscript fst ${CMAKE_DL_LIBS})
|
||||
set_target_properties(${_name} PROPERTIES FOLDER bin)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${_name} RUNTIME DESTINATION bin)
|
||||
endfunction()
|
||||
|
||||
include_directories(../include ../script/)
|
||||
|
||||
add_executable2(fstarcsort fstarcsort-main.cc fstarcsort.cc)
|
||||
|
||||
add_executable2(fstclosure fstclosure-main.cc fstclosure.cc)
|
||||
|
||||
add_executable2(fstcompile fstcompile-main.cc fstcompile.cc)
|
||||
|
||||
add_executable2(fstcompose fstcompose-main.cc fstcompose.cc)
|
||||
|
||||
add_executable2(fstconcat fstconcat-main.cc fstconcat.cc)
|
||||
|
||||
add_executable2(fstconnect fstconnect-main.cc fstconnect.cc)
|
||||
|
||||
add_executable2(fstconvert fstconvert-main.cc fstconvert.cc)
|
||||
|
||||
add_executable2(fstdeterminize fstdeterminize-main.cc fstdeterminize.cc)
|
||||
|
||||
add_executable2(fstdifference fstdifference-main.cc fstdifference.cc)
|
||||
|
||||
add_executable2(fstdisambiguate fstdisambiguate-main.cc fstdisambiguate.cc)
|
||||
|
||||
add_executable2(fstdraw fstdraw-main.cc fstdraw.cc)
|
||||
|
||||
add_executable2(fstencode fstencode-main.cc fstencode.cc)
|
||||
|
||||
add_executable2(fstepsnormalize fstepsnormalize-main.cc fstepsnormalize.cc)
|
||||
|
||||
add_executable2(fstequal fstequal-main.cc fstequal.cc)
|
||||
|
||||
add_executable2(fstequivalent fstequivalent-main.cc fstequivalent.cc)
|
||||
|
||||
add_executable2(fstinfo fstinfo-main.cc fstinfo.cc)
|
||||
|
||||
add_executable2(fstintersect fstintersect-main.cc fstintersect.cc)
|
||||
|
||||
add_executable2(fstinvert fstinvert-main.cc fstinvert.cc)
|
||||
|
||||
add_executable2(fstisomorphic fstisomorphic-main.cc fstisomorphic.cc)
|
||||
|
||||
add_executable2(fstmap fstmap-main.cc fstmap.cc)
|
||||
|
||||
add_executable2(fstminimize fstminimize-main.cc fstminimize.cc)
|
||||
|
||||
add_executable2(fstprint fstprint-main.cc fstprint.cc)
|
||||
|
||||
add_executable2(fstproject fstproject-main.cc fstproject.cc)
|
||||
|
||||
add_executable2(fstprune fstprune-main.cc fstprune.cc)
|
||||
|
||||
add_executable2(fstpush fstpush-main.cc fstpush.cc)
|
||||
|
||||
add_executable2(fstrandgen fstrandgen-main.cc fstrandgen.cc)
|
||||
|
||||
add_executable2(fstrelabel fstrelabel-main.cc fstrelabel.cc)
|
||||
|
||||
add_executable2(fstreplace fstreplace-main.cc fstreplace.cc)
|
||||
|
||||
add_executable2(fstreverse fstreverse-main.cc fstreverse.cc)
|
||||
|
||||
add_executable2(fstreweight fstreweight-main.cc fstreweight.cc)
|
||||
|
||||
add_executable2(fstrmepsilon fstrmepsilon-main.cc fstrmepsilon.cc)
|
||||
|
||||
add_executable2(fstshortestdistance fstshortestdistance-main.cc fstshortestdistance.cc)
|
||||
|
||||
add_executable2(fstshortestpath fstshortestpath-main.cc fstshortestpath.cc)
|
||||
|
||||
add_executable2(fstsymbols fstsymbols-main.cc fstsymbols.cc)
|
||||
|
||||
add_executable2(fstsynchronize fstsynchronize-main.cc fstsynchronize.cc)
|
||||
|
||||
add_executable2(fsttopsort fsttopsort-main.cc fsttopsort.cc)
|
||||
|
||||
add_executable2(fstunion fstunion-main.cc fstunion.cc)
|
||||
|
86
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/Makefile.am
vendored
Normal file
86
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/Makefile.am
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../script $(ICU_FLAGS)
|
||||
LDADD = ../script/libfstscript.la ../lib/libfst.la -lm $(DL_LIBS)
|
||||
|
||||
if HAVE_BIN
|
||||
bin_PROGRAMS = fstarcsort fstclosure fstcompile fstcompose fstconcat \
|
||||
fstconnect fstconvert fstdeterminize fstdifference fstdisambiguate fstdraw \
|
||||
fstencode fstepsnormalize fstequal fstequivalent fstinfo fstintersect \
|
||||
fstinvert fstisomorphic fstmap fstminimize fstprint fstproject fstprune \
|
||||
fstpush fstrandgen fstrelabel fstreplace fstreverse fstreweight fstrmepsilon \
|
||||
fstshortestdistance fstshortestpath fstsymbols fstsynchronize fsttopsort \
|
||||
fstunion
|
||||
|
||||
fstarcsort_SOURCES = fstarcsort.cc fstarcsort-main.cc
|
||||
|
||||
fstclosure_SOURCES = fstclosure.cc fstclosure-main.cc
|
||||
|
||||
fstcompile_SOURCES = fstcompile.cc fstcompile-main.cc
|
||||
|
||||
fstcompose_SOURCES = fstcompose.cc fstcompose-main.cc
|
||||
|
||||
fstconcat_SOURCES = fstconcat.cc fstconcat-main.cc
|
||||
|
||||
fstconnect_SOURCES = fstconnect.cc fstconnect-main.cc
|
||||
|
||||
fstconvert_SOURCES = fstconvert.cc fstconvert-main.cc
|
||||
|
||||
fstdeterminize_SOURCES = fstdeterminize.cc fstdeterminize-main.cc
|
||||
|
||||
fstdifference_SOURCES = fstdifference.cc fstdifference-main.cc
|
||||
|
||||
fstdisambiguate_SOURCES = fstdisambiguate.cc fstdisambiguate-main.cc
|
||||
|
||||
fstdraw_SOURCES = fstdraw.cc fstdraw-main.cc
|
||||
|
||||
fstencode_SOURCES = fstencode.cc fstencode-main.cc
|
||||
|
||||
fstepsnormalize_SOURCES = fstepsnormalize.cc fstepsnormalize-main.cc
|
||||
|
||||
fstequal_SOURCES = fstequal.cc fstequal-main.cc
|
||||
|
||||
fstequivalent_SOURCES = fstequivalent.cc fstequivalent-main.cc
|
||||
|
||||
fstinfo_SOURCES = fstinfo.cc fstinfo-main.cc
|
||||
|
||||
fstintersect_SOURCES = fstintersect.cc fstintersect-main.cc
|
||||
|
||||
fstinvert_SOURCES = fstinvert.cc fstinvert-main.cc
|
||||
|
||||
fstisomorphic_SOURCES = fstisomorphic.cc fstisomorphic-main.cc
|
||||
|
||||
fstmap_SOURCES = fstmap.cc fstmap-main.cc
|
||||
|
||||
fstminimize_SOURCES = fstminimize.cc fstminimize-main.cc
|
||||
|
||||
fstprint_SOURCES = fstprint.cc fstprint-main.cc
|
||||
|
||||
fstproject_SOURCES = fstproject.cc fstproject-main.cc
|
||||
|
||||
fstprune_SOURCES = fstprune.cc fstprune-main.cc
|
||||
|
||||
fstpush_SOURCES = fstpush.cc fstpush-main.cc
|
||||
|
||||
fstrandgen_SOURCES = fstrandgen.cc fstrandgen-main.cc
|
||||
|
||||
fstrelabel_SOURCES = fstrelabel.cc fstrelabel-main.cc
|
||||
|
||||
fstreplace_SOURCES = fstreplace.cc fstreplace-main.cc
|
||||
|
||||
fstreverse_SOURCES = fstreverse.cc fstreverse-main.cc
|
||||
|
||||
fstreweight_SOURCES = fstreweight.cc fstreweight-main.cc
|
||||
|
||||
fstrmepsilon_SOURCES = fstrmepsilon.cc fstrmepsilon-main.cc
|
||||
|
||||
fstshortestdistance_SOURCES = fstshortestdistance.cc fstshortestdistance-main.cc
|
||||
|
||||
fstshortestpath_SOURCES = fstshortestpath.cc fstshortestpath-main.cc
|
||||
|
||||
fstsymbols_SOURCES = fstsymbols.cc fstsymbols-main.cc
|
||||
|
||||
fstsynchronize_SOURCES = fstsynchronize.cc fstsynchronize-main.cc
|
||||
|
||||
fsttopsort_SOURCES = fsttopsort.cc fsttopsort-main.cc
|
||||
|
||||
fstunion_SOURCES = fstunion.cc fstunion-main.cc
|
||||
endif
|
1231
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/Makefile.in
vendored
Normal file
1231
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/Makefile.in
vendored
Normal file
File diff suppressed because it is too large
Load Diff
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/bin.vcxproj
vendored
Normal file
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/bin.vcxproj
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
Need ConfigurationType set before importing openfst.props!
|
||||
-->
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{84657A19-CAF2-49E8-8DB3-A428C19F460D}</ProjectGuid>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<MultiBin>true</MultiBin>
|
||||
</PropertyGroup>
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<Import Project="../openfst.props" />
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<ItemGroup>
|
||||
<ClCompile Include="*.cc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\lib\libfst.vcxproj">
|
||||
<Project>{de80efec-9ed9-4631-bd96-8568c31ed26d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\script\libfstscript.vcxproj">
|
||||
<Project>{111f46ed-da1f-469b-b912-ba2acc2ff8e6}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<Import Project="../openfst.targets" />
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
</Project>
|
51
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstarcsort-main.cc
vendored
Normal file
51
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstarcsort-main.cc
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Sorts arcs of an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/arcsort.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_string(sort_type);
|
||||
|
||||
int fstarcsort_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Sorts arcs of an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name =
|
||||
(argc > 1 && (strcmp(argv[1], "-") != 0)) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
s::ArcSortType sort_type;
|
||||
if (!s::GetArcSortType(FLAGS_sort_type, &sort_type)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported sort type: "
|
||||
<< FLAGS_sort_type;
|
||||
return 1;
|
||||
}
|
||||
|
||||
s::ArcSort(fst.get(), sort_type);
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
12
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstarcsort.cc
vendored
Normal file
12
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstarcsort.cc
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/compat.h>
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(sort_type, "ilabel",
|
||||
"Comparison method, one of: \"ilabel\", \"olabel\"");
|
||||
|
||||
int fstarcsort_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstarcsort_main(argc, argv); }
|
41
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstclosure-main.cc
vendored
Normal file
41
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstclosure-main.cc
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Creates the Kleene closure of an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/closure.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_bool(closure_plus);
|
||||
|
||||
int fstclosure_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Creates the Kleene closure of an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
s::Closure(fst.get(), s::GetClosureType(FLAGS_closure_plus));
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstclosure.cc
vendored
Normal file
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstclosure.cc
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(closure_plus, false,
|
||||
"Do not add the empty path (T+ instead of T*)?");
|
||||
|
||||
int fstclosure_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstclosure_main(argc, argv); }
|
84
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompile-main.cc
vendored
Normal file
84
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompile-main.cc
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Creates binary FSTs from simple text format used by AT&T.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/compile.h>
|
||||
|
||||
DECLARE_bool(acceptor);
|
||||
DECLARE_string(arc_type);
|
||||
DECLARE_string(fst_type);
|
||||
DECLARE_string(isymbols);
|
||||
DECLARE_string(osymbols);
|
||||
DECLARE_string(ssymbols);
|
||||
DECLARE_bool(keep_isymbols);
|
||||
DECLARE_bool(keep_osymbols);
|
||||
DECLARE_bool(keep_state_numbering);
|
||||
DECLARE_bool(allow_negative_labels);
|
||||
|
||||
int fstcompile_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::SymbolTable;
|
||||
using fst::SymbolTableTextOptions;
|
||||
|
||||
string usage = "Creates binary FSTs from simple text format.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [text.fst [binary.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
string source = "standard input";
|
||||
std::ifstream fstrm;
|
||||
if (argc > 1 && strcmp(argv[1], "-") != 0) {
|
||||
fstrm.open(argv[1]);
|
||||
if (!fstrm) {
|
||||
LOG(ERROR) << argv[0] << ": Open failed, file = " << argv[1];
|
||||
return 1;
|
||||
}
|
||||
source = argv[1];
|
||||
}
|
||||
std::istream &istrm = fstrm.is_open() ? fstrm : std::cin;
|
||||
|
||||
const SymbolTableTextOptions opts(FLAGS_allow_negative_labels);
|
||||
|
||||
std::unique_ptr<const SymbolTable> isyms;
|
||||
if (!FLAGS_isymbols.empty()) {
|
||||
isyms.reset(SymbolTable::ReadText(FLAGS_isymbols, opts));
|
||||
if (!isyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> osyms;
|
||||
if (!FLAGS_osymbols.empty()) {
|
||||
osyms.reset(SymbolTable::ReadText(FLAGS_osymbols, opts));
|
||||
if (!osyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> ssyms;
|
||||
if (!FLAGS_ssymbols.empty()) {
|
||||
ssyms.reset(SymbolTable::ReadText(FLAGS_ssymbols));
|
||||
if (!ssyms) return 1;
|
||||
}
|
||||
|
||||
const string dest = argc > 2 ? argv[2] : "";
|
||||
|
||||
s::CompileFst(istrm, source, dest, FLAGS_fst_type, FLAGS_arc_type,
|
||||
isyms.get(), osyms.get(), ssyms.get(), FLAGS_acceptor,
|
||||
FLAGS_keep_isymbols, FLAGS_keep_osymbols,
|
||||
FLAGS_keep_state_numbering, FLAGS_allow_negative_labels);
|
||||
|
||||
return 0;
|
||||
}
|
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompile.cc
vendored
Normal file
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompile.cc
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(acceptor, false, "Input in acceptor format");
|
||||
DEFINE_string(arc_type, "standard", "Output arc type");
|
||||
DEFINE_string(fst_type, "vector", "Output FST type");
|
||||
DEFINE_string(isymbols, "", "Input label symbol table");
|
||||
DEFINE_string(osymbols, "", "Output label symbol table");
|
||||
DEFINE_string(ssymbols, "", "State label symbol table");
|
||||
DEFINE_bool(keep_isymbols, false, "Store input label symbol table with FST");
|
||||
DEFINE_bool(keep_osymbols, false, "Store output label symbol table with FST");
|
||||
DEFINE_bool(keep_state_numbering, false, "Do not renumber input states");
|
||||
DEFINE_bool(allow_negative_labels, false,
|
||||
"Allow negative labels (not recommended; may cause conflicts)");
|
||||
|
||||
int fstcompile_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstcompile_main(argc, argv); }
|
72
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompose-main.cc
vendored
Normal file
72
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompose-main.cc
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Composes two FSTs.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/compose.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_string(compose_filter);
|
||||
DECLARE_bool(connect);
|
||||
|
||||
int fstcompose_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::ComposeFilter;
|
||||
using fst::ComposeOptions;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Composes two FSTs.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") != 0 ? argv[1] : "";
|
||||
const string in2_name =
|
||||
(argc > 2 && (strcmp(argv[2], "-") != 0)) ? argv[2] : "";
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
if (ifst1->ArcType() != ifst2->ArcType()) {
|
||||
LOG(ERROR) << argv[0] << ": Input FSTs must have the same arc type";
|
||||
return 1;
|
||||
}
|
||||
|
||||
VectorFstClass ofst(ifst1->ArcType());
|
||||
|
||||
ComposeFilter compose_filter;
|
||||
if (!s::GetComposeFilter(FLAGS_compose_filter, &compose_filter)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported compose filter type: "
|
||||
<< FLAGS_compose_filter;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const ComposeOptions opts(FLAGS_connect, compose_filter);
|
||||
|
||||
s::Compose(*ifst1, *ifst2, &ofst, opts);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompose.cc
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompose.cc
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(compose_filter, "auto",
|
||||
"Composition filter, one of: \"alt_sequence\", \"auto\", "
|
||||
"\"match\", \"null\", \"sequence\", \"trivial\"");
|
||||
DEFINE_bool(connect, true, "Trim output");
|
||||
|
||||
int fstcompose_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstcompose_main(argc, argv); }
|
49
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconcat-main.cc
vendored
Normal file
49
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconcat-main.cc
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Concatenates two FSTs.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/concat.h>
|
||||
|
||||
int fstconcat_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Concatenates two FSTs.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst1(MutableFstClass::Read(in1_name, true));
|
||||
if (!fst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> fst2(FstClass::Read(in2_name));
|
||||
if (!fst2) return 1;
|
||||
|
||||
s::Concat(fst1.get(), *fst2);
|
||||
|
||||
return !fst1->Write(out_name);
|
||||
}
|
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconcat.cc
vendored
Normal file
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconcat.cc
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
int fstconcat_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstconcat_main(argc, argv); }
|
40
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconnect-main.cc
vendored
Normal file
40
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconnect-main.cc
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Removes useless (inaccessible or non-coaccessible) states and arcs from an
|
||||
// FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/connect.h>
|
||||
|
||||
int fstconnect_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Removes useless states and arcs from an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
s::Connect(fst.get());
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconnect.cc
vendored
Normal file
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconnect.cc
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
int fstconnect_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstconnect_main(argc, argv); }
|
44
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconvert-main.cc
vendored
Normal file
44
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconvert-main.cc
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Converts an FST to another type.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/convert.h>
|
||||
|
||||
DECLARE_string(fst_type);
|
||||
|
||||
int fstconvert_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
|
||||
string usage = "Converts an FST to another type.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
if (ifst->FstType() != FLAGS_fst_type) {
|
||||
std::unique_ptr<FstClass> ofst(s::Convert(*ifst, FLAGS_fst_type));
|
||||
if (!ofst) return 1;
|
||||
return !ofst->Write(out_name);
|
||||
} else {
|
||||
return !ifst->Write(out_name);
|
||||
}
|
||||
}
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconvert.cc
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconvert.cc
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(fst_type, "vector", "Output FST type");
|
||||
|
||||
int fstconvert_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstconvert_main(argc, argv); }
|
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdeterminize-main.cc
vendored
Normal file
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdeterminize-main.cc
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Determinizes an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/determinize.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_string(weight);
|
||||
DECLARE_int64(nstate);
|
||||
DECLARE_int64(subsequential_label);
|
||||
DECLARE_string(det_type);
|
||||
DECLARE_bool(increment_subsequential_label);
|
||||
|
||||
int fstdeterminize_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::DeterminizeType;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Determinizes an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
DeterminizeType det_type;
|
||||
if (!s::GetDeterminizeType(FLAGS_det_type, &det_type)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported determinization type: "
|
||||
<< FLAGS_det_type;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
const auto weight_threshold =
|
||||
FLAGS_weight.empty() ? WeightClass::Zero(ifst->WeightType())
|
||||
: WeightClass(ifst->WeightType(), FLAGS_weight);
|
||||
|
||||
const s::DeterminizeOptions opts(FLAGS_delta, weight_threshold, FLAGS_nstate,
|
||||
FLAGS_subsequential_label, det_type,
|
||||
FLAGS_increment_subsequential_label);
|
||||
|
||||
s::Determinize(*ifst, &ofst, opts);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
23
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdeterminize.cc
vendored
Normal file
23
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdeterminize.cc
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/fst.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_string(weight, "", "Weight threshold");
|
||||
DEFINE_int64(nstate, fst::kNoStateId, "State number threshold");
|
||||
DEFINE_int64(subsequential_label, 0,
|
||||
"Input label of arc corresponding to residual final output when"
|
||||
" producing a subsequential transducer");
|
||||
DEFINE_string(det_type, "functional",
|
||||
"Type of determinization: \"functional\", "
|
||||
"\"nonfunctional\", \"disambiguate\"");
|
||||
DEFINE_bool(increment_subsequential_label, false,
|
||||
"Increment subsequential_label to obtain distinct labels for "
|
||||
" subsequential arcs at a given state");
|
||||
|
||||
int fstdeterminize_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstdeterminize_main(argc, argv); }
|
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdifference-main.cc
vendored
Normal file
66
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdifference-main.cc
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Subtracts an unweighted DFA from an FSA.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/difference.h>
|
||||
|
||||
DECLARE_string(compose_filter);
|
||||
DECLARE_bool(connect);
|
||||
|
||||
int fstdifference_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::ComposeFilter;
|
||||
using fst::DifferenceOptions;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Subtracts an unweighted DFA from an FSA.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst1->ArcType());
|
||||
|
||||
ComposeFilter compose_filter;
|
||||
if (!s::GetComposeFilter(FLAGS_compose_filter, &compose_filter)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported compose filter type: "
|
||||
<< FLAGS_compose_filter;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const DifferenceOptions opts(FLAGS_connect, compose_filter);
|
||||
|
||||
s::Difference(*ifst1, *ifst2, &ofst, opts);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdifference.cc
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdifference.cc
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(compose_filter, "auto",
|
||||
"Composition filter, one of: \"alt_sequence\", \"auto\", "
|
||||
"\"match\", \"null\", \"sequence\", \"trivial\"");
|
||||
DEFINE_bool(connect, true, "Trim output");
|
||||
|
||||
int fstdifference_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstdifference_main(argc, argv); }
|
54
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdisambiguate-main.cc
vendored
Normal file
54
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdisambiguate-main.cc
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Disambiguates an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/disambiguate.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_int64(nstate);
|
||||
DECLARE_string(weight);
|
||||
DECLARE_int64(subsequential_label);
|
||||
|
||||
int fstdisambiguate_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Disambiguates an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
const auto weight_threshold =
|
||||
FLAGS_weight.empty() ? WeightClass::Zero(ifst->WeightType())
|
||||
: WeightClass(ifst->WeightType(), FLAGS_weight);
|
||||
|
||||
const s::DisambiguateOptions opts(FLAGS_delta, weight_threshold, FLAGS_nstate,
|
||||
FLAGS_subsequential_label);
|
||||
|
||||
s::Disambiguate(*ifst, &ofst, opts);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
17
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdisambiguate.cc
vendored
Normal file
17
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdisambiguate.cc
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/fst.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_int64(nstate, fst::kNoStateId, "State number threshold");
|
||||
DEFINE_string(weight, "", "Weight threshold");
|
||||
DEFINE_int64(subsequential_label, 0,
|
||||
"Input label of arc corresponding to residual final output when"
|
||||
" producing a subsequential transducer");
|
||||
|
||||
int fstdisambiguate_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstdisambiguate_main(argc, argv); }
|
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdraw-main.cc
vendored
Normal file
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdraw-main.cc
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Draws a binary FSTs in the Graphviz dot text format.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/draw.h>
|
||||
|
||||
DECLARE_bool(acceptor);
|
||||
DECLARE_string(isymbols);
|
||||
DECLARE_string(osymbols);
|
||||
DECLARE_string(ssymbols);
|
||||
DECLARE_bool(numeric);
|
||||
DECLARE_int32(precision);
|
||||
DECLARE_string(float_format);
|
||||
DECLARE_bool(show_weight_one);
|
||||
DECLARE_string(title);
|
||||
DECLARE_bool(portrait);
|
||||
DECLARE_bool(vertical);
|
||||
DECLARE_int32(fontsize);
|
||||
DECLARE_double(height);
|
||||
DECLARE_double(width);
|
||||
DECLARE_double(nodesep);
|
||||
DECLARE_double(ranksep);
|
||||
DECLARE_bool(allow_negative_labels);
|
||||
|
||||
int fstdraw_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::SymbolTable;
|
||||
using fst::SymbolTableTextOptions;
|
||||
|
||||
string usage = "Prints out binary FSTs in dot text format.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [binary.fst [text.dot]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
|
||||
std::unique_ptr<FstClass> fst(FstClass::Read(in_name));
|
||||
if (!fst) return 1;
|
||||
|
||||
string dest = "stdout";
|
||||
std::ofstream fstrm;
|
||||
if (argc == 3) {
|
||||
fstrm.open(argv[2]);
|
||||
if (!fstrm) {
|
||||
LOG(ERROR) << argv[0] << ": Open failed, file = " << argv[2];
|
||||
return 1;
|
||||
}
|
||||
dest = argv[2];
|
||||
}
|
||||
std::ostream &ostrm = fstrm.is_open() ? fstrm : std::cout;
|
||||
|
||||
const SymbolTableTextOptions opts(FLAGS_allow_negative_labels);
|
||||
|
||||
std::unique_ptr<const SymbolTable> isyms;
|
||||
if (!FLAGS_isymbols.empty() && !FLAGS_numeric) {
|
||||
isyms.reset(SymbolTable::ReadText(FLAGS_isymbols, opts));
|
||||
if (!isyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> osyms;
|
||||
if (!FLAGS_osymbols.empty() && !FLAGS_numeric) {
|
||||
osyms.reset(SymbolTable::ReadText(FLAGS_osymbols, opts));
|
||||
if (!osyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> ssyms;
|
||||
if (!FLAGS_ssymbols.empty() && !FLAGS_numeric) {
|
||||
ssyms.reset(SymbolTable::ReadText(FLAGS_ssymbols));
|
||||
if (!ssyms) return 1;
|
||||
}
|
||||
|
||||
if (!isyms && !FLAGS_numeric && fst->InputSymbols()) {
|
||||
isyms.reset(fst->InputSymbols()->Copy());
|
||||
}
|
||||
|
||||
if (!osyms && !FLAGS_numeric && fst->OutputSymbols()) {
|
||||
osyms.reset(fst->OutputSymbols()->Copy());
|
||||
}
|
||||
|
||||
s::DrawFst(*fst, isyms.get(), osyms.get(), ssyms.get(), FLAGS_acceptor,
|
||||
FLAGS_title, FLAGS_width, FLAGS_height, FLAGS_portrait,
|
||||
FLAGS_vertical, FLAGS_ranksep, FLAGS_nodesep, FLAGS_fontsize,
|
||||
FLAGS_precision, FLAGS_float_format, FLAGS_show_weight_one,
|
||||
&ostrm, dest);
|
||||
|
||||
return 0;
|
||||
}
|
31
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdraw.cc
vendored
Normal file
31
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdraw.cc
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(acceptor, false, "Input in acceptor format");
|
||||
DEFINE_string(isymbols, "", "Input label symbol table");
|
||||
DEFINE_string(osymbols, "", "Output label symbol table");
|
||||
DEFINE_string(ssymbols, "", "State label symbol table");
|
||||
DEFINE_bool(numeric, false, "Print numeric labels");
|
||||
DEFINE_int32(precision, 5, "Set precision (number of char/float)");
|
||||
DEFINE_string(float_format, "g",
|
||||
"Floating-point format, one of: \"e\", \"f\", or \"g\"");
|
||||
DEFINE_bool(show_weight_one, false,
|
||||
"Print/draw arc weights and final weights equal to Weight::One()");
|
||||
DEFINE_string(title, "", "Set figure title");
|
||||
DEFINE_bool(portrait, false, "Portrait mode (def: landscape)");
|
||||
DEFINE_bool(vertical, false, "Draw bottom-to-top instead of left-to-right");
|
||||
DEFINE_int32(fontsize, 14, "Set fontsize");
|
||||
DEFINE_double(height, 11, "Set height");
|
||||
DEFINE_double(width, 8.5, "Set width");
|
||||
DEFINE_double(nodesep, 0.25,
|
||||
"Set minimum separation between nodes (see dot documentation)");
|
||||
DEFINE_double(ranksep, 0.40,
|
||||
"Set minimum separation between ranks (see dot documentation)");
|
||||
DEFINE_bool(allow_negative_labels, false,
|
||||
"Allow negative labels (not recommended; may cause conflicts)");
|
||||
|
||||
int fstdraw_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstdraw_main(argc, argv); }
|
53
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstencode-main.cc
vendored
Normal file
53
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstencode-main.cc
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Encode transducer labels and/or weights.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/decode.h>
|
||||
#include <fst/script/encode.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_bool(encode_labels);
|
||||
DECLARE_bool(encode_weights);
|
||||
DECLARE_bool(encode_reuse);
|
||||
DECLARE_bool(decode);
|
||||
|
||||
int fstencode_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Encodes transducer labels and/or weights.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in.fst codex [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string codex_name = argv[2];
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
if (FLAGS_decode) {
|
||||
s::Decode(fst.get(), codex_name);
|
||||
return !fst->Write(out_name);
|
||||
} else {
|
||||
const auto flags =
|
||||
s::GetEncodeFlags(FLAGS_encode_labels, FLAGS_encode_weights);
|
||||
s::Encode(fst.get(), flags, FLAGS_encode_reuse, codex_name);
|
||||
return !fst->Write(out_name);
|
||||
}
|
||||
}
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstencode.cc
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstencode.cc
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(encode_labels, false, "Encode output labels");
|
||||
DEFINE_bool(encode_weights, false, "Encode weights");
|
||||
DEFINE_bool(encode_reuse, false, "Re-use existing codex");
|
||||
DEFINE_bool(decode, false, "Decode labels and/or weights");
|
||||
|
||||
int fstencode_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstencode_main(argc, argv); }
|
44
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstepsnormalize-main.cc
vendored
Normal file
44
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstepsnormalize-main.cc
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Epsilon-normalizes an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/epsnormalize.h>
|
||||
#include <fst/script/getters.h>
|
||||
|
||||
DECLARE_bool(eps_norm_output);
|
||||
|
||||
int fstepsnormalize_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Epsilon normalizes an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
s::EpsNormalize(*ifst, &ofst, s::GetEpsNormalizeType(FLAGS_eps_norm_output));
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstepsnormalize.cc
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstepsnormalize.cc
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(eps_norm_output, false, "Normalize output epsilons");
|
||||
|
||||
int fstepsnormalize_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstepsnormalize_main(argc, argv); }
|
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequal-main.cc
vendored
Normal file
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequal-main.cc
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Two FSTS are equal iff their exit status is zero.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/equal.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
|
||||
int fstequal_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
|
||||
string usage = "Two FSTs are equal iff the exit status is zero.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc != 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
bool result = s::Equal(*ifst1, *ifst2, FLAGS_delta);
|
||||
if (!result) VLOG(1) << "FSTs are not equal.";
|
||||
|
||||
return result ? 0 : 2;
|
||||
}
|
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequal.cc
vendored
Normal file
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequal.cc
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
|
||||
int fstequal_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstequal_main(argc, argv); }
|
73
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequivalent-main.cc
vendored
Normal file
73
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequivalent-main.cc
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Two DFAs are equivalent iff their exit status is zero.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/equivalent.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/randequivalent.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_bool(random);
|
||||
DECLARE_int32(max_length);
|
||||
DECLARE_int32(npath);
|
||||
DECLARE_int32(seed);
|
||||
DECLARE_string(select);
|
||||
|
||||
int fstequivalent_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::RandGenOptions;
|
||||
using fst::script::FstClass;
|
||||
|
||||
string usage =
|
||||
"Two DFAs are equivalent iff the exit status is zero.\n\n"
|
||||
" Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc != 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
if (!FLAGS_random) {
|
||||
bool result = s::Equivalent(*ifst1, *ifst2, FLAGS_delta);
|
||||
if (!result) VLOG(1) << "FSTs are not equivalent";
|
||||
return result ? 0 : 2;
|
||||
} else {
|
||||
s::RandArcSelection ras;
|
||||
if (!s::GetRandArcSelection(FLAGS_select, &ras)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported select type "
|
||||
<< FLAGS_select;
|
||||
return 1;
|
||||
}
|
||||
const RandGenOptions<s::RandArcSelection> opts(ras, FLAGS_max_length);
|
||||
bool result = s::RandEquivalent(*ifst1, *ifst2, FLAGS_npath, FLAGS_delta,
|
||||
FLAGS_seed, opts);
|
||||
if (!result) VLOG(1) << "FSTs are not equivalent";
|
||||
return result ? 0 : 2;
|
||||
}
|
||||
}
|
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequivalent.cc
vendored
Normal file
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequivalent.cc
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
#include <climits>
|
||||
#include <ctime>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_bool(random, false,
|
||||
"Test equivalence by randomly selecting paths in the input FSTs");
|
||||
DEFINE_int32(max_length, INT32_MAX, "Maximum path length");
|
||||
DEFINE_int32(npath, 1, "Number of paths to generate");
|
||||
DEFINE_int32(seed, time(nullptr) + getpid(), "Random seed");
|
||||
DEFINE_string(select, "uniform",
|
||||
"Selection type: one of: "
|
||||
" \"uniform\", \"log_prob\" (when appropriate),"
|
||||
" \"fast_log_prob\" (when appropriate)");
|
||||
|
||||
int fstequivalent_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstequivalent_main(argc, argv); }
|
46
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinfo-main.cc
vendored
Normal file
46
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinfo-main.cc
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Prints out various information about an FST such as number of states
|
||||
// and arcs and property values (see properties.h).
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/info.h>
|
||||
|
||||
DECLARE_string(arc_filter);
|
||||
DECLARE_string(info_type);
|
||||
DECLARE_bool(pipe);
|
||||
DECLARE_bool(test_properties);
|
||||
DECLARE_bool(fst_verify);
|
||||
|
||||
int fstinfo_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
|
||||
string usage = "Prints out information about an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 2) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name =
|
||||
(argc > 1 && (strcmp(argv[1], "-") != 0)) ? argv[1] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
s::PrintFstInfo(*ifst, FLAGS_test_properties, FLAGS_arc_filter,
|
||||
FLAGS_info_type, FLAGS_fst_verify, FLAGS_pipe);
|
||||
|
||||
return 0;
|
||||
}
|
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinfo.cc
vendored
Normal file
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinfo.cc
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(arc_filter, "any",
|
||||
"Arc filter: one of:"
|
||||
" \"any\", \"epsilon\", \"iepsilon\", \"oepsilon\"; "
|
||||
"this only affects the counts of (co)accessible states, "
|
||||
"connected states, and (strongly) connected components");
|
||||
DEFINE_string(info_type, "auto",
|
||||
"Info format: one of: \"auto\", \"long\", \"short\"");
|
||||
DEFINE_bool(pipe, false, "Send info to stderr, input to stdout");
|
||||
DEFINE_bool(test_properties, true,
|
||||
"Compute property values (if unknown to FST)");
|
||||
DEFINE_bool(fst_verify, true, "Verify FST sanity");
|
||||
|
||||
int fstinfo_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstinfo_main(argc, argv); }
|
65
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstintersect-main.cc
vendored
Normal file
65
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstintersect-main.cc
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Intersects two FSTs.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/intersect.h>
|
||||
|
||||
DECLARE_string(compose_filter);
|
||||
DECLARE_bool(connect);
|
||||
|
||||
int fstintersect_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::ComposeFilter;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Intersects two FSAs.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst [out.fst]\n";
|
||||
usage += " Flags: connect\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst1->ArcType());
|
||||
|
||||
ComposeFilter compose_filter;
|
||||
if (!s::GetComposeFilter(FLAGS_compose_filter, &compose_filter)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported compose filter type: "
|
||||
<< FLAGS_compose_filter;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const fst::IntersectOptions opts(FLAGS_connect, compose_filter);
|
||||
|
||||
s::Intersect(*ifst1, *ifst2, &ofst, opts);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstintersect.cc
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstintersect.cc
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(compose_filter, "auto",
|
||||
"Composition filter, one of: \"alt_sequence\", \"auto\", "
|
||||
"\"match\", \"null\", \"sequence\", \"trivial\"");
|
||||
DEFINE_bool(connect, true, "Trim output");
|
||||
|
||||
int fstintersect_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstintersect_main(argc, argv); }
|
38
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinvert-main.cc
vendored
Normal file
38
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinvert-main.cc
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Inverts a transduction.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/invert.h>
|
||||
|
||||
int fstinvert_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage = "Inverts a transduction.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
s::Invert(fst.get());
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinvert.cc
vendored
Normal file
6
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinvert.cc
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
int fstinvert_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstinvert_main(argc, argv); }
|
53
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstisomorphic-main.cc
vendored
Normal file
53
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstisomorphic-main.cc
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Two FSTS are isomorphic (equal up to state and arc re-ordering) iff their
|
||||
// exit status is zero. FSTs should be deterministic when viewed as unweighted
|
||||
// automata.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/isomorphic.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
|
||||
int fstisomorphic_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
|
||||
string usage =
|
||||
"Two FSTs are isomorphic iff the exit status is zero.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in1.fst in2.fst\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc != 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in1_name = strcmp(argv[1], "-") == 0 ? "" : argv[1];
|
||||
const string in2_name = strcmp(argv[2], "-") == 0 ? "" : argv[2];
|
||||
|
||||
if (in1_name.empty() && in2_name.empty()) {
|
||||
LOG(ERROR) << argv[0] << ": Can't take both inputs from standard input";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<FstClass> ifst1(FstClass::Read(in1_name));
|
||||
if (!ifst1) return 1;
|
||||
|
||||
std::unique_ptr<FstClass> ifst2(FstClass::Read(in2_name));
|
||||
if (!ifst2) return 1;
|
||||
|
||||
bool result = s::Isomorphic(*ifst1, *ifst2, FLAGS_delta);
|
||||
if (!result) VLOG(1) << "FSTs are not isomorphic";
|
||||
|
||||
return result ? 0 : 2;
|
||||
}
|
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstisomorphic.cc
vendored
Normal file
11
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstisomorphic.cc
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
|
||||
int fstisomorphic_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstisomorphic_main(argc, argv); }
|
60
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstmap-main.cc
vendored
Normal file
60
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstmap-main.cc
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Applies an operation to each arc of an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/map.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_string(map_type);
|
||||
DECLARE_double(power);
|
||||
DECLARE_string(weight);
|
||||
|
||||
int fstmap_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Applies an operation to each arc of an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
s::MapType map_type;
|
||||
if (!s::GetMapType(FLAGS_map_type, &map_type)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported map type "
|
||||
<< FLAGS_map_type;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const auto weight_param =
|
||||
!FLAGS_weight.empty()
|
||||
? WeightClass(ifst->WeightType(), FLAGS_weight)
|
||||
: (FLAGS_map_type == "times" ? WeightClass::One(ifst->WeightType())
|
||||
: WeightClass::Zero(ifst->WeightType()));
|
||||
|
||||
std::unique_ptr<FstClass> ofst(
|
||||
s::Map(*ifst, map_type, FLAGS_delta, FLAGS_power, weight_param));
|
||||
|
||||
return !ofst->Write(out_name);
|
||||
}
|
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstmap.cc
vendored
Normal file
20
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstmap.cc
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_string(map_type, "identity",
|
||||
"Map operation, one of: \"arc_sum\", \"arc_unique\", "
|
||||
"\"float_power\" (--power)\", \"identity\", \"input_epsilon\", "
|
||||
"\"invert\", \"output_epsilon\", \"plus (--weight)\", "
|
||||
"\"quantize (--delta)\", \"rmweight\", \"superfinal\", "
|
||||
"\"power (--power)\", \"times (--weight)\", \"to_log\", "
|
||||
"\"to_log64\", \"to_std\"");
|
||||
DEFINE_double(power, 1.0, "Power parameter");
|
||||
DEFINE_string(weight, "", "Weight parameter");
|
||||
|
||||
int fstmap_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstmap_main(argc, argv); }
|
57
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstminimize-main.cc
vendored
Normal file
57
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstminimize-main.cc
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Minimizes a deterministic FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/minimize.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_bool(allow_nondet);
|
||||
|
||||
int fstminimize_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Minimizes a deterministic FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out1.fst [out2.fst]]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out1_name =
|
||||
(argc > 2 && strcmp(argv[2], "-") != 0) ? argv[2] : "";
|
||||
const string out2_name =
|
||||
(argc > 3 && strcmp(argv[3], "-") != 0) ? argv[3] : "";
|
||||
|
||||
if (out1_name.empty() && out2_name.empty() && argc > 3) {
|
||||
LOG(ERROR) << argv[0] << ": Both outputs can't be standard output.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst1(MutableFstClass::Read(in_name, true));
|
||||
if (!fst1) return 1;
|
||||
|
||||
if (argc > 3) {
|
||||
std::unique_ptr<MutableFstClass> fst2(new VectorFstClass(fst1->ArcType()));
|
||||
s::Minimize(fst1.get(), fst2.get(), FLAGS_delta, FLAGS_allow_nondet);
|
||||
if (!fst2->Write(out2_name)) return 1;
|
||||
} else {
|
||||
s::Minimize(fst1.get(), nullptr, FLAGS_delta, FLAGS_allow_nondet);
|
||||
}
|
||||
|
||||
return !fst1->Write(out1_name);
|
||||
}
|
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstminimize.cc
vendored
Normal file
13
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstminimize.cc
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/shortest-distance.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kShortestDelta, "Comparison/quantization delta");
|
||||
DEFINE_bool(allow_nondet, false, "Minimize non-deterministic FSTs");
|
||||
|
||||
int fstminimize_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstminimize_main(argc, argv); }
|
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprint-main.cc
vendored
Normal file
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprint-main.cc
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Prints out binary FSTs in simple text format used by AT&T.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/print.h>
|
||||
|
||||
DECLARE_bool(acceptor);
|
||||
DECLARE_string(isymbols);
|
||||
DECLARE_string(osymbols);
|
||||
DECLARE_string(ssymbols);
|
||||
DECLARE_bool(numeric);
|
||||
DECLARE_string(save_isymbols);
|
||||
DECLARE_string(save_osymbols);
|
||||
DECLARE_bool(show_weight_one);
|
||||
DECLARE_bool(allow_negative_labels);
|
||||
DECLARE_string(missing_symbol);
|
||||
|
||||
int fstprint_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::SymbolTable;
|
||||
using fst::SymbolTableTextOptions;
|
||||
|
||||
string usage = "Prints out binary FSTs in simple text format.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [binary.fst [text.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> fst(FstClass::Read(in_name));
|
||||
if (!fst) return 1;
|
||||
|
||||
string dest = "standard output";
|
||||
std::ofstream fstrm;
|
||||
if (argc == 3) {
|
||||
fstrm.open(argv[2]);
|
||||
if (!fstrm) {
|
||||
LOG(ERROR) << argv[0] << ": Open failed, file = " << argv[2];
|
||||
return 1;
|
||||
}
|
||||
dest = argv[2];
|
||||
}
|
||||
std::ostream &ostrm = fstrm.is_open() ? fstrm : std::cout;
|
||||
ostrm.precision(9);
|
||||
|
||||
const SymbolTableTextOptions opts(FLAGS_allow_negative_labels);
|
||||
|
||||
std::unique_ptr<const SymbolTable> isyms;
|
||||
if (!FLAGS_isymbols.empty() && !FLAGS_numeric) {
|
||||
isyms.reset(SymbolTable::ReadText(FLAGS_isymbols, opts));
|
||||
if (!isyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> osyms;
|
||||
if (!FLAGS_osymbols.empty() && !FLAGS_numeric) {
|
||||
osyms.reset(SymbolTable::ReadText(FLAGS_osymbols, opts));
|
||||
if (!osyms) return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<const SymbolTable> ssyms;
|
||||
if (!FLAGS_ssymbols.empty() && !FLAGS_numeric) {
|
||||
ssyms.reset(SymbolTable::ReadText(FLAGS_ssymbols));
|
||||
if (!ssyms) return 1;
|
||||
}
|
||||
|
||||
if (!isyms && !FLAGS_numeric && fst->InputSymbols()) {
|
||||
isyms.reset(fst->InputSymbols()->Copy());
|
||||
}
|
||||
|
||||
if (!osyms && !FLAGS_numeric && fst->OutputSymbols()) {
|
||||
osyms.reset(fst->OutputSymbols()->Copy());
|
||||
}
|
||||
|
||||
s::PrintFst(*fst, ostrm, dest, isyms.get(), osyms.get(), ssyms.get(),
|
||||
FLAGS_acceptor, FLAGS_show_weight_one, FLAGS_missing_symbol);
|
||||
|
||||
if (isyms && !FLAGS_save_isymbols.empty()) {
|
||||
if (!isyms->WriteText(FLAGS_save_isymbols)) return 1;
|
||||
}
|
||||
|
||||
if (osyms && !FLAGS_save_osymbols.empty()) {
|
||||
if (!osyms->WriteText(FLAGS_save_osymbols)) return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
22
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprint.cc
vendored
Normal file
22
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprint.cc
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(acceptor, false, "Input in acceptor format?");
|
||||
DEFINE_string(isymbols, "", "Input label symbol table");
|
||||
DEFINE_string(osymbols, "", "Output label symbol table");
|
||||
DEFINE_string(ssymbols, "", "State label symbol table");
|
||||
DEFINE_bool(numeric, false, "Print numeric labels?");
|
||||
DEFINE_string(save_isymbols, "", "Save input symbol table to file");
|
||||
DEFINE_string(save_osymbols, "", "Save output symbol table to file");
|
||||
DEFINE_bool(show_weight_one, false,
|
||||
"Print/draw arc weights and final weights equal to semiring One?");
|
||||
DEFINE_bool(allow_negative_labels, false,
|
||||
"Allow negative labels (not recommended; may cause conflicts)?");
|
||||
DEFINE_string(missing_symbol, "",
|
||||
"Symbol to print when lookup fails (default raises error)");
|
||||
|
||||
int fstprint_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstprint_main(argc, argv); }
|
43
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstproject-main.cc
vendored
Normal file
43
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstproject-main.cc
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Projects a transduction onto its input or output language.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/project.h>
|
||||
|
||||
DECLARE_bool(project_output);
|
||||
|
||||
int fstproject_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
|
||||
string usage =
|
||||
"Projects a transduction onto its input"
|
||||
" or output language.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
s::Project(fst.get(), s::GetProjectType(FLAGS_project_output));
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstproject.cc
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstproject.cc
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(project_output, false, "Project on output (vs. input)");
|
||||
|
||||
int fstproject_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstproject_main(argc, argv); }
|
47
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprune-main.cc
vendored
Normal file
47
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprune-main.cc
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Prunes states and arcs of an FST w.r.t. the shortest path weight.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/prune.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_int64(nstate);
|
||||
DECLARE_string(weight);
|
||||
|
||||
int fstprune_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Prunes states and arcs of an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
const auto weight_threshold =
|
||||
FLAGS_weight.empty() ? WeightClass::Zero(fst->WeightType())
|
||||
: WeightClass(fst->WeightType(), FLAGS_weight);
|
||||
|
||||
s::Prune(fst.get(), weight_threshold, FLAGS_nstate, FLAGS_delta);
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
14
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprune.cc
vendored
Normal file
14
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprune.cc
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/fst.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_int64(nstate, fst::kNoStateId, "State number threshold");
|
||||
DEFINE_string(weight, "", "Weight threshold");
|
||||
|
||||
int fstprune_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstprune_main(argc, argv); }
|
55
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstpush-main.cc
vendored
Normal file
55
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstpush-main.cc
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Pushes weights and/or output labels in an FST toward the initial or final
|
||||
// states.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/push.h>
|
||||
|
||||
DECLARE_double(delta);
|
||||
DECLARE_bool(push_weights);
|
||||
DECLARE_bool(push_labels);
|
||||
DECLARE_bool(remove_total_weight);
|
||||
DECLARE_bool(remove_common_affix);
|
||||
DECLARE_bool(to_final);
|
||||
|
||||
int fstpush_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Pushes weights and/or olabels in an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
const auto flags =
|
||||
s::GetPushFlags(FLAGS_push_weights, FLAGS_push_labels,
|
||||
FLAGS_remove_total_weight, FLAGS_remove_common_affix);
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
s::Push(*ifst, &ofst, flags, s::GetReweightType(FLAGS_to_final),
|
||||
FLAGS_delta);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
18
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstpush.cc
vendored
Normal file
18
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstpush.cc
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta");
|
||||
DEFINE_bool(push_weights, false, "Push weights");
|
||||
DEFINE_bool(push_labels, false, "Push output labels");
|
||||
DEFINE_bool(remove_total_weight, false,
|
||||
"Remove total weight when pushing weights");
|
||||
DEFINE_bool(remove_common_affix, false,
|
||||
"Remove common prefix/suffix when pushing labels");
|
||||
DEFINE_bool(to_final, false, "Push/reweight to final (vs. to initial) states");
|
||||
|
||||
int fstpush_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstpush_main(argc, argv); }
|
62
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrandgen-main.cc
vendored
Normal file
62
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrandgen-main.cc
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Generates random paths through an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/randgen.h>
|
||||
|
||||
DECLARE_int32(max_length);
|
||||
DECLARE_int32(npath);
|
||||
DECLARE_int32(seed);
|
||||
DECLARE_string(select);
|
||||
DECLARE_bool(weighted);
|
||||
DECLARE_bool(remove_total_weight);
|
||||
|
||||
int fstrandgen_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Generates random paths through an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
VLOG(1) << argv[0] << ": Seed = " << FLAGS_seed;
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
s::RandArcSelection ras;
|
||||
if (!s::GetRandArcSelection(FLAGS_select, &ras)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported select type "
|
||||
<< FLAGS_select;
|
||||
return 1;
|
||||
}
|
||||
|
||||
s::RandGen(*ifst, &ofst, FLAGS_seed,
|
||||
fst::RandGenOptions<s::RandArcSelection>(
|
||||
ras, FLAGS_max_length, FLAGS_npath, FLAGS_weighted,
|
||||
FLAGS_remove_total_weight));
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrandgen.cc
vendored
Normal file
27
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrandgen.cc
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
#include <climits>
|
||||
#include <ctime>
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_int32(max_length, INT32_MAX, "Maximum path length");
|
||||
DEFINE_int32(npath, 1, "Number of paths to generate");
|
||||
DEFINE_int32(seed, time(nullptr) + getpid(), "Random seed");
|
||||
DEFINE_string(select, "uniform",
|
||||
"Selection type: one of: "
|
||||
" \"uniform\", \"log_prob\" (when appropriate),"
|
||||
" \"fast_log_prob\" (when appropriate)");
|
||||
DEFINE_bool(weighted, false,
|
||||
"Output tree weighted by path count vs. unweighted paths");
|
||||
DEFINE_bool(remove_total_weight, false,
|
||||
"Remove total weight when output weighted");
|
||||
|
||||
int fstrandgen_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstrandgen_main(argc, argv); }
|
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrelabel-main.cc
vendored
Normal file
104
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrelabel-main.cc
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Relabels input or output space of an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/util.h>
|
||||
#include <fst/script/relabel.h>
|
||||
#include <fst/script/weight-class.h>
|
||||
|
||||
DECLARE_string(isymbols);
|
||||
DECLARE_string(osymbols);
|
||||
DECLARE_string(relabel_isymbols);
|
||||
DECLARE_string(relabel_osymbols);
|
||||
DECLARE_string(relabel_ipairs);
|
||||
DECLARE_string(relabel_opairs);
|
||||
DECLARE_string(unknown_isymbol);
|
||||
DECLARE_string(unknown_osymbol);
|
||||
DECLARE_bool(allow_negative_labels);
|
||||
|
||||
int fstrelabel_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
using fst::SymbolTable;
|
||||
using fst::SymbolTableTextOptions;
|
||||
|
||||
string usage =
|
||||
"Relabels the input and/or the output labels of the FST.\n\n"
|
||||
" Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
usage += "\n Using SymbolTables flags:\n";
|
||||
usage += " --relabel_isymbols isyms.map\n";
|
||||
usage += " --relabel_osymbols osyms.map\n";
|
||||
usage += "\n Using numeric labels flags:\n";
|
||||
usage += " --relabel_ipairs ipairs.txt\n";
|
||||
usage += " --relabel_opairs opairs.txt\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name =
|
||||
(argc > 1 && (strcmp(argv[1], "-") != 0)) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
// Relabel with symbol tables.
|
||||
const SymbolTableTextOptions opts(FLAGS_allow_negative_labels);
|
||||
|
||||
if (!FLAGS_relabel_isymbols.empty() || !FLAGS_relabel_osymbols.empty()) {
|
||||
bool attach_new_isymbols = (fst->InputSymbols() != nullptr);
|
||||
std::unique_ptr<const SymbolTable> old_isymbols(
|
||||
FLAGS_isymbols.empty() ? nullptr
|
||||
: SymbolTable::ReadText(FLAGS_isymbols, opts));
|
||||
const std::unique_ptr<const SymbolTable> relabel_isymbols(
|
||||
FLAGS_relabel_isymbols.empty()
|
||||
? nullptr
|
||||
: SymbolTable::ReadText(FLAGS_relabel_isymbols, opts));
|
||||
bool attach_new_osymbols = (fst->OutputSymbols() != nullptr);
|
||||
std::unique_ptr<const SymbolTable> old_osymbols(
|
||||
FLAGS_osymbols.empty() ? nullptr
|
||||
: SymbolTable::ReadText(FLAGS_osymbols, opts));
|
||||
const std::unique_ptr<const SymbolTable> relabel_osymbols(
|
||||
FLAGS_relabel_osymbols.empty()
|
||||
? nullptr
|
||||
: SymbolTable::ReadText(FLAGS_relabel_osymbols, opts));
|
||||
s::Relabel(fst.get(),
|
||||
old_isymbols ? old_isymbols.get() : fst->InputSymbols(),
|
||||
relabel_isymbols.get(), FLAGS_unknown_isymbol,
|
||||
attach_new_isymbols,
|
||||
old_osymbols ? old_osymbols.get() : fst->OutputSymbols(),
|
||||
relabel_osymbols.get(), FLAGS_unknown_osymbol,
|
||||
attach_new_osymbols);
|
||||
} else {
|
||||
// Reads in relabeling pairs.
|
||||
std::vector<s::LabelPair> ipairs;
|
||||
std::vector<s::LabelPair> opairs;
|
||||
if (!FLAGS_relabel_ipairs.empty()) {
|
||||
if (!fst::ReadLabelPairs(FLAGS_relabel_ipairs, &ipairs,
|
||||
FLAGS_allow_negative_labels))
|
||||
return 1;
|
||||
}
|
||||
if (!FLAGS_relabel_opairs.empty()) {
|
||||
if (!fst::ReadLabelPairs(FLAGS_relabel_opairs, &opairs,
|
||||
FLAGS_allow_negative_labels))
|
||||
return 1;
|
||||
}
|
||||
s::Relabel(fst.get(), ipairs, opairs);
|
||||
}
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
21
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrelabel.cc
vendored
Normal file
21
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrelabel.cc
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(isymbols, "", "Input label symbol table");
|
||||
DEFINE_string(osymbols, "", "Output label symbol table");
|
||||
DEFINE_string(relabel_isymbols, "", "Input symbol set to relabel to");
|
||||
DEFINE_string(relabel_osymbols, "", "Output symbol set to relabel to");
|
||||
DEFINE_string(relabel_ipairs, "", "Input relabel pairs (numeric)");
|
||||
DEFINE_string(relabel_opairs, "", "Output relabel pairs (numeric)");
|
||||
DEFINE_string(unknown_isymbol, "",
|
||||
"Input symbol to use to relabel OOVs (default: OOVs are errors)");
|
||||
DEFINE_string(unknown_osymbol, "",
|
||||
"Output symbol to use to relabel OOVs (default: OOVs are errors)");
|
||||
DEFINE_bool(allow_negative_labels, false,
|
||||
"Allow negative labels (not recommended; may cause conflicts)");
|
||||
|
||||
int fstrelabel_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstrelabel_main(argc, argv); }
|
91
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreplace-main.cc
vendored
Normal file
91
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreplace-main.cc
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Performs the dynamic replacement of arcs in one FST with another FST,
|
||||
// allowing for the definition of FSTs analogous to RTNs.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/replace.h>
|
||||
|
||||
DECLARE_string(call_arc_labeling);
|
||||
DECLARE_string(return_arc_labeling);
|
||||
DECLARE_int64(return_label);
|
||||
DECLARE_bool(epsilon_on_replace);
|
||||
|
||||
void Cleanup(std::vector<fst::script::LabelFstClassPair> *pairs) {
|
||||
for (const auto &pair : *pairs) {
|
||||
delete pair.second;
|
||||
}
|
||||
pairs->clear();
|
||||
}
|
||||
|
||||
int fstreplace_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
using fst::ReplaceLabelType;
|
||||
|
||||
string usage = "Recursively replaces FST arcs with other FST(s).\n\n"
|
||||
" Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " root.fst rootlabel [rule1.fst label1 ...] [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = argv[1];
|
||||
const string out_name = argc % 2 == 0 ? argv[argc - 1] : "";
|
||||
|
||||
auto *ifst = FstClass::Read(in_name);
|
||||
if (!ifst) return 1;
|
||||
|
||||
std::vector<s::LabelFstClassPair> pairs;
|
||||
// Note that if the root label is beyond the range of the underlying FST's
|
||||
// labels, truncation will occur.
|
||||
const auto root = atoll(argv[2]);
|
||||
pairs.emplace_back(root, ifst);
|
||||
|
||||
for (auto i = 3; i < argc - 1; i += 2) {
|
||||
ifst = FstClass::Read(argv[i]);
|
||||
if (!ifst) {
|
||||
Cleanup(&pairs);
|
||||
return 1;
|
||||
}
|
||||
// Note that if the root label is beyond the range of the underlying FST's
|
||||
// labels, truncation will occur.
|
||||
const auto label = atoll(argv[i + 1]);
|
||||
pairs.emplace_back(label, ifst);
|
||||
}
|
||||
|
||||
ReplaceLabelType call_label_type;
|
||||
if (!s::GetReplaceLabelType(FLAGS_call_arc_labeling, FLAGS_epsilon_on_replace,
|
||||
&call_label_type)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported call arc replace "
|
||||
<< "label type: " << FLAGS_call_arc_labeling;
|
||||
}
|
||||
ReplaceLabelType return_label_type;
|
||||
if (!s::GetReplaceLabelType(FLAGS_return_arc_labeling,
|
||||
FLAGS_epsilon_on_replace, &return_label_type)) {
|
||||
LOG(ERROR) << argv[0] << ": Unknown or unsupported return arc replace "
|
||||
<< "label type: " << FLAGS_return_arc_labeling;
|
||||
}
|
||||
|
||||
s::ReplaceOptions opts(root, call_label_type, return_label_type,
|
||||
FLAGS_return_label);
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
s::Replace(pairs, &ofst, opts);
|
||||
Cleanup(&pairs);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
17
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreplace.cc
vendored
Normal file
17
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreplace.cc
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_string(call_arc_labeling, "input",
|
||||
"Which labels to make non-epsilon on the call arc. "
|
||||
"One of: \"input\" (default), \"output\", \"both\", \"neither\"");
|
||||
DEFINE_string(return_arc_labeling, "neither",
|
||||
"Which labels to make non-epsilon on the return arc. "
|
||||
"One of: \"input\", \"output\", \"both\", \"neither\" (default)");
|
||||
DEFINE_int64(return_label, 0, "Label to put on return arc");
|
||||
DEFINE_bool(epsilon_on_replace, false, "Call/return arcs are epsilon arcs?");
|
||||
|
||||
int fstreplace_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstreplace_main(argc, argv); }
|
45
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreverse-main.cc
vendored
Normal file
45
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreverse-main.cc
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Reverses the paths in an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/fst-class.h>
|
||||
#include <fst/script/reverse.h>
|
||||
|
||||
DECLARE_bool(require_superinitial);
|
||||
|
||||
int fstreverse_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::FstClass;
|
||||
using fst::script::VectorFstClass;
|
||||
|
||||
string usage = "Reverses the paths in an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name =
|
||||
(argc > 1 && (strcmp(argv[1], "-") != 0)) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<FstClass> ifst(FstClass::Read(in_name));
|
||||
if (!ifst) return 1;
|
||||
|
||||
VectorFstClass ofst(ifst->ArcType());
|
||||
|
||||
s::Reverse(*ifst, &ofst, FLAGS_require_superinitial);
|
||||
|
||||
return !ofst.Write(out_name);
|
||||
}
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreverse.cc
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreverse.cc
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(require_superinitial, true, "Always create a superinitial state");
|
||||
|
||||
int fstreverse_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstreverse_main(argc, argv); }
|
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreweight-main.cc
vendored
Normal file
50
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreweight-main.cc
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Reweights an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/reweight.h>
|
||||
#include <fst/script/text-io.h>
|
||||
|
||||
DECLARE_bool(to_final);
|
||||
|
||||
int fstreweight_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Reweights an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " in.fst potential.txt [out.fst]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc < 3 || argc > 4) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = argv[1];
|
||||
const string potentials_name = argv[2];
|
||||
const string out_name = argc > 3 ? argv[3] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
std::vector<WeightClass> potential;
|
||||
if (!s::ReadPotentials(fst->WeightType(), potentials_name, &potential)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
s::Reweight(fst.get(), potential, s::GetReweightType(FLAGS_to_final));
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreweight.cc
vendored
Normal file
10
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreweight.cc
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
|
||||
DEFINE_bool(to_final, false, "Push/reweight to final (vs. to initial) states");
|
||||
|
||||
int fstreweight_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstreweight_main(argc, argv); }
|
61
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrmepsilon-main.cc
vendored
Normal file
61
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrmepsilon-main.cc
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
//
|
||||
// Removes epsilons from an FST.
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/log.h>
|
||||
#include <fst/script/getters.h>
|
||||
#include <fst/script/rmepsilon.h>
|
||||
|
||||
DECLARE_bool(connect);
|
||||
DECLARE_double(delta);
|
||||
DECLARE_int64(nstate);
|
||||
DECLARE_string(queue_type);
|
||||
DECLARE_string(weight);
|
||||
|
||||
int fstrmepsilon_main(int argc, char **argv) {
|
||||
namespace s = fst::script;
|
||||
using fst::script::MutableFstClass;
|
||||
using fst::script::WeightClass;
|
||||
|
||||
string usage = "Removes epsilons from an FST.\n\n Usage: ";
|
||||
usage += argv[0];
|
||||
usage += " [in.fst [out.fst]]\n";
|
||||
|
||||
std::set_new_handler(FailedNewHandler);
|
||||
SET_FLAGS(usage.c_str(), &argc, &argv, true);
|
||||
if (argc > 3) {
|
||||
ShowUsage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string in_name = (argc > 1 && strcmp(argv[1], "-") != 0) ? argv[1] : "";
|
||||
const string out_name = argc > 2 ? argv[2] : "";
|
||||
|
||||
std::unique_ptr<MutableFstClass> fst(MutableFstClass::Read(in_name, true));
|
||||
if (!fst) return 1;
|
||||
|
||||
const auto weight_threshold =
|
||||
FLAGS_weight.empty() ? WeightClass::Zero(fst->WeightType())
|
||||
: WeightClass(fst->WeightType(), FLAGS_weight);
|
||||
|
||||
fst::QueueType queue_type;
|
||||
if (!s::GetQueueType(FLAGS_queue_type, &queue_type)) {
|
||||
LOG(ERROR) << argv[0]
|
||||
<< ": Unknown or unsupported queue type: " << FLAGS_queue_type;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const s::RmEpsilonOptions opts(queue_type, FLAGS_connect, weight_threshold,
|
||||
FLAGS_nstate, FLAGS_delta);
|
||||
|
||||
s::RmEpsilon(fst.get(), opts);
|
||||
|
||||
return !fst->Write(out_name);
|
||||
}
|
19
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrmepsilon.cc
vendored
Normal file
19
native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstrmepsilon.cc
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// See www.openfst.org for extensive documentation on this weighted
|
||||
// finite-state transducer library.
|
||||
|
||||
#include <fst/flags.h>
|
||||
#include <fst/fst.h>
|
||||
#include <fst/shortest-distance.h>
|
||||
#include <fst/weight.h>
|
||||
|
||||
DEFINE_bool(connect, true, "Trim output");
|
||||
DEFINE_double(delta, fst::kShortestDelta, "Comparison/quantization delta");
|
||||
DEFINE_int64(nstate, fst::kNoStateId, "State number threshold");
|
||||
DEFINE_string(queue_type, "auto",
|
||||
"Queue type: one of: \"auto\", "
|
||||
"\"fifo\", \"lifo\", \"shortest\", \"state\", \"top\"");
|
||||
DEFINE_string(weight, "", "Weight threshold");
|
||||
|
||||
int fstrmepsilon_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv) { return fstrmepsilon_main(argc, argv); }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user