Merge branch 'collectd-4.5' into collectd-4.6
[collectd.git] / configure.in
index bed13f8..795a9e1 100644 (file)
@@ -80,8 +80,9 @@ AC_SUBST(pkgconfigdir)
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_HEADER_DIRENT
+AC_HEADER_STDBOOL
 
-AC_CHECK_HEADERS(stdio.h stdint.h stdbool.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
+AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
 
 # For ping library
 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
@@ -250,7 +251,7 @@ AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
 
 # For the swap module
 have_sys_swap_h="yes"
-AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"],
+AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
 [
 #if HAVE_SYS_TYPES_H
 #  include <sys/types.h>
@@ -262,7 +263,14 @@ AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"],
 
 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
 then
-       AC_MSG_NOTICE([Solaris detected and sys/swap.h not found: Try building a 64bit binary.])
+       hint_64=""
+       if test "x$GCC" = "xyes"
+       then
+               hint_64="CFLAGS='-m64'"
+       else
+               hint_64="CFLAGS='-xarch=v9'"
+       fi
+       AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
 fi
 
 # For load module
@@ -1351,6 +1359,11 @@ then
                 [with_libmysql="yes"],
                 [with_libmysql="no (symbol 'mysql_init' not found)"],
                 [$with_mysql_libs])
+
+               AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
+                [with_libmysql="yes"],
+                [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
+                [$with_mysql_libs])
        fi
 fi
 if test "x$with_libmysql" = "xyes"