Merge pull request #1847 from rubenk/man-collectd-python-remove-notes-section
[collectd.git] / configure.ac
index 8b6a98d..5171dec 100644 (file)
@@ -42,7 +42,9 @@ AC_SYS_LARGEFILE
 #
 # Checks for programs.
 #
-AC_PROG_CC
+AC_PROG_CC_C99([],
+  [AC_MSG_ERROR([No compiler found that supports C99])]
+)
 AC_PROG_CXX
 AC_PROG_CPP
 AC_PROG_EGREP
@@ -81,7 +83,7 @@ AC_PATH_PROG([PROTOC], [protoc])
 have_protoc3="no"
 if test "x$PROTOC" != "x"; then
        AC_MSG_CHECKING([for protoc 3.0.0+])
-       if $PROTOC --version | grep -q libprotoc.3; then
+       if $PROTOC --version | $EGREP libprotoc.3 >/dev/null; then
                protoc3="yes (`$PROTOC --version`)"
                have_protoc3="yes"
        else
@@ -784,7 +786,7 @@ AC_HEADER_TIME
 #
 # Checks for library functions.
 #
-AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname setlocale)
+AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname setlocale asprintf)
 
 AC_FUNC_STRERROR_R
 
@@ -1350,6 +1352,20 @@ AC_ARG_WITH(useragent, [AS_HELP_STRING([--with-useragent@<:@=AGENT@:>@], [User a
 
 # }}}
 
+# --with-data-max-name-len {{{
+AC_ARG_WITH(data-max-name-len, [AS_HELP_STRING([--with-data-max-name-len@<:@=VALUE@:>@], [Maximum length of data buffers])],
+[
+    if test "x$withval" != "x" && test $withval -gt 0
+    then
+        AC_DEFINE_UNQUOTED(DATA_MAX_NAME_LEN, [$withval], [Maximum length of data buffers])
+    else
+        AC_MSG_ERROR([DATA_MAX_NAME_LEN must be a positive integer -- $withval given])
+    fi
+],
+[   AC_DEFINE(DATA_MAX_NAME_LEN, 128, [Maximum length of data buffers])]
+)
+# }}}
+
 have_getfsstat="no"
 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
 have_getvfsstat="no"
@@ -6505,7 +6521,7 @@ AC_MSG_RESULT([    libxmms . . . . . . . $with_libxmms])
 AC_MSG_RESULT([    libyajl . . . . . . . $with_libyajl])
 AC_MSG_RESULT([    oracle  . . . . . . . $with_oracle])
 AC_MSG_RESULT([    protobuf-c  . . . . . $have_protoc_c])
-AC_MSG_RESULT([    protoc 3  . . . . . . $protoc3])
+AC_MSG_RESULT([    protoc 3  . . . . . . $have_protoc3])
 AC_MSG_RESULT([    python  . . . . . . . $with_python])
 AC_MSG_RESULT()
 AC_MSG_RESULT([  Features:])