diff options
author | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2013-11-10 01:22:11 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2013-11-10 01:22:11 -0500 |
commit | 4bdb3451dc6c005a5356844435c098bb14dae6a8 (patch) | |
tree | 60a5b74cc3c5617581a303f3ff02e8a275ef949e | |
parent | 2d3948b98bb9e8c7bad60f1acd99ff0b42b3ae30 (diff) |
fixes
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | mteval/mbr_kbest.cc | 2 | ||||
-rw-r--r-- | mteval/ns_ter.cc | 2 | ||||
-rw-r--r-- | mteval/ter.cc | 2 | ||||
-rw-r--r-- | utils/hash.h | 2 |
5 files changed, 10 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index c3b749e3..e4183c15 100644 --- a/configure.ac +++ b/configure.ac @@ -185,7 +185,12 @@ AC_CHECK_HEADER(google/dense_hash_map, AC_PROG_INSTALL -CPPFLAGS="-DPIC -fPIC $CPPFLAGS -DHAVE_CONFIG_H -DKENLM_MAX_ORDER=6" +CPPFLAGS="-DPIC -fPIC $CXX11_SWITCH $CPPFLAGS -DHAVE_CONFIG_H -DKENLM_MAX_ORDER=6" + +if test "x$HAVE_CXX11" = "x0"; then + CPPFLAGS="$CPPFLAGS -DHAVE_OLD_CPP" +fi + # core cdec stuff AC_CONFIG_FILES([Makefile]) diff --git a/mteval/mbr_kbest.cc b/mteval/mbr_kbest.cc index 787c03bd..76d2c7fc 100644 --- a/mteval/mbr_kbest.cc +++ b/mteval/mbr_kbest.cc @@ -3,7 +3,7 @@ #include <boost/program_options.hpp> #include <boost/functional/hash.hpp> -#ifdef HAVE_CXX11 +#ifndef HAVE_OLD_CPP # include <unordered_map> #else # include <tr1/unordered_map> diff --git a/mteval/ns_ter.cc b/mteval/ns_ter.cc index f0d84098..680fb7b4 100644 --- a/mteval/ns_ter.cc +++ b/mteval/ns_ter.cc @@ -4,7 +4,7 @@ #include <cassert> #include <iostream> #include <limits> -#ifdef HAVE_CXX11 +#ifndef HAVE_OLD_CPP # include <unordered_map> #else # include <tr1/unordered_map> diff --git a/mteval/ter.cc b/mteval/ter.cc index 9da54306..19b90bbc 100644 --- a/mteval/ter.cc +++ b/mteval/ter.cc @@ -5,7 +5,7 @@ #include <iostream> #include <limits> #include <sstream> -#ifdef HAVE_CXX11 +#ifndef HAVE_OLD_CPP # include <unordered_map> #else # include <tr1/unordered_map> diff --git a/utils/hash.h b/utils/hash.h index e56fca06..e1426ffb 100644 --- a/utils/hash.h +++ b/utils/hash.h @@ -20,7 +20,7 @@ # define HASH_MAP_RESERVED(h,empty,deleted) do { (h).set_empty_key(empty); (h).set_deleted_key(deleted); } while(0) # define HASH_MAP_EMPTY(h,empty) do { (h).set_empty_key(empty); } while(0) #else -#ifdef HAVE_CXX11 +#ifndef HAVE_OLD_CPP # include <unordered_map> # include <unordered_set> #else |