aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/configure.ac
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-27 11:12:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-27 11:12:00 +0200
commitde3d9ff4ee51f3f9125d4a76cc21747c0613b8fd (patch)
treeb2abe728e91199b50c25732da22b1e623b395b5b /nxcomp/configure.ac
parent39ee56f5dbe968cddebf6e7891667a2cf8b5af76 (diff)
parentceac077637d147b54abeeb4f0154bf152ba13138 (diff)
downloadnx-libs-de3d9ff4ee51f3f9125d4a76cc21747c0613b8fd.tar.gz
nx-libs-de3d9ff4ee51f3f9125d4a76cc21747c0613b8fd.tar.bz2
nx-libs-de3d9ff4ee51f3f9125d4a76cc21747c0613b8fd.zip
Merge branch 'theqvd-improved-logging' into 3.6.x
Attributes GH PR #193: https://github.com/ArcticaProject/nx-libs/pull/193
Diffstat (limited to 'nxcomp/configure.ac')
-rw-r--r--nxcomp/configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/nxcomp/configure.ac b/nxcomp/configure.ac
index 0b30915c2..3ae81f0d1 100644
--- a/nxcomp/configure.ac
+++ b/nxcomp/configure.ac
@@ -63,9 +63,34 @@ if test "$FreeBSD" = yes; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
fi
+AX_PTHREAD([], AC_MSG_ERROR([no POSIX threads support detected]))
+
# If in_addr_t is not defined use unsigned int.
AC_CHECK_TYPES([in_addr_t], [], [], [[#include <netinet/in.h>]])
+AC_ARG_ENABLE([cxx11],
+ [AS_HELP_STRING([--enable-cxx11],
+ [enable optional features requiring C++11 support (disabled by default)])],
+ [AS_IF([test x$enableval = xyes],
+ [AX_CXX_COMPILE_STDCXX_11([], [mandatory])])])
+
+# Check if std::put_time is available.
+AC_MSG_CHECKING([if std::put_time is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+#include <iomanip>
+#include <ctime>
+]],
+[[
+std::time_t t = std::time(NULL);
+std::tm tm = *std::localtime(&t);
+(void) std::put_time(&tm, "%c");
+]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_STD_PUT_TIME, [1],
+ [Use std::put_time to format times, must be made available by the compiler if turned on.])],
+ [AC_MSG_RESULT([no])])
+
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable to get info session log output (disabled by default)])],
@@ -83,6 +108,7 @@ AC_ARG_ENABLE([valgrind],
AC_CONFIG_FILES([
Makefile
src/Makefile
+test/Makefile
nxcomp.pc
])