+check_cxx_source_compiles(
+ "
+ int i[ ( sizeof(long long)>sizeof(long) ? 1 : -1 ) ];
+ int main(){return 0;}
+ "
+SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG)
+
+check_cxx_source_compiles(
+ "
+ #include <execinfo.h>
+ #include <cxxabi.h>
+ int main() {
+ void* array[200];
+ size_t size = backtrace(array, 200);
+ backtrace_symbols(array, size);
+ int status = 0;
+ abi::__cxa_demangle(\"abcd\", 0, 0, &status);
+ }
+ "
+LYX_CALLSTACK_PRINTING)
+
+# Check whether STL is libstdc++
+check_cxx_source_compiles(
+ "
+ #include <vector>
+ int main() {
+ #if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
+ this is not libstdc++
+ #endif
+ return(0);
+ }
+ "
+lyx_cv_lib_stdcxx)
+
+# Check whether STL is libstdc++ with C++11 ABI
+check_cxx_source_compiles(
+ "
+ #include <vector>
+ int main() {
+ #if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
+ this is not libstdc++ using the C++11 ABI
+ #endif
+ return(0);
+ }
+ "
+USE_GLIBCXX_CXX11_ABI)
+
+check_cxx_source_compiles(
+ "
+ #ifndef __clang__
+ this is not clang
+ #endif
+ int main() {
+ return(0);
+ }
+ "
+lyx_cv_prog_clang)
+
+check_cxx_source_compiles(
+ "
+ #include <memory>
+ using std::make_unique;
+ int main() {
+ return(0);
+ }
+ "
+HAVE_DEF_MAKE_UNIQUE)
+
+check_cxx_source_compiles(
+ "
+ #include <mutex>
+ static std::once_flag flag;
+ int main() {
+ std::call_once(flag, [](){ return; });
+ return(0);
+ }
+ "
+LYX_USE_STD_CALL_ONCE)
+
+set(USE_LLVM_LIBCPP)
+set(STD_STRING_USES_COW)
+set(USE_GLIBCXX_CXX11_ABI)
+if(lyx_cv_lib_stdcxx)
+ if(NOT USE_GLIBCXX_CXX11_ABI)
+ set(STD_STRING_USES_COW 1)
+ endif()
+else()
+ if(lyx_cv_prog_clang)
+ # use libc++ provided by llvm instead of GNU libstdc++
+ set(USE_LLVM_LIBCPP 1)
+ endif()
+endif()
+
+set(QPA_XCB)
+set(HAVE_QT5_X11_EXTRAS)