--- scripts/build-lm-qsub.sh.orig 2013-04-06 00:31:56.000000000 +0900 +++ scripts/build-lm-qsub.sh 2013-05-18 14:01:30.000000000 +0900 @@ -36,13 +36,12 @@ fi if [ ! $IRSTLM ]; then - echo "Set IRSTLM environment variable with path to irstlm" - exit 2; + IRSTLM=@libexec_dir@ fi #paths to scripts and commands in irstlm -scr=$IRSTLM/bin -bin=$IRSTLM/bin +scr=$IRSTLM +bin=$IRSTLM gzip=`which gzip 2> /dev/null`; gunzip=`which gunzip 2> /dev/null`; --- scripts/build-lm.sh.orig 2012-10-02 16:25:08.000000000 +0900 +++ scripts/build-lm.sh 2013-05-18 14:01:30.000000000 +0900 @@ -30,13 +30,12 @@ } if [ ! $IRSTLM ]; then - echo "Set IRSTLM environment variable with path to irstlm" - exit 2 + IRSTLM=@libexec_dir@ fi #paths to scripts and commands in irstlm -scr=$IRSTLM/bin -bin=$IRSTLM/bin +scr=$IRSTLM +bin=$IRSTLM gzip=`which gzip 2> /dev/null`; gunzip=`which gunzip 2> /dev/null`; --- scripts/lm-stat.pl.orig 2012-10-02 16:25:08.000000000 +0900 +++ scripts/lm-stat.pl 2013-05-18 14:01:30.000000000 +0900 @@ -46,14 +46,7 @@ exit(1); } -if (!$ENV{IRSTLM}){ - print "Set environment variable IRSTLM with path to the irstlm directory\n"; - exit(1); -} - - - -my $clm="$ENV{IRSTLM}/bin/compile-lm"; +my $clm="@libexec_dir@/compile-lm"; open (OUT,"$clm $lm --eval $txt --debug 1|"); while (){ --- scripts/split-ngt.sh.orig 2012-10-02 16:25:08.000000000 +0900 +++ scripts/split-ngt.sh 2013-05-18 14:01:30.000000000 +0900 @@ -38,9 +38,9 @@ #containing ngram statistics (of length) in Google format #These files are a partition of the whole set of ngrams -basedir=$IRSTLM -bindir=$basedir/bin -scriptdir=$basedir/scripts +basedir=@libexec_dir@ +bindir=$basedir +scriptdir=$basedir unset par while [ $# -gt 0 ] --- scripts/Makefile.am.orig 2012-10-12 06:19:19.000000000 +0900 +++ scripts/Makefile.am 2013-05-18 20:54:50.000000000 +0900 @@ -1,4 +1,4 @@ -wrapperbindir = @prefix@/bin +wrapperbindir = @libexecdir@/irstlm dist_wrapperbin_SCRIPTS = \ add-start-end.sh build-lm-qsub.sh build-lm.sh rm-start-end.sh split-ngt.sh mdtsel.sh \