]>
Commit | Line | Data |
---|---|---|
d0191583 | 1 | ############################################################################### |
ad6254c5 | 2 | ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved. |
b6d7a484 | 3 | ## Copyright (C) 2004-2012 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" |
bf09a320 AK |
34 | ELDFLAGS="-Wl,--export-dynamic" |
35 | # FIXME Generate list and use --dynamic-list=.dlopen.sym | |
8106cdd5 AK |
36 | CLDWHOLEARCHIVE="-Wl,-whole-archive" |
37 | CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" | |
80992638 | 38 | LDDEPS="$LDDEPS .export.sym" |
d0191583 | 39 | LIB_SUFFIX=so |
8106cdd5 | 40 | DEVMAPPER=yes |
615534d3 | 41 | LVMETAD=no |
1a9ea74d | 42 | ODIRECT=yes |
d0191583 | 43 | DM_IOCTLS=yes |
80992638 | 44 | SELINUX=yes |
d3c8211f | 45 | CLUSTER=internal |
f6fc418d | 46 | FSADM=yes |
d0191583 | 47 | ;; |
8106cdd5 | 48 | darwin*) |
80992638 | 49 | CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" |
8ce0cbda | 50 | COPTIMISE_FLAG="-O2" |
80992638 | 51 | CLDFLAGS="$CLDFLAGS" |
bf09a320 | 52 | ELDFLAGS= |
8106cdd5 AK |
53 | CLDWHOLEARCHIVE="-all_load" |
54 | CLDNOWHOLEARCHIVE= | |
d0191583 | 55 | LIB_SUFFIX=dylib |
a653923f | 56 | DEVMAPPER=yes |
1a9ea74d | 57 | ODIRECT=no |
d0191583 | 58 | DM_IOCTLS=no |
80992638 | 59 | SELINUX=no |
d3c8211f | 60 | CLUSTER=none |
d0191583 JM |
61 | FSADM=no |
62 | ;; | |
b896caa1 AK |
63 | esac |
64 | ||
3d962ed6 AK |
65 | VERITYSETUP=no |
66 | ||
80992638 | 67 | ################################################################################ |
8ce0cbda | 68 | dnl -- Checks for programs. |
162aefe8 | 69 | AC_PROG_SED |
8ce0cbda AK |
70 | AC_PROG_AWK |
71 | AC_PROG_CC | |
d0191583 JM |
72 | |
73 | dnl probably no longer needed in 2008, but... | |
74 | AC_PROG_GCC_TRADITIONAL | |
8ce0cbda AK |
75 | AC_PROG_INSTALL |
76 | AC_PROG_LN_S | |
77 | AC_PROG_MAKE_SET | |
162aefe8 | 78 | AC_PROG_MKDIR_P |
5556819a | 79 | AC_PROG_RANLIB |
8a2fc586 AK |
80 | AC_PATH_PROG(CFLOW_CMD, cflow) |
81 | AC_PATH_PROG(CSCOPE_CMD, cscope) | |
8ce0cbda AK |
82 | |
83 | ################################################################################ | |
d0191583 | 84 | dnl -- Check for header files. |
80992638 | 85 | AC_HEADER_DIRENT |
d911ec67 | 86 | AC_HEADER_MAJOR |
80992638 | 87 | AC_HEADER_STDC |
ad6254c5 AK |
88 | AC_HEADER_SYS_WAIT |
89 | AC_HEADER_TIME | |
90 | ||
d0191583 | 91 | AC_CHECK_HEADERS([locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \ |
d911ec67 AK |
92 | langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \ |
93 | sys/wait.h time.h], , | |
d0191583 | 94 | [AC_MSG_ERROR(bailing out)]) |
ad6254c5 AK |
95 | |
96 | case "$host_os" in | |
97 | linux*) | |
98 | AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;; | |
99 | darwin*) | |
100 | AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;; | |
101 | esac | |
80992638 | 102 | |
d0191583 JM |
103 | AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \ |
104 | stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \ | |
105 | sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)]) | |
106 | AC_CHECK_HEADERS(termios.h sys/statvfs.h) | |
107 | ||
80992638 | 108 | ################################################################################ |
d0191583 | 109 | dnl -- Check for typedefs, structures, and compiler characteristics. |
80992638 AK |
110 | AC_C_CONST |
111 | AC_C_INLINE | |
d0191583 | 112 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
80992638 AK |
113 | AC_TYPE_OFF_T |
114 | AC_TYPE_PID_T | |
d0191583 | 115 | AC_TYPE_SIGNAL |
80992638 | 116 | AC_TYPE_SIZE_T |
ad6254c5 | 117 | AC_TYPE_MODE_T |
d911ec67 AK |
118 | AC_TYPE_INT8_T |
119 | AC_TYPE_INT16_T | |
120 | AC_TYPE_INT32_T | |
121 | AC_TYPE_INT64_T | |
122 | AC_TYPE_SSIZE_T | |
123 | AC_TYPE_UID_T | |
124 | AC_TYPE_UINT8_T | |
125 | AC_TYPE_UINT16_T | |
126 | AC_TYPE_UINT32_T | |
127 | AC_TYPE_UINT64_T | |
7a197a62 | 128 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
ad6254c5 AK |
129 | AC_STRUCT_TM |
130 | ||
131 | ################################################################################ | |
132 | dnl -- Check for functions | |
7c9fd3ea | 133 | AC_CHECK_FUNCS([ftruncate gethostname getpagesize \ |
d911ec67 AK |
134 | gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \ |
135 | strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \ | |
136 | strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)]) | |
a0f9708e | 137 | AC_CHECK_FUNCS(siginterrupt) |
ad6254c5 AK |
138 | AC_FUNC_ALLOCA |
139 | AC_FUNC_CLOSEDIR_VOID | |
d911ec67 | 140 | AC_FUNC_CHOWN |
ad6254c5 AK |
141 | AC_FUNC_FORK |
142 | AC_FUNC_LSTAT | |
143 | AC_FUNC_MALLOC | |
144 | AC_FUNC_MEMCMP | |
145 | AC_FUNC_MMAP | |
d911ec67 | 146 | AC_FUNC_REALLOC |
ad6254c5 AK |
147 | AC_FUNC_STAT |
148 | AC_FUNC_STRTOD | |
d0191583 | 149 | AC_FUNC_VPRINTF |
80992638 | 150 | |
9c961554 MB |
151 | ################################################################################ |
152 | dnl -- Enables statically-linked tools | |
153 | AC_MSG_CHECKING(whether to use static linking) | |
154 | AC_ARG_ENABLE(static_link, | |
71082be4 ZK |
155 | AC_HELP_STRING([--enable-static_link], |
156 | [use this to link the tools to their libraries | |
157 | statically (default is dynamic linking]), | |
158 | STATIC_LINK=$enableval, STATIC_LINK=no) | |
9c961554 MB |
159 | AC_MSG_RESULT($STATIC_LINK) |
160 | ||
80992638 | 161 | ################################################################################ |
8ce0cbda | 162 | dnl -- Prefix is /usr by default, the exec_prefix default is setup later |
795ca3e5 AK |
163 | AC_PREFIX_DEFAULT(/usr) |
164 | ||
80992638 | 165 | ################################################################################ |
8ce0cbda | 166 | dnl -- Setup the ownership of the files |
ad6254c5 | 167 | AC_MSG_CHECKING(file owner) |
795ca3e5 | 168 | AC_ARG_WITH(user, |
71082be4 ZK |
169 | AC_HELP_STRING([--with-user=USER], |
170 | [set the owner of installed files [[USER=]]]), | |
171 | OWNER=$withval) | |
ad6254c5 | 172 | AC_MSG_RESULT($OWNER) |
a38df97f AK |
173 | |
174 | if test x$OWNER != x; then | |
23b059e7 | 175 | INSTALL="$INSTALL -o $OWNER" |
a38df97f | 176 | fi |
795ca3e5 | 177 | |
80992638 | 178 | ################################################################################ |
8ce0cbda | 179 | dnl -- Setup the group ownership of the files |
ad6254c5 | 180 | AC_MSG_CHECKING(group owner) |
795ca3e5 | 181 | AC_ARG_WITH(group, |
71082be4 ZK |
182 | AC_HELP_STRING([--with-group=GROUP], |
183 | [set the group owner of installed files [[GROUP=]]]), | |
184 | GROUP=$withval) | |
ad6254c5 | 185 | AC_MSG_RESULT($GROUP) |
a38df97f AK |
186 | |
187 | if test x$GROUP != x; then | |
23b059e7 | 188 | INSTALL="$INSTALL -g $GROUP" |
a38df97f | 189 | fi |
795ca3e5 | 190 | |
0782ad50 AK |
191 | ################################################################################ |
192 | dnl -- Setup device node ownership | |
193 | AC_MSG_CHECKING(device node uid) | |
194 | ||
195 | AC_ARG_WITH(device-uid, | |
71082be4 ZK |
196 | AC_HELP_STRING([--with-device-uid=UID], |
197 | [set the owner used for new device nodes [[UID=0]]]), | |
198 | DM_DEVICE_UID=$withval, DM_DEVICE_UID=0) | |
0782ad50 AK |
199 | AC_MSG_RESULT($DM_DEVICE_UID) |
200 | ||
201 | ################################################################################ | |
202 | dnl -- Setup device group ownership | |
203 | AC_MSG_CHECKING(device node gid) | |
204 | ||
205 | AC_ARG_WITH(device-gid, | |
71082be4 ZK |
206 | AC_HELP_STRING([--with-device-gid=GID], |
207 | [set the group used for new device nodes [[GID=0]]]), | |
208 | DM_DEVICE_GID=$withval, DM_DEVICE_GID=0) | |
0782ad50 AK |
209 | AC_MSG_RESULT($DM_DEVICE_GID) |
210 | ||
f6fc418d AK |
211 | ################################################################################ |
212 | dnl -- Setup device mode | |
213 | AC_MSG_CHECKING(device node mode) | |
214 | ||
215 | AC_ARG_WITH(device-mode, | |
71082be4 ZK |
216 | AC_HELP_STRING([--with-device-mode=MODE], |
217 | [set the mode used for new device nodes [[MODE=0600]]]), | |
218 | DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600) | |
f6fc418d AK |
219 | AC_MSG_RESULT($DM_DEVICE_MODE) |
220 | ||
d0df875d ZK |
221 | AC_MSG_CHECKING(when to create device nodes) |
222 | AC_ARG_WITH(device-nodes-on, | |
223 | AC_HELP_STRING([--with-device-nodes-on=ON], | |
224 | [create nodes on resume or create [[ON=resume]]]), | |
225 | ADD_NODE=$withval, ADD_NODE=resume) | |
226 | case "$ADD_NODE" in | |
227 | resume) add_on=DM_ADD_NODE_ON_RESUME;; | |
228 | create) add_on=DM_ADD_NODE_ON_CREATE;; | |
229 | *) AC_MSG_ERROR([--with-device-nodes-on parameter invalid]);; | |
230 | esac | |
231 | AC_MSG_RESULT(on $ADD_NODE) | |
232 | AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create]) | |
233 | ||
53f3ebce PR |
234 | AC_MSG_CHECKING(default name mangling) |
235 | AC_ARG_WITH(default-name-mangling, | |
236 | AC_HELP_STRING([--with-default-name-mangling=MANGLING], | |
237 | [default name mangling: auto/none/hex [[MANGLING=auto]]]), | |
238 | MANGLING=$withval, MANGLING=auto) | |
239 | case "$MANGLING" in | |
240 | auto) mangling=DM_STRING_MANGLING_AUTO;; | |
241 | disabled) mangling=DM_STRING_MANGLING_NONE;; | |
242 | hex) mangling=DM_STRING_MANGLING_HEX;; | |
243 | *) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);; | |
244 | esac | |
245 | AC_MSG_RESULT($MANGLING) | |
246 | AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour]) | |
247 | ||
80992638 | 248 | ################################################################################ |
7d1552c9 | 249 | dnl -- LVM1 tool fallback option |
ad6254c5 | 250 | AC_MSG_CHECKING(whether to enable lvm1 fallback) |
71082be4 ZK |
251 | AC_ARG_ENABLE(lvm1_fallback, |
252 | AC_HELP_STRING([--enable-lvm1_fallback], | |
253 | [use this to fall back and use LVM1 binaries if | |
254 | device-mapper is missing from the kernel]), | |
255 | LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no) | |
ad6254c5 | 256 | AC_MSG_RESULT($LVM1_FALLBACK) |
7d1552c9 AK |
257 | |
258 | if test x$LVM1_FALLBACK = xyes; then | |
72b2cb61 | 259 | 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 |
260 | fi |
261 | ||
80992638 | 262 | ################################################################################ |
5a52dca9 | 263 | dnl -- format1 inclusion type |
ad6254c5 | 264 | AC_MSG_CHECKING(whether to include support for lvm1 metadata) |
5a52dca9 | 265 | AC_ARG_WITH(lvm1, |
71082be4 ZK |
266 | AC_HELP_STRING([--with-lvm1=TYPE], |
267 | [LVM1 metadata support: internal/shared/none | |
268 | [[TYPE=internal]]]), | |
269 | LVM1=$withval, LVM1=internal) | |
ad6254c5 | 270 | AC_MSG_RESULT($LVM1) |
5a52dca9 AK |
271 | |
272 | if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]]; | |
273 | then AC_MSG_ERROR( | |
274 | --with-lvm1 parameter invalid | |
275 | ) | |
5a52dca9 AK |
276 | fi; |
277 | ||
b896caa1 | 278 | if test x$LVM1 = xinternal; then |
72b2cb61 | 279 | AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.]) |
b896caa1 AK |
280 | fi |
281 | ||
80992638 | 282 | ################################################################################ |
d8ac0fbc | 283 | dnl -- format_pool inclusion type |
ad6254c5 | 284 | AC_MSG_CHECKING(whether to include support for GFS pool metadata) |
d8ac0fbc | 285 | AC_ARG_WITH(pool, |
71082be4 ZK |
286 | AC_HELP_STRING([--with-pool=TYPE], |
287 | [GFS pool read-only support: internal/shared/none | |
288 | [[TYPE=internal]]]), | |
289 | POOL=$withval, POOL=internal) | |
ad6254c5 | 290 | AC_MSG_RESULT($POOL) |
d8ac0fbc AK |
291 | |
292 | if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]]; | |
293 | then AC_MSG_ERROR( | |
294 | --with-pool parameter invalid | |
295 | ) | |
d8ac0fbc AK |
296 | fi; |
297 | ||
298 | if test x$POOL = xinternal; then | |
72b2cb61 | 299 | AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.]) |
d8ac0fbc AK |
300 | fi |
301 | ||
80992638 | 302 | ################################################################################ |
d3c8211f | 303 | dnl -- cluster_locking inclusion type |
ad6254c5 | 304 | AC_MSG_CHECKING(whether to include support for cluster locking) |
d3c8211f | 305 | AC_ARG_WITH(cluster, |
71082be4 ZK |
306 | AC_HELP_STRING([--with-cluster=TYPE], |
307 | [cluster LVM locking support: internal/shared/none | |
308 | [[TYPE=internal]]]), | |
309 | CLUSTER=$withval) | |
ad6254c5 | 310 | AC_MSG_RESULT($CLUSTER) |
d3c8211f AK |
311 | |
312 | if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]]; | |
313 | then AC_MSG_ERROR( | |
314 | --with-cluster parameter invalid | |
315 | ) | |
d3c8211f AK |
316 | fi; |
317 | ||
318 | if test x$CLUSTER = xinternal; then | |
72b2cb61 | 319 | AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.]) |
d3c8211f | 320 | fi |
d8ac0fbc | 321 | |
80992638 | 322 | ################################################################################ |
4922197a | 323 | dnl -- snapshots inclusion type |
ad6254c5 | 324 | AC_MSG_CHECKING(whether to include snapshots) |
4922197a | 325 | AC_ARG_WITH(snapshots, |
71082be4 ZK |
326 | AC_HELP_STRING([--with-snapshots=TYPE], |
327 | [snapshot support: internal/shared/none | |
328 | [[TYPE=internal]]]), | |
329 | SNAPSHOTS=$withval, SNAPSHOTS=internal) | |
ad6254c5 | 330 | AC_MSG_RESULT($SNAPSHOTS) |
4922197a AK |
331 | |
332 | if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]]; | |
333 | then AC_MSG_ERROR( | |
334 | --with-snapshots parameter invalid | |
335 | ) | |
4922197a AK |
336 | fi; |
337 | ||
338 | if test x$SNAPSHOTS = xinternal; then | |
72b2cb61 | 339 | AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.]) |
4922197a AK |
340 | fi |
341 | ||
80992638 | 342 | ################################################################################ |
4922197a | 343 | dnl -- mirrors inclusion type |
ad6254c5 | 344 | AC_MSG_CHECKING(whether to include mirrors) |
4922197a | 345 | AC_ARG_WITH(mirrors, |
71082be4 ZK |
346 | AC_HELP_STRING([--with-mirrors=TYPE], |
347 | [mirror support: internal/shared/none | |
348 | [[TYPE=internal]]]), | |
349 | MIRRORS=$withval, MIRRORS=internal) | |
ad6254c5 | 350 | AC_MSG_RESULT($MIRRORS) |
4922197a AK |
351 | |
352 | if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]]; | |
353 | then AC_MSG_ERROR( | |
354 | --with-mirrors parameter invalid | |
355 | ) | |
4922197a AK |
356 | fi; |
357 | ||
358 | if test x$MIRRORS = xinternal; then | |
72b2cb61 | 359 | AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.]) |
4922197a AK |
360 | fi |
361 | ||
cac52ca4 JEB |
362 | ################################################################################ |
363 | dnl -- raid inclusion type | |
364 | AC_MSG_CHECKING(whether to include raid) | |
365 | AC_ARG_WITH(raid, | |
366 | AC_HELP_STRING([--with-raid=TYPE], | |
367 | [mirror support: internal/shared/none | |
368 | [[TYPE=internal]]]), | |
369 | RAID=$withval, RAID=internal) | |
370 | AC_MSG_RESULT($RAID) | |
371 | ||
372 | if [[ "x$RAID" != xnone -a "x$RAID" != xinternal -a "x$RAID" != xshared ]]; | |
373 | then AC_MSG_ERROR( | |
374 | --with-raid parameter invalid | |
375 | ) | |
376 | fi; | |
377 | ||
378 | if test x$RAID = xinternal; then | |
379 | AC_DEFINE([RAID_INTERNAL], 1, [Define to 1 to include built-in support for raid.]) | |
380 | fi | |
381 | ||
8fea97b7 ZK |
382 | ################################################################################ |
383 | dnl -- asynchronous volume replicator inclusion type | |
384 | AC_MSG_CHECKING(whether to include replicators) | |
71082be4 ZK |
385 | AC_ARG_WITH(replicators, |
386 | AC_HELP_STRING([--with-replicators=TYPE], | |
387 | [replicator support: internal/shared/none | |
388 | [[TYPE=none]]]), | |
389 | REPLICATORS=$withval, REPLICATORS=none) | |
8fea97b7 ZK |
390 | AC_MSG_RESULT($REPLICATORS) |
391 | ||
392 | case "$REPLICATORS" in | |
393 | none|shared) ;; | |
394 | internal) AC_DEFINE([REPLICATOR_INTERNAL], 1, | |
395 | [Define to 1 to include built-in support for replicators.]) ;; | |
396 | *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;; | |
397 | esac | |
398 | ||
3ba4a195 ZK |
399 | ################################################################################ |
400 | dnl -- thin provisioning | |
401 | AC_MSG_CHECKING(whether to include thin provisioning) | |
402 | AC_ARG_WITH(thin, | |
403 | AC_HELP_STRING([--with-thin=TYPE], | |
404 | [thin provisioning support: internal/shared/none | |
405 | [[TYPE=none]]]), | |
406 | THIN=$withval, THIN=none) | |
407 | AC_MSG_RESULT($THIN) | |
408 | ||
409 | case "$THIN" in | |
410 | none|shared) ;; | |
411 | internal) AC_DEFINE([THIN_INTERNAL], 1, | |
412 | [Define to 1 to include built-in support for thin provisioning.]) ;; | |
413 | *) AC_MSG_ERROR([--with-thin parameter invalid ($THIN)]) ;; | |
414 | esac | |
415 | ||
f61cacad ZK |
416 | case "$THIN" in |
417 | internal|shared) | |
418 | AC_ARG_WITH(thin-check, | |
419 | AC_HELP_STRING([--with-thin-check=PATH], | |
420 | [thin_check tool: [[autodetect]]]), | |
421 | THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="autodetect") | |
422 | # Empty means a config way to ignore thin checking | |
423 | if test "$THIN_CHECK_CMD" = "autodetect"; then | |
424 | AC_PATH_PROG(THIN_CHECK_CMD, thin_check) | |
425 | test -z "$THIN_CHECK_CMD" && AC_MSG_ERROR(thin_check not found in path $PATH) | |
426 | fi | |
f61cacad ZK |
427 | ;; |
428 | esac | |
429 | ||
909887be ZK |
430 | AC_DEFINE_UNQUOTED([THIN_CHECK_CMD], ["$THIN_CHECK_CMD"], |
431 | [The path to 'thin_check', if available.]) | |
432 | ||
f61cacad | 433 | |
80992638 | 434 | ################################################################################ |
1b523347 | 435 | dnl -- Disable readline |
ad6254c5 | 436 | AC_MSG_CHECKING(whether to enable readline) |
2c189a57 | 437 | AC_ARG_ENABLE([readline], |
71082be4 ZK |
438 | AC_HELP_STRING([--disable-readline], [disable readline support]), |
439 | READLINE=$enableval, READLINE=maybe) | |
ad6254c5 | 440 | AC_MSG_RESULT($READLINE) |
795ca3e5 | 441 | |
8b1a3214 AK |
442 | ################################################################################ |
443 | dnl -- Disable realtime clock support | |
444 | AC_MSG_CHECKING(whether to enable realtime support) | |
71082be4 ZK |
445 | AC_ARG_ENABLE(realtime, |
446 | AC_HELP_STRING([--enable-realtime], [enable realtime clock support]), | |
447 | REALTIME=$enableval) | |
8b1a3214 AK |
448 | AC_MSG_RESULT($REALTIME) |
449 | ||
e40d44be ZK |
450 | ################################################################################ |
451 | dnl -- disable OCF resource agents | |
452 | AC_MSG_CHECKING(whether to enable OCF resource agents) | |
453 | AC_ARG_ENABLE(ocf, | |
454 | AC_HELP_STRING([--enable-ocf], | |
455 | [enable Open Cluster Framework (OCF) compliant resource agents]), | |
456 | OCF=$enableval, OCF=no) | |
457 | AC_MSG_RESULT($OCF) | |
349da06c ZK |
458 | AC_ARG_WITH(ocfdir, |
459 | AC_HELP_STRING([--with-ocfdir=DIR], | |
460 | [install OCF files in DIR [[PREFIX/lib/ocf/resource.d/lvm2]]]), | |
461 | OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2') | |
e40d44be | 462 | |
90c80887 AK |
463 | ################################################################################ |
464 | dnl -- Init pkg-config with dummy invokation: | |
465 | dnl -- this is required because PKG_CHECK_MODULES macro is expanded | |
466 | dnl -- to initialize the pkg-config environment only at the first invokation, | |
467 | dnl -- that would be conditional in this configure.in. | |
468 | pkg_config_init() { | |
469 | PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [], | |
470 | [AC_MSG_RESULT([pkg-config initialized])]) | |
471 | PKGCONFIG_INIT=1 | |
472 | } | |
473 | ||
80992638 | 474 | ################################################################################ |
8ce0cbda | 475 | dnl -- Build cluster LVM daemon |
ad6254c5 | 476 | AC_MSG_CHECKING(whether to build cluster LVM daemon) |
a266258f | 477 | AC_ARG_WITH(clvmd, |
71082be4 | 478 | [ --with-clvmd=TYPE build cluster LVM Daemon |
8c222979 | 479 | The following cluster manager combinations are valid: |
a946372e AK |
480 | * cman (RHEL5 or equivalent) |
481 | * cman,corosync,openais (or selection of them) | |
649c4507 | 482 | * singlenode (localhost only) |
a946372e AK |
483 | * all (autodetect) |
484 | * none (disable build) | |
71082be4 ZK |
485 | [[TYPE=none]]], |
486 | CLVMD=$withval, CLVMD=none) | |
a266258f | 487 | if test x$CLVMD = xyes; then |
5c7fc7c4 | 488 | CLVMD=all |
b1098701 | 489 | fi |
ad6254c5 | 490 | AC_MSG_RESULT($CLVMD) |
80992638 | 491 | |
8ce0cbda | 492 | dnl -- If clvmd enabled without cluster locking, automagically include it |
a266258f | 493 | if test x$CLVMD != xnone && test x$CLUSTER = xnone; then |
d3c8211f AK |
494 | CLUSTER=internal |
495 | fi | |
d3c8211f | 496 | |
90c80887 | 497 | dnl -- init pkgconfig if required |
34b6075d | 498 | if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then |
90c80887 AK |
499 | pkg_config_init |
500 | fi | |
501 | ||
34b6075d FDN |
502 | dnl -- Express clvmd init script Required-Start / Required-Stop |
503 | CLVMD_CMANAGERS="" | |
504 | dnl -- On RHEL4/RHEL5, qdiskd is started from a separate init script. | |
7cf60770 | 505 | dnl -- Enable if we are build for cman. |
34b6075d | 506 | CLVMD_NEEDS_QDISKD=no |
90c80887 | 507 | |
a946372e AK |
508 | dnl -- define build types |
509 | if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then | |
7cf60770 | 510 | AC_MSG_ERROR([Since version 2.02.87 GULM locking is no longer supported.]); |
34b6075d FDN |
511 | fi |
512 | if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then | |
513 | BUILDCMAN=yes | |
514 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" | |
515 | CLVMD_NEEDS_QDISKD=yes | |
a946372e AK |
516 | fi |
517 | if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then | |
518 | BUILDCOROSYNC=yes | |
34b6075d | 519 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" |
a946372e AK |
520 | fi |
521 | if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then | |
522 | BUILDOPENAIS=yes | |
34b6075d | 523 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" |
a946372e | 524 | fi |
34b6075d FDN |
525 | if test x$CLVMD_NEEDS_QDISKD != xno; then |
526 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" | |
a946372e AK |
527 | fi |
528 | ||
a946372e AK |
529 | dnl -- define a soft bailout if we are autodetecting |
530 | soft_bailout() { | |
531 | NOTFOUND=1 | |
532 | } | |
533 | ||
534 | hard_bailout() { | |
535 | AC_MSG_ERROR([bailing out]) | |
536 | } | |
537 | ||
538 | dnl -- if clvmd=all then set soft_bailout (we don't want to error) | |
539 | dnl -- and set all builds to yes. We need to do this here | |
7cf60770 | 540 | dnl -- to skip the openais|corosync sanity check above. |
a946372e AK |
541 | if test x$CLVMD = xall; then |
542 | bailout=soft_bailout | |
a946372e AK |
543 | BUILDCMAN=yes |
544 | BUILDCOROSYNC=yes | |
545 | BUILDOPENAIS=yes | |
546 | else | |
547 | bailout=hard_bailout | |
548 | fi | |
549 | ||
550 | dnl -- helper macro to check libs without adding them to LIBS | |
551 | check_lib_no_libs() { | |
552 | lib_no_libs_arg1=$1 | |
553 | shift | |
554 | lib_no_libs_arg2=$1 | |
555 | shift | |
556 | lib_no_libs_args=$@ | |
557 | AC_CHECK_LIB([$lib_no_libs_arg1], | |
558 | [$lib_no_libs_arg2],, | |
559 | [$bailout], | |
560 | [$lib_no_libs_args]) | |
561 | LIBS=$ac_check_lib_save_LIBS | |
562 | } | |
563 | ||
a946372e AK |
564 | dnl -- Look for cman libraries if required. |
565 | if test x$BUILDCMAN = xyes; then | |
566 | PKG_CHECK_MODULES(CMAN, libcman, [HAVE_CMAN=yes], | |
567 | [NOTFOUND=0 | |
568 | AC_CHECK_HEADERS(libcman.h,,$bailout) | |
569 | check_lib_no_libs cman cman_init | |
570 | if test $NOTFOUND = 0; then | |
571 | AC_MSG_RESULT([no pkg for libcman, using -lcman]) | |
572 | CMAN_LIBS="-lcman" | |
573 | HAVE_CMAN=yes | |
574 | fi]) | |
575 | CHECKCONFDB=yes | |
576 | CHECKDLM=yes | |
577 | fi | |
578 | ||
579 | dnl -- Look for corosync that's required also for openais build | |
580 | dnl -- only enough recent version of corosync ship pkg-config files. | |
581 | dnl -- We can safely rely on that to detect the correct bits. | |
582 | if test x$BUILDCOROSYNC = xyes || \ | |
583 | test x$BUILDOPENAIS = xyes; then | |
584 | PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout) | |
585 | CHECKCONFDB=yes | |
b6d7a484 | 586 | CHECKCMAP=yes |
a946372e AK |
587 | fi |
588 | ||
edf47283 | 589 | dnl -- Look for corosync libraries if required. |
a946372e AK |
590 | if test x$BUILDCOROSYNC = xyes; then |
591 | PKG_CHECK_MODULES(QUORUM, libquorum, [HAVE_QUORUM=yes], $bailout) | |
592 | CHECKCPG=yes | |
593 | CHECKDLM=yes | |
594 | fi | |
595 | ||
596 | dnl -- Look for openais libraries if required. | |
597 | if test x$BUILDOPENAIS = xyes; then | |
598 | PKG_CHECK_MODULES(SALCK, libSaLck, [HAVE_SALCK=yes], $bailout) | |
599 | CHECKCPG=yes | |
600 | fi | |
601 | ||
602 | dnl -- Below are checks for libraries common to more than one build. | |
603 | ||
604 | dnl -- Check confdb library. | |
b6d7a484 | 605 | dnl -- mandatory for corosync < 2.0 build. |
a946372e AK |
606 | dnl -- optional for openais/cman build. |
607 | ||
608 | if test x$CHECKCONFDB = xyes; then | |
609 | PKG_CHECK_MODULES(CONFDB, libconfdb, | |
610 | [HAVE_CONFDB=yes], | |
611 | [HAVE_CONFDB=no]) | |
612 | ||
613 | AC_CHECK_HEADERS(corosync/confdb.h, | |
614 | [HAVE_CONFDB_H=yes], | |
615 | [HAVE_CONFDB_H=no]) | |
616 | ||
617 | if test x$HAVE_CONFDB != xyes && \ | |
618 | test x$HAVE_CONFDB_H = xyes; then | |
619 | check_lib_no_libs confdb confdb_initialize | |
620 | AC_MSG_RESULT([no pkg for confdb, using -lconfdb]) | |
621 | CONFDB_LIBS="-lconfdb" | |
622 | HAVE_CONFDB=yes | |
623 | fi | |
b6d7a484 AK |
624 | fi |
625 | ||
626 | dnl -- Check cmap library | |
627 | dnl -- mandatory for corosync >= 2.0 build. | |
628 | ||
629 | if test x$CHECKCMAP = xyes; then | |
630 | PKG_CHECK_MODULES(CMAP, libcmap, | |
631 | [HAVE_CMAP=yes], | |
632 | [HAVE_CMAP=no]) | |
a946372e | 633 | |
b6d7a484 AK |
634 | AC_CHECK_HEADERS(corosync/cmap.h, |
635 | [HAVE_CMAP_H=yes], | |
636 | [HAVE_CMAP_H=no]) | |
637 | ||
638 | if test x$HAVE_CMAP != xyes && \ | |
639 | test x$HAVE_CMAP_H = xyes; then | |
640 | check_lib_no_libs cmap cmap_initialize | |
641 | AC_MSG_RESULT([no pkg for cmap, using -lcmap]) | |
642 | CMAP_LIBS="-lcmap" | |
643 | HAVE_CMAP=yes | |
644 | fi | |
645 | fi | |
646 | ||
647 | if test x$BUILDCOROSYNC = xyes; then | |
648 | if test x$HAVE_CMAP != xyes && \ | |
649 | test x$HAVE_CONFDB != xyes && \ | |
a946372e | 650 | test x$CLVMD != xall; then |
b6d7a484 | 651 | AC_MSG_ERROR([bailing out... cmap (corosync >= 2.0) or confdb (corosync < 2.0) library is required]) |
a946372e AK |
652 | fi |
653 | fi | |
654 | ||
655 | dnl -- Check cpg library. | |
656 | if test x$CHECKCPG = xyes; then | |
657 | PKG_CHECK_MODULES(CPG, libcpg, [HAVE_CPG=yes], $bailout) | |
658 | fi | |
659 | ||
660 | dnl -- Check dlm library. | |
661 | if test x$CHECKDLM = xyes; then | |
662 | PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes], | |
663 | [NOTFOUND=0 | |
664 | AC_CHECK_HEADERS(libdlm.h,,$bailout) | |
665 | check_lib_no_libs dlm dlm_lock -lpthread | |
666 | if test $NOTFOUND = 0; then | |
667 | AC_MSG_RESULT([no pkg for libdlm, using -ldlm]) | |
668 | DLM_LIBS="-ldlm -lpthread" | |
669 | HAVE_DLM=yes | |
670 | fi]) | |
671 | fi | |
672 | ||
673 | dnl -- If we are autodetecting, we need to re-create | |
34b6075d FDN |
674 | dnl -- the depedencies checks and set a proper CLVMD, |
675 | dnl -- together with init script Required-Start/Stop entries. | |
a946372e | 676 | if test x$CLVMD = xall; then |
8c222979 | 677 | CLVMD=none |
34b6075d FDN |
678 | CLVMD_CMANAGERS="" |
679 | CLVMD_NEEDS_QDISKD=no | |
a946372e AK |
680 | if test x$HAVE_CMAN = xyes && \ |
681 | test x$HAVE_DLM = xyes; then | |
8c222979 FDN |
682 | AC_MSG_RESULT([Enabling clvmd cman cluster manager]) |
683 | CLVMD="$CLVMD,cman" | |
34b6075d FDN |
684 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" |
685 | CLVMD_NEEDS_QDISKD=yes | |
a946372e AK |
686 | fi |
687 | if test x$HAVE_COROSYNC = xyes && \ | |
688 | test x$HAVE_QUORUM = xyes && \ | |
689 | test x$HAVE_CPG = xyes && \ | |
b6d7a484 AK |
690 | test x$HAVE_DLM = xyes; then |
691 | if test x$HAVE_CONFDB = xyes || test x$HAVE_CMAP = xyes; then | |
8c222979 FDN |
692 | AC_MSG_RESULT([Enabling clvmd corosync cluster manager]) |
693 | CLVMD="$CLVMD,corosync" | |
34b6075d | 694 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" |
b6d7a484 | 695 | fi |
a946372e AK |
696 | fi |
697 | if test x$HAVE_COROSYNC = xyes && \ | |
698 | test x$HAVE_CPG = xyes && \ | |
699 | test x$HAVE_SALCK = xyes; then | |
8c222979 FDN |
700 | AC_MSG_RESULT([Enabling clvmd openais cluster manager]) |
701 | CLVMD="$CLVMD,openais" | |
34b6075d FDN |
702 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" |
703 | fi | |
704 | if test x$CLVMD_NEEDS_QDISKD != xno; then | |
705 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" | |
8c222979 FDN |
706 | fi |
707 | if test x$CLVMD = xnone; then | |
708 | AC_MSG_RESULT([Disabling clvmd build. No cluster manager detected.]) | |
a946372e | 709 | fi |
edf47283 AK |
710 | fi |
711 | ||
94424fab FDN |
712 | dnl -- Fixup CLVMD_CMANAGERS with new corosync |
713 | dnl -- clvmd built with corosync >= 2.0 needs dlm (either init or systemd service) | |
714 | dnl -- to be started. | |
715 | if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then | |
716 | if test x$HAVE_CMAP = xyes; then | |
717 | CLVMD_CMANAGERS="$CLVMD_CMANAGERS dlm" | |
718 | fi | |
719 | fi | |
720 | ||
8c4e8a18 FDN |
721 | ################################################################################ |
722 | dnl -- clvmd pidfile | |
723 | if test "x$CLVMD" != xnone; then | |
724 | AC_ARG_WITH(clvmd-pidfile, | |
725 | AC_HELP_STRING([--with-clvmd-pidfile=PATH], | |
726 | [clvmd pidfile [[/var/run/clvmd.pid]]]), | |
727 | CLVMD_PIDFILE=$withval, | |
728 | CLVMD_PIDFILE="/var/run/clvmd.pid") | |
729 | AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"], | |
730 | [Path to clvmd pidfile.]) | |
731 | fi | |
732 | ||
3c14bcca | 733 | ################################################################################ |
66fd4529 AK |
734 | dnl -- Build cluster mirror log daemon |
735 | AC_MSG_CHECKING(whether to build cluster mirror log daemon) | |
71082be4 ZK |
736 | AC_ARG_ENABLE(cmirrord, |
737 | AC_HELP_STRING([--enable-cmirrord], | |
738 | [enable the cluster mirror log daemon]), | |
739 | CMIRRORD=$enableval, CMIRRORD=no) | |
66fd4529 | 740 | AC_MSG_RESULT($CMIRRORD) |
3c14bcca | 741 | |
66fd4529 AK |
742 | BUILD_CMIRRORD=$CMIRRORD |
743 | ||
744 | ################################################################################ | |
745 | dnl -- cmirrord pidfile | |
66fd4529 AK |
746 | if test "x$BUILD_CMIRRORD" = xyes; then |
747 | AC_ARG_WITH(cmirrord-pidfile, | |
71082be4 ZK |
748 | AC_HELP_STRING([--with-cmirrord-pidfile=PATH], |
749 | [cmirrord pidfile [[/var/run/cmirrord.pid]]]), | |
750 | CMIRRORD_PIDFILE=$withval, | |
751 | CMIRRORD_PIDFILE="/var/run/cmirrord.pid") | |
752 | AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"], | |
753 | [Path to cmirrord pidfile.]) | |
66fd4529 AK |
754 | fi |
755 | ||
756 | ################################################################################ | |
3c14bcca | 757 | dnl -- Look for corosync libraries if required. |
66fd4529 | 758 | if [[ "x$BUILD_CMIRRORD" = xyes ]]; then |
90c80887 AK |
759 | dnl -- init pkgconfig if required |
760 | if test x$PKGCONFIG_INIT != x1; then | |
761 | pkg_config_init | |
762 | fi | |
62e38da1 JEB |
763 | |
764 | AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 1, [Define to 1 to include libSaCkpt.]) | |
765 | PKG_CHECK_MODULES(SACKPT, libSaCkpt, [HAVE_SACKPT=yes], | |
766 | [AC_MSG_RESULT([no libSaCkpt, compiling without it]) | |
767 | AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 0, [Define to 0 to exclude libSaCkpt.])]) | |
768 | ||
90c80887 AK |
769 | if test x$HAVE_CPG != xyes; then |
770 | PKG_CHECK_MODULES(CPG, libcpg) | |
771 | fi | |
3c14bcca JEB |
772 | fi |
773 | ||
80992638 | 774 | ################################################################################ |
8ce0cbda | 775 | dnl -- Enable debugging |
ad6254c5 | 776 | AC_MSG_CHECKING(whether to enable debugging) |
71082be4 ZK |
777 | AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging]), |
778 | DEBUG=$enableval, DEBUG=no) | |
ad6254c5 | 779 | AC_MSG_RESULT($DEBUG) |
8ef2b021 | 780 | |
8ce0cbda AK |
781 | dnl -- Normally turn off optimisation for debug builds |
782 | if test x$DEBUG = xyes; then | |
783 | COPTIMISE_FLAG= | |
8a2fc586 AK |
784 | else |
785 | CSCOPE_CMD= | |
8ce0cbda AK |
786 | fi |
787 | ||
788 | ################################################################################ | |
789 | dnl -- Override optimisation | |
ad6254c5 | 790 | AC_MSG_CHECKING(for C optimisation flag) |
8ce0cbda | 791 | AC_ARG_WITH(optimisation, |
71082be4 ZK |
792 | AC_HELP_STRING([--with-optimisation=OPT], |
793 | [C optimisation flag [[OPT=-O2]]]), | |
794 | COPTIMISE_FLAG=$withval) | |
ad6254c5 | 795 | AC_MSG_RESULT($COPTIMISE_FLAG) |
8ce0cbda | 796 | |
fddafd51 ZK |
797 | ################################################################################ |
798 | dnl -- Enable profiling | |
5556819a | 799 | AC_MSG_CHECKING(whether to gather gcov profiling data) |
fddafd51 | 800 | AC_ARG_ENABLE(profiling, |
71082be4 ZK |
801 | AC_HELP_STRING(--enable-profiling, [gather gcov profiling data]), |
802 | PROFILING=$enableval, PROFILING=no) | |
5556819a AK |
803 | AC_MSG_RESULT($PROFILING) |
804 | ||
805 | if test "x$PROFILING" = xyes; then | |
806 | COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage" | |
fd4728e1 ZK |
807 | AC_PATH_PROG(LCOV, lcov) |
808 | AC_PATH_PROG(GENHTML, genhtml) | |
809 | if test -z "$LCOV" -o -z "$GENHTML"; then | |
b145d876 ZK |
810 | AC_MSG_ERROR([lcov and genhtml are required for profiling]) |
811 | fi | |
fd4728e1 ZK |
812 | AC_PATH_PROG(GENPNG, genpng) |
813 | if test -n "$GENPNG"; then | |
814 | AC_MSG_CHECKING([whether $GENPNG has all required modules]) | |
815 | if $GENPNG --help > /dev/null 2>&1 ; then | |
816 | AC_MSG_RESULT(ok) | |
817 | GENHTML="$GENHTML --frames" | |
818 | else | |
819 | AC_MSG_RESULT(not supported) | |
820 | AC_MSG_WARN([GD.pm perl module is not installed]) | |
821 | GENPNG= | |
822 | fi | |
823 | fi | |
5556819a | 824 | fi |
fddafd51 | 825 | |
1033d120 JT |
826 | ################################################################################ |
827 | dnl -- Enable testing | |
828 | AC_MSG_CHECKING(whether to enable unit testing) | |
829 | AC_ARG_ENABLE(testing, | |
830 | AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]), | |
831 | TESTING=$enableval, TESTING=no) | |
832 | AC_MSG_RESULT($TESTING) | |
833 | ||
834 | if test "$TESTING" = yes; then | |
5da88e5b | 835 | PKG_CHECK_MODULES(CUNIT, cunit >= 2.0) |
1033d120 JT |
836 | fi |
837 | ||
52e1564f JT |
838 | ################################################################################ |
839 | dnl -- Enable valgrind awareness of memory pools | |
840 | AC_MSG_CHECKING(whether to enable valgrind awareness of pools) | |
841 | AC_ARG_ENABLE(valgrind_pool, | |
842 | AC_HELP_STRING(--enable-valgrind-pool, [enable valgrind awareness of pools]), | |
843 | VALGRIND_POOL=$enableval, VALGRIND_POOL=no) | |
844 | AC_MSG_RESULT($VALGRIND_POOL) | |
845 | ||
846 | if test "$VALGRIND_POOL" = yes; then | |
847 | AC_CHECK_HEADERS([valgrind/memcheck.h], , [AC_MSG_ERROR(bailing out)]) | |
848 | AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool]) | |
849 | fi | |
850 | ||
80992638 | 851 | ################################################################################ |
8ce0cbda | 852 | dnl -- Disable devmapper |
ad6254c5 | 853 | AC_MSG_CHECKING(whether to use device-mapper) |
71082be4 ZK |
854 | AC_ARG_ENABLE(devmapper, |
855 | AC_HELP_STRING([--disable-devmapper], | |
856 | [disable LVM2 device-mapper interaction]), | |
857 | DEVMAPPER=$enableval) | |
ad6254c5 | 858 | AC_MSG_RESULT($DEVMAPPER) |
199e490e | 859 | |
b896caa1 | 860 | if test x$DEVMAPPER = xyes; then |
f6fc418d | 861 | AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.]) |
b896caa1 AK |
862 | fi |
863 | ||
615534d3 PR |
864 | ################################################################################ |
865 | dnl -- Build lvmetad | |
866 | AC_MSG_CHECKING(whether to build LVMetaD) | |
867 | AC_ARG_ENABLE(lvmetad, | |
d38de32b AK |
868 | AC_HELP_STRING([--enable-lvmetad], |
869 | [enable the LVM Metadata Daemon]), | |
615534d3 PR |
870 | LVMETAD=$enableval) |
871 | AC_MSG_RESULT($LVMETAD) | |
872 | ||
873 | BUILD_LVMETAD=$LVMETAD | |
874 | ||
832a1e73 AK |
875 | if test x$BUILD_LVMETAD = xyes; then |
876 | AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.]) | |
877 | fi | |
878 | ||
5d518f1f AK |
879 | ################################################################################ |
880 | dnl -- Enable udev synchronisation | |
881 | AC_MSG_CHECKING(whether to enable synchronisation with udev processing) | |
71082be4 ZK |
882 | AC_ARG_ENABLE(udev_sync, |
883 | AC_HELP_STRING([--enable-udev_sync], | |
884 | [enable synchronisation with udev processing]), | |
885 | UDEV_SYNC=$enableval, UDEV_SYNC=no) | |
5d518f1f AK |
886 | AC_MSG_RESULT($UDEV_SYNC) |
887 | ||
888 | if test x$UDEV_SYNC = xyes; then | |
86ba564a AK |
889 | dnl -- init pkgconfig if required |
890 | if test x$PKGCONFIG_INIT != x1; then | |
891 | pkg_config_init | |
892 | fi | |
71b29ddc | 893 | PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) |
5d518f1f AK |
894 | AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) |
895 | fi | |
896 | ||
897 | dnl -- Enable udev rules | |
898 | AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation) | |
71082be4 ZK |
899 | AC_ARG_ENABLE(udev_rules, |
900 | AC_HELP_STRING([--enable-udev_rules], | |
901 | [install rule files needed for udev synchronisation]), | |
902 | UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC) | |
5d518f1f AK |
903 | AC_MSG_RESULT($UDEV_RULES) |
904 | ||
b559a1e6 PR |
905 | if test x$UDEV_RULES = xyes; then |
906 | AC_MSG_CHECKING(whether udev supports builtin blkid) | |
907 | udev_version=$(udevadm info --version 2>/dev/null) | |
908 | if test -n "$udev_version" && test "$udev_version" -ge 176; then | |
909 | UDEV_HAS_BUILTIN_BLKID=yes | |
910 | else | |
911 | UDEV_HAS_BUILTIN_BLKID=no | |
912 | fi | |
913 | AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID) | |
914 | fi | |
915 | ||
f6fc418d AK |
916 | ################################################################################ |
917 | dnl -- Compatibility mode | |
71082be4 ZK |
918 | AC_ARG_ENABLE(compat, |
919 | AC_HELP_STRING([--enable-compat], | |
920 | [enable support for old device-mapper versions]), | |
921 | DM_COMPAT=$enableval, DM_COMPAT=no) | |
f6fc418d | 922 | |
2061c0ec AK |
923 | if test x$DM_COMPAT = xyes; then |
924 | AC_MSG_ERROR( | |
925 | [--enable-compat is not currently supported. | |
926 | Since device-mapper version 1.02.66, only one version (4) of the device-mapper | |
927 | ioctl protocol is supported.] | |
928 | ) | |
929 | fi | |
930 | ||
95eaa683 AK |
931 | ################################################################################ |
932 | dnl -- Compatible units suffix mode | |
933 | AC_ARG_ENABLE(units-compat, | |
71082be4 ZK |
934 | AC_HELP_STRING([--enable-units-compat], |
935 | [enable output compatibility with old versions that | |
936 | that do not use KiB-style unit suffixes]), | |
937 | UNITS_COMPAT=$enableval, UNITS_COMPAT=no) | |
95eaa683 AK |
938 | |
939 | if test x$UNITS_COMPAT = xyes; then | |
940 | AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.]) | |
941 | fi | |
942 | ||
f6fc418d AK |
943 | ################################################################################ |
944 | dnl -- Disable ioctl | |
71082be4 ZK |
945 | AC_ARG_ENABLE(ioctl, |
946 | AC_HELP_STRING([--disable-driver], | |
947 | [disable calls to device-mapper in the kernel]), | |
948 | DM_IOCTLS=$enableval) | |
f6fc418d | 949 | |
80992638 | 950 | ################################################################################ |
8ce0cbda | 951 | dnl -- Disable O_DIRECT |
ad6254c5 | 952 | AC_MSG_CHECKING(whether to enable O_DIRECT) |
71082be4 ZK |
953 | AC_ARG_ENABLE(o_direct, |
954 | AC_HELP_STRING([--disable-o_direct], [disable O_DIRECT]), | |
955 | ODIRECT=$enableval) | |
ad6254c5 | 956 | AC_MSG_RESULT($ODIRECT) |
2dc95e1c AK |
957 | |
958 | if test x$ODIRECT = xyes; then | |
72b2cb61 | 959 | AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.]) |
2dc95e1c AK |
960 | fi |
961 | ||
572fefeb AK |
962 | ################################################################################ |
963 | dnl -- Enable liblvm2app.so | |
964 | AC_MSG_CHECKING(whether to build liblvm2app.so application library) | |
965 | AC_ARG_ENABLE(applib, | |
71082be4 ZK |
966 | AC_HELP_STRING([--enable-applib], [build application library]), |
967 | APPLIB=$enableval, APPLIB=no) | |
572fefeb AK |
968 | AC_MSG_RESULT($APPLIB) |
969 | AC_SUBST([LVM2APP_LIB]) | |
970 | test x$APPLIB = xyes \ | |
971 | && LVM2APP_LIB=-llvm2app \ | |
972 | || LVM2APP_LIB= | |
973 | ||
80992638 | 974 | ################################################################################ |
8ce0cbda | 975 | dnl -- Enable cmdlib |
ad6254c5 | 976 | AC_MSG_CHECKING(whether to compile liblvm2cmd.so) |
71082be4 ZK |
977 | AC_ARG_ENABLE(cmdlib, |
978 | AC_HELP_STRING([--enable-cmdlib], [build shared command library]), | |
979 | CMDLIB=$enableval, CMDLIB=no) | |
ad6254c5 | 980 | AC_MSG_RESULT($CMDLIB) |
aa4d1e31 | 981 | AC_SUBST([LVM2CMD_LIB]) |
2a9a80c9 | 982 | test x$CMDLIB = xyes \ |
aa4d1e31 JM |
983 | && LVM2CMD_LIB=-llvm2cmd \ |
984 | || LVM2CMD_LIB= | |
8106cdd5 | 985 | |
f6fc418d AK |
986 | ################################################################################ |
987 | dnl -- Enable pkg-config | |
71082be4 ZK |
988 | AC_ARG_ENABLE(pkgconfig, |
989 | AC_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]), | |
990 | PKGCONFIG=$enableval, PKGCONFIG=no) | |
2a9a80c9 | 991 | |
23b059e7 ZK |
992 | ################################################################################ |
993 | dnl -- Enable installation of writable files by user | |
71082be4 ZK |
994 | AC_ARG_ENABLE(write_install, |
995 | AC_HELP_STRING([--enable-write_install], | |
996 | [install user writable files]), | |
997 | WRITE_INSTALL=$enableval, WRITE_INSTALL=no) | |
23b059e7 | 998 | |
80992638 | 999 | ################################################################################ |
8ce0cbda | 1000 | dnl -- Enable fsadm |
1995c9ff | 1001 | AC_MSG_CHECKING(whether to install fsadm) |
71082be4 ZK |
1002 | AC_ARG_ENABLE(fsadm, AC_HELP_STRING([--disable-fsadm], [disable fsadm]), |
1003 | FSADM=$enableval) | |
ad6254c5 | 1004 | AC_MSG_RESULT($FSADM) |
809fae91 | 1005 | |
06f62ad1 AK |
1006 | ################################################################################ |
1007 | dnl -- enable dmeventd handling | |
1008 | AC_MSG_CHECKING(whether to use dmeventd) | |
71082be4 ZK |
1009 | AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd], |
1010 | [enable the device-mapper event daemon]), | |
1011 | DMEVENTD=$enableval) | |
06f62ad1 AK |
1012 | AC_MSG_RESULT($DMEVENTD) |
1013 | ||
f6fc418d AK |
1014 | BUILD_DMEVENTD=$DMEVENTD |
1015 | ||
06f62ad1 | 1016 | dnl -- dmeventd currently requires internal mirror support |
2a9a80c9 PR |
1017 | if test x$DMEVENTD = xyes; then |
1018 | if test x$MIRRORS != xinternal; then | |
1019 | AC_MSG_ERROR( | |
1020 | --enable-dmeventd currently requires --with-mirrors=internal | |
1021 | ) | |
1022 | fi | |
1023 | if test x$CMDLIB = xno; then | |
1024 | AC_MSG_ERROR( | |
1025 | --enable-dmeventd requires --enable-cmdlib to be used as well | |
1026 | ) | |
1027 | fi | |
06f62ad1 AK |
1028 | fi |
1029 | ||
15d91f5a | 1030 | if test x$DMEVENTD = xyes; then |
72b2cb61 | 1031 | AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.]) |
15d91f5a | 1032 | fi |
f6fc418d | 1033 | |
3d962ed6 AK |
1034 | ################################################################################ |
1035 | dnl -- enable veritysetup | |
1036 | AC_MSG_CHECKING(whether to install veritysetup) | |
1037 | AC_ARG_WITH(veritysetup, AC_HELP_STRING([--with-veritysetup=TYPE], [build veritysetup using openssl/nss/gcrypt]), | |
1038 | VERITYSETUP=$withval) | |
1039 | AC_MSG_RESULT($VERITYSETUP) | |
1040 | ||
1041 | if test x$VERITYSETUP != xno -a x$VERITYSETUP != x; then | |
1042 | if test x$PKGCONFIG_INIT != x1; then | |
1043 | pkg_config_init | |
1044 | fi | |
1045 | ||
1046 | dnl Test OPENSSL | |
1047 | if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xopenssl; then | |
1048 | PKG_CHECK_MODULES(OPENSSL, openssl, [ | |
1049 | AC_DEFINE([CRYPT_OPENSSL], 1, [Define to 1 if OpenSSL encryption is to be used.]) | |
1050 | VERITYSETUP_CFLAGS="$OPENSSL_CFLAGS" | |
1051 | VERITYSETUP_LIBS="`echo "$OPENSSL_LIBS" | sed 's/-lssl\>//'`" | |
1052 | ], [ | |
1053 | AC_CHECK_LIB(crypto, EVP_get_digestbyname, [ | |
1054 | AC_CHECK_HEADER(openssl/evp.h, [ | |
1055 | AC_DEFINE([CRYPT_OPENSSL], 1, [Define to 1 if OpenSSL encryption is to be used.]) | |
1056 | VERITYSETUP_CFLAGS= | |
1057 | VERITYSETUP_LIBS="-lcrypto" | |
1058 | ]) | |
1059 | ]) | |
1060 | ]) | |
1061 | fi | |
1062 | ||
1063 | dnl Test NSS | |
1064 | if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xnss; then | |
1065 | PKG_CHECK_MODULES(NSS, nss, [ | |
1066 | AC_DEFINE([CRYPT_NSS], 1, [Define to 1 if nss encryption is to be used.]) | |
1067 | VERITYSETUP_CFLAGS="$NSS_CFLAGS" | |
1068 | VERITYSETUP_LIBS="`echo "$NSS_LIBS" | sed 's/-lsmime3\>//' | sed 's/-lssl3\>//'`" | |
1069 | ], true) | |
1070 | fi | |
1071 | ||
1072 | dnl Test GCRYPT | |
1073 | if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xgcrypt; then | |
1074 | AC_CHECK_LIB(gcrypt, gcry_md_map_name, [ | |
1075 | AC_CHECK_HEADER(gcrypt.h, [ | |
1076 | AC_DEFINE([CRYPT_GCRYPT], 1, [Define to 1 if gcrpyt encryption is to be used.]) | |
1077 | VERITYSETUP_CFLAGS= | |
1078 | VERITYSETUP_LIBS="-lgcrypt" | |
1079 | ]) | |
1080 | ]) | |
1081 | fi | |
1082 | ||
1083 | if test -z "$VERITYSETUP_LIBS"; then | |
1084 | AC_MSG_ERROR(No cryptographic library for veritysetup found) | |
1085 | fi | |
1086 | AC_CHECK_LIB(popt, poptGetContext, true, [ | |
1087 | AC_MSG_ERROR(popt library was not found) | |
1088 | ]) | |
1089 | AC_CHECK_HEADER(popt.h, true, [ | |
1090 | AC_MSG_ERROR(popt.h was not found) | |
1091 | ]) | |
1092 | VERITYSETUP_LIBS="$VERITYSETUP_LIBS -lpopt" | |
1093 | AC_SUBST(VERITYSETUP_CFLAGS) | |
1094 | AC_SUBST(VERITYSETUP_LIBS) | |
1095 | VERITYSETUP=yes | |
1096 | fi | |
1097 | AC_SUBST(VERITYSETUP) | |
1098 | ||
f6fc418d AK |
1099 | ################################################################################ |
1100 | dnl -- getline included in recent libc | |
1101 | ||
1102 | AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1, | |
1103 | [Define to 1 if getline is available.])) | |
1104 | ||
1105 | ################################################################################ | |
1106 | dnl -- canonicalize_file_name included in recent libc | |
1107 | ||
1108 | AC_CHECK_LIB(c, canonicalize_file_name, | |
1109 | AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1, | |
1110 | [Define to 1 if canonicalize_file_name is available.])) | |
1111 | ||
80992638 | 1112 | ################################################################################ |
d0191583 | 1113 | dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin |
795ca3e5 AK |
1114 | if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; |
1115 | then exec_prefix=""; | |
1116 | fi; | |
1117 | ||
80992638 | 1118 | ################################################################################ |
8ce0cbda | 1119 | dnl -- Check for dlopen |
19a2c6e0 | 1120 | AC_CHECK_LIB(dl, dlopen, [ |
72b2cb61 | 1121 | AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.]) |
19a2c6e0 ZK |
1122 | DL_LIBS="-ldl" |
1123 | HAVE_LIBDL=yes ], [ | |
1124 | DL_LIBS= | |
1125 | HAVE_LIBDL=no ]) | |
26e7f2e0 | 1126 | |
80992638 | 1127 | ################################################################################ |
8ce0cbda | 1128 | dnl -- Check for shared/static conflicts |
80992638 AK |
1129 | if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \ |
1130 | -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ | |
cac52ca4 | 1131 | -o "x$RAID" = xshared \ |
4922197a | 1132 | \) -a "x$STATIC_LINK" = xyes ]]; |
d68a82ec | 1133 | then AC_MSG_ERROR( |
036f273a | 1134 | Features cannot be 'shared' when building statically |
d68a82ec | 1135 | ) |
036f273a AK |
1136 | fi |
1137 | ||
f30875db ZK |
1138 | ################################################################################ |
1139 | if [[ "$DMEVENTD" = yes -o "$CLVMD" != none ]] ; then | |
1140 | AC_CHECK_LIB([pthread], [pthread_mutex_lock], | |
1141 | [PTHREAD_LIBS="-lpthread"], hard_bailout) | |
1142 | fi | |
1143 | ||
d0191583 JM |
1144 | ################################################################################ |
1145 | dnl -- Disable selinux | |
1146 | AC_MSG_CHECKING(whether to enable selinux support) | |
71082be4 ZK |
1147 | AC_ARG_ENABLE(selinux, |
1148 | AC_HELP_STRING([--disable-selinux], [disable selinux support]), | |
1149 | SELINUX=$enableval) | |
d0191583 JM |
1150 | AC_MSG_RESULT($SELINUX) |
1151 | ||
80992638 | 1152 | ################################################################################ |
8a2fc586 | 1153 | dnl -- Check for selinux |
80992638 | 1154 | if test x$SELINUX = xyes; then |
f8f6ec92 ZK |
1155 | AC_CHECK_LIB([sepol], [sepol_check_context], [ |
1156 | AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) | |
1157 | SELINUX_LIBS="-lsepol"]) | |
8a2fc586 | 1158 | |
f8f6ec92 ZK |
1159 | AC_CHECK_LIB([selinux], [is_selinux_enabled], [ |
1160 | AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) | |
7dfce0e4 | 1161 | AC_CHECK_HEADERS([selinux/label.h]) |
72b2cb61 | 1162 | AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) |
e1b8a236 | 1163 | SELINUX_LIBS="-lselinux $SELINUX_LIBS" |
f7f0854e | 1164 | SELINUX_PC="libselinux" |
f8f6ec92 | 1165 | HAVE_SELINUX=yes ], [ |
ad6254c5 | 1166 | AC_MSG_WARN(Disabling selinux) |
f8f6ec92 | 1167 | SELINUX_LIBS= |
f7f0854e | 1168 | SELINUX_PC= |
f8f6ec92 | 1169 | HAVE_SELINUX=no ]) |
036f273a | 1170 | fi |
d68a82ec | 1171 | |
8b1a3214 AK |
1172 | ################################################################################ |
1173 | dnl -- Check for realtime clock support | |
1174 | if test x$REALTIME = xyes; then | |
8b1a3214 | 1175 | AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no) |
8b1a3214 AK |
1176 | |
1177 | if test x$HAVE_REALTIME = xyes; then | |
1178 | AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) | |
1179 | LIBS="-lrt $LIBS" | |
1180 | else | |
1181 | AC_MSG_WARN(Disabling realtime clock) | |
1182 | fi | |
1183 | fi | |
1184 | ||
80992638 | 1185 | ################################################################################ |
8ce0cbda | 1186 | dnl -- Check for getopt |
d0191583 | 1187 | AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.])) |
b896caa1 | 1188 | |
80992638 | 1189 | ################################################################################ |
8ce0cbda | 1190 | dnl -- Check for readline (Shamelessly copied from parted 1.4.17) |
ea7cfb00 | 1191 | if test x$READLINE != xno; then |
539f4a77 ZK |
1192 | lvm_saved_libs=$LIBS |
1193 | AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib], | |
1194 | READLINE_LIBS=$ac_cv_search_tgetent, [ | |
1195 | if test "$READLINE" = yes; then | |
1196 | AC_MSG_ERROR( | |
1197 | [termcap could not be found which is required for the | |
1198 | --enable-readline option (which is enabled by default). Either disable readline | |
1199 | support with --disable-readline or download and install termcap from: | |
1200 | ftp.gnu.org/gnu/termcap | |
1201 | Note: if you are using precompiled packages you will also need the development | |
1202 | package as well (which may be called termcap-devel or something similar). | |
1203 | Note: (n)curses also seems to work as a substitute for termcap. This was | |
1204 | not found either - but you could try installing that as well.]) | |
1205 | fi]) | |
1206 | dnl -- Old systems may need extra termcap dependency explicitly in LIBS | |
1207 | AC_CHECK_LIB([readline], [readline], [ | |
1208 | AC_DEFINE([READLINE_SUPPORT], 1, | |
1209 | [Define to 1 to include the LVM readline shell.]) | |
1210 | dnl -- Try only with -lreadline and check for different symbol | |
1211 | LIBS=$lvm_saved_libs | |
1212 | AC_CHECK_LIB([readline], [rl_line_buffer], | |
1213 | [ READLINE_LIBS="-lreadline" ], [ | |
1214 | AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed]) | |
1215 | READLINE_LIBS="-lreadline $READLINE_LIBS" | |
1216 | ]) ], [ | |
1217 | READLINE_LIBS= | |
1218 | if test "$READLINE" = yes; then | |
1219 | AC_MSG_ERROR( | |
1220 | [GNU Readline could not be found which is required for the | |
795ca3e5 AK |
1221 | --enable-readline option (which is enabled by default). Either disable readline |
1222 | support with --disable-readline or download and install readline from: | |
1223 | ftp.gnu.org/gnu/readline | |
1224 | Note: if you are using precompiled packages you will also need the development | |
539f4a77 ZK |
1225 | package as well (which may be called readline-devel or something similar).]) |
1226 | fi ]) | |
1227 | LIBS="$READLINE_LIBS $lvm_saved_libs" | |
1228 | AC_CHECK_FUNCS([rl_completion_matches]) | |
1229 | LIBS=$lvm_saved_libs | |
795ca3e5 AK |
1230 | fi |
1231 | ||
80992638 | 1232 | ################################################################################ |
8ce0cbda | 1233 | dnl -- Internationalisation stuff |
ad6254c5 | 1234 | AC_MSG_CHECKING(whether to enable internationalisation) |
71082be4 ZK |
1235 | AC_ARG_ENABLE(nls, |
1236 | AC_HELP_STRING([--enable-nls], [enable Native Language Support]), | |
1237 | INTL=$enableval, INTL=no) | |
ad6254c5 | 1238 | AC_MSG_RESULT($INTL) |
69792976 AK |
1239 | |
1240 | if test x$INTL = xyes; then | |
f6fc418d | 1241 | # FIXME - Move this - can be device-mapper too |
69792976 AK |
1242 | INTL_PACKAGE="lvm2" |
1243 | AC_PATH_PROG(MSGFMT, msgfmt) | |
1244 | if [[ "x$MSGFMT" == x ]]; | |
1245 | then AC_MSG_ERROR( | |
1246 | msgfmt not found in path $PATH | |
1247 | ) | |
69792976 AK |
1248 | fi; |
1249 | ||
1250 | AC_ARG_WITH(localedir, | |
71082be4 ZK |
1251 | AC_HELP_STRING([--with-localedir=DIR], |
1252 | [translation files in DIR | |
1253 | [[PREFIX/share/locale]]]), | |
1254 | LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale') | |
69792976 AK |
1255 | fi |
1256 | ||
80992638 | 1257 | ################################################################################ |
4a7f3eb2 | 1258 | AC_ARG_WITH(confdir, |
71082be4 ZK |
1259 | AC_HELP_STRING([--with-confdir=DIR], |
1260 | [configuration files in DIR [[/etc]]]), | |
1261 | CONFDIR=$withval, CONFDIR="/etc") | |
0a62c911 AK |
1262 | |
1263 | AC_ARG_WITH(staticdir, | |
71082be4 ZK |
1264 | AC_HELP_STRING([--with-staticdir=DIR], |
1265 | [static binaries in DIR [[EPREFIX/sbin]]]), | |
1266 | STATICDIR=$withval, STATICDIR='${exec_prefix}/sbin') | |
0a62c911 | 1267 | |
68f2de6d | 1268 | AC_ARG_WITH(usrlibdir, |
71082be4 ZK |
1269 | AC_HELP_STRING([--with-usrlibdir=DIR], |
1270 | [usrlib in DIR [[PREFIX/lib]]]), | |
1271 | usrlibdir=$withval, usrlibdir='${prefix}/lib') | |
68f2de6d AK |
1272 | |
1273 | AC_ARG_WITH(usrsbindir, | |
71082be4 ZK |
1274 | AC_HELP_STRING([--with-usrsbindir=DIR], |
1275 | [usrsbin executables in DIR [[PREFIX/sbin]]]), | |
1276 | usrsbindir=$withval, usrsbindir='${prefix}/sbin') | |
68f2de6d | 1277 | |
5d518f1f AK |
1278 | ################################################################################ |
1279 | AC_ARG_WITH(udev_prefix, | |
71082be4 ZK |
1280 | AC_HELP_STRING([--with-udev-prefix=UPREFIX], |
1281 | [install udev rule files in UPREFIX [[EPREFIX]]]), | |
1282 | udev_prefix=$withval, udev_prefix='${exec_prefix}') | |
5d518f1f | 1283 | |
78ce7acc | 1284 | AC_ARG_WITH(udevdir, |
71082be4 ZK |
1285 | AC_HELP_STRING([--with-udevdir=DIR], |
1286 | [udev rules in DIR [[UPREFIX/lib/udev/rules.d]]]), | |
1287 | udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d') | |
5d518f1f | 1288 | |
e587cb6a PR |
1289 | ################################################################################ |
1290 | dnl -- Get the systemd system unit dir value from pkg_config automatically if value not given explicitly. | |
1291 | dnl -- This follows the recommendation for systemd integration best practices mentioned in daemon(7) manpage. | |
1292 | AC_ARG_WITH(systemdsystemunitdir, | |
1293 | AC_HELP_STRING([--with-systemdsystemunitdir=DIR], | |
1294 | [systemd service files in DIR]), | |
1295 | systemdsystemunitdir=$withval, | |
767ce95a ZK |
1296 | dnl -- init pkgconfig if required |
1297 | test x$PKGCONFIG_INIT != x1 && pkg_config_init | |
e587cb6a PR |
1298 | pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)) |
1299 | ||
1300 | if test -n "$pkg_systemdsystemunitdir"; then | |
1301 | systemdsystemunitdir=$pkg_systemdsystemunitdir; | |
1302 | fi | |
1303 | ||
1304 | if test -z "$systemdsystemunitdir"; then | |
1305 | systemdsystemunitdir='/lib/systemd/system'; | |
1306 | fi | |
ad6254c5 | 1307 | ################################################################################ |
4417a8bd PR |
1308 | AC_ARG_WITH(tmpfilesdir, |
1309 | AC_HELP_STRING([--with-tmpfilesdir=DIR], | |
1310 | [install configuration files for management of volatile files and directories in DIR [[SYSCONFDIR/tmpfiles.d]]]), | |
1311 | tmpfilesdir=$withval, tmpfilesdir='${sysconfdir}/tmpfiles.d') | |
1312 | ################################################################################ | |
ad6254c5 AK |
1313 | dnl -- Ensure additional headers required |
1314 | if test x$READLINE = xyes; then | |
1315 | AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out)) | |
1316 | fi | |
1317 | ||
5c7fc7c4 | 1318 | if test x$CLVMD != xnone; then |
ad6254c5 AK |
1319 | 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)) |
1320 | AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out)) | |
1321 | AC_FUNC_GETMNTENT | |
ad6254c5 AK |
1322 | AC_FUNC_SELECT_ARGTYPES |
1323 | fi | |
1324 | ||
ad6254c5 AK |
1325 | if test x$CLUSTER != xnone; then |
1326 | AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out)) | |
1327 | AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out)) | |
1328 | fi | |
1329 | ||
d911ec67 AK |
1330 | if test x$DMEVENTD = xyes; then |
1331 | AC_CHECK_HEADERS(arpa/inet.h,,AC_MSG_ERROR(bailing out)) | |
1332 | fi | |
1333 | ||
ad6254c5 AK |
1334 | if test x$HAVE_LIBDL = xyes; then |
1335 | AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out)) | |
1336 | fi | |
1337 | ||
1338 | if test x$INTL = xyes; then | |
1339 | AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out)) | |
1340 | fi | |
1341 | ||
5d518f1f AK |
1342 | if test x$UDEV_SYNC = xyes; then |
1343 | AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,AC_MSG_ERROR(bailing out)) | |
1344 | fi | |
1345 | ||
a653923f AK |
1346 | ################################################################################ |
1347 | AC_PATH_PROG(MODPROBE_CMD, modprobe) | |
1348 | ||
1349 | if test x$MODPROBE_CMD != x; then | |
72b2cb61 | 1350 | AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.]) |
a653923f AK |
1351 | fi |
1352 | ||
a9b601e2 ZK |
1353 | |
1354 | lvm_exec_prefix=$exec_prefix | |
1355 | test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$prefix | |
1356 | test "$lvm_exec_prefix" = NONE && lvm_exec_prefix=$ac_default_prefix | |
d2c11605 ZK |
1357 | LVM_PATH="$lvm_exec_prefix/sbin/lvm" |
1358 | AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) | |
b5c2529b ZK |
1359 | |
1360 | if test "$CLVMD" != none; then | |
1361 | clvmd_prefix=$ac_default_prefix | |
d2c11605 | 1362 | CLVMD_PATH="$clvmd_prefix/sbin/clvmd" |
b5c2529b | 1363 | test "$prefix" != NONE && clvmd_prefix=$prefix |
d2c11605 | 1364 | AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$CLVMD_PATH"], [Path to clvmd binary.]) |
b5c2529b ZK |
1365 | fi |
1366 | ||
80992638 | 1367 | ################################################################################ |
f6fc418d | 1368 | dnl -- dmeventd pidfile and executable path |
f6fc418d AK |
1369 | if test "$BUILD_DMEVENTD" = yes; then |
1370 | AC_ARG_WITH(dmeventd-pidfile, | |
71082be4 ZK |
1371 | AC_HELP_STRING([--with-dmeventd-pidfile=PATH], |
1372 | [dmeventd pidfile [[/var/run/dmeventd.pid]]]), | |
1373 | DMEVENTD_PIDFILE=$withval, | |
1374 | DMEVENTD_PIDFILE="/var/run/dmeventd.pid") | |
1375 | AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"], | |
1376 | [Path to dmeventd pidfile.]) | |
f6fc418d AK |
1377 | fi |
1378 | ||
f6fc418d | 1379 | if test "$BUILD_DMEVENTD" = yes; then |
f6fc418d | 1380 | AC_ARG_WITH(dmeventd-path, |
71082be4 ZK |
1381 | AC_HELP_STRING([--with-dmeventd-path=PATH], |
1382 | [dmeventd path [[EPREFIX/sbin/dmeventd]]]), | |
1383 | DMEVENTD_PATH=$withval, | |
1384 | DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd") | |
1385 | AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"], | |
1386 | [Path to dmeventd binary.]) | |
f6fc418d AK |
1387 | fi |
1388 | ||
8bae0a1e AK |
1389 | AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.]) |
1390 | AC_ARG_WITH(default-run-dir, | |
1391 | [ --with-default-run-dir=DIR Default run directory [[/var/run/lvm]] ], | |
1392 | [ DEFAULT_RUN_DIR="$withval" ], | |
1393 | [ DEFAULT_RUN_DIR="/var/run/lvm" ]) | |
1394 | AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] ) | |
1395 | ||
3399ae32 AK |
1396 | ################################################################################ |
1397 | dnl -- various defaults | |
3399ae32 | 1398 | AC_ARG_WITH(default-system-dir, |
71082be4 ZK |
1399 | AC_HELP_STRING([--with-default-system-dir=DIR], |
1400 | [default LVM system directory [[/etc/lvm]]]), | |
1401 | DEFAULT_SYS_DIR=$withval, DEFAULT_SYS_DIR="/etc/lvm") | |
1402 | AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"], | |
1403 | [Path to LVM system directory.]) | |
3399ae32 | 1404 | |
3399ae32 | 1405 | AC_ARG_WITH(default-archive-subdir, |
71082be4 ZK |
1406 | AC_HELP_STRING([--with-default-archive-subdir=SUBDIR], |
1407 | [default metadata archive subdir [[archive]]]), | |
1408 | DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive) | |
1409 | AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"], | |
1410 | [Name of default metadata archive subdirectory.]) | |
3399ae32 | 1411 | |
3399ae32 | 1412 | AC_ARG_WITH(default-backup-subdir, |
71082be4 ZK |
1413 | AC_HELP_STRING([--with-default-backup-subdir=SUBDIR], |
1414 | [default metadata backup subdir [[backup]]]), | |
1415 | DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup) | |
1416 | AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"], | |
1417 | [Name of default metadata backup subdirectory.]) | |
3399ae32 | 1418 | |
3399ae32 | 1419 | AC_ARG_WITH(default-cache-subdir, |
71082be4 ZK |
1420 | AC_HELP_STRING([--with-default-cache-subdir=SUBDIR], |
1421 | [default metadata cache subdir [[cache]]]), | |
1422 | DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache) | |
1423 | AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"], | |
1424 | [Name of default metadata cache subdirectory.]) | |
3399ae32 | 1425 | |
3399ae32 | 1426 | AC_ARG_WITH(default-locking-dir, |
71082be4 ZK |
1427 | AC_HELP_STRING([--with-default-locking-dir=DIR], |
1428 | [default locking directory [[/var/lock/lvm]]]), | |
1429 | DEFAULT_LOCK_DIR=$withval, DEFAULT_LOCK_DIR="/var/lock/lvm") | |
1430 | AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"], | |
1431 | [Name of default locking directory.]) | |
3399ae32 | 1432 | |
7063efe1 MS |
1433 | ################################################################################ |
1434 | dnl -- Setup default data alignment | |
1435 | AC_ARG_WITH(default-data-alignment, | |
1436 | AC_HELP_STRING([--with-default-data-alignment=NUM], | |
1437 | [set the default data alignment in MiB [[1]]]), | |
1438 | DEFAULT_DATA_ALIGNMENT=$withval, DEFAULT_DATA_ALIGNMENT=1) | |
1439 | AC_DEFINE_UNQUOTED(DEFAULT_DATA_ALIGNMENT, [$DEFAULT_DATA_ALIGNMENT], | |
1440 | [Default data alignment.]) | |
1441 | ||
f6fc418d AK |
1442 | ################################################################################ |
1443 | dnl -- which kernel interface to use (ioctl only) | |
1444 | AC_MSG_CHECKING(for kernel interface choice) | |
1445 | AC_ARG_WITH(interface, | |
71082be4 ZK |
1446 | AC_HELP_STRING([--with-interface=IFACE], |
1447 | [choose kernel interface (ioctl) [[ioctl]]]), | |
1448 | interface=$withval, interface=ioctl) | |
f6fc418d AK |
1449 | if [[ "x$interface" != xioctl ]]; |
1450 | then | |
1451 | AC_MSG_ERROR(--with-interface=ioctl required. fs no longer supported.) | |
1452 | fi | |
1453 | AC_MSG_RESULT($interface) | |
1454 | ||
1455 | ################################################################################ | |
db8b5af9 | 1456 | DM_LIB_VERSION="\"`cat "$srcdir"/VERSION_DM 2>/dev/null || echo Unknown`\"" |
f58b35b5 AK |
1457 | AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version]) |
1458 | ||
db8b5af9 | 1459 | DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'` |
597c3f8e | 1460 | |
db8b5af9 | 1461 | LVM_VERSION="\"`cat "$srcdir"/VERSION 2>/dev/null || echo Unknown`\"" |
fae0c576 | 1462 | |
db8b5af9 | 1463 | VER=`cat "$srcdir"/VERSION` |
bf456146 | 1464 | LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\"" |
ec6a6fbe AK |
1465 | VER=`echo "$VER" | $AWK '{print $1}'` |
1466 | LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\"" | |
1467 | VER=`echo "$VER" | $AWK -F '-' '{print $1}'` | |
1468 | LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'` | |
1469 | LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'` | |
bf456146 AK |
1470 | LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'` |
1471 | LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` | |
ec6a6fbe | 1472 | |
80992638 | 1473 | ################################################################################ |
572fefeb | 1474 | AC_SUBST(APPLIB) |
aaa2e046 | 1475 | AC_SUBST(AWK) |
66fd4529 | 1476 | AC_SUBST(BUILD_CMIRRORD) |
d0191583 | 1477 | AC_SUBST(BUILD_DMEVENTD) |
615534d3 | 1478 | AC_SUBST(BUILD_LVMETAD) |
b896caa1 | 1479 | AC_SUBST(CFLAGS) |
d0191583 | 1480 | AC_SUBST(CFLOW_CMD) |
8106cdd5 | 1481 | AC_SUBST(CLDFLAGS) |
8106cdd5 | 1482 | AC_SUBST(CLDNOWHOLEARCHIVE) |
d0191583 JM |
1483 | AC_SUBST(CLDWHOLEARCHIVE) |
1484 | AC_SUBST(CLUSTER) | |
1485 | AC_SUBST(CLVMD) | |
34b6075d | 1486 | AC_SUBST(CLVMD_CMANAGERS) |
d2c11605 | 1487 | AC_SUBST(CLVMD_PATH) |
a946372e AK |
1488 | AC_SUBST(CMAN_CFLAGS) |
1489 | AC_SUBST(CMAN_LIBS) | |
b6d7a484 AK |
1490 | AC_SUBST(CMAP_CFLAGS) |
1491 | AC_SUBST(CMAP_LIBS) | |
d0191583 | 1492 | AC_SUBST(CMDLIB) |
edf47283 AK |
1493 | AC_SUBST(CONFDB_CFLAGS) |
1494 | AC_SUBST(CONFDB_LIBS) | |
1495 | AC_SUBST(CONFDIR) | |
d0191583 | 1496 | AC_SUBST(COPTIMISE_FLAG) |
edf47283 AK |
1497 | AC_SUBST(CPG_CFLAGS) |
1498 | AC_SUBST(CPG_LIBS) | |
d0191583 | 1499 | AC_SUBST(CSCOPE_CMD) |
8ef2b021 | 1500 | AC_SUBST(DEBUG) |
3399ae32 AK |
1501 | AC_SUBST(DEFAULT_SYS_DIR) |
1502 | AC_SUBST(DEFAULT_ARCHIVE_SUBDIR) | |
1503 | AC_SUBST(DEFAULT_BACKUP_SUBDIR) | |
1504 | AC_SUBST(DEFAULT_CACHE_SUBDIR) | |
7063efe1 | 1505 | AC_SUBST(DEFAULT_DATA_ALIGNMENT) |
3399ae32 | 1506 | AC_SUBST(DEFAULT_LOCK_DIR) |
b1f08e51 | 1507 | AC_SUBST(DEFAULT_RUN_DIR) |
199e490e | 1508 | AC_SUBST(DEVMAPPER) |
a946372e AK |
1509 | AC_SUBST(DLM_CFLAGS) |
1510 | AC_SUBST(DLM_LIBS) | |
19a2c6e0 | 1511 | AC_SUBST(DL_LIBS) |
d0191583 | 1512 | AC_SUBST(DMEVENTD) |
d1e8046f | 1513 | AC_SUBST(DMEVENTD_PATH) |
d0191583 JM |
1514 | AC_SUBST(DM_COMPAT) |
1515 | AC_SUBST(DM_DEVICE_GID) | |
1516 | AC_SUBST(DM_DEVICE_MODE) | |
1517 | AC_SUBST(DM_DEVICE_UID) | |
1518 | AC_SUBST(DM_IOCTLS) | |
1519 | AC_SUBST(DM_LIB_VERSION) | |
597c3f8e | 1520 | AC_SUBST(DM_LIB_PATCHLEVEL) |
bf09a320 | 1521 | AC_SUBST(ELDFLAGS) |
d0191583 | 1522 | AC_SUBST(FSADM) |
26e7f2e0 | 1523 | AC_SUBST(HAVE_LIBDL) |
8b1a3214 | 1524 | AC_SUBST(HAVE_REALTIME) |
d0191583 JM |
1525 | AC_SUBST(INTL) |
1526 | AC_SUBST(INTL_PACKAGE) | |
1527 | AC_SUBST(JOBS) | |
1528 | AC_SUBST(LDDEPS) | |
1529 | AC_SUBST(LIBS) | |
1530 | AC_SUBST(LIB_SUFFIX) | |
69792976 | 1531 | AC_SUBST(LOCALEDIR) |
d0191583 JM |
1532 | AC_SUBST(LVM1) |
1533 | AC_SUBST(LVM1_FALLBACK) | |
d0191583 | 1534 | AC_SUBST(LVM_VERSION) |
bf456146 | 1535 | AC_SUBST(LVM_LIBAPI) |
ec6a6fbe AK |
1536 | AC_SUBST(LVM_MAJOR) |
1537 | AC_SUBST(LVM_MINOR) | |
1538 | AC_SUBST(LVM_PATCHLEVEL) | |
d2c11605 | 1539 | AC_SUBST(LVM_PATH) |
ec6a6fbe AK |
1540 | AC_SUBST(LVM_RELEASE) |
1541 | AC_SUBST(LVM_RELEASE_DATE) | |
d0191583 | 1542 | AC_SUBST(MIRRORS) |
cac52ca4 | 1543 | AC_SUBST(MSGFMT) |
e40d44be | 1544 | AC_SUBST(OCF) |
349da06c | 1545 | AC_SUBST(OCFDIR) |
d0191583 JM |
1546 | AC_SUBST(PKGCONFIG) |
1547 | AC_SUBST(POOL) | |
f30875db | 1548 | AC_SUBST(PTHREAD_LIBS) |
edf47283 AK |
1549 | AC_SUBST(QUORUM_CFLAGS) |
1550 | AC_SUBST(QUORUM_LIBS) | |
cac52ca4 | 1551 | AC_SUBST(RAID) |
539f4a77 | 1552 | AC_SUBST(READLINE_LIBS) |
cac52ca4 | 1553 | AC_SUBST(REPLICATORS) |
90c80887 AK |
1554 | AC_SUBST(SACKPT_CFLAGS) |
1555 | AC_SUBST(SACKPT_LIBS) | |
a946372e AK |
1556 | AC_SUBST(SALCK_CFLAGS) |
1557 | AC_SUBST(SALCK_LIBS) | |
e1b8a236 | 1558 | AC_SUBST(SELINUX_LIBS) |
f7f0854e | 1559 | AC_SUBST(SELINUX_PC) |
d0191583 | 1560 | AC_SUBST(SNAPSHOTS) |
0a62c911 | 1561 | AC_SUBST(STATICDIR) |
d0191583 | 1562 | AC_SUBST(STATIC_LINK) |
1033d120 | 1563 | AC_SUBST(TESTING) |
3ba4a195 | 1564 | AC_SUBST(THIN) |
f61cacad | 1565 | AC_SUBST(THIN_CHECK_CMD) |
db724a44 | 1566 | AC_SUBST(UDEV_LIBS) |
f7f0854e | 1567 | AC_SUBST(UDEV_PC) |
5d518f1f | 1568 | AC_SUBST(UDEV_RULES) |
4df024c4 | 1569 | AC_SUBST(UDEV_SYNC) |
b559a1e6 | 1570 | AC_SUBST(UDEV_HAS_BUILTIN_BLKID) |
5da88e5b PR |
1571 | AC_SUBST(CUNIT_LIBS) |
1572 | AC_SUBST(CUNIT_CFLAGS) | |
23b059e7 | 1573 | AC_SUBST(WRITE_INSTALL) |
395d204d | 1574 | AC_SUBST(DMEVENTD_PIDFILE) |
f6fc418d AK |
1575 | AC_SUBST(interface) |
1576 | AC_SUBST(kerneldir) | |
1577 | AC_SUBST(missingkernel) | |
1578 | AC_SUBST(kernelvsn) | |
1579 | AC_SUBST(tmpdir) | |
5d518f1f AK |
1580 | AC_SUBST(udev_prefix) |
1581 | AC_SUBST(udevdir) | |
e587cb6a | 1582 | AC_SUBST(systemdsystemunitdir) |
4417a8bd | 1583 | AC_SUBST(tmpfilesdir) |
68f2de6d AK |
1584 | AC_SUBST(usrlibdir) |
1585 | AC_SUBST(usrsbindir) | |
8106cdd5 | 1586 | |
80992638 | 1587 | ################################################################################ |
d3a356b4 | 1588 | dnl -- First and last lines should not contain files to generate in order to |
8ce0cbda | 1589 | dnl -- keep utility scripts running properly |
d3a356b4 JM |
1590 | AC_CONFIG_FILES([ |
1591 | Makefile | |
1592 | make.tmpl | |
1593 | daemons/Makefile | |
1594 | daemons/clvmd/Makefile | |
5d311afb | 1595 | daemons/cmirrord/Makefile |
f6fc418d AK |
1596 | daemons/dmeventd/Makefile |
1597 | daemons/dmeventd/libdevmapper-event.pc | |
b7edb5bf | 1598 | daemons/dmeventd/plugins/Makefile |
d3d98fdc | 1599 | daemons/dmeventd/plugins/lvm2/Makefile |
3041b72f | 1600 | daemons/dmeventd/plugins/raid/Makefile |
f6fc418d AK |
1601 | daemons/dmeventd/plugins/mirror/Makefile |
1602 | daemons/dmeventd/plugins/snapshot/Makefile | |
2bc1d759 | 1603 | daemons/dmeventd/plugins/thin/Makefile |
615534d3 | 1604 | daemons/lvmetad/Makefile |
d3a356b4 | 1605 | doc/Makefile |
da05c479 | 1606 | doc/example.conf |
db8b5af9 | 1607 | include/.symlinks |
f6fc418d AK |
1608 | include/Makefile |
1609 | lib/Makefile | |
d3a356b4 JM |
1610 | lib/format1/Makefile |
1611 | lib/format_pool/Makefile | |
1612 | lib/locking/Makefile | |
1613 | lib/mirror/Makefile | |
8fea97b7 | 1614 | lib/replicator/Makefile |
ec6a6fbe | 1615 | lib/misc/lvm-version.h |
40dbaac8 | 1616 | lib/raid/Makefile |
d3a356b4 | 1617 | lib/snapshot/Makefile |
3ba4a195 | 1618 | lib/thin/Makefile |
832a1e73 AK |
1619 | libdaemon/Makefile |
1620 | libdaemon/client/Makefile | |
1621 | libdaemon/server/Makefile | |
f6fc418d AK |
1622 | libdm/Makefile |
1623 | libdm/libdevmapper.pc | |
e0c64c6c | 1624 | liblvm/Makefile |
70046623 | 1625 | liblvm/liblvm2app.pc |
f6fc418d AK |
1626 | man/Makefile |
1627 | po/Makefile | |
2de38033 | 1628 | scripts/clvmd_init_red_hat |
81410c8f | 1629 | scripts/cmirrord_init_red_hat |
a30491b2 | 1630 | scripts/lvm2_lvmetad_init_red_hat |
dac3c36f | 1631 | scripts/lvm2_lvmetad_systemd_red_hat.socket |
da532741 | 1632 | scripts/lvm2_lvmetad_systemd_red_hat.service |
595eaf92 | 1633 | scripts/lvm2_monitoring_init_red_hat |
395d204d PR |
1634 | scripts/dm_event_systemd_red_hat.service |
1635 | scripts/lvm2_monitoring_systemd_red_hat.service | |
4417a8bd | 1636 | scripts/lvm2_tmpfiles_red_hat.conf |
d3a356b4 | 1637 | scripts/Makefile |
f6fc418d | 1638 | test/Makefile |
c7e363f9 | 1639 | test/api/Makefile |
d4fed285 | 1640 | test/unit/Makefile |
d3a356b4 | 1641 | tools/Makefile |
5d518f1f | 1642 | udev/Makefile |
66392e66 | 1643 | unit-tests/datastruct/Makefile |
15106c50 | 1644 | unit-tests/regex/Makefile |
52e1564f | 1645 | unit-tests/mm/Makefile |
6bbbcf42 | 1646 | verity/Makefile |
7a197a62 AK |
1647 | ]) |
1648 | AC_OUTPUT | |
2dc95e1c AK |
1649 | |
1650 | if test x$ODIRECT != xyes; then | |
ad6254c5 | 1651 | AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up) |
2dc95e1c | 1652 | fi |