From cba752892db0b36038f917ceb281b47aae953057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 12 Dec 2014 12:49:17 +0000 Subject: [PATCH] fix debian build failure; refs #12 --- configure.in | 2 +- src/mrw/checkcxx11.hxx | 80 ++++++++++++++++++++++-------------------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/configure.in b/configure.in index 54c3de7..16ab0a1 100644 --- a/configure.in +++ b/configure.in @@ -27,7 +27,7 @@ m4_define(x_minor, 1) PACKAGENAME=x_packagename MAJOR=x_major MINOR=x_minor -BUILDDATE=$(date "+%d.%m.%Y/%H.%M") +BUILDDATE=$(date -R) if svn info . 2>&1 > /dev/null; then LEAST=$(LANG= svn info $path | sed -n 's/Revision: //p') diff --git a/src/mrw/checkcxx11.hxx b/src/mrw/checkcxx11.hxx index 3a9e9e6..eea3414 100644 --- a/src/mrw/checkcxx11.hxx +++ b/src/mrw/checkcxx11.hxx @@ -14,19 +14,21 @@ # if __cplusplus < 201103L # if __cplusplus==1 # if __APPLE__ - /// Code is compiled with old non C++11 standard compliant compiler - /** There are workarounds for old non C++11 compatible - compilers. These workarounds are deprecated, but will - remain until most compilers fully support C++11. So - this workaround will be removed in future releases, - when support for C++11 is more common. Only rely on - this workaround, if you really have to. - Mac gcc is even worse than on other systems. */ -# define MRW__OLD_PRE11_COMPILER -# 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 this is deprecated and will be removed in future releases -# warning refere to the library documentation for more details +# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 + /// Code is compiled with old non C++11 standard compliant compiler + /** There are workarounds for old non C++11 compatible + compilers. These workarounds are deprecated, but will + remain until most compilers fully support C++11. So + this workaround will be removed in future releases, + when support for C++11 is more common. Only rely on + this workaround, if you really have to. Mac gcc is + even worse than on other systems. */ +# define MRW__OLD_PRE11_COMPILER +# 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 this is deprecated and will be removed in future releases +# warning refere to the library documentation for more details +# endif # else // __cplusplus==1 is a known bug in gcc 4.6.3 # warning your compiler has a know bug, please upgrade to gcc >= 4.7 @@ -69,33 +71,35 @@ namespace std { }; # else # warning trying standard C++11 support +# include # endif -# elif __APPLE__ -# 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 - /** There are workarounds for old non C++11 compatible - compilers. These workarounds are deprecated, but will - remain until most compilers fully support C++11. So this - workaround will be removed in future releases, when support - for C++11 is more common. Only rely on this workaround, if - you really have to. */ -# define MRW__OLD_PRE11_COMPILER -# 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 this is deprecated and will be removed in future releases -# warning refere to the library documentation for more details -# warning special workaround for apple -# include - namespace std { - // there is no std::shared_ptr in apple, but - // std::tr1::shared_ptr in - template class shared_ptr: public tr1::shared_ptr { - public: - explicit shared_ptr(): tr1::shared_ptr() {} - explicit shared_ptr(T* p): tr1::shared_ptr(p) {} - }; - } +# elif __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 + /// Code is compiled with an old non C++11 standard compliant compiler + /** There are workarounds for old non C++11 compatible + compilers. These workarounds are deprecated, but will remain + until most compilers fully support C++11. So this workaround + will be removed in future releases, when support for C++11 is + more common. Only rely on this workaround, if you really have + to. */ +# define MRW__OLD_PRE11_COMPILER +# 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 this is deprecated and will be removed in future releases +# warning refere to the library documentation for more details +# warning special workaround for apple +# include + namespace std { + // there is no std::shared_ptr in apple, but + // std::tr1::shared_ptr in + template class shared_ptr: public tr1::shared_ptr { + public: + explicit shared_ptr(): tr1::shared_ptr() {} + explicit shared_ptr(T* p): tr1::shared_ptr(p) {} + }; + } # endif +# else +# include # endif #endif