fix debian build failure; refs #12

master
Marc Wäckerlin 10 years ago
parent 83530df845
commit cba752892d
  1. 2
      configure.in
  2. 80
      src/mrw/checkcxx11.hxx

@ -27,7 +27,7 @@ m4_define(x_minor, 1)
PACKAGENAME=x_packagename PACKAGENAME=x_packagename
MAJOR=x_major MAJOR=x_major
MINOR=x_minor MINOR=x_minor
BUILDDATE=$(date "+%d.%m.%Y/%H.%M") BUILDDATE=$(date -R)
if svn info . 2>&1 > /dev/null; then if svn info . 2>&1 > /dev/null; then
LEAST=$(LANG= svn info $path | sed -n 's/Revision: //p') LEAST=$(LANG= svn info $path | sed -n 's/Revision: //p')

@ -14,19 +14,21 @@
# if __cplusplus < 201103L # if __cplusplus < 201103L
# if __cplusplus==1 # if __cplusplus==1
# if __APPLE__ # if __APPLE__
/// Code is compiled with old non C++11 standard compliant compiler # if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
/** There are workarounds for old non C++11 compatible /// Code is compiled with old non C++11 standard compliant compiler
compilers. These workarounds are deprecated, but will /** There are workarounds for old non C++11 compatible
remain until most compilers fully support C++11. So compilers. These workarounds are deprecated, but will
this workaround will be removed in future releases, remain until most compilers fully support C++11. So
when support for C++11 is more common. Only rely on this workaround will be removed in future releases,
this workaround, if you really have to. when support for C++11 is more common. Only rely on
Mac gcc is even worse than on other systems. */ this workaround, if you really have to. Mac gcc is
# define MRW__OLD_PRE11_COMPILER even worse than on other systems. */
# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 # define MRW__OLD_PRE11_COMPILER
# warning emulating C++11 - this changes the way you use the library # warning you need a C++11 compliant compiler, on gcc: add -std=c++11
# warning this is deprecated and will be removed in future releases # warning emulating C++11 - this changes the way you use the library
# warning refere to the library documentation for more details # warning this is deprecated and will be removed in future releases
# warning refere to the library documentation for more details
# endif
# else # else
// __cplusplus==1 is a known bug in gcc 4.6.3 // __cplusplus==1 is a known bug in gcc 4.6.3
# warning your compiler has a know bug, please upgrade to gcc >= 4.7 # warning your compiler has a know bug, please upgrade to gcc >= 4.7
@ -69,33 +71,35 @@ namespace std {
}; };
# else # else
# warning trying standard C++11 support # warning trying standard C++11 support
# include <memory>
# endif # endif
# elif __APPLE__ # elif __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 /// Code is compiled with an old non C++11 standard compliant compiler
/// Code is compiled with an old non C++11 standard compliant compiler /** There are workarounds for old non C++11 compatible
/** There are workarounds for old non C++11 compatible compilers. These workarounds are deprecated, but will remain
compilers. These workarounds are deprecated, but will until most compilers fully support C++11. So this workaround
remain until most compilers fully support C++11. So this will be removed in future releases, when support for C++11 is
workaround will be removed in future releases, when support more common. Only rely on this workaround, if you really have
for C++11 is more common. Only rely on this workaround, if to. */
you really have to. */ # define MRW__OLD_PRE11_COMPILER
# define MRW__OLD_PRE11_COMPILER # warning you need a C++11 compliant compiler, on gcc: add -std=c++11
# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 # warning emulating C++11 - this changes the way you use the library
# warning emulating C++11 - this changes the way you use the library # warning this is deprecated and will be removed in future releases
# warning this is deprecated and will be removed in future releases # warning refere to the library documentation for more details
# warning refere to the library documentation for more details # warning special workaround for apple
# warning special workaround for apple # include <tr1/memory>
# include <tr1/memory> namespace std {
namespace std { // there is no std::shared_ptr in apple, but
// there is no std::shared_ptr in apple, but // std::tr1::shared_ptr in <tr1/memory>
// std::tr1::shared_ptr in <tr1/memory> template <typename T> class shared_ptr: public tr1::shared_ptr<T> {
template <typename T> class shared_ptr: public tr1::shared_ptr<T> { public:
public: explicit shared_ptr(): tr1::shared_ptr<T>() {}
explicit shared_ptr(): tr1::shared_ptr<T>() {} explicit shared_ptr(T* p): tr1::shared_ptr<T>(p) {}
explicit shared_ptr(T* p): tr1::shared_ptr<T>(p) {} };
}; }
}
# endif # endif
# else
# include <memory>
# endif # endif
#endif #endif

Loading…
Cancel
Save