-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
203 lines (183 loc) · 4.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
##*****************************************************************************
## $Id: configure.ac,v 1.70 2009-08-11 22:07:07 chu11 Exp $
##*****************************************************************************
## Process this file with autoconf to produce a configure script.
##*****************************************************************************
##
# Prologue.
##
AC_INIT([whatsup], [1.14.1])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([README])
AC_CANONICAL_TARGET
##
# Automake support.
##
AM_INIT_AUTOMAKE([tar-ustar subdir-objects])
AC_CONFIG_HEADERS([config/config.h])
AM_MAINTAINER_MODE
# Update this information before a public release only!
# libnodeupdown versioning
#
# If the library source code has changed at all since the last update,
# then increment c:r: c:r+1:).
#
# If any interfaces have been added, removed, or changed since the
# last update, increment current, and set revision to 0.
#
# If any interfaces have been added since the last public release,
# then increment age.
#
# If any interfaces have been removed or changed since the last public
# release, then set age to 0.
#
LIBNODEUPDOWN_CURRENT=1
LIBNODEUPDOWN_REVISION=0
LIBNODEUPDOWN_AGE=1
LIBNODEUPDOWN_VERSION_INFO=$LIBNODEUPDOWN_CURRENT:$LIBNODEUPDOWN_REVISION:$LIBNODEUPDOWN_AGE
AC_SUBST([LIBNODEUPDOWN_VERSION_INFO])
# Libnodeupdown and Nodeupdown versioning
PERLNODEUPDOWN_MAJOR=0
PERLNODEUPDOWN_MINOR=01
PERLNODEUPDOWN_VERSION=$PERLNODEUPDOWN_MAJOR.$PERLNODEUPDOWN_MINOR
AC_SUBST([PERLNODEUPDOWN_VERSION])
##
# Checks for programs.
##
AC_PROG_CC
AC_PROG_MAKE_SET
LT_INIT([dlopen])
AC_LIB_LTDL
AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(POD2MAN, pod2man)
AC_DEBUG
##
# Checks for header files.
##
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS( \
fcntl.h \
unistd.h \
getopt.h \
)
#
# Check for libs
#
AC_CHECK_LIB([expat], [XML_SetElementHandler], [have_expat=yes], [have_expat=no])
if test "x${have_expat}" = "xyes" ; then
AC_DEFINE([HAVE_LIBEXPAT],[1],[Define if you have libexpat])
EXPAT_LIBS="-lexpat"
fi
AC_SUBST(EXPAT_LIBS)
AM_CONDITIONAL(WITH_EXPAT, [test "$have_expat" = "yes"])
#
# Check for default paths
#
AC_NODEUPDOWN_CONF
AC_NODEUPDOWN_MODULE_DIR
AC_WHATSUP_MODULE_DIR
AC_PINGD_CONF
AC_PINGD_MODULE_DIR
#
# Check for perl stuff
#
AC_PERL_DESTDIR
AC_PERL_EXTENSIONS
AM_CONDITIONAL(WITH_PERL_EXTENSIONS, [test "$ac_with_perl_extensions" = "yes"])
#
# Determine Perl Install Location
#
AC_PERL_SITE_ARCH
AC_PERL_VENDOR_ARCH
if test "$ac_with_perl_site_arch" = yes && \
test "$ac_with_perl_vendor_arch" = yes ; then
AC_MSG_ERROR([cannot specify both perl site arch and vendor arch])
elif test "$ac_with_perl_site_arch" = yes; then
PERL_ARCH_INSTALL=site
elif test "$ac_with_perl_vendor_arch" = yes; then
PERL_ARCH_INSTALL=vendor
else
PERL_ARCH_INSTALL=vendor
fi
AC_SUBST(PERL_ARCH_INSTALL)
#
# Check for cerebro
#
AC_CEREBRO
AM_CONDITIONAL(WITH_CEREBRO, [test "$ac_with_cerebro" = "yes"])
AM_CONDITIONAL(WITH_CEREBRO_EVENT, [test "$ac_with_cerebro_event" = "yes"])
#
# Check for ganglia build
#
AC_GANGLIA
AM_CONDITIONAL(WITH_GANGLIA, [test "$ac_with_ganglia" = "yes"])
#
# Check for pingd build
#
AC_PINGD
AM_CONDITIONAL(WITH_PINGD, [test "$ac_with_pingd" = "yes"])
#
# Check for genders
#
AC_GENDERS
AM_CONDITIONAL(WITH_GENDERS, [test "$ac_with_genders" = "yes"])
#
# Check for hostsfile
#
AC_HOSTSFILE
AC_HOSTSFILE_PATH
AM_CONDITIONAL(WITH_HOSTSFILE, [test "$ac_with_hostsfile" = "yes"])
#
# Determine Perl section-3 man page extension
#
PERLMAN3EXT=`$PERL -MConfig -e 'print $Config{man3ext}'`
AC_SUBST([PERLMAN3EXT])
##
# Checks for typedefs, structures, and compiler characteristics.
##
AC_C_BIGENDIAN
AC_C_CONST
AC_TYPE_UID_T
##
# Checks for library functions.
##
AC_FUNC_MALLOC
AC_CHECK_FUNCS( \
strcpy \
strdup \
strchr \
strlen \
strcat \
strtok \
)
AC_CHECK_FUNCS([getopt_long])
##
# Epilogue.
##
AC_CONFIG_FILES( \
Makefile \
whatsup.spec \
src/Makefile \
src/libcommon/Makefile \
src/libexpat/Makefile \
src/libnodeupdown/Makefile \
src/whatsup/Makefile \
src/pingd/Makefile \
src/scripts/Makefile \
src/Libnodeupdown/Makefile \
src/Nodeupdown/Makefile \
man/Makefile \
etc/Makefile
man/libnodeupdown.3 \
man/nodeupdown_module.3 \
man/nodeupdown.conf.5 \
man/whatsup.1 \
man/pingd.8 \
man/pingd.conf.5 \
src/Libnodeupdown/Libnodeupdown.pm \
src/Nodeupdown/Nodeupdown.pm \
)
AC_OUTPUT