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