]>
Commit | Line | Data |
---|---|---|
d0191583 | 1 | ############################################################################### |
ad6254c5 | 2 | ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved. |
ec6a6fbe | 3 | ## Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. |
795ca3e5 | 4 | ## |
ad6254c5 AK |
5 | ## This copyrighted material is made available to anyone wishing to use, |
6 | ## modify, copy, or redistribute it subject to the terms and conditions | |
7 | ## of the GNU General Public License v.2. | |
795ca3e5 | 8 | ## |
ad6254c5 AK |
9 | ## You should have received a copy of the GNU General Public License |
10 | ## along with this program; if not, write to the Free Software Foundation, | |
11 | ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
795ca3e5 AK |
12 | ################################################################################ |
13 | ||
e24fb506 | 14 | AC_PREREQ(2.61) |
80992638 | 15 | ################################################################################ |
8ce0cbda | 16 | dnl -- Process this file with autoconf to produce a configure script. |
7a197a62 AK |
17 | AC_INIT |
18 | AC_CONFIG_SRCDIR([lib/device/dev-cache.h]) | |
d0191583 | 19 | AC_CONFIG_HEADERS([lib/misc/configure.h]) |
72b2cb61 | 20 | |
80992638 | 21 | ################################################################################ |
ad6254c5 | 22 | dnl -- Setup the directory where autoconf has auxilary files |
d3a356b4 | 23 | AC_CONFIG_AUX_DIR(autoconf) |
795ca3e5 | 24 | |
80992638 | 25 | ################################################################################ |
8ce0cbda | 26 | dnl -- Get system type |
7a197a62 | 27 | AC_CANONICAL_TARGET([]) |
b896caa1 AK |
28 | |
29 | case "$host_os" in | |
30 | linux*) | |
7f54ef36 | 31 | CFLAGS="$CFLAGS" |
8ce0cbda | 32 | COPTIMISE_FLAG="-O2" |
80992638 | 33 | CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" |
8106cdd5 AK |
34 | CLDWHOLEARCHIVE="-Wl,-whole-archive" |
35 | CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" | |
80992638 AK |
36 | LDDEPS="$LDDEPS .export.sym" |
37 | LDFLAGS="$LDFLAGS -Wl,--export-dynamic" | |
d0191583 | 38 | LIB_SUFFIX=so |
8106cdd5 | 39 | DEVMAPPER=yes |
1a9ea74d | 40 | ODIRECT=yes |
d0191583 | 41 | DM_IOCTLS=yes |
80992638 | 42 | SELINUX=yes |
d3c8211f | 43 | CLUSTER=internal |
f6fc418d | 44 | FSADM=yes |
d0191583 | 45 | ;; |
8106cdd5 | 46 | darwin*) |
80992638 | 47 | CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" |
8ce0cbda | 48 | COPTIMISE_FLAG="-O2" |
80992638 | 49 | CLDFLAGS="$CLDFLAGS" |
8106cdd5 AK |
50 | CLDWHOLEARCHIVE="-all_load" |
51 | CLDNOWHOLEARCHIVE= | |
d0191583 | 52 | LIB_SUFFIX=dylib |
a653923f | 53 | DEVMAPPER=yes |
1a9ea74d | 54 | ODIRECT=no |
d0191583 | 55 | DM_IOCTLS=no |
80992638 | 56 | SELINUX=no |
d3c8211f | 57 | CLUSTER=none |
d0191583 JM |
58 | FSADM=no |
59 | ;; | |
b896caa1 AK |
60 | esac |
61 | ||
80992638 | 62 | ################################################################################ |
8ce0cbda | 63 | dnl -- Checks for programs. |
162aefe8 | 64 | AC_PROG_SED |
8ce0cbda AK |
65 | AC_PROG_AWK |
66 | AC_PROG_CC | |
d0191583 JM |
67 | |
68 | dnl probably no longer needed in 2008, but... | |
69 | AC_PROG_GCC_TRADITIONAL | |
8ce0cbda AK |
70 | AC_PROG_INSTALL |
71 | AC_PROG_LN_S | |
72 | AC_PROG_MAKE_SET | |
162aefe8 | 73 | AC_PROG_MKDIR_P |
5556819a | 74 | AC_PROG_RANLIB |
8a2fc586 AK |
75 | AC_PATH_PROG(CFLOW_CMD, cflow) |
76 | AC_PATH_PROG(CSCOPE_CMD, cscope) | |
8ce0cbda AK |
77 | |
78 | ################################################################################ | |
d0191583 | 79 | dnl -- Check for header files. |
80992638 | 80 | AC_HEADER_DIRENT |
d911ec67 | 81 | AC_HEADER_MAJOR |
80992638 | 82 | AC_HEADER_STDC |
ad6254c5 AK |
83 | AC_HEADER_SYS_WAIT |
84 | AC_HEADER_TIME | |
85 | ||
d0191583 | 86 | AC_CHECK_HEADERS([locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \ |
d911ec67 AK |
87 | langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \ |
88 | sys/wait.h time.h], , | |
d0191583 | 89 | [AC_MSG_ERROR(bailing out)]) |
ad6254c5 AK |
90 | |
91 | case "$host_os" in | |
92 | linux*) | |
93 | AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;; | |
94 | darwin*) | |
95 | AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;; | |
96 | esac | |
80992638 | 97 | |
d0191583 JM |
98 | AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \ |
99 | stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \ | |
100 | sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)]) | |
101 | AC_CHECK_HEADERS(termios.h sys/statvfs.h) | |
102 | ||
80992638 | 103 | ################################################################################ |
d0191583 | 104 | dnl -- Check for typedefs, structures, and compiler characteristics. |
80992638 AK |
105 | AC_C_CONST |
106 | AC_C_INLINE | |
d0191583 | 107 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
80992638 AK |
108 | AC_TYPE_OFF_T |
109 | AC_TYPE_PID_T | |
d0191583 | 110 | AC_TYPE_SIGNAL |
80992638 | 111 | AC_TYPE_SIZE_T |
ad6254c5 | 112 | AC_TYPE_MODE_T |
d911ec67 AK |
113 | AC_TYPE_INT8_T |
114 | AC_TYPE_INT16_T | |
115 | AC_TYPE_INT32_T | |
116 | AC_TYPE_INT64_T | |
117 | AC_TYPE_SSIZE_T | |
118 | AC_TYPE_UID_T | |
119 | AC_TYPE_UINT8_T | |
120 | AC_TYPE_UINT16_T | |
121 | AC_TYPE_UINT32_T | |
122 | AC_TYPE_UINT64_T | |
7a197a62 | 123 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
ad6254c5 AK |
124 | AC_STRUCT_TM |
125 | ||
126 | ################################################################################ | |
127 | dnl -- Check for functions | |
d911ec67 AK |
128 | AC_SEARCH_LIBS([floor], [m], , [AC_MSG_ERROR(bailing out)]) |
129 | AC_CHECK_FUNCS([floor ftruncate gethostname getpagesize \ | |
130 | gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \ | |
131 | strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \ | |
132 | strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)]) | |
a0f9708e | 133 | AC_CHECK_FUNCS(siginterrupt) |
ad6254c5 AK |
134 | AC_FUNC_ALLOCA |
135 | AC_FUNC_CLOSEDIR_VOID | |
d911ec67 | 136 | AC_FUNC_CHOWN |
ad6254c5 AK |
137 | AC_FUNC_FORK |
138 | AC_FUNC_LSTAT | |
139 | AC_FUNC_MALLOC | |
140 | AC_FUNC_MEMCMP | |
141 | AC_FUNC_MMAP | |
d911ec67 | 142 | AC_FUNC_REALLOC |
ad6254c5 AK |
143 | AC_FUNC_STAT |
144 | AC_FUNC_STRTOD | |
d0191583 | 145 | AC_FUNC_VPRINTF |
80992638 | 146 | |
9c961554 MB |
147 | ################################################################################ |
148 | dnl -- Enables statically-linked tools | |
149 | AC_MSG_CHECKING(whether to use static linking) | |
150 | AC_ARG_ENABLE(static_link, | |
71082be4 ZK |
151 | AC_HELP_STRING([--enable-static_link], |
152 | [use this to link the tools to their libraries | |
153 | statically (default is dynamic linking]), | |
154 | STATIC_LINK=$enableval, STATIC_LINK=no) | |
9c961554 MB |
155 | AC_MSG_RESULT($STATIC_LINK) |
156 | ||
80992638 | 157 | ################################################################################ |
8ce0cbda | 158 | dnl -- Prefix is /usr by default, the exec_prefix default is setup later |
795ca3e5 AK |
159 | AC_PREFIX_DEFAULT(/usr) |
160 | ||
80992638 | 161 | ################################################################################ |
8ce0cbda | 162 | dnl -- Setup the ownership of the files |
ad6254c5 | 163 | AC_MSG_CHECKING(file owner) |
795ca3e5 | 164 | AC_ARG_WITH(user, |
71082be4 ZK |
165 | AC_HELP_STRING([--with-user=USER], |
166 | [set the owner of installed files [[USER=]]]), | |
167 | OWNER=$withval) | |
ad6254c5 | 168 | AC_MSG_RESULT($OWNER) |
a38df97f AK |
169 | |
170 | if test x$OWNER != x; then | |
23b059e7 | 171 | INSTALL="$INSTALL -o $OWNER" |
a38df97f | 172 | fi |
795ca3e5 | 173 | |
80992638 | 174 | ################################################################################ |
8ce0cbda | 175 | dnl -- Setup the group ownership of the files |
ad6254c5 | 176 | AC_MSG_CHECKING(group owner) |
795ca3e5 | 177 | AC_ARG_WITH(group, |
71082be4 ZK |
178 | AC_HELP_STRING([--with-group=GROUP], |
179 | [set the group owner of installed files [[GROUP=]]]), | |
180 | GROUP=$withval) | |
ad6254c5 | 181 | AC_MSG_RESULT($GROUP) |
a38df97f AK |
182 | |
183 | if test x$GROUP != x; then | |
23b059e7 | 184 | INSTALL="$INSTALL -g $GROUP" |
a38df97f | 185 | fi |
795ca3e5 | 186 | |
0782ad50 AK |
187 | ################################################################################ |
188 | dnl -- Setup device node ownership | |
189 | AC_MSG_CHECKING(device node uid) | |
190 | ||
191 | AC_ARG_WITH(device-uid, | |
71082be4 ZK |
192 | AC_HELP_STRING([--with-device-uid=UID], |
193 | [set the owner used for new device nodes [[UID=0]]]), | |
194 | DM_DEVICE_UID=$withval, DM_DEVICE_UID=0) | |
0782ad50 AK |
195 | AC_MSG_RESULT($DM_DEVICE_UID) |
196 | ||
197 | ################################################################################ | |
198 | dnl -- Setup device group ownership | |
199 | AC_MSG_CHECKING(device node gid) | |
200 | ||
201 | AC_ARG_WITH(device-gid, | |
71082be4 ZK |
202 | AC_HELP_STRING([--with-device-gid=GID], |
203 | [set the group used for new device nodes [[GID=0]]]), | |
204 | DM_DEVICE_GID=$withval, DM_DEVICE_GID=0) | |
0782ad50 AK |
205 | AC_MSG_RESULT($DM_DEVICE_GID) |
206 | ||
f6fc418d AK |
207 | ################################################################################ |
208 | dnl -- Setup device mode | |
209 | AC_MSG_CHECKING(device node mode) | |
210 | ||
211 | AC_ARG_WITH(device-mode, | |
71082be4 ZK |
212 | AC_HELP_STRING([--with-device-mode=MODE], |
213 | [set the mode used for new device nodes [[MODE=0600]]]), | |
214 | DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600) | |
f6fc418d AK |
215 | AC_MSG_RESULT($DM_DEVICE_MODE) |
216 | ||
80992638 | 217 | ################################################################################ |
7d1552c9 | 218 | dnl -- LVM1 tool fallback option |
ad6254c5 | 219 | AC_MSG_CHECKING(whether to enable lvm1 fallback) |
71082be4 ZK |
220 | AC_ARG_ENABLE(lvm1_fallback, |
221 | AC_HELP_STRING([--enable-lvm1_fallback], | |
222 | [use this to fall back and use LVM1 binaries if | |
223 | device-mapper is missing from the kernel]), | |
224 | LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no) | |
ad6254c5 | 225 | AC_MSG_RESULT($LVM1_FALLBACK) |
7d1552c9 AK |
226 | |
227 | if test x$LVM1_FALLBACK = xyes; then | |
72b2cb61 | 228 | AC_DEFINE([LVM1_FALLBACK], 1, [Define to 1 if 'lvm' should fall back to using LVM1 binaries if device-mapper is missing from the kernel]) |
7d1552c9 AK |
229 | fi |
230 | ||
80992638 | 231 | ################################################################################ |
5a52dca9 | 232 | dnl -- format1 inclusion type |
ad6254c5 | 233 | AC_MSG_CHECKING(whether to include support for lvm1 metadata) |
5a52dca9 | 234 | AC_ARG_WITH(lvm1, |
71082be4 ZK |
235 | AC_HELP_STRING([--with-lvm1=TYPE], |
236 | [LVM1 metadata support: internal/shared/none | |
237 | [[TYPE=internal]]]), | |
238 | LVM1=$withval, LVM1=internal) | |
ad6254c5 | 239 | AC_MSG_RESULT($LVM1) |
5a52dca9 AK |
240 | |
241 | if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]]; | |
242 | then AC_MSG_ERROR( | |
243 | --with-lvm1 parameter invalid | |
244 | ) | |
5a52dca9 AK |
245 | fi; |
246 | ||
b896caa1 | 247 | if test x$LVM1 = xinternal; then |
72b2cb61 | 248 | AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.]) |
b896caa1 AK |
249 | fi |
250 | ||
80992638 | 251 | ################################################################################ |
d8ac0fbc | 252 | dnl -- format_pool inclusion type |
ad6254c5 | 253 | AC_MSG_CHECKING(whether to include support for GFS pool metadata) |
d8ac0fbc | 254 | AC_ARG_WITH(pool, |
71082be4 ZK |
255 | AC_HELP_STRING([--with-pool=TYPE], |
256 | [GFS pool read-only support: internal/shared/none | |
257 | [[TYPE=internal]]]), | |
258 | POOL=$withval, POOL=internal) | |
ad6254c5 | 259 | AC_MSG_RESULT($POOL) |
d8ac0fbc AK |
260 | |
261 | if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]]; | |
262 | then AC_MSG_ERROR( | |
263 | --with-pool parameter invalid | |
264 | ) | |
d8ac0fbc AK |
265 | fi; |
266 | ||
267 | if test x$POOL = xinternal; then | |
72b2cb61 | 268 | AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.]) |
d8ac0fbc AK |
269 | fi |
270 | ||
80992638 | 271 | ################################################################################ |
d3c8211f | 272 | dnl -- cluster_locking inclusion type |
ad6254c5 | 273 | AC_MSG_CHECKING(whether to include support for cluster locking) |
d3c8211f | 274 | AC_ARG_WITH(cluster, |
71082be4 ZK |
275 | AC_HELP_STRING([--with-cluster=TYPE], |
276 | [cluster LVM locking support: internal/shared/none | |
277 | [[TYPE=internal]]]), | |
278 | CLUSTER=$withval) | |
ad6254c5 | 279 | AC_MSG_RESULT($CLUSTER) |
d3c8211f AK |
280 | |
281 | if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]]; | |
282 | then AC_MSG_ERROR( | |
283 | --with-cluster parameter invalid | |
284 | ) | |
d3c8211f AK |
285 | fi; |
286 | ||
287 | if test x$CLUSTER = xinternal; then | |
72b2cb61 | 288 | AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.]) |
d3c8211f | 289 | fi |
d8ac0fbc | 290 | |
80992638 | 291 | ################################################################################ |
4922197a | 292 | dnl -- snapshots inclusion type |
ad6254c5 | 293 | AC_MSG_CHECKING(whether to include snapshots) |
4922197a | 294 | AC_ARG_WITH(snapshots, |
71082be4 ZK |
295 | AC_HELP_STRING([--with-snapshots=TYPE], |
296 | [snapshot support: internal/shared/none | |
297 | [[TYPE=internal]]]), | |
298 | SNAPSHOTS=$withval, SNAPSHOTS=internal) | |
ad6254c5 | 299 | AC_MSG_RESULT($SNAPSHOTS) |
4922197a AK |
300 | |
301 | if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]]; | |
302 | then AC_MSG_ERROR( | |
303 | --with-snapshots parameter invalid | |
304 | ) | |
4922197a AK |
305 | fi; |
306 | ||
307 | if test x$SNAPSHOTS = xinternal; then | |
72b2cb61 | 308 | AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.]) |
4922197a AK |
309 | fi |
310 | ||
80992638 | 311 | ################################################################################ |
4922197a | 312 | dnl -- mirrors inclusion type |
ad6254c5 | 313 | AC_MSG_CHECKING(whether to include mirrors) |
4922197a | 314 | AC_ARG_WITH(mirrors, |
71082be4 ZK |
315 | AC_HELP_STRING([--with-mirrors=TYPE], |
316 | [mirror support: internal/shared/none | |
317 | [[TYPE=internal]]]), | |
318 | MIRRORS=$withval, MIRRORS=internal) | |
ad6254c5 | 319 | AC_MSG_RESULT($MIRRORS) |
4922197a AK |
320 | |
321 | if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]]; | |
322 | then AC_MSG_ERROR( | |
323 | --with-mirrors parameter invalid | |
324 | ) | |
4922197a AK |
325 | fi; |
326 | ||
327 | if test x$MIRRORS = xinternal; then | |
72b2cb61 | 328 | AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.]) |
4922197a AK |
329 | fi |
330 | ||
8fea97b7 ZK |
331 | ################################################################################ |
332 | dnl -- asynchronous volume replicator inclusion type | |
333 | AC_MSG_CHECKING(whether to include replicators) | |
71082be4 ZK |
334 | AC_ARG_WITH(replicators, |
335 | AC_HELP_STRING([--with-replicators=TYPE], | |
336 | [replicator support: internal/shared/none | |
337 | [[TYPE=none]]]), | |
338 | REPLICATORS=$withval, REPLICATORS=none) | |
8fea97b7 ZK |
339 | AC_MSG_RESULT($REPLICATORS) |
340 | ||
341 | case "$REPLICATORS" in | |
342 | none|shared) ;; | |
343 | internal) AC_DEFINE([REPLICATOR_INTERNAL], 1, | |
344 | [Define to 1 to include built-in support for replicators.]) ;; | |
345 | *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;; | |
346 | esac | |
347 | ||
80992638 | 348 | ################################################################################ |
1b523347 | 349 | dnl -- Disable readline |
ad6254c5 | 350 | AC_MSG_CHECKING(whether to enable readline) |
2c189a57 | 351 | AC_ARG_ENABLE([readline], |
71082be4 ZK |
352 | AC_HELP_STRING([--disable-readline], [disable readline support]), |
353 | READLINE=$enableval, READLINE=maybe) | |
ad6254c5 | 354 | AC_MSG_RESULT($READLINE) |
795ca3e5 | 355 | |
8b1a3214 AK |
356 | ################################################################################ |
357 | dnl -- Disable realtime clock support | |
358 | AC_MSG_CHECKING(whether to enable realtime support) | |
71082be4 ZK |
359 | AC_ARG_ENABLE(realtime, |
360 | AC_HELP_STRING([--enable-realtime], [enable realtime clock support]), | |
361 | REALTIME=$enableval) | |
8b1a3214 AK |
362 | AC_MSG_RESULT($REALTIME) |
363 | ||
90c80887 AK |
364 | ################################################################################ |
365 | dnl -- Init pkg-config with dummy invokation: | |
366 | dnl -- this is required because PKG_CHECK_MODULES macro is expanded | |
367 | dnl -- to initialize the pkg-config environment only at the first invokation, | |
368 | dnl -- that would be conditional in this configure.in. | |
369 | pkg_config_init() { | |
370 | PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [], | |
371 | [AC_MSG_RESULT([pkg-config initialized])]) | |
372 | PKGCONFIG_INIT=1 | |
373 | } | |
374 | ||
80992638 | 375 | ################################################################################ |
8ce0cbda | 376 | dnl -- Build cluster LVM daemon |
ad6254c5 | 377 | AC_MSG_CHECKING(whether to build cluster LVM daemon) |
a266258f | 378 | AC_ARG_WITH(clvmd, |
71082be4 | 379 | [ --with-clvmd=TYPE build cluster LVM Daemon |
8c222979 | 380 | The following cluster manager combinations are valid: |
a946372e AK |
381 | * cman,gulm (RHEL4 or equivalent) |
382 | * cman (RHEL5 or equivalent) | |
383 | * cman,corosync,openais (or selection of them) | |
649c4507 | 384 | * singlenode (localhost only) |
a946372e AK |
385 | * all (autodetect) |
386 | * none (disable build) | |
71082be4 ZK |
387 | [[TYPE=none]]], |
388 | CLVMD=$withval, CLVMD=none) | |
a266258f | 389 | if test x$CLVMD = xyes; then |
5c7fc7c4 | 390 | CLVMD=all |
b1098701 | 391 | fi |
ad6254c5 | 392 | AC_MSG_RESULT($CLVMD) |
80992638 | 393 | |
8ce0cbda | 394 | dnl -- If clvmd enabled without cluster locking, automagically include it |
a266258f | 395 | if test x$CLVMD != xnone && test x$CLUSTER = xnone; then |
d3c8211f AK |
396 | CLUSTER=internal |
397 | fi | |
d3c8211f | 398 | |
90c80887 AK |
399 | dnl -- init pkgconfig if required |
400 | if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then | |
401 | pkg_config_init | |
402 | fi | |
403 | ||
404 | ||
a946372e AK |
405 | dnl -- define build types |
406 | if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then | |
407 | BUILDGULM=yes | |
408 | fi | |
409 | if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then | |
410 | BUILDCOROSYNC=yes | |
411 | fi | |
412 | if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then | |
413 | BUILDOPENAIS=yes | |
414 | fi | |
415 | if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then | |
416 | BUILDCMAN=yes | |
417 | fi | |
418 | ||
419 | dnl -- sanity check around user selection | |
420 | if test x$BUILDGULM = xyes; then | |
421 | if test x$BUILDCOROSYNC = xyes || \ | |
422 | test x$BUILDOPENAIS = xyes; then | |
423 | AC_MSG_ERROR([requested clvmd configuration is not valid]) | |
424 | fi | |
425 | fi | |
426 | ||
a946372e AK |
427 | dnl -- define a soft bailout if we are autodetecting |
428 | soft_bailout() { | |
429 | NOTFOUND=1 | |
430 | } | |
431 | ||
432 | hard_bailout() { | |
433 | AC_MSG_ERROR([bailing out]) | |
434 | } | |
435 | ||
436 | dnl -- if clvmd=all then set soft_bailout (we don't want to error) | |
437 | dnl -- and set all builds to yes. We need to do this here | |
438 | dnl -- to skip the gulm + openais|corosync sanity check above. | |
439 | if test x$CLVMD = xall; then | |
440 | bailout=soft_bailout | |
441 | BUILDGULM=yes | |
442 | BUILDCMAN=yes | |
443 | BUILDCOROSYNC=yes | |
444 | BUILDOPENAIS=yes | |
445 | else | |
446 | bailout=hard_bailout | |
447 | fi | |
448 | ||
449 | dnl -- helper macro to check libs without adding them to LIBS | |
450 | check_lib_no_libs() { | |
451 | lib_no_libs_arg1=$1 | |
452 | shift | |
453 | lib_no_libs_arg2=$1 | |
454 | shift | |
455 | lib_no_libs_args=$@ | |
456 | AC_CHECK_LIB([$lib_no_libs_arg1], | |
457 | [$lib_no_libs_arg2],, | |
458 | [$bailout], | |
459 | [$lib_no_libs_args]) | |
460 | LIBS=$ac_check_lib_save_LIBS | |
461 | } | |
462 | ||
463 | dnl -- Look for gulm libraries if required. | |
464 | if test x$BUILDGULM = xyes; then | |
465 | PKG_CHECK_MODULES(CCS, libccs, [HAVE_CCS=yes], | |
466 | [NOTFOUND=0 | |
467 | AC_CHECK_HEADERS(ccs.h,,$bailout) | |
468 | check_lib_no_libs ccs ccs_connect | |
469 | if test $NOTFOUND = 0; then | |
470 | AC_MSG_RESULT([no pkg for libccs, using -lccs]) | |
471 | CCS_LIBS="-lccs" | |
472 | HAVE_CCS=yes | |
473 | fi]) | |
474 | PKG_CHECK_MODULES(GULM, libgulm, [HAVE_GULM=yes], | |
475 | [NOTFOUND=0 | |
476 | AC_CHECK_HEADERS(libgulm.h,,$bailout) | |
477 | check_lib_no_libs gulm lg_core_login | |
478 | if test $NOTFOUND = 0; then | |
479 | AC_MSG_RESULT([no pkg for libgulm, using -lgulm]) | |
480 | GULM_LIBS="-lgulm" | |
481 | HAVE_GULM=yes | |
482 | fi]) | |
483 | fi | |
484 | ||
485 | dnl -- Look for cman libraries if required. | |
486 | if test x$BUILDCMAN = xyes; then | |
487 | PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes], | |
488 | [NOTFOUND=0 | |
489 | AC_CHECK_HEADERS(libcman.h,,$bailout) | |
490 | check_lib_no_libs cman cman_init | |
491 | if test $NOTFOUND = 0; then | |
492 | AC_MSG_RESULT([no pkg for libcman, using -lcman]) | |
493 | CMAN_LIBS="-lcman" | |
494 | HAVE_CMAN=yes | |
495 | fi]) | |
496 | CHECKCONFDB=yes | |
497 | CHECKDLM=yes | |
498 | fi | |
499 | ||
500 | dnl -- Look for corosync that's required also for openais build | |
501 | dnl -- only enough recent version of corosync ship pkg-config files. | |
502 | dnl -- We can safely rely on that to detect the correct bits. | |
503 | if test x$BUILDCOROSYNC = xyes || \ | |
504 | test x$BUILDOPENAIS = xyes; then | |
505 | PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout) | |
506 | CHECKCONFDB=yes | |
507 | fi | |
508 | ||
edf47283 | 509 | dnl -- Look for corosync libraries if required. |
a946372e AK |
510 | if test x$BUILDCOROSYNC = xyes; then |
511 | PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout) | |
512 | CHECKCPG=yes | |
513 | CHECKDLM=yes | |
514 | fi | |
515 | ||
516 | dnl -- Look for openais libraries if required. | |
517 | if test x$BUILDOPENAIS = xyes; then | |
518 | PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout) | |
519 | CHECKCPG=yes | |
520 | fi | |
521 | ||
522 | dnl -- Below are checks for libraries common to more than one build. | |
523 | ||
524 | dnl -- Check confdb library. | |
525 | dnl -- mandatory for corosync build. | |
526 | dnl -- optional for openais/cman build. | |
527 | ||
528 | if test x$CHECKCONFDB = xyes; then | |
529 | PKG_CHECK_MODULES(CONFDB, libconfdb, | |
530 | [HAVE_CONFDB=yes], | |
531 | [HAVE_CONFDB=no]) | |
532 | ||
533 | AC_CHECK_HEADERS(corosync/confdb.h, | |
534 | [HAVE_CONFDB_H=yes], | |
535 | [HAVE_CONFDB_H=no]) | |
536 | ||
537 | if test x$HAVE_CONFDB != xyes && \ | |
538 | test x$HAVE_CONFDB_H = xyes; then | |
539 | check_lib_no_libs confdb confdb_initialize | |
540 | AC_MSG_RESULT([no pkg for confdb, using -lconfdb]) | |
541 | CONFDB_LIBS="-lconfdb" | |
542 | HAVE_CONFDB=yes | |
543 | fi | |
544 | ||
545 | if test x$BUILDCOROSYNC = xyes && \ | |
546 | test x$HAVE_CONFDB != xyes && | |
547 | test x$CLVMD != xall; then | |
548 | AC_MSG_ERROR([bailing out... confdb library is required]) | |
549 | fi | |
550 | fi | |
551 | ||
552 | dnl -- Check cpg library. | |
553 | if test x$CHECKCPG = xyes; then | |
554 | PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout) | |
555 | fi | |
556 | ||
557 | dnl -- Check dlm library. | |
558 | if test x$CHECKDLM = xyes; then | |
559 | PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes], | |
560 | [NOTFOUND=0 | |
561 | AC_CHECK_HEADERS(libdlm.h,,$bailout) | |
562 | check_lib_no_libs dlm dlm_lock -lpthread | |
563 | if test $NOTFOUND = 0; then | |
564 | AC_MSG_RESULT([no pkg for libdlm, using -ldlm]) | |
565 | DLM_LIBS="-ldlm -lpthread" | |
566 | HAVE_DLM=yes | |
567 | fi]) | |
568 | fi | |
569 | ||
570 | dnl -- If we are autodetecting, we need to re-create | |
571 | dnl -- the depedencies checks and set a proper CLVMD. | |
572 | if test x$CLVMD = xall; then | |
8c222979 | 573 | CLVMD=none |
a946372e AK |
574 | if test x$HAVE_CCS = xyes && \ |
575 | test x$HAVE_GULM = xyes; then | |
8c222979 FDN |
576 | AC_MSG_RESULT([Enabling clvmd gulm cluster manager]) |
577 | CLVMD="$CLVMD,gulm" | |
a946372e AK |
578 | fi |
579 | if test x$HAVE_CMAN = xyes && \ | |
580 | test x$HAVE_DLM = xyes; then | |
8c222979 FDN |
581 | AC_MSG_RESULT([Enabling clvmd cman cluster manager]) |
582 | CLVMD="$CLVMD,cman" | |
a946372e AK |
583 | fi |
584 | if test x$HAVE_COROSYNC = xyes && \ | |
585 | test x$HAVE_QUORUM = xyes && \ | |
586 | test x$HAVE_CPG = xyes && \ | |
587 | test x$HAVE_DLM = xyes && \ | |
588 | test x$HAVE_CONFDB = xyes; then | |
8c222979 FDN |
589 | AC_MSG_RESULT([Enabling clvmd corosync cluster manager]) |
590 | CLVMD="$CLVMD,corosync" | |
a946372e AK |
591 | fi |
592 | if test x$HAVE_COROSYNC = xyes && \ | |
593 | test x$HAVE_CPG = xyes && \ | |
594 | test x$HAVE_SALCK = xyes; then | |
8c222979 FDN |
595 | AC_MSG_RESULT([Enabling clvmd openais cluster manager]) |
596 | CLVMD="$CLVMD,openais" | |
597 | fi | |
598 | if test x$CLVMD = xnone; then | |
599 | AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.]) | |
a946372e | 600 | fi |
edf47283 AK |
601 | fi |
602 | ||
8c4e8a18 FDN |
603 | ################################################################################ |
604 | dnl -- clvmd pidfile | |
605 | if test "x$CLVMD" != xnone; then | |
606 | AC_ARG_WITH(clvmd-pidfile, | |
607 | AC_HELP_STRING([--with-clvmd-pidfile=PATH], | |
608 | [clvmd pidfile [[/var/run/clvmd.pid]]]), | |
609 | CLVMD_PIDFILE=$withval, | |
610 | CLVMD_PIDFILE="/var/run/clvmd.pid") | |
611 | AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"], | |
612 | [Path to clvmd pidfile.]) | |
613 | fi | |
614 | ||
3c14bcca | 615 | ################################################################################ |
66fd4529 AK |
616 | dnl -- Build cluster mirror log daemon |
617 | AC_MSG_CHECKING(whether to build cluster mirror log daemon) | |
71082be4 ZK |
618 | AC_ARG_ENABLE(cmirrord, |
619 | AC_HELP_STRING([--enable-cmirrord], | |
620 | [enable the cluster mirror log daemon]), | |
621 | CMIRRORD=$enableval, CMIRRORD=no) | |
66fd4529 | 622 | AC_MSG_RESULT($CMIRRORD) |
3c14bcca | 623 | |
66fd4529 AK |
624 | BUILD_CMIRRORD=$CMIRRORD |
625 | ||
626 | ################################################################################ | |
627 | dnl -- cmirrord pidfile | |
66fd4529 AK |
628 | if test "x$BUILD_CMIRRORD" = xyes; then |
629 | AC_ARG_WITH(cmirrord-pidfile, | |
71082be4 ZK |
630 | AC_HELP_STRING([--with-cmirrord-pidfile=PATH], |
631 | [cmirrord pidfile [[/var/run/cmirrord.pid]]]), | |
632 | CMIRRORD_PIDFILE=$withval, | |
633 | CMIRRORD_PIDFILE="/var/run/cmirrord.pid") | |
634 | AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"], | |
635 | [Path to cmirrord pidfile.]) | |
66fd4529 AK |
636 | fi |
637 | ||
638 | ################################################################################ | |
3c14bcca | 639 | dnl -- Look for corosync libraries if required. |
66fd4529 | 640 | if [[ "x$BUILD_CMIRRORD" = xyes ]]; then |
90c80887 AK |
641 | dnl -- init pkgconfig if required |
642 | if test x$PKGCONFIG_INIT != x1; then | |
643 | pkg_config_init | |
644 | fi | |
645 | PKG_CHECK_MODULES(SACKPT, libSaCkpt) | |
646 | if test x$HAVE_CPG != xyes; then | |
647 | PKG_CHECK_MODULES(CPG, libcpg) | |
648 | fi | |
3c14bcca JEB |
649 | fi |
650 | ||
80992638 | 651 | ################################################################################ |
8ce0cbda | 652 | dnl -- Enable debugging |
ad6254c5 | 653 | AC_MSG_CHECKING(whether to enable debugging) |
71082be4 ZK |
654 | AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging]), |
655 | DEBUG=$enableval, DEBUG=no) | |
ad6254c5 | 656 | AC_MSG_RESULT($DEBUG) |
8ef2b021 | 657 | |
8ce0cbda AK |
658 | dnl -- Normally turn off optimisation for debug builds |
659 | if test x$DEBUG = xyes; then | |
660 | COPTIMISE_FLAG= | |
8a2fc586 AK |
661 | else |
662 | CSCOPE_CMD= | |
8ce0cbda AK |
663 | fi |
664 | ||
665 | ################################################################################ | |
666 | dnl -- Override optimisation | |
ad6254c5 | 667 | AC_MSG_CHECKING(for C optimisation flag) |
8ce0cbda | 668 | AC_ARG_WITH(optimisation, |
71082be4 ZK |
669 | AC_HELP_STRING([--with-optimisation=OPT], |
670 | [C optimisation flag [[OPT=-O2]]]), | |
671 | COPTIMISE_FLAG=$withval) | |
ad6254c5 | 672 | AC_MSG_RESULT($COPTIMISE_FLAG) |
8ce0cbda | 673 | |
fddafd51 ZK |
674 | ################################################################################ |
675 | dnl -- Enable profiling | |
5556819a | 676 | AC_MSG_CHECKING(whether to gather gcov profiling data) |
fddafd51 | 677 | AC_ARG_ENABLE(profiling, |
71082be4 ZK |
678 | AC_HELP_STRING(--enable-profiling, [gather gcov profiling data]), |
679 | PROFILING=$enableval, PROFILING=no) | |
5556819a AK |
680 | AC_MSG_RESULT($PROFILING) |
681 | ||
682 | if test "x$PROFILING" = xyes; then | |
683 | COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage" | |
fd4728e1 ZK |
684 | AC_PATH_PROG(LCOV, lcov) |
685 | AC_PATH_PROG(GENHTML, genhtml) | |
686 | if test -z "$LCOV" -o -z "$GENHTML"; then | |
b145d876 ZK |
687 | AC_MSG_ERROR([lcov and genhtml are required for profiling]) |
688 | fi | |
fd4728e1 ZK |
689 | AC_PATH_PROG(GENPNG, genpng) |
690 | if test -n "$GENPNG"; then | |
691 | AC_MSG_CHECKING([whether $GENPNG has all required modules]) | |
692 | if $GENPNG --help > /dev/null 2>&1 ; then | |
693 | AC_MSG_RESULT(ok) | |
694 | GENHTML="$GENHTML --frames" | |
695 | else | |
696 | AC_MSG_RESULT(not supported) | |
697 | AC_MSG_WARN([GD.pm perl module is not installed]) | |
698 | GENPNG= | |
699 | fi | |
700 | fi | |
5556819a | 701 | fi |
fddafd51 | 702 | |
80992638 | 703 | ################################################################################ |
8ce0cbda | 704 | dnl -- Disable devmapper |
ad6254c5 | 705 | AC_MSG_CHECKING(whether to use device-mapper) |
71082be4 ZK |
706 | AC_ARG_ENABLE(devmapper, |
707 | AC_HELP_STRING([--disable-devmapper], | |
708 | [disable LVM2 device-mapper interaction]), | |
709 | DEVMAPPER=$enableval) | |
ad6254c5 | 710 | AC_MSG_RESULT($DEVMAPPER) |
199e490e | 711 | |
b896caa1 | 712 | if test x$DEVMAPPER = xyes; then |
f6fc418d | 713 | AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.]) |
b896caa1 AK |
714 | fi |
715 | ||
5d518f1f AK |
716 | ################################################################################ |
717 | dnl -- Enable udev synchronisation | |
718 | AC_MSG_CHECKING(whether to enable synchronisation with udev processing) | |
71082be4 ZK |
719 | AC_ARG_ENABLE(udev_sync, |
720 | AC_HELP_STRING([--enable-udev_sync], | |
721 | [enable synchronisation with udev processing]), | |
722 | UDEV_SYNC=$enableval, UDEV_SYNC=no) | |
5d518f1f AK |
723 | AC_MSG_RESULT($UDEV_SYNC) |
724 | ||
725 | if test x$UDEV_SYNC = xyes; then | |
f7f0854e ZK |
726 | AC_CHECK_LIB(udev, udev_queue_get_udev_is_active, |
727 | [UDEV_PC="libudev"; UDEV_LIBS="-ludev"], | |
728 | [AC_MSG_ERROR([bailing out... libudev library is required])]) | |
5d518f1f AK |
729 | AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) |
730 | fi | |
731 | ||
732 | dnl -- Enable udev rules | |
733 | AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation) | |
71082be4 ZK |
734 | AC_ARG_ENABLE(udev_rules, |
735 | AC_HELP_STRING([--enable-udev_rules], | |
736 | [install rule files needed for udev synchronisation]), | |
737 | UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC) | |
5d518f1f AK |
738 | AC_MSG_RESULT($UDEV_RULES) |
739 | ||
f6fc418d AK |
740 | ################################################################################ |
741 | dnl -- Compatibility mode | |
71082be4 ZK |
742 | AC_ARG_ENABLE(compat, |
743 | AC_HELP_STRING([--enable-compat], | |
744 | [enable support for old device-mapper versions]), | |
745 | DM_COMPAT=$enableval, DM_COMPAT=no) | |
f6fc418d | 746 | |
95eaa683 AK |
747 | ################################################################################ |
748 | dnl -- Compatible units suffix mode | |
749 | AC_ARG_ENABLE(units-compat, | |
71082be4 ZK |
750 | AC_HELP_STRING([--enable-units-compat], |
751 | [enable output compatibility with old versions that | |
752 | that do not use KiB-style unit suffixes]), | |
753 | UNITS_COMPAT=$enableval, UNITS_COMPAT=no) | |
95eaa683 AK |
754 | |
755 | if test x$UNITS_COMPAT = xyes; then | |
756 | AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.]) | |
757 | fi | |
758 | ||
f6fc418d AK |
759 | ################################################################################ |
760 | dnl -- Disable ioctl | |
71082be4 ZK |
761 | AC_ARG_ENABLE(ioctl, |
762 | AC_HELP_STRING([--disable-driver], | |
763 | [disable calls to device-mapper in the kernel]), | |
764 | DM_IOCTLS=$enableval) | |
f6fc418d | 765 | |
80992638 | 766 | ################################################################################ |
8ce0cbda | 767 | dnl -- Disable O_DIRECT |
ad6254c5 | 768 | AC_MSG_CHECKING(whether to enable O_DIRECT) |
71082be4 ZK |
769 | AC_ARG_ENABLE(o_direct, |
770 | AC_HELP_STRING([--disable-o_direct], [disable O_DIRECT]), | |
771 | ODIRECT=$enableval) | |
ad6254c5 | 772 | AC_MSG_RESULT($ODIRECT) |
2dc95e1c AK |
773 | |
774 | if test x$ODIRECT = xyes; then | |
72b2cb61 | 775 | AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.]) |
2dc95e1c AK |
776 | fi |
777 | ||
572fefeb AK |
778 | ################################################################################ |
779 | dnl -- Enable liblvm2app.so | |
780 | AC_MSG_CHECKING(whether to build liblvm2app.so application library) | |
781 | AC_ARG_ENABLE(applib, | |
71082be4 ZK |
782 | AC_HELP_STRING([--enable-applib], [build application library]), |
783 | APPLIB=$enableval, APPLIB=no) | |
572fefeb AK |
784 | AC_MSG_RESULT($APPLIB) |
785 | AC_SUBST([LVM2APP_LIB]) | |
786 | test x$APPLIB = xyes \ | |
787 | && LVM2APP_LIB=-llvm2app \ | |
788 | || LVM2APP_LIB= | |
789 | ||
80992638 | 790 | ################################################################################ |
8ce0cbda | 791 | dnl -- Enable cmdlib |
ad6254c5 | 792 | AC_MSG_CHECKING(whether to compile liblvm2cmd.so) |
71082be4 ZK |
793 | AC_ARG_ENABLE(cmdlib, |
794 | AC_HELP_STRING([--enable-cmdlib], [build shared command library]), | |
795 | CMDLIB=$enableval, CMDLIB=no) | |
ad6254c5 | 796 | AC_MSG_RESULT($CMDLIB) |
aa4d1e31 | 797 | AC_SUBST([LVM2CMD_LIB]) |
2a9a80c9 | 798 | test x$CMDLIB = xyes \ |
aa4d1e31 JM |
799 | && LVM2CMD_LIB=-llvm2cmd \ |
800 | || LVM2CMD_LIB= | |
8106cdd5 | 801 | |
f6fc418d AK |
802 | ################################################################################ |
803 | dnl -- Enable pkg-config | |
71082be4 ZK |
804 | AC_ARG_ENABLE(pkgconfig, |
805 | AC_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]), | |
806 | PKGCONFIG=$enableval, PKGCONFIG=no) | |
2a9a80c9 | 807 | |
23b059e7 ZK |
808 | ################################################################################ |
809 | dnl -- Enable installation of writable files by user | |
71082be4 ZK |
810 | AC_ARG_ENABLE(write_install, |
811 | AC_HELP_STRING([--enable-write_install], | |
812 | [install user writable files]), | |
813 | WRITE_INSTALL=$enableval, WRITE_INSTALL=no) | |
23b059e7 | 814 | |
80992638 | 815 | ################################################################################ |
8ce0cbda | 816 | dnl -- Enable fsadm |
1995c9ff | 817 | AC_MSG_CHECKING(whether to install fsadm) |
71082be4 ZK |
818 | AC_ARG_ENABLE(fsadm, AC_HELP_STRING([--disable-fsadm], [disable fsadm]), |
819 | FSADM=$enableval) | |
ad6254c5 | 820 | AC_MSG_RESULT($FSADM) |
809fae91 | 821 | |
06f62ad1 AK |
822 | ################################################################################ |
823 | dnl -- enable dmeventd handling | |
824 | AC_MSG_CHECKING(whether to use dmeventd) | |
71082be4 ZK |
825 | AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd], |
826 | [enable the device-mapper event daemon]), | |
827 | DMEVENTD=$enableval) | |
06f62ad1 AK |
828 | AC_MSG_RESULT($DMEVENTD) |
829 | ||
f6fc418d AK |
830 | BUILD_DMEVENTD=$DMEVENTD |
831 | ||
06f62ad1 | 832 | dnl -- dmeventd currently requires internal mirror support |
2a9a80c9 PR |
833 | if test x$DMEVENTD = xyes; then |
834 | if test x$MIRRORS != xinternal; then | |
835 | AC_MSG_ERROR( | |
836 | --enable-dmeventd currently requires --with-mirrors=internal | |
837 | ) | |
838 | fi | |
839 | if test x$CMDLIB = xno; then | |
840 | AC_MSG_ERROR( | |
841 | --enable-dmeventd requires --enable-cmdlib to be used as well | |
842 | ) | |
843 | fi | |
06f62ad1 AK |
844 | fi |
845 | ||
15d91f5a | 846 | if test x$DMEVENTD = xyes; then |
72b2cb61 | 847 | AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.]) |
15d91f5a | 848 | fi |
f6fc418d AK |
849 | |
850 | ################################################################################ | |
851 | dnl -- getline included in recent libc | |
852 | ||
853 | AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1, | |
854 | [Define to 1 if getline is available.])) | |
855 | ||
856 | ################################################################################ | |
857 | dnl -- canonicalize_file_name included in recent libc | |
858 | ||
859 | AC_CHECK_LIB(c, canonicalize_file_name, | |
860 | AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1, | |
861 | [Define to 1 if canonicalize_file_name is available.])) | |
862 | ||
80992638 | 863 | ################################################################################ |
d0191583 | 864 | dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin |
795ca3e5 AK |
865 | if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; |
866 | then exec_prefix=""; | |
867 | fi; | |
868 | ||
80992638 | 869 | ################################################################################ |
8ce0cbda | 870 | dnl -- Check for dlopen |
19a2c6e0 | 871 | AC_CHECK_LIB(dl, dlopen, [ |
72b2cb61 | 872 | AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.]) |
19a2c6e0 ZK |
873 | DL_LIBS="-ldl" |
874 | HAVE_LIBDL=yes ], [ | |
875 | DL_LIBS= | |
876 | HAVE_LIBDL=no ]) | |
26e7f2e0 | 877 | |
80992638 | 878 | ################################################################################ |
8ce0cbda | 879 | dnl -- Check for shared/static conflicts |
80992638 AK |
880 | if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \ |
881 | -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ | |
4922197a | 882 | \) -a "x$STATIC_LINK" = xyes ]]; |
d68a82ec | 883 | then AC_MSG_ERROR( |
036f273a | 884 | Features cannot be 'shared' when building statically |
d68a82ec | 885 | ) |
036f273a AK |
886 | fi |
887 | ||
f30875db ZK |
888 | ################################################################################ |
889 | if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then | |
890 | AC_CHECK_LIB([pthread], [pthread_mutex_lock], | |
891 | [PTHREAD_LIBS="-lpthread"], hard_bailout) | |
892 | fi | |
893 | ||
d0191583 JM |
894 | ################################################################################ |
895 | dnl -- Disable selinux | |
896 | AC_MSG_CHECKING(whether to enable selinux support) | |
71082be4 ZK |
897 | AC_ARG_ENABLE(selinux, |
898 | AC_HELP_STRING([--disable-selinux], [disable selinux support]), | |
899 | SELINUX=$enableval) | |
d0191583 JM |
900 | AC_MSG_RESULT($SELINUX) |
901 | ||
80992638 | 902 | ################################################################################ |
8a2fc586 | 903 | dnl -- Check for selinux |
80992638 | 904 | if test x$SELINUX = xyes; then |
f8f6ec92 ZK |
905 | AC_CHECK_LIB([sepol], [sepol_check_context], [ |
906 | AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) | |
907 | SELINUX_LIBS="-lsepol"]) | |
8a2fc586 | 908 | |
f8f6ec92 ZK |
909 | AC_CHECK_LIB([selinux], [is_selinux_enabled], [ |
910 | AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) | |
72b2cb61 | 911 | AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) |
e1b8a236 | 912 | SELINUX_LIBS="-lselinux $SELINUX_LIBS" |
f7f0854e | 913 | SELINUX_PC="libselinux" |
f8f6ec92 | 914 | HAVE_SELINUX=yes ], [ |
ad6254c5 | 915 | AC_MSG_WARN(Disabling selinux) |
f8f6ec92 | 916 | SELINUX_LIBS= |
f7f0854e | 917 | SELINUX_PC= |
f8f6ec92 | 918 | HAVE_SELINUX=no ]) |
036f273a | 919 | fi |
d68a82ec | 920 | |
8b1a3214 AK |
921 | ################################################################################ |
922 | dnl -- Check for realtime clock support | |
923 | if test x$REALTIME = xyes; then | |
8b1a3214 | 924 | AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no) |
8b1a3214 AK |
925 | |
926 | if test x$HAVE_REALTIME = xyes; then | |
927 | AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) | |
928 | LIBS="-lrt $LIBS" | |
929 | else | |
930 | AC_MSG_WARN(Disabling realtime clock) | |
931 | fi | |
932 | fi | |
933 | ||
80992638 | 934 | ################################################################################ |
8ce0cbda | 935 | dnl -- Check for getopt |
d0191583 | 936 | AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.])) |
b896caa1 | 937 | |
80992638 | 938 | ################################################################################ |
8ce0cbda | 939 | dnl -- Check for readline (Shamelessly copied from parted 1.4.17) |
ea7cfb00 | 940 | if test x$READLINE != xno; then |
539f4a77 ZK |
941 | lvm_saved_libs=$LIBS |
942 | AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib], | |
943 | READLINE_LIBS=$ac_cv_search_tgetent, [ | |
944 | if test "$READLINE" = yes; then | |
945 | AC_MSG_ERROR( | |
946 | [termcap could not be found which is required for the | |
947 | --enable-readline option (which is enabled by default). Either disable readline | |
948 | support with --disable-readline or download and install termcap from: | |
949 | ftp.gnu.org/gnu/termcap | |
950 | Note: if you are using precompiled packages you will also need the development | |
951 | package as well (which may be called termcap-devel or something similar). | |
952 | Note: (n)curses also seems to work as a substitute for termcap. This was | |
953 | not found either - but you could try installing that as well.]) | |
954 | fi]) | |
955 | dnl -- Old systems may need extra termcap dependency explicitly in LIBS | |
956 | AC_CHECK_LIB([readline], [readline], [ | |
957 | AC_DEFINE([READLINE_SUPPORT], 1, | |
958 | [Define to 1 to include the LVM readline shell.]) | |
959 | dnl -- Try only with -lreadline and check for different symbol | |
960 | LIBS=$lvm_saved_libs | |
961 | AC_CHECK_LIB([readline], [rl_line_buffer], | |
962 | [ READLINE_LIBS="-lreadline" ], [ | |
963 | AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed]) | |
964 | READLINE_LIBS="-lreadline $READLINE_LIBS" | |
965 | ]) ], [ | |
966 | READLINE_LIBS= | |
967 | if test "$READLINE" = yes; then | |
968 | AC_MSG_ERROR( | |
969 | [GNU Readline could not be found which is required for the | |
795ca3e5 AK |
970 | --enable-readline option (which is enabled by default). Either disable readline |
971 | support with --disable-readline or download and install readline from: | |
972 | ftp.gnu.org/gnu/readline | |
973 | Note: if you are using precompiled packages you will also need the development | |
539f4a77 ZK |
974 | package as well (which may be called readline-devel or something similar).]) |
975 | fi ]) | |
976 | LIBS="$READLINE_LIBS $lvm_saved_libs" | |
977 | AC_CHECK_FUNCS([rl_completion_matches]) | |
978 | LIBS=$lvm_saved_libs | |
795ca3e5 AK |
979 | fi |
980 | ||
80992638 | 981 | ################################################################################ |
8ce0cbda | 982 | dnl -- Internationalisation stuff |
ad6254c5 | 983 | AC_MSG_CHECKING(whether to enable internationalisation) |
71082be4 ZK |
984 | AC_ARG_ENABLE(nls, |
985 | AC_HELP_STRING([--enable-nls], [enable Native Language Support]), | |
986 | INTL=$enableval, INTL=no) | |
ad6254c5 | 987 | AC_MSG_RESULT($INTL) |
69792976 AK |
988 | |
989 | if test x$INTL = xyes; then | |
f6fc418d | 990 | # FIXME - Move this - can be device-mapper too |
69792976 AK |
991 | INTL_PACKAGE="lvm2" |
992 | AC_PATH_PROG(MSGFMT, msgfmt) | |
993 | if [[ "x$MSGFMT" == x ]]; | |
994 | then AC_MSG_ERROR( | |
995 | msgfmt not found in path $PATH | |
996 | ) | |
69792976 AK |
997 | fi; |
998 | ||
999 | AC_ARG_WITH(localedir, | |
71082be4 ZK |
1000 | AC_HELP_STRING([--with-localedir=DIR], |
1001 | [translation files in DIR | |
1002 | [[PREFIX/share/locale]]]), | |
1003 | LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale') | |
69792976 AK |
1004 | fi |
1005 | ||
80992638 | 1006 | ################################################################################ |
4a7f3eb2 | 1007 | AC_ARG_WITH(confdir, |
71082be4 ZK |
1008 | AC_HELP_STRING([--with-confdir=DIR], |
1009 | [configuration files in DIR [[/etc]]]), | |
1010 | CONFDIR=$withval, CONFDIR="/etc") | |
0a62c911 AK |
1011 | |
1012 | AC_ARG_WITH(staticdir, | |
71082be4 ZK |
1013 | AC_HELP_STRING([--with-staticdir=DIR], |
1014 | [static binaries in DIR [[EPREFIX/sbin]]]), | |
1015 | STATICDIR=$withval, STATICDIR='${exec_prefix}/sbin') | |
0a62c911 | 1016 | |
68f2de6d | 1017 | AC_ARG_WITH(usrlibdir, |
71082be4 ZK |
1018 | AC_HELP_STRING([--with-usrlibdir=DIR], |
1019 | [usrlib in DIR [[PREFIX/lib]]]), | |
1020 | usrlibdir=$withval, usrlibdir='${prefix}/lib') | |
68f2de6d AK |
1021 | |
1022 | AC_ARG_WITH(usrsbindir, | |
71082be4 ZK |
1023 | AC_HELP_STRING([--with-usrsbindir=DIR], |
1024 | [usrsbin executables in DIR [[PREFIX/sbin]]]), | |
1025 | usrsbindir=$withval, usrsbindir='${prefix}/sbin') | |
68f2de6d | 1026 | |
5d518f1f AK |
1027 | ################################################################################ |
1028 | AC_ARG_WITH(udev_prefix, | |
71082be4 ZK |
1029 | AC_HELP_STRING([--with-udev-prefix=UPREFIX], |
1030 | [install udev rule files in UPREFIX [[EPREFIX]]]), | |
1031 | udev_prefix=$withval, udev_prefix='${exec_prefix}') | |
5d518f1f | 1032 | |
78ce7acc | 1033 | AC_ARG_WITH(udevdir, |
71082be4 ZK |
1034 | AC_HELP_STRING([--with-udevdir=DIR], |
1035 | [udev rules in DIR [[UPREFIX/lib/udev/rules.d]]]), | |
1036 | udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d') | |
5d518f1f | 1037 | |
ad6254c5 AK |
1038 | ################################################################################ |
1039 | dnl -- Ensure additional headers required | |
1040 | if test x$READLINE = xyes; then | |
1041 | AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out)) | |
1042 | fi | |
1043 | ||
5c7fc7c4 | 1044 | if test x$CLVMD != xnone; then |
ad6254c5 AK |
1045 | AC_CHECK_HEADERS(mntent.h netdb.h netinet/in.h pthread.h search.h sys/mount.h sys/socket.h sys/uio.h sys/un.h utmpx.h,,AC_MSG_ERROR(bailing out)) |
1046 | AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out)) | |
1047 | AC_FUNC_GETMNTENT | |
ad6254c5 AK |
1048 | AC_FUNC_SELECT_ARGTYPES |
1049 | fi | |
1050 | ||
ad6254c5 AK |
1051 | if test x$CLUSTER != xnone; then |
1052 | AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out)) | |
1053 | AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out)) | |
1054 | fi | |
1055 | ||
d911ec67 AK |
1056 | if test x$DMEVENTD = xyes; then |
1057 | AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out)) | |
1058 | fi | |
1059 | ||
ad6254c5 AK |
1060 | if test x$HAVE_LIBDL = xyes; then |
1061 | AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out)) | |
1062 | fi | |
1063 | ||
1064 | if test x$INTL = xyes; then | |
1065 | AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out)) | |
1066 | fi | |
1067 | ||
5d518f1f AK |
1068 | if test x$UDEV_SYNC = xyes; then |
1069 | AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out)) | |
1070 | fi | |
1071 | ||
a653923f AK |
1072 | ################################################################################ |
1073 | AC_PATH_PROG(MODPROBE_CMD, modprobe) | |
1074 | ||
1075 | if test x$MODPROBE_CMD != x; then | |
72b2cb61 | 1076 | AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.]) |
a653923f AK |
1077 | fi |
1078 | ||
a9b601e2 ZK |
1079 | |
1080 | lvm_exec_prefix=$exec_prefix | |
1081 | test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix | |
1082 | test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix | |
1083 | AC_DEFINE_UNQUOTED(LVM_PATH, ["$lvm_exec_prefix/sbin/lvm"], [Path to lvm binary.]) | |
b5c2529b ZK |
1084 | |
1085 | if test "$CLVMD" != none; then | |
1086 | clvmd_prefix=$ac_default_prefix | |
1087 | test "$prefix" != NONE && clvmd_prefix=$prefix | |
71082be4 ZK |
1088 | AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$clvmd_prefix/sbin/clvmd"], |
1089 | [Path to clvmd binary.]) | |
b5c2529b ZK |
1090 | fi |
1091 | ||
80992638 | 1092 | ################################################################################ |
f6fc418d | 1093 | dnl -- dmeventd pidfile and executable path |
f6fc418d AK |
1094 | if test "$BUILD_DMEVENTD" = yes; then |
1095 | AC_ARG_WITH(dmeventd-pidfile, | |
71082be4 ZK |
1096 | AC_HELP_STRING([--with-dmeventd-pidfile=PATH], |
1097 | [dmeventd pidfile [[/var/run/dmeventd.pid]]]), | |
1098 | DMEVENTD_PIDFILE=$withval, | |
1099 | DMEVENTD_PIDFILE="/var/run/dmeventd.pid") | |
1100 | AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"], | |
1101 | [Path to dmeventd pidfile.]) | |
f6fc418d AK |
1102 | fi |
1103 | ||
f6fc418d | 1104 | if test "$BUILD_DMEVENTD" = yes; then |
f6fc418d | 1105 | AC_ARG_WITH(dmeventd-path, |
71082be4 ZK |
1106 | AC_HELP_STRING([--with-dmeventd-path=PATH], |
1107 | [dmeventd path [[EPREFIX/sbin/dmeventd]]]), | |
1108 | DMEVENTD_PATH=$withval, | |
1109 | DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd") | |
1110 | AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"], | |
1111 | [Path to dmeventd binary.]) | |
f6fc418d AK |
1112 | fi |
1113 | ||
3399ae32 AK |
1114 | ################################################################################ |
1115 | dnl -- various defaults | |
3399ae32 | 1116 | AC_ARG_WITH(default-system-dir, |
71082be4 ZK |
1117 | AC_HELP_STRING([--with-default-system-dir=DIR], |
1118 | [default LVM system directory [[/etc/lvm]]]), | |
1119 | DEFAULT_SYS_DIR=$withval, DEFAULT_SYS_DIR="/etc/lvm") | |
1120 | AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"], | |
1121 | [Path to LVM system directory.]) | |
3399ae32 | 1122 | |
3399ae32 | 1123 | AC_ARG_WITH(default-archive-subdir, |
71082be4 ZK |
1124 | AC_HELP_STRING([--with-default-archive-subdir=SUBDIR], |
1125 | [default metadata archive subdir [[archive]]]), | |
1126 | DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive) | |
1127 | AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"], | |
1128 | [Name of default metadata archive subdirectory.]) | |
3399ae32 | 1129 | |
3399ae32 | 1130 | AC_ARG_WITH(default-backup-subdir, |
71082be4 ZK |
1131 | AC_HELP_STRING([--with-default-backup-subdir=SUBDIR], |
1132 | [default metadata backup subdir [[backup]]]), | |
1133 | DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup) | |
1134 | AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"], | |
1135 | [Name of default metadata backup subdirectory.]) | |
3399ae32 | 1136 | |
3399ae32 | 1137 | AC_ARG_WITH(default-cache-subdir, |
71082be4 ZK |
1138 | AC_HELP_STRING([--with-default-cache-subdir=SUBDIR], |
1139 | [default metadata cache subdir [[cache]]]), | |
1140 | DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache) | |
1141 | AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"], | |
1142 | [Name of default metadata cache subdirectory.]) | |
3399ae32 | 1143 | |
3399ae32 | 1144 | AC_ARG_WITH(default-locking-dir, |
71082be4 ZK |
1145 | AC_HELP_STRING([--with-default-locking-dir=DIR], |
1146 | [default locking directory [[/var/lock/lvm]]]), | |
1147 | DEFAULT_LOCK_DIR=$withval, DEFAULT_LOCK_DIR="/var/lock/lvm") | |
1148 | AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"], | |
1149 | [Name of default locking directory.]) | |
3399ae32 | 1150 | |
f6fc418d AK |
1151 | ################################################################################ |
1152 | dnl -- which kernel interface to use (ioctl only) | |
1153 | AC_MSG_CHECKING(for kernel interface choice) | |
1154 | AC_ARG_WITH(interface, | |
71082be4 ZK |
1155 | AC_HELP_STRING([--with-interface=IFACE], |
1156 | [choose kernel interface (ioctl) [[ioctl]]]), | |
1157 | interface=$withval, interface=ioctl) | |
f6fc418d AK |
1158 | if [[ "x$interface" != xioctl ]]; |
1159 | then | |
1160 | AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.) | |
1161 | fi | |
1162 | AC_MSG_RESULT($interface) | |
1163 | ||
1164 | ################################################################################ | |
db8b5af9 | 1165 | DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\"" |
f58b35b5 AK |
1166 | AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version]) |
1167 | ||
db8b5af9 | 1168 | DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'` |
597c3f8e | 1169 | |
db8b5af9 | 1170 | LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\"" |
fae0c576 | 1171 | |
db8b5af9 | 1172 | VER=`cat "$srcdir"/VERSION` |
bf456146 | 1173 | LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\"" |
ec6a6fbe AK |
1174 | VER=`echo "$VER" | $AWK '{print $1}'` |
1175 | LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\"" | |
1176 | VER=`echo "$VER" | $AWK -F '-' '{print $1}'` | |
1177 | LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'` | |
1178 | LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'` | |
bf456146 AK |
1179 | LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'` |
1180 | LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` | |
ec6a6fbe | 1181 | |
80992638 | 1182 | ################################################################################ |
572fefeb | 1183 | AC_SUBST(APPLIB) |
aaa2e046 | 1184 | AC_SUBST(AWK) |
66fd4529 | 1185 | AC_SUBST(BUILD_CMIRRORD) |
d0191583 | 1186 | AC_SUBST(BUILD_DMEVENTD) |
a946372e AK |
1187 | AC_SUBST(CCS_CFLAGS) |
1188 | AC_SUBST(CCS_LIBS) | |
b896caa1 | 1189 | AC_SUBST(CFLAGS) |
d0191583 | 1190 | AC_SUBST(CFLOW_CMD) |
8106cdd5 | 1191 | AC_SUBST(CLDFLAGS) |
8106cdd5 | 1192 | AC_SUBST(CLDNOWHOLEARCHIVE) |
d0191583 JM |
1193 | AC_SUBST(CLDWHOLEARCHIVE) |
1194 | AC_SUBST(CLUSTER) | |
1195 | AC_SUBST(CLVMD) | |
a946372e AK |
1196 | AC_SUBST(CMAN_CFLAGS) |
1197 | AC_SUBST(CMAN_LIBS) | |
d0191583 | 1198 | AC_SUBST(CMDLIB) |
edf47283 AK |
1199 | AC_SUBST(CONFDB_CFLAGS) |
1200 | AC_SUBST(CONFDB_LIBS) | |
1201 | AC_SUBST(CONFDIR) | |
d0191583 | 1202 | AC_SUBST(COPTIMISE_FLAG) |
edf47283 AK |
1203 | AC_SUBST(CPG_CFLAGS) |
1204 | AC_SUBST(CPG_LIBS) | |
d0191583 | 1205 | AC_SUBST(CSCOPE_CMD) |
8ef2b021 | 1206 | AC_SUBST(DEBUG) |
3399ae32 AK |
1207 | AC_SUBST(DEFAULT_SYS_DIR) |
1208 | AC_SUBST(DEFAULT_ARCHIVE_SUBDIR) | |
1209 | AC_SUBST(DEFAULT_BACKUP_SUBDIR) | |
1210 | AC_SUBST(DEFAULT_CACHE_SUBDIR) | |
1211 | AC_SUBST(DEFAULT_LOCK_DIR) | |
199e490e | 1212 | AC_SUBST(DEVMAPPER) |
a946372e AK |
1213 | AC_SUBST(DLM_CFLAGS) |
1214 | AC_SUBST(DLM_LIBS) | |
19a2c6e0 | 1215 | AC_SUBST(DL_LIBS) |
d0191583 JM |
1216 | AC_SUBST(DMEVENTD) |
1217 | AC_SUBST(DM_COMPAT) | |
1218 | AC_SUBST(DM_DEVICE_GID) | |
1219 | AC_SUBST(DM_DEVICE_MODE) | |
1220 | AC_SUBST(DM_DEVICE_UID) | |
1221 | AC_SUBST(DM_IOCTLS) | |
1222 | AC_SUBST(DM_LIB_VERSION) | |
597c3f8e | 1223 | AC_SUBST(DM_LIB_PATCHLEVEL) |
d0191583 | 1224 | AC_SUBST(FSADM) |
a946372e AK |
1225 | AC_SUBST(GULM_CFLAGS) |
1226 | AC_SUBST(GULM_LIBS) | |
26e7f2e0 | 1227 | AC_SUBST(HAVE_LIBDL) |
8b1a3214 | 1228 | AC_SUBST(HAVE_REALTIME) |
d0191583 JM |
1229 | AC_SUBST(INTL) |
1230 | AC_SUBST(INTL_PACKAGE) | |
1231 | AC_SUBST(JOBS) | |
1232 | AC_SUBST(LDDEPS) | |
1233 | AC_SUBST(LIBS) | |
1234 | AC_SUBST(LIB_SUFFIX) | |
69792976 | 1235 | AC_SUBST(LOCALEDIR) |
d0191583 JM |
1236 | AC_SUBST(LVM1) |
1237 | AC_SUBST(LVM1_FALLBACK) | |
d0191583 | 1238 | AC_SUBST(LVM_VERSION) |
bf456146 | 1239 | AC_SUBST(LVM_LIBAPI) |
ec6a6fbe AK |
1240 | AC_SUBST(LVM_MAJOR) |
1241 | AC_SUBST(LVM_MINOR) | |
1242 | AC_SUBST(LVM_PATCHLEVEL) | |
1243 | AC_SUBST(LVM_RELEASE) | |
1244 | AC_SUBST(LVM_RELEASE_DATE) | |
d0191583 | 1245 | AC_SUBST(MIRRORS) |
8fea97b7 | 1246 | AC_SUBST(REPLICATORS) |
d0191583 | 1247 | AC_SUBST(MSGFMT) |
d0191583 JM |
1248 | AC_SUBST(PKGCONFIG) |
1249 | AC_SUBST(POOL) | |
f30875db | 1250 | AC_SUBST(PTHREAD_LIBS) |
edf47283 AK |
1251 | AC_SUBST(QUORUM_CFLAGS) |
1252 | AC_SUBST(QUORUM_LIBS) | |
539f4a77 | 1253 | AC_SUBST(READLINE_LIBS) |
90c80887 AK |
1254 | AC_SUBST(SACKPT_CFLAGS) |
1255 | AC_SUBST(SACKPT_LIBS) | |
a946372e AK |
1256 | AC_SUBST(SALCK_CFLAGS) |
1257 | AC_SUBST(SALCK_LIBS) | |
e1b8a236 | 1258 | AC_SUBST(SELINUX_LIBS) |
f7f0854e | 1259 | AC_SUBST(SELINUX_PC) |
d0191583 | 1260 | AC_SUBST(SNAPSHOTS) |
0a62c911 | 1261 | AC_SUBST(STATICDIR) |
d0191583 | 1262 | AC_SUBST(STATIC_LINK) |
db724a44 | 1263 | AC_SUBST(UDEV_LIBS) |
f7f0854e | 1264 | AC_SUBST(UDEV_PC) |
5d518f1f | 1265 | AC_SUBST(UDEV_RULES) |
4df024c4 | 1266 | AC_SUBST(UDEV_SYNC) |
23b059e7 | 1267 | AC_SUBST(WRITE_INSTALL) |
f6fc418d AK |
1268 | AC_SUBST(interface) |
1269 | AC_SUBST(kerneldir) | |
1270 | AC_SUBST(missingkernel) | |
1271 | AC_SUBST(kernelvsn) | |
1272 | AC_SUBST(tmpdir) | |
5d518f1f AK |
1273 | AC_SUBST(udev_prefix) |
1274 | AC_SUBST(udevdir) | |
68f2de6d AK |
1275 | AC_SUBST(usrlibdir) |
1276 | AC_SUBST(usrsbindir) | |
8106cdd5 | 1277 | |
80992638 | 1278 | ################################################################################ |
d3a356b4 | 1279 | dnl -- First and last lines should not contain files to generate in order to |
8ce0cbda | 1280 | dnl -- keep utility scripts running properly |
d3a356b4 JM |
1281 | AC_CONFIG_FILES([ |
1282 | Makefile | |
1283 | make.tmpl | |
1284 | daemons/Makefile | |
1285 | daemons/clvmd/Makefile | |
5d311afb | 1286 | daemons/cmirrord/Makefile |
f6fc418d AK |
1287 | daemons/dmeventd/Makefile |
1288 | daemons/dmeventd/libdevmapper-event.pc | |
b7edb5bf | 1289 | daemons/dmeventd/plugins/Makefile |
d3d98fdc | 1290 | daemons/dmeventd/plugins/lvm2/Makefile |
f6fc418d AK |
1291 | daemons/dmeventd/plugins/mirror/Makefile |
1292 | daemons/dmeventd/plugins/snapshot/Makefile | |
d3a356b4 | 1293 | doc/Makefile |
da05c479 | 1294 | doc/example.conf |
db8b5af9 | 1295 | include/.symlinks |
f6fc418d AK |
1296 | include/Makefile |
1297 | lib/Makefile | |
d3a356b4 JM |
1298 | lib/format1/Makefile |
1299 | lib/format_pool/Makefile | |
1300 | lib/locking/Makefile | |
1301 | lib/mirror/Makefile | |
8fea97b7 | 1302 | lib/replicator/Makefile |
ec6a6fbe | 1303 | lib/misc/lvm-version.h |
d3a356b4 | 1304 | lib/snapshot/Makefile |
f6fc418d AK |
1305 | libdm/Makefile |
1306 | libdm/libdevmapper.pc | |
e0c64c6c | 1307 | liblvm/Makefile |
70046623 | 1308 | liblvm/liblvm2app.pc |
f6fc418d AK |
1309 | man/Makefile |
1310 | po/Makefile | |
2de38033 | 1311 | scripts/clvmd_init_red_hat |
81410c8f | 1312 | scripts/cmirrord_init_red_hat |
595eaf92 | 1313 | scripts/lvm2_monitoring_init_red_hat |
d3a356b4 | 1314 | scripts/Makefile |
f6fc418d | 1315 | test/Makefile |
c7e363f9 | 1316 | test/api/Makefile |
d3a356b4 | 1317 | tools/Makefile |
5d518f1f | 1318 | udev/Makefile |
7a197a62 AK |
1319 | ]) |
1320 | AC_OUTPUT | |
2dc95e1c AK |
1321 | |
1322 | if test x$ODIRECT != xyes; then | |
ad6254c5 | 1323 | AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up) |
2dc95e1c | 1324 | fi |