@@ -91,7 +91,7 @@ template<class Arc> void TestDeterminizeLattice() {
9191 VectorFst<Arc> *fst = RandFst<Arc>();
9292 std::cout << " FST before lattice-determinizing is:\n " ;
9393 {
94- #ifdef HAVE_OPENFST_GE_10400
94+ #if OPENFST_VER >= 10400
9595 FstPrinter<Arc> fstprinter (*fst, NULL , NULL , NULL , false , true , " \t " );
9696#else
9797 FstPrinter<Arc> fstprinter (*fst, NULL , NULL , NULL , false , true );
@@ -107,7 +107,7 @@ template<class Arc> void TestDeterminizeLattice() {
107107 throw std::runtime_error (" could not determinize" );
108108 std::cout << " FST after lattice-determinizing is:\n " ;
109109 {
110- #ifdef HAVE_OPENFST_GE_10400
110+ #if OPENFST_VER >= 10400
111111 FstPrinter<Arc> fstprinter (det_fst, NULL , NULL , NULL , false , true , " \t " );
112112#else
113113 FstPrinter<Arc> fstprinter (det_fst, NULL , NULL , NULL , false , true );
@@ -122,7 +122,7 @@ template<class Arc> void TestDeterminizeLattice() {
122122 ConvertLattice<Weight, Int>(*fst, &compact_fst, false );
123123 std::cout << " Compact FST is:\n " ;
124124 {
125- #ifdef HAVE_OPENFST_GE_10400
125+ #if OPENFST_VER >= 10400
126126 FstPrinter<CompactArc> fstprinter (compact_fst, NULL , NULL , NULL , false , true , " \t " );
127127#else
128128 FstPrinter<CompactArc> fstprinter (compact_fst, NULL , NULL , NULL , false , true );
@@ -137,7 +137,7 @@ template<class Arc> void TestDeterminizeLattice() {
137137
138138 std::cout << " Compact version of determinized FST is:\n " ;
139139 {
140- #ifdef HAVE_OPENFST_GE_10400
140+ #if OPENFST_VER >= 10400
141141 FstPrinter<CompactArc> fstprinter (compact_det_fst, NULL , NULL , NULL , false , true , " \t " );
142142#else
143143 FstPrinter<CompactArc> fstprinter (compact_det_fst, NULL , NULL , NULL , false , true );
@@ -162,7 +162,7 @@ template<class Arc> void TestDeterminizeLattice2() {
162162 VectorFst<Arc> *fst = RandFst<Arc>(opts);
163163 std::cout << " FST before lattice-determinizing is:\n " ;
164164 {
165- #ifdef HAVE_OPENFST_GE_10400
165+ #if OPENFST_VER >= 10400
166166 FstPrinter<Arc> fstprinter (*fst, NULL , NULL , NULL , false , true , " \t " );
167167#else
168168 FstPrinter<Arc> fstprinter (*fst, NULL , NULL , NULL , false , true );
@@ -173,7 +173,7 @@ template<class Arc> void TestDeterminizeLattice2() {
173173 DeterminizeLattice<TropicalWeight, int32>(*fst, &ofst);
174174 std::cout << " FST after lattice-determinizing is:\n " ;
175175 {
176- #ifdef HAVE_OPENFST_GE_10400
176+ #if OPENFST_VER >= 10400
177177 FstPrinter<Arc> fstprinter (ofst, NULL , NULL , NULL , false , true , " \t " );
178178#else
179179 FstPrinter<Arc> fstprinter (ofst, NULL , NULL , NULL , false , true );
0 commit comments