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 | 3abb2f590940e05be345446a10e5f247f0046c2a (patch) | |
tree | e5023d2695119d3f4a18070822719c702e14dfd5 | |
parent | d9cc1a6986188a97e09e4c8cef46c34eee5f9cd2 (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 |