-
Notifications
You must be signed in to change notification settings - Fork 65
/
configure.ac
53 lines (43 loc) · 1.28 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
AC_INIT([libzbxpgsql], [1.1.0], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
m4_pattern_allow([AM_PROG_AR])
AM_PROG_AR
AC_PROG_LIBTOOL # seem to need this on CentOS 5 (libtool v1.5)
LT_INIT
AC_PROG_CC
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
# check for stdlib header files
AC_HEADER_STDC
# check for libconfig
AC_CHECK_HEADERS(libconfig.h, [], [ AC_MSG_ERROR("Unable to locate libconfig development headers.")])
AC_CHECK_LIB([config],[config_init],[],AC_MSG_ERROR(["Unable to locate libconfig library."]))
# Checking for PostgreSQL support
AX_LIB_POSTGRESQL([8.1])
AS_IF(
[test "x$found_postgresql" = "xno"],
[
AS_IF(
[test ! -z "$POSTGRESQL_VERSION"],
[AC_MSG_ERROR([PostgreSQL version mismatch])],
[AC_MSG_ERROR([PostgreSQL library not found])]
)
]
)
#AS_IF([test "x$found_postgresql" = "xyes"],
# [ AS_IF([test "Xfound_postgresql_req_version" = "Xno"],
# [ AC_MSG_ERROR([PostgreSQL version mismatch])])], [
# AC_MSG_ERROR([PostgreSQL library not found])])
# Checking for Zabbix headers
AX_LIB_ZABBIX
if test ! "x$found_zabbix" = "xyes"; then
AC_MSG_ERROR([Zabbix headers not found])
fi
# Checking for libdl
AC_CHECK_LIB(dl,dlopen)
# output
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT