Skip to content

Commit

Permalink
Merge tag 'orig/1.7.0.1' into winport
Browse files Browse the repository at this point in the history
  • Loading branch information
kkm committed Feb 25, 2019
2 parents d4dd88e + c3c017d commit 5f15087
Show file tree
Hide file tree
Showing 98 changed files with 12,550 additions and 13,367 deletions.
396 changes: 202 additions & 194 deletions NEWS

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OpenFst: Release 1.6.9.
OpenFst: Release 1.7.0.

OpenFst is a library for constructing, combining, optimizing, and searching
weighted finite-state transducers (FSTs).
Expand Down
83 changes: 83 additions & 0 deletions _import_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash

# This is a port port maintainer's file, and is not part of OpenFST.
# Licensed under the same Apache 2.0 license (see the file COPYING),
# or just delete it if in legal doubt; you do not need it anyway.
# Copyright 2019 SmartAction LLC.

set -euo pipefail; shopt -s extglob

LF=$'\n'

say() { echo >&2 "$0: $@"; }
die() { echo >&2 "$0: error: $@"; exit 1; }

# This is Spar^H^H Windooows!
miss=(); for tool in gawk git grep gzip tar wget; do
command -v $tool >/dev/null || miss+=($tool)
done
test ${#miss[@]} -eq 0 || die "missing required program(s): ${miss[@]}"
unset miss

[[ "$#" == [12] ]] || {
echo >&2 -e "Usage: $0 <version> [<revision>=1]${LF} e.g.: $0 1.7.0 1"
exit 2; }

ver=$1
rev=${2:-1}
tag="orig/$ver.$rev"
url="http://www.openfst.org/twiki/bin/viewfile/FST/FstDownload?filename=openfst-${ver}.tar.gz;rev=${rev}"

grep -qP '^1(\.1?\d){3}$' <<<"$ver.$rev" ||
die "revision $ver.$rev does not look correct to me"

pfx="$(git rev-parse --show-prefix)" && test -z "$pfx" ||
die "must be in the root of the work tree"

# Must be on the 'original' branch, in sync with the main repo,
# and with no local changes, although we can ignore deletions,
# since we are deleting files before import anyway. We must be
# squeaky clean, lest stray random files be added. Also, ignore
# changes to this file to allow for debugging.
git fetch origin
git status --porcelain=2 --branch | gawk -v me=$0 >&2 '
$0 == "# branch.head original" { branch_ok = 1 }
$1$2 == "#branch.ab" { ab_bad = $4 != "-0" }
$1 == "#" { next }
$1$2 == "1.D" { next } # Deleted files are fine.
$1$9 == "1_import_release.sh" { next }
{ modf_bad=1; nextfile }
END {
me = me ": error: "
if (!branch_ok) print me "current branch must be \"original\""
if (ab_bad) print me "current branch is not in sync with remote"
if (modf_bad) print me "there are locally modified files"
exit !(branch_ok && !ab_bad && !modf_bad) }'

git rev-parse -q --verify "refs/tags/$tag" >/dev/null &&
die "tag $tag already exists"

say "Removing (almost) all files from worktree"
rm -rf -- !(.|..|.git|.gitignore|_import_release.sh)

say "Fetching and unpacking OpenFST v$ver r$rev${LF} ... from: $url"
wget -nv -O - -- "$url" | tar -xzf - --strip-components=1

test -f NEWS ||
die "file NEWS was not unpacked. Something went horribly wrong."

message="Import v$ver r$rev${LF}${LF}$url"

say "committing and tagging new version"
git add -A
git commit -m "$message"
git tag -a "$tag" -m "$message"

say "summary of changes to the previous version, and a NEWS snippet"

git --no-pager show --stat
echo
git --no-pager show --format='' --unified=1 -w -- NEWS
echo

say "tag ${tag} created for the imported version. Import complete."
158 changes: 113 additions & 45 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for OpenFst 1.6.9.
# Generated by GNU Autoconf 2.69 for OpenFst 1.7.0.
#
# Report bugs to <help@www.openfst.org>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenFst'
PACKAGE_TARNAME='openfst'
PACKAGE_VERSION='1.6.9'
PACKAGE_STRING='OpenFst 1.6.9'
PACKAGE_VERSION='1.7.0'
PACKAGE_STRING='OpenFst 1.7.0'
PACKAGE_BUGREPORT='help@www.openfst.org'
PACKAGE_URL=''

Expand Down Expand Up @@ -1395,7 +1395,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures OpenFst 1.6.9 to adapt to many kinds of systems.
\`configure' configures OpenFst 1.7.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1466,7 +1466,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of OpenFst 1.6.9:";;
short | recursive ) echo "Configuration of OpenFst 1.7.0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1598,7 +1598,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
OpenFst configure 1.6.9
OpenFst configure 1.7.0
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1993,11 +1993,53 @@ fi
as_fn_set_status $ac_retval

} # ac_fn_cxx_try_link

# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_cxx_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval

} # ac_fn_cxx_try_run
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by OpenFst $as_me 1.6.9, which was
It was created by OpenFst $as_me 1.7.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2860,7 +2902,7 @@ fi

# Define the identity of the package.
PACKAGE='openfst'
VERSION='1.6.9'
VERSION='1.7.0'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -5896,7 +5938,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;

netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
Expand Down Expand Up @@ -9569,9 +9611,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
openbsd* | bitrig*)
with_gnu_ld=no
;;
linux* | k*bsd*-gnu | gnu*)
link_all_deplibs=no
;;
esac

ld_shlibs=yes
Expand Down Expand Up @@ -9826,7 +9865,7 @@ _LT_EOF
fi
;;

netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
Expand Down Expand Up @@ -10496,7 +10535,6 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
link_all_deplibs=no
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
Expand All @@ -10518,7 +10556,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
esac
;;

netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
Expand Down Expand Up @@ -11633,18 +11671,6 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;

netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
;;

netbsd*)
version_type=sunos
need_lib_prefix=no
Expand Down Expand Up @@ -14539,7 +14565,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
Expand Down Expand Up @@ -14914,9 +14940,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
esac
;;
linux* | k*bsd*-gnu | gnu*)
link_all_deplibs_CXX=no
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
Expand Down Expand Up @@ -15610,18 +15633,6 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;

netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
;;

netbsd*)
version_type=sunos
need_lib_prefix=no
Expand Down Expand Up @@ -16759,6 +16770,62 @@ fi
libfstdir=$with_libfstdir


# Flags may be changed after configuring, so this is checked again by
# weight_test.cc. The check here is to save time in the common case,
# or when someone does not run `make check`.
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

#include <cstdio>

template <typename T>
bool FloatEqIsReflexive(T m) {
volatile T x = 1.111;
x *= m;

T y = 1.111;
y *= m;

return x == y;
}

int
main ()
{

volatile double test_value = 1.1;
if (!FloatEqIsReflexive(static_cast<float>(test_value))) {
printf("float FAIL\n");
return 1;
}
if (!FloatEqIsReflexive(test_value)) {
printf("double FAIL\n");
return 1;
}

;
return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
echo "Float equality is good"
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Test float equality failed! Compile with -msse -mfpmath=sse if using g++.
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
Expand Down Expand Up @@ -17391,7 +17458,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by OpenFst $as_me 1.6.9, which was
This file was extended by OpenFst $as_me 1.7.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -17457,7 +17524,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
OpenFst config.status 1.6.9
OpenFst config.status 1.7.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down Expand Up @@ -18693,6 +18760,7 @@ $as_echo X"$file" |
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.

# Provide generalized library-building support services.
Expand Down
Loading

0 comments on commit 5f15087

Please sign in to comment.