]> sourceware.org Git - lvm2.git/blame - configure.in
sign fix
[lvm2.git] / configure.in
CommitLineData
795ca3e5 1##
ad6254c5
AK
2## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
3## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
795ca3e5 4##
ad6254c5 5## This file is part of the LVM2.
795ca3e5 6##
ad6254c5
AK
7## This copyrighted material is made available to anyone wishing to use,
8## modify, copy, or redistribute it subject to the terms and conditions
9## of the GNU General Public License v.2.
795ca3e5 10##
ad6254c5
AK
11## You should have received a copy of the GNU General Public License
12## along with this program; if not, write to the Free Software Foundation,
13## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
795ca3e5
AK
14################################################################################
15
ad6254c5 16AC_PREREQ(2.53)
80992638 17################################################################################
8ce0cbda 18dnl -- Process this file with autoconf to produce a configure script.
13c7b701 19AC_INIT(lib/device/dev-cache.h)
795ca3e5 20
80992638 21################################################################################
ad6254c5 22dnl -- Setup the directory where autoconf has auxilary files
795ca3e5
AK
23AC_CONFIG_AUX_DIR(autoconf)
24
80992638 25################################################################################
8ce0cbda 26dnl -- Get system type
b896caa1
AK
27AC_CANONICAL_SYSTEM
28
29case "$host_os" in
30 linux*)
80992638 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"
e4c11ad1 38 LIB_SUFFIX="so"
8106cdd5 39 DEVMAPPER=yes
1a9ea74d 40 ODIRECT=yes
80992638 41 SELINUX=yes
d3c8211f 42 CLUSTER=internal
809fae91 43 FSADM=no ;;
8106cdd5 44 darwin*)
80992638 45 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
8ce0cbda 46 COPTIMISE_FLAG="-O2"
80992638 47 CLDFLAGS="$CLDFLAGS"
8106cdd5
AK
48 CLDWHOLEARCHIVE="-all_load"
49 CLDNOWHOLEARCHIVE=
80992638
AK
50 LDDEPS="$LDDEPS"
51 LDFLAGS="$LDFLAGS"
e4c11ad1 52 LIB_SUFFIX="dylib"
a653923f 53 DEVMAPPER=yes
1a9ea74d 54 ODIRECT=no
80992638 55 SELINUX=no
d3c8211f 56 CLUSTER=none
1a9ea74d 57 FSADM=no ;;
b896caa1
AK
58esac
59
80992638 60################################################################################
8ce0cbda
AK
61dnl -- Checks for programs.
62AC_PROG_AWK
63AC_PROG_CC
64AC_PROG_INSTALL
65AC_PROG_LN_S
66AC_PROG_MAKE_SET
67AC_PROG_RANLIB
8a2fc586
AK
68AC_PATH_PROG(CFLOW_CMD, cflow)
69AC_PATH_PROG(CSCOPE_CMD, cscope)
8ce0cbda
AK
70
71################################################################################
72dnl -- Checks for header files.
80992638
AK
73AC_HEADER_DIRENT
74AC_HEADER_STDC
ad6254c5
AK
75AC_HEADER_SYS_WAIT
76AC_HEADER_TIME
77
78AC_CHECK_HEADERS(fcntl.h limits.h locale.h stddef.h syslog.h sys/file.h sys/ioctl.h sys/param.h sys/time.h,,AC_MSG_ERROR(bailing out))
79AC_CHECK_HEADERS(assert.h ctype.h libgen.h signal.h stdio.h sys/mman.h sys/resource.h sys/stat.h sys/types.h sys/utsname.h sys/wait.h time.h,,AC_MSG_ERROR(bailing out))
80
81case "$host_os" in
82 linux*)
83 AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
84 darwin*)
85 AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
86esac
80992638
AK
87
88################################################################################
8ce0cbda 89dnl -- Checks for typedefs, structures, and compiler characteristics.
80992638
AK
90AC_C_CONST
91AC_C_INLINE
92AC_TYPE_OFF_T
93AC_TYPE_PID_T
94AC_TYPE_SIZE_T
ad6254c5 95AC_TYPE_MODE_T
80992638 96AC_STRUCT_ST_RDEV
ad6254c5
AK
97AC_STRUCT_TM
98
99################################################################################
100dnl -- Check for functions
101AC_CHECK_FUNCS(gethostname getpagesize memset munmap setlocale strcasecmp strchr strdup strncasecmp strerror strrchr strstr strtol strtoul,,AC_MSG_ERROR(bailing out))
102AC_FUNC_ALLOCA
103AC_FUNC_CLOSEDIR_VOID
104AC_FUNC_FORK
105AC_FUNC_LSTAT
106AC_FUNC_MALLOC
107AC_FUNC_MEMCMP
108AC_FUNC_MMAP
109AC_FUNC_STAT
110AC_FUNC_STRTOD
80992638
AK
111
112################################################################################
8ce0cbda 113dnl -- Prefix is /usr by default, the exec_prefix default is setup later
795ca3e5
AK
114AC_PREFIX_DEFAULT(/usr)
115
80992638
AK
116################################################################################
117dnl -- Parallel make jobs?
118AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2)
a38df97f 119
80992638 120################################################################################
8ce0cbda 121dnl -- Setup the ownership of the files
ad6254c5 122AC_MSG_CHECKING(file owner)
80992638
AK
123OWNER="root"
124
795ca3e5
AK
125AC_ARG_WITH(user,
126 [ --with-user=USER Set the owner of installed files ],
a38df97f 127 [ OWNER="$withval" ])
ad6254c5 128AC_MSG_RESULT($OWNER)
a38df97f
AK
129
130if test x$OWNER != x; then
131 OWNER="-o $OWNER"
132fi
795ca3e5 133
80992638 134################################################################################
8ce0cbda 135dnl -- Setup the group ownership of the files
ad6254c5 136AC_MSG_CHECKING(group owner)
80992638 137GROUP="root"
795ca3e5
AK
138AC_ARG_WITH(group,
139 [ --with-group=GROUP Set the group owner of installed files ],
a38df97f 140 [ GROUP="$withval" ])
ad6254c5 141AC_MSG_RESULT($GROUP)
a38df97f
AK
142
143if test x$GROUP != x; then
144 GROUP="-g $GROUP"
145fi
795ca3e5 146
80992638 147################################################################################
7d1552c9 148dnl -- LVM1 tool fallback option
ad6254c5 149AC_MSG_CHECKING(whether to enable lvm1 fallback)
7d1552c9
AK
150AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if
151 device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
ad6254c5 152AC_MSG_RESULT($LVM1_FALLBACK)
7d1552c9
AK
153
154if test x$LVM1_FALLBACK = xyes; then
8a2fc586 155 LVM_DEFS="$LVM_DEFS -DLVM1_FALLBACK"
7d1552c9
AK
156fi
157
80992638 158################################################################################
5a52dca9 159dnl -- format1 inclusion type
ad6254c5 160AC_MSG_CHECKING(whether to include support for lvm1 metadata)
5a52dca9
AK
161AC_ARG_WITH(lvm1,
162 [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
163 [TYPE=internal] ],
164 [ LVM1="$withval" ],
165 [ LVM1="internal" ])
ad6254c5 166AC_MSG_RESULT($LVM1)
5a52dca9
AK
167
168if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
169 then AC_MSG_ERROR(
170--with-lvm1 parameter invalid
171)
5a52dca9
AK
172fi;
173
b896caa1 174if test x$LVM1 = xinternal; then
8a2fc586 175 LVM_DEFS="$LVM_DEFS -DLVM1_INTERNAL"
b896caa1
AK
176fi
177
80992638 178################################################################################
d8ac0fbc 179dnl -- format_pool inclusion type
ad6254c5 180AC_MSG_CHECKING(whether to include support for GFS pool metadata)
d8ac0fbc 181AC_ARG_WITH(pool,
60329273 182 [ --with-pool=TYPE GFS pool read-only support: internal/shared/none
d8ac0fbc
AK
183 [TYPE=internal] ],
184 [ POOL="$withval" ],
185 [ POOL="internal" ])
ad6254c5 186AC_MSG_RESULT($POOL)
d8ac0fbc
AK
187
188if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
189 then AC_MSG_ERROR(
190--with-pool parameter invalid
191)
d8ac0fbc
AK
192fi;
193
194if test x$POOL = xinternal; then
8a2fc586 195 LVM_DEFS="$LVM_DEFS -DPOOL_INTERNAL"
d8ac0fbc
AK
196fi
197
80992638 198################################################################################
d3c8211f 199dnl -- cluster_locking inclusion type
ad6254c5 200AC_MSG_CHECKING(whether to include support for cluster locking)
d3c8211f
AK
201AC_ARG_WITH(cluster,
202 [ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
203 [TYPE=internal] ],
204 [ CLUSTER="$withval" ])
ad6254c5 205AC_MSG_RESULT($CLUSTER)
d3c8211f
AK
206
207if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
208 then AC_MSG_ERROR(
209--with-cluster parameter invalid
210)
d3c8211f
AK
211fi;
212
213if test x$CLUSTER = xinternal; then
8a2fc586 214 LVM_DEFS="$LVM_DEFS -DCLUSTER_LOCKING_INTERNAL"
d3c8211f 215fi
d8ac0fbc 216
80992638 217################################################################################
4922197a 218dnl -- snapshots inclusion type
ad6254c5 219AC_MSG_CHECKING(whether to include snapshots)
4922197a
AK
220AC_ARG_WITH(snapshots,
221 [ --with-snapshots=TYPE Snapshot support: internal/shared/none
222 [TYPE=internal] ],
223 [ SNAPSHOTS="$withval" ],
224 [ SNAPSHOTS="internal" ])
ad6254c5 225AC_MSG_RESULT($SNAPSHOTS)
4922197a
AK
226
227if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
228 then AC_MSG_ERROR(
229--with-snapshots parameter invalid
230)
4922197a
AK
231fi;
232
233if test x$SNAPSHOTS = xinternal; then
8a2fc586 234 LVM_DEFS="$LVM_DEFS -DSNAPSHOT_INTERNAL"
4922197a
AK
235fi
236
80992638 237################################################################################
4922197a 238dnl -- mirrors inclusion type
ad6254c5 239AC_MSG_CHECKING(whether to include mirrors)
4922197a
AK
240AC_ARG_WITH(mirrors,
241 [ --with-mirrors=TYPE Mirror support: internal/shared/none
242 [TYPE=internal] ],
243 [ MIRRORS="$withval" ],
244 [ MIRRORS="internal" ])
ad6254c5 245AC_MSG_RESULT($MIRRORS)
4922197a
AK
246
247if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
248 then AC_MSG_ERROR(
249--with-mirrors parameter invalid
250)
4922197a
AK
251fi;
252
253if test x$MIRRORS = xinternal; then
8a2fc586 254 LVM_DEFS="$LVM_DEFS -DMIRRORED_INTERNAL"
4922197a
AK
255fi
256
80992638 257################################################################################
8ce0cbda 258dnl -- Enables staticly-linked tools
ad6254c5 259AC_MSG_CHECKING(whether to use static linking)
8106cdd5 260AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries
795ca3e5 261 statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
ad6254c5 262AC_MSG_RESULT($STATIC_LINK)
795ca3e5 263
80992638 264################################################################################
8ce0cbda 265dnl -- Enable readline
ad6254c5
AK
266AC_MSG_CHECKING(whether to enable readline)
267AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support],
5a52dca9 268READLINE=$enableval, READLINE=no)
ad6254c5 269AC_MSG_RESULT($READLINE)
795ca3e5 270
b896caa1 271if test x$READLINE = xyes; then
8a2fc586 272 LVM_DEFS="$LVM_DEFS -DREADLINE_SUPPORT"
b896caa1
AK
273fi
274
80992638 275################################################################################
8ce0cbda 276dnl -- Disable selinux
ad6254c5
AK
277AC_MSG_CHECKING(whether to enable selinux support)
278AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
80992638 279SELINUX=$enableval)
ad6254c5 280AC_MSG_RESULT($SELINUX)
80992638
AK
281
282################################################################################
8ce0cbda 283dnl -- Build cluster LVM daemon
ad6254c5 284AC_MSG_CHECKING(whether to build cluster LVM daemon)
a266258f 285AC_ARG_WITH(clvmd,
5c7fc7c4 286 [ --with-clvmd=TYPE Build cluster LVM Daemon: cman/gulm/none/all
a266258f
AK
287 [TYPE=none] ],
288 [ CLVMD="$withval" ],
289 [ CLVMD="none" ])
290if test x$CLVMD = xyes; then
5c7fc7c4 291 CLVMD=all
b1098701 292fi
ad6254c5 293AC_MSG_RESULT($CLVMD)
80992638 294
8ce0cbda 295dnl -- If clvmd enabled without cluster locking, automagically include it
a266258f 296if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
d3c8211f
AK
297 CLUSTER=internal
298fi
d3c8211f 299
80992638 300################################################################################
8ce0cbda 301dnl -- Enable debugging
ad6254c5
AK
302AC_MSG_CHECKING(whether to enable debugging)
303AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging],
304DEBUG=$enableval, DEBUG=no)
305AC_MSG_RESULT($DEBUG)
8ef2b021 306
8ce0cbda
AK
307dnl -- Normally turn off optimisation for debug builds
308if test x$DEBUG = xyes; then
309 COPTIMISE_FLAG=
8a2fc586
AK
310else
311 CSCOPE_CMD=
8ce0cbda
AK
312fi
313
314################################################################################
315dnl -- Override optimisation
ad6254c5 316AC_MSG_CHECKING(for C optimisation flag)
8ce0cbda
AK
317AC_ARG_WITH(optimisation,
318 [ --with-optimisation=OPT C optimisation flag [OPT=-O2] ],
319 [ COPTIMISE_FLAG="$withval" ])
ad6254c5 320AC_MSG_RESULT($COPTIMISE_FLAG)
8ce0cbda 321
80992638 322################################################################################
8ce0cbda 323dnl -- Disable devmapper
ad6254c5
AK
324AC_MSG_CHECKING(whether to use device-mapper)
325AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction],
326DEVMAPPER=$enableval)
327AC_MSG_RESULT($DEVMAPPER)
199e490e 328
b896caa1 329if test x$DEVMAPPER = xyes; then
8a2fc586 330 LVM_DEFS="$LVM_DEFS -DDEVMAPPER_SUPPORT"
b896caa1
AK
331fi
332
80992638 333################################################################################
8ce0cbda 334dnl -- Disable O_DIRECT
ad6254c5
AK
335AC_MSG_CHECKING(whether to enable O_DIRECT)
336AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT],
337ODIRECT=$enableval)
338AC_MSG_RESULT($ODIRECT)
2dc95e1c
AK
339
340if test x$ODIRECT = xyes; then
8a2fc586 341 LVM_DEFS="$LVM_DEFS -DO_DIRECT_SUPPORT"
2dc95e1c
AK
342fi
343
80992638 344################################################################################
8ce0cbda 345dnl -- Enable cmdlib
ad6254c5
AK
346AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
347AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library],
348CMDLIB=$enableval, CMDLIB=no)
349AC_MSG_RESULT($CMDLIB)
8106cdd5 350
59376640 351if test x$CMDLIB = xyes; then
8a2fc586 352 LVM_DEFS="$LVM_DEFS -DCMDLIB"
8106cdd5
AK
353fi
354
80992638 355################################################################################
8ce0cbda 356dnl -- Enable fsadm
ad6254c5
AK
357AC_MSG_CHECKING(whether to build fsadm)
358AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm],
359FSADM=$enableval)
360AC_MSG_RESULT($FSADM)
809fae91 361
06f62ad1
AK
362################################################################################
363dnl -- enable dmeventd handling
364AC_MSG_CHECKING(whether to use dmeventd)
365AC_ARG_ENABLE(dmeventd, [ --enable-dmeventd Enable the device-mapper event daemon],
366DMEVENTD=$enableval)
367AC_MSG_RESULT($DMEVENTD)
368
369dnl -- dmeventd currently requires internal mirror support
370if test x$DMEVENTD = xyes && test x$MIRRORS != xinternal; then
371AC_MSG_ERROR(
372--enable-dmeventd currently requires --with-mirrors=internal
373)
374fi
375
15d91f5a 376if test x$DMEVENTD = xyes; then
8a2fc586 377 LVM_DEFS="$LVM_DEFS -DDMEVENTD"
15d91f5a 378fi
80992638 379################################################################################
8ce0cbda 380dnl -- Mess with default exec_prefix
795ca3e5
AK
381if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
382 then exec_prefix="";
383fi;
384
80992638 385################################################################################
8ce0cbda 386dnl -- Checks for library functions.
795ca3e5
AK
387AC_PROG_GCC_TRADITIONAL
388AC_TYPE_SIGNAL
389AC_FUNC_VPRINTF
ad6254c5 390AC_CHECK_FUNCS(mkdir rmdir uname,,AC_MSG_ERROR(bailing out))
795ca3e5 391
80992638 392################################################################################
8ce0cbda 393dnl -- Check for termcap (Shamelessly copied from parted 1.4.17)
795ca3e5
AK
394if test x$READLINE = xyes; then
395 AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
396 AC_MSG_ERROR(
397termcap could not be found which is required for the
398--enable-readline option (which is enabled by default). Either disable readline
399support with --disable-readline or download and install termcap from:
400 ftp.gnu.org/gnu/termcap
401Note: if you are using precompiled packages you will also need the development
402 package as well (which may be called termcap-devel or something similar).
403Note: (n)curses also seems to work as a substitute for termcap. This was
404 not found either - but you could try installing that as well.
405)
795ca3e5
AK
406 )
407fi
408
80992638 409################################################################################
8ce0cbda 410dnl -- Check for dlopen
26e7f2e0
AK
411AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
412
7e9e9502 413if [[ "x$HAVE_LIBDL" = xyes ]]; then
8a2fc586 414 LVM_DEFS="$LVM_DEFS -DHAVE_LIBDL"
26e7f2e0 415 LIBS="-ldl $LIBS"
d68a82ec
AK
416else
417 HAVE_LIBDL=no
26e7f2e0
AK
418fi
419
80992638 420################################################################################
8ce0cbda 421dnl -- Check for shared/static conflicts
80992638
AK
422if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
423 -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
4922197a 424 \) -a "x$STATIC_LINK" = xyes ]];
d68a82ec 425 then AC_MSG_ERROR(
036f273a 426Features cannot be 'shared' when building statically
d68a82ec 427)
036f273a
AK
428fi
429
80992638 430################################################################################
8a2fc586 431dnl -- Check for selinux
80992638 432if test x$SELINUX = xyes; then
8a2fc586
AK
433 AC_MSG_CHECKING(for sepol_check_context function)
434 AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
435 AC_MSG_RESULT($HAVE_SEPOL)
436
437 if test x$HAVE_SEPOL = xyes; then
438 LIBS="-lsepol $LIBS"
439 fi
440
ad6254c5 441 AC_MSG_CHECKING(for is_selinux_enabled function)
80992638 442 AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
ad6254c5 443 AC_MSG_RESULT($HAVE_SELINUX)
80992638
AK
444
445 if test x$HAVE_SELINUX = xyes; then
8a2fc586 446 LVM_DEFS="$LVM_DEFS -DHAVE_SELINUX"
80992638
AK
447 LIBS="-lselinux $LIBS"
448 else
ad6254c5 449 AC_MSG_WARN(Disabling selinux)
80992638 450 fi
036f273a 451fi
d68a82ec 452
80992638 453################################################################################
8ce0cbda 454dnl -- Check for getopt
8a2fc586 455AC_CHECK_HEADERS(getopt.h, LVM_DEFS="$LVM_DEFS -DHAVE_GETOPTLONG")
b896caa1 456
80992638 457################################################################################
8ce0cbda 458dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
795ca3e5
AK
459if test x$READLINE = xyes; then
460 AC_CHECK_LIB(readline, readline, ,
461 AC_MSG_ERROR(
462GNU Readline could not be found which is required for the
463--enable-readline option (which is enabled by default). Either disable readline
464support with --disable-readline or download and install readline from:
465 ftp.gnu.org/gnu/readline
466Note: if you are using precompiled packages you will also need the development
467package as well (which may be called readline-devel or something similar).
468)
795ca3e5 469 )
8a2fc586 470 AC_CHECK_FUNC(rl_completion_matches, LVM_DEFS="$LVM_DEFS -DHAVE_RL_COMPLETION_MATCHES")
b896caa1 471
795ca3e5
AK
472fi
473
80992638 474################################################################################
8ce0cbda 475dnl -- Internationalisation stuff
ad6254c5
AK
476AC_MSG_CHECKING(whether to enable internationalisation)
477AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],
478 INTL=$enableval, INTL=no)
479AC_MSG_RESULT($INTL)
69792976
AK
480
481if test x$INTL = xyes; then
482 INTL_PACKAGE="lvm2"
483 AC_PATH_PROG(MSGFMT, msgfmt)
484 if [[ "x$MSGFMT" == x ]];
485 then AC_MSG_ERROR(
486 msgfmt not found in path $PATH
487 )
69792976
AK
488 fi;
489
490 AC_ARG_WITH(localedir,
491 [ --with-localedir=DIR Translation files in DIR [PREFIX/share/locale]],
492 [ LOCALEDIR="$withval" ],
493 [ LOCALEDIR='${prefix}/share/locale' ])
494fi
495
80992638 496################################################################################
4a7f3eb2 497AC_ARG_WITH(confdir,
0a62c911 498 [ --with-confdir=DIR Configuration files in DIR [/etc]],
4a7f3eb2 499 [ CONFDIR="$withval" ],
0a62c911
AK
500 [ CONFDIR='/etc' ])
501
502AC_ARG_WITH(staticdir,
503 [ --with-staticdir=DIR Static binary in DIR [EXEC_PREFIX/sbin]],
504 [ STATICDIR="$withval" ],
505 [ STATICDIR='${exec_prefix}/sbin' ])
506
ad6254c5
AK
507################################################################################
508dnl -- Ensure additional headers required
509if test x$READLINE = xyes; then
510 AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
511fi
512
5c7fc7c4 513if test x$CLVMD != xnone; then
ad6254c5
AK
514 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))
515 AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
516 AC_FUNC_GETMNTENT
517# AC_FUNC_REALLOC
518 AC_FUNC_SELECT_ARGTYPES
519fi
520
521if test x$FSADM = xyes; then
522 AC_CHECK_HEADERS(fstab.h sys/mount.h sys/vfs.h,,AC_MSG_ERROR(bailing out))
523 AC_CHECK_FUNCS(memmove,,AC_MSG_ERROR(bailing out))
524fi
525
526if test x$CLUSTER != xnone; then
527 AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
528 AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
529fi
530
531if test x$HAVE_LIBDL = xyes; then
532 AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
533fi
534
535if test x$INTL = xyes; then
536 AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
537fi
538
539if test x$DEVMAPPER = xyes; then
540 AC_CHECK_HEADERS(libdevmapper.h,,AC_MSG_ERROR(bailing out))
541fi
542
543if test x$HAVE_SELINUX = xyes; then
544 AC_CHECK_HEADERS(selinux/selinux.h,,AC_MSG_ERROR(bailing out))
545fi
4a7f3eb2 546
a653923f
AK
547################################################################################
548AC_PATH_PROG(MODPROBE_CMD, modprobe)
549
550if test x$MODPROBE_CMD != x; then
8a2fc586 551 LVM_DEFS="$LVM_DEFS -DMODPROBE_CMD=\\\"$MODPROBE_CMD\\\""
a653923f
AK
552fi
553
80992638 554################################################################################
fae0c576
AK
555if test "-f VERSION"; then
556 LVM_VERSION="\"`cat VERSION`\""
557else
558 LVM_VERSION="Unknown"
559fi
560
80992638 561################################################################################
795ca3e5
AK
562AC_SUBST(JOBS)
563AC_SUBST(STATIC_LINK)
5a52dca9 564AC_SUBST(LVM1)
d8ac0fbc 565AC_SUBST(POOL)
4922197a
AK
566AC_SUBST(SNAPSHOTS)
567AC_SUBST(MIRRORS)
795ca3e5
AK
568AC_SUBST(OWNER)
569AC_SUBST(GROUP)
b896caa1 570AC_SUBST(CFLAGS)
8a2fc586 571AC_SUBST(LVM_DEFS)
8ce0cbda 572AC_SUBST(COPTIMISE_FLAG)
8106cdd5
AK
573AC_SUBST(CLDFLAGS)
574AC_SUBST(CLDWHOLEARCHIVE)
575AC_SUBST(CLDNOWHOLEARCHIVE)
80992638
AK
576AC_SUBST(LDDEPS)
577AC_SUBST(LDFLAGS)
c1c065a3 578AC_SUBST(LIB_SUFFIX)
5f68d858 579AC_SUBST(LIBS)
fae0c576 580AC_SUBST(LVM_VERSION)
7d1552c9 581AC_SUBST(LVM1_FALLBACK)
8ef2b021 582AC_SUBST(DEBUG)
199e490e 583AC_SUBST(DEVMAPPER)
26e7f2e0 584AC_SUBST(HAVE_LIBDL)
036f273a 585AC_SUBST(HAVE_SELINUX)
8106cdd5 586AC_SUBST(CMDLIB)
69792976
AK
587AC_SUBST(MSGFMT)
588AC_SUBST(LOCALEDIR)
4a7f3eb2 589AC_SUBST(CONFDIR)
0a62c911 590AC_SUBST(STATICDIR)
69792976
AK
591AC_SUBST(INTL_PACKAGE)
592AC_SUBST(INTL)
d3c8211f
AK
593AC_SUBST(CLVMD)
594AC_SUBST(CLUSTER)
1a9ea74d 595AC_SUBST(FSADM)
06f62ad1 596AC_SUBST(DMEVENTD)
8a2fc586
AK
597AC_SUBST(CFLOW_CMD)
598AC_SUBST(CSCOPE_CMD)
8106cdd5 599
80992638 600################################################################################
8ce0cbda
AK
601dnl -- First and last lines should not contain files to generate in order to
602dnl -- keep utility scripts running properly
795ca3e5
AK
603AC_OUTPUT( \
604Makefile \
80992638 605make.tmpl \
d3c8211f
AK
606daemons/Makefile \
607daemons/clvmd/Makefile \
06f62ad1
AK
608dmeventd/Makefile \
609dmeventd/mirror/Makefile \
4a7f3eb2 610doc/Makefile \
fa42e649 611include/Makefile \
795ca3e5 612lib/Makefile \
5a52dca9 613lib/format1/Makefile \
d8ac0fbc 614lib/format_pool/Makefile \
d3c8211f 615lib/locking/Makefile \
4922197a
AK
616lib/mirror/Makefile \
617lib/snapshot/Makefile \
795ca3e5 618man/Makefile \
69792976 619po/Makefile \
795ca3e5 620tools/Makefile \
fae0c576 621tools/version.h \
1a9ea74d 622tools/fsadm/Makefile \
e6efb2b0 623test/mm/Makefile \
43b7b8cf 624test/device/Makefile \
e0304b58 625test/format1/Makefile \
d1b28647 626test/regex/Makefile \
291ec3b6 627test/filters/Makefile \
795ca3e5 628)
2dc95e1c
AK
629
630if test x$ODIRECT != xyes; then
ad6254c5 631 AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
2dc95e1c 632fi
809fae91
AK
633
634if test x$FSADM == xyes; then
ad6254c5 635 AC_MSG_WARN(fsadm support is untested)
809fae91 636fi
06f62ad1
AK
637
638if test x$DMEVENTD == xyes; then
639 AC_MSG_WARN(dmeventd support is untested)
640fi
This page took 0.107901 seconds and 5 git commands to generate.