1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/configure.in

662 lines
22 KiB
Plaintext
Raw Normal View History

2001-09-21 16:37:43 +04:00
##
2004-07-03 22:21:13 +04:00
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
2001-09-21 16:37:43 +04:00
##
2004-07-03 22:21:13 +04:00
## This file is part of the LVM2.
2001-09-21 16:37:43 +04:00
##
2004-07-03 22:21:13 +04:00
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
2001-09-21 16:37:43 +04:00
##
2004-07-03 22:21:13 +04:00
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2001-09-21 16:37:43 +04:00
################################################################################
2004-07-03 22:21:13 +04:00
AC_PREREQ(2.53)
################################################################################
dnl -- Process this file with autoconf to produce a configure script.
2001-10-10 14:11:25 +04:00
AC_INIT(lib/device/dev-cache.h)
2001-09-21 16:37:43 +04:00
################################################################################
AC_CONFIG_HEADERS(lib/misc/configure.h)
################################################################################
2004-07-03 22:21:13 +04:00
dnl -- Setup the directory where autoconf has auxilary files
2001-09-21 16:37:43 +04:00
AC_CONFIG_AUX_DIR(autoconf)
################################################################################
dnl -- Get system type
2003-04-15 17:24:42 +04:00
AC_CANONICAL_SYSTEM
case "$host_os" in
linux*)
CFLAGS="$CFLAGS"
COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
2004-03-26 17:17:14 +03:00
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
LIB_SUFFIX="so"
2004-03-26 17:17:14 +03:00
DEVMAPPER=yes
ODIRECT=yes
SELINUX=yes
REALTIME=yes
2004-06-24 12:02:38 +04:00
CLUSTER=internal
FSADM=no ;;
2004-03-26 17:17:14 +03:00
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS"
2004-03-26 17:17:14 +03:00
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
LDDEPS="$LDDEPS"
LDFLAGS="$LDFLAGS"
LIB_SUFFIX="dylib"
DEVMAPPER=yes
ODIRECT=no
SELINUX=no
REALTIME=no
2004-06-24 12:02:38 +04:00
CLUSTER=none
FSADM=no ;;
2003-04-15 17:24:42 +04:00
esac
################################################################################
dnl -- Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PATH_PROG(CFLOW_CMD, cflow)
AC_PATH_PROG(CSCOPE_CMD, cscope)
################################################################################
dnl -- Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
2004-07-03 22:21:13 +04:00
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_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))
AC_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))
case "$host_os" in
linux*)
AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
darwin*)
AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
esac
################################################################################
dnl -- Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
2004-07-03 22:21:13 +04:00
AC_TYPE_MODE_T
AC_STRUCT_ST_RDEV
2004-07-03 22:21:13 +04:00
AC_STRUCT_TM
################################################################################
dnl -- Check for functions
AC_CHECK_FUNCS(gethostname getpagesize memset munmap setlocale strcasecmp strchr strdup strncasecmp strerror strrchr strstr strtol strtoul,,AC_MSG_ERROR(bailing out))
AC_FUNC_ALLOCA
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_FORK
AC_FUNC_LSTAT
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_STAT
AC_FUNC_STRTOD
################################################################################
dnl -- Prefix is /usr by default, the exec_prefix default is setup later
2001-09-21 16:37:43 +04:00
AC_PREFIX_DEFAULT(/usr)
################################################################################
dnl -- Parallel make jobs?
AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2)
################################################################################
dnl -- Setup the ownership of the files
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(file owner)
OWNER="root"
2001-09-21 16:37:43 +04:00
AC_ARG_WITH(user,
[ --with-user=USER Set the owner of installed files ],
[ OWNER="$withval" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($OWNER)
if test x$OWNER != x; then
OWNER="-o $OWNER"
fi
2001-09-21 16:37:43 +04:00
################################################################################
dnl -- Setup the group ownership of the files
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(group owner)
GROUP="root"
2001-09-21 16:37:43 +04:00
AC_ARG_WITH(group,
[ --with-group=GROUP Set the group owner of installed files ],
[ GROUP="$withval" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($GROUP)
if test x$GROUP != x; then
GROUP="-g $GROUP"
fi
2001-09-21 16:37:43 +04:00
################################################################################
dnl -- LVM1 tool fallback option
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable lvm1 fallback)
AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if
device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($LVM1_FALLBACK)
if test x$LVM1_FALLBACK = xyes; then
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])
fi
################################################################################
2002-11-18 17:04:08 +03:00
dnl -- format1 inclusion type
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to include support for lvm1 metadata)
2002-11-18 17:04:08 +03:00
AC_ARG_WITH(lvm1,
[ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
[TYPE=internal] ],
[ LVM1="$withval" ],
[ LVM1="internal" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($LVM1)
2002-11-18 17:04:08 +03:00
if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
then AC_MSG_ERROR(
--with-lvm1 parameter invalid
)
fi;
2003-04-15 17:24:42 +04:00
if test x$LVM1 = xinternal; then
AC_DEFINE([LVM1_INTERNAL], 1, [Define to 1 to include built-in support for LVM1 metadata.])
2003-04-15 17:24:42 +04:00
fi
################################################################################
2004-06-07 23:10:21 +04:00
dnl -- format_pool inclusion type
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to include support for GFS pool metadata)
2004-06-07 23:10:21 +04:00
AC_ARG_WITH(pool,
[ --with-pool=TYPE GFS pool read-only support: internal/shared/none
2004-06-07 23:10:21 +04:00
[TYPE=internal] ],
[ POOL="$withval" ],
[ POOL="internal" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($POOL)
2004-06-07 23:10:21 +04:00
if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
then AC_MSG_ERROR(
--with-pool parameter invalid
)
fi;
if test x$POOL = xinternal; then
AC_DEFINE([POOL_INTERNAL], 1, [Define to 1 to include built-in support for GFS pool metadata.])
2004-06-07 23:10:21 +04:00
fi
################################################################################
2004-06-24 12:02:38 +04:00
dnl -- cluster_locking inclusion type
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to include support for cluster locking)
2004-06-24 12:02:38 +04:00
AC_ARG_WITH(cluster,
[ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
[TYPE=internal] ],
[ CLUSTER="$withval" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($CLUSTER)
2004-06-24 12:02:38 +04:00
if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
then AC_MSG_ERROR(
--with-cluster parameter invalid
)
fi;
if test x$CLUSTER = xinternal; then
AC_DEFINE([CLUSTER_LOCKING_INTERNAL], 1, [Define to 1 to include built-in support for clustered LVM locking.])
2004-06-24 12:02:38 +04:00
fi
2004-06-07 23:10:21 +04:00
################################################################################
2004-05-05 01:25:57 +04:00
dnl -- snapshots inclusion type
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to include snapshots)
2004-05-05 01:25:57 +04:00
AC_ARG_WITH(snapshots,
[ --with-snapshots=TYPE Snapshot support: internal/shared/none
[TYPE=internal] ],
[ SNAPSHOTS="$withval" ],
[ SNAPSHOTS="internal" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($SNAPSHOTS)
2004-05-05 01:25:57 +04:00
if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
then AC_MSG_ERROR(
--with-snapshots parameter invalid
)
fi;
if test x$SNAPSHOTS = xinternal; then
AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])
2004-05-05 01:25:57 +04:00
fi
################################################################################
2004-05-05 01:25:57 +04:00
dnl -- mirrors inclusion type
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to include mirrors)
2004-05-05 01:25:57 +04:00
AC_ARG_WITH(mirrors,
[ --with-mirrors=TYPE Mirror support: internal/shared/none
[TYPE=internal] ],
[ MIRRORS="$withval" ],
[ MIRRORS="internal" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($MIRRORS)
2004-05-05 01:25:57 +04:00
if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
then AC_MSG_ERROR(
--with-mirrors parameter invalid
)
fi;
if test x$MIRRORS = xinternal; then
AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])
2004-05-05 01:25:57 +04:00
fi
################################################################################
dnl -- Enables staticly-linked tools
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to use static linking)
2004-03-26 17:17:14 +03:00
AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries
2001-09-21 16:37:43 +04:00
statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($STATIC_LINK)
2001-09-21 16:37:43 +04:00
################################################################################
dnl -- Enable readline
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable readline)
AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support],
2002-11-18 17:04:08 +03:00
READLINE=$enableval, READLINE=no)
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($READLINE)
2001-09-21 16:37:43 +04:00
2003-04-15 17:24:42 +04:00
if test x$READLINE = xyes; then
AC_DEFINE([READLINE_SUPPORT], 1, [Define to 1 to include the LVM readline shell.])
2003-04-15 17:24:42 +04:00
fi
################################################################################
dnl -- Disable selinux
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable selinux support)
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
SELINUX=$enableval)
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($SELINUX)
################################################################################
dnl -- Disable realtime clock support
AC_MSG_CHECKING(whether to enable realtime support)
2006-10-12 22:17:09 +04:00
AC_ARG_ENABLE(realtime, [ --disable-realtime Disable realtime clock support],
REALTIME=$enableval)
AC_MSG_RESULT($REALTIME)
################################################################################
dnl -- Build cluster LVM daemon
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to build cluster LVM daemon)
2004-11-26 21:07:17 +03:00
AC_ARG_WITH(clvmd,
[ --with-clvmd=TYPE Build cluster LVM Daemon: cman/gulm/none/all
2004-11-26 21:07:17 +03:00
[TYPE=none] ],
[ CLVMD="$withval" ],
[ CLVMD="none" ])
if test x$CLVMD = xyes; then
CLVMD=all
fi
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($CLVMD)
dnl -- If clvmd enabled without cluster locking, automagically include it
2004-11-26 21:07:17 +03:00
if test x$CLVMD != xnone && test x$CLUSTER = xnone; then
2004-06-24 12:02:38 +04:00
CLUSTER=internal
fi
################################################################################
dnl -- Enable debugging
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging],
DEBUG=$enableval, DEBUG=no)
AC_MSG_RESULT($DEBUG)
dnl -- Normally turn off optimisation for debug builds
if test x$DEBUG = xyes; then
COPTIMISE_FLAG=
else
CSCOPE_CMD=
fi
################################################################################
dnl -- Override optimisation
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(for C optimisation flag)
AC_ARG_WITH(optimisation,
[ --with-optimisation=OPT C optimisation flag [OPT=-O2] ],
[ COPTIMISE_FLAG="$withval" ])
2004-07-03 22:21:13 +04:00
AC_MSG_RESULT($COPTIMISE_FLAG)
################################################################################
dnl -- Disable devmapper
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to use device-mapper)
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction],
DEVMAPPER=$enableval)
AC_MSG_RESULT($DEVMAPPER)
2003-04-15 17:24:42 +04:00
if test x$DEVMAPPER = xyes; then
AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable device-mapper interaction.])
2003-04-15 17:24:42 +04:00
fi
################################################################################
dnl -- Disable O_DIRECT
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable O_DIRECT)
AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT],
ODIRECT=$enableval)
AC_MSG_RESULT($ODIRECT)
2003-11-06 20:14:06 +03:00
if test x$ODIRECT = xyes; then
AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
2003-11-06 20:14:06 +03:00
fi
################################################################################
dnl -- Enable cmdlib
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library],
CMDLIB=$enableval, CMDLIB=no)
AC_MSG_RESULT($CMDLIB)
2004-03-26 17:17:14 +03:00
################################################################################
dnl -- Enable fsadm
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to build fsadm)
AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm],
FSADM=$enableval)
AC_MSG_RESULT($FSADM)
2005-12-02 22:52:06 +03:00
################################################################################
dnl -- enable dmeventd handling
AC_MSG_CHECKING(whether to use dmeventd)
AC_ARG_ENABLE(dmeventd, [ --enable-dmeventd Enable the device-mapper event daemon],
DMEVENTD=$enableval)
AC_MSG_RESULT($DMEVENTD)
dnl -- dmeventd currently requires internal mirror support
if test x$DMEVENTD = xyes && test x$MIRRORS != xinternal; then
AC_MSG_ERROR(
--enable-dmeventd currently requires --with-mirrors=internal
)
fi
2005-12-02 23:35:07 +03:00
if test x$DMEVENTD = xyes; then
AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
2005-12-02 23:35:07 +03:00
fi
################################################################################
dnl -- Mess with default exec_prefix
2001-09-21 16:37:43 +04:00
if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
then exec_prefix="";
fi;
################################################################################
dnl -- Checks for library functions.
2001-09-21 16:37:43 +04:00
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
2004-07-03 22:21:13 +04:00
AC_CHECK_FUNCS(mkdir rmdir uname,,AC_MSG_ERROR(bailing out))
2001-09-21 16:37:43 +04:00
################################################################################
dnl -- Check for termcap (Shamelessly copied from parted 1.4.17)
2001-09-21 16:37:43 +04:00
if test x$READLINE = xyes; then
AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
AC_MSG_ERROR(
termcap could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install termcap from:
ftp.gnu.org/gnu/termcap
Note: if you are using precompiled packages you will also need the development
package as well (which may be called termcap-devel or something similar).
Note: (n)curses also seems to work as a substitute for termcap. This was
not found either - but you could try installing that as well.
)
)
fi
################################################################################
dnl -- Check for dlopen
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
if [[ "x$HAVE_LIBDL" = xyes ]]; then
AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
LIBS="-ldl $LIBS"
2004-04-05 20:29:37 +04:00
else
HAVE_LIBDL=no
fi
################################################################################
dnl -- Check for shared/static conflicts
if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
-o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
2004-05-05 01:25:57 +04:00
\) -a "x$STATIC_LINK" = xyes ]];
2004-04-05 20:29:37 +04:00
then AC_MSG_ERROR(
2004-04-07 18:08:22 +04:00
Features cannot be 'shared' when building statically
2004-04-05 20:29:37 +04:00
)
2004-04-07 18:08:22 +04:00
fi
################################################################################
dnl -- Check for selinux
if test x$SELINUX = xyes; then
AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
if test x$HAVE_SEPOL = xyes; then
LIBS="-lsepol $LIBS"
fi
AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
if test x$HAVE_SELINUX = xyes; then
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
LIBS="-lselinux $LIBS"
else
2004-07-03 22:21:13 +04:00
AC_MSG_WARN(Disabling selinux)
fi
2004-04-07 18:08:22 +04:00
fi
2004-04-05 20:29:37 +04:00
################################################################################
dnl -- Check for realtime clock support
if test x$REALTIME = xyes; then
AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
if test x$HAVE_REALTIME = xyes; then
AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
LIBS="-lrt $LIBS"
else
AC_MSG_WARN(Disabling realtime clock)
fi
fi
################################################################################
dnl -- Check for getopt
AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 to if getopt_long is available.]))
2003-04-15 17:24:42 +04:00
################################################################################
dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
2001-09-21 16:37:43 +04:00
if test x$READLINE = xyes; then
AC_CHECK_LIB(readline, readline, ,
AC_MSG_ERROR(
GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
package as well (which may be called readline-devel or something similar).
)
)
AC_CHECK_FUNC(rl_completion_matches, AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], 1, [Define to 1 if rl_completion_matches() is available.]))
2001-09-21 16:37:43 +04:00
fi
################################################################################
dnl -- Internationalisation stuff
2004-07-03 22:21:13 +04:00
AC_MSG_CHECKING(whether to enable internationalisation)
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],
INTL=$enableval, INTL=no)
AC_MSG_RESULT($INTL)
2004-02-14 01:56:45 +03:00
if test x$INTL = xyes; then
INTL_PACKAGE="lvm2"
AC_PATH_PROG(MSGFMT, msgfmt)
if [[ "x$MSGFMT" == x ]];
then AC_MSG_ERROR(
msgfmt not found in path $PATH
)
fi;
AC_ARG_WITH(localedir,
[ --with-localedir=DIR Translation files in DIR [PREFIX/share/locale]],
[ LOCALEDIR="$withval" ],
[ LOCALEDIR='${prefix}/share/locale' ])
fi
################################################################################
AC_ARG_WITH(confdir,
[ --with-confdir=DIR Configuration files in DIR [/etc]],
[ CONFDIR="$withval" ],
[ CONFDIR='/etc' ])
AC_ARG_WITH(staticdir,
[ --with-staticdir=DIR Static binary in DIR [EXEC_PREFIX/sbin]],
[ STATICDIR="$withval" ],
[ STATICDIR='${exec_prefix}/sbin' ])
AC_ARG_WITH(dmdir,
[ --with-dmdir=DIR Build against device-mapper source tree in DIR],
[ DMDIR="$withval" CPPFLAGS="$CPPFLAGS -I$DMDIR/include"],
[ DMDIR= ])
2004-07-03 22:21:13 +04:00
################################################################################
dnl -- Ensure additional headers required
if test x$READLINE = xyes; then
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
fi
if test x$CLVMD != xnone; then
2004-07-03 22:21:13 +04:00
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))
AC_CHECK_FUNCS(dup2 getmntent memmove select socket,,AC_MSG_ERROR(bailing out))
AC_FUNC_GETMNTENT
# AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
fi
if test x$FSADM = xyes; then
AC_CHECK_HEADERS(fstab.h sys/mount.h sys/vfs.h,,AC_MSG_ERROR(bailing out))
AC_CHECK_FUNCS(memmove,,AC_MSG_ERROR(bailing out))
fi
if test x$CLUSTER != xnone; then
AC_CHECK_HEADERS(sys/socket.h sys/un.h,,AC_MSG_ERROR(bailing out))
AC_CHECK_FUNCS(socket,,AC_MSG_ERROR(bailing out))
fi
if test x$HAVE_LIBDL = xyes; then
AC_CHECK_HEADERS(dlfcn.h,,AC_MSG_ERROR(bailing out))
fi
if test x$INTL = xyes; then
AC_CHECK_HEADERS(libintl.h,,AC_MSG_ERROR(bailing out))
fi
AC_CHECK_HEADERS(libdevmapper.h,,AC_MSG_ERROR(bailing out))
2004-07-03 22:21:13 +04:00
if test x$HAVE_SELINUX = xyes; then
AC_CHECK_HEADERS(selinux/selinux.h,,AC_MSG_ERROR(bailing out))
fi
################################################################################
AC_PATH_PROG(MODPROBE_CMD, modprobe)
if test x$MODPROBE_CMD != x; then
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
fi
################################################################################
if test "-f VERSION"; then
LVM_VERSION="\"`cat VERSION`\""
else
LVM_VERSION="Unknown"
fi
################################################################################
2001-09-21 16:37:43 +04:00
AC_SUBST(JOBS)
AC_SUBST(STATIC_LINK)
2002-11-18 17:04:08 +03:00
AC_SUBST(LVM1)
2004-06-07 23:10:21 +04:00
AC_SUBST(POOL)
2004-05-05 01:25:57 +04:00
AC_SUBST(SNAPSHOTS)
AC_SUBST(MIRRORS)
2001-09-21 16:37:43 +04:00
AC_SUBST(OWNER)
AC_SUBST(GROUP)
2003-04-15 17:24:42 +04:00
AC_SUBST(CFLAGS)
AC_SUBST(COPTIMISE_FLAG)
2004-03-26 17:17:14 +03:00
AC_SUBST(CLDFLAGS)
AC_SUBST(CLDWHOLEARCHIVE)
AC_SUBST(CLDNOWHOLEARCHIVE)
AC_SUBST(LDDEPS)
AC_SUBST(LDFLAGS)
2006-02-02 21:39:23 +03:00
AC_SUBST(LIB_SUFFIX)
AC_SUBST(LIBS)
AC_SUBST(LVM_VERSION)
AC_SUBST(LVM1_FALLBACK)
AC_SUBST(DEBUG)
AC_SUBST(DEVMAPPER)
AC_SUBST(HAVE_LIBDL)
2004-04-07 18:08:22 +04:00
AC_SUBST(HAVE_SELINUX)
AC_SUBST(HAVE_REALTIME)
2004-03-26 17:17:14 +03:00
AC_SUBST(CMDLIB)
2004-02-14 01:56:45 +03:00
AC_SUBST(MSGFMT)
AC_SUBST(LOCALEDIR)
AC_SUBST(CONFDIR)
AC_SUBST(STATICDIR)
AC_SUBST(DMDIR)
2004-02-14 01:56:45 +03:00
AC_SUBST(INTL_PACKAGE)
AC_SUBST(INTL)
2004-06-24 12:02:38 +04:00
AC_SUBST(CLVMD)
AC_SUBST(CLUSTER)
AC_SUBST(FSADM)
2005-12-02 22:52:06 +03:00
AC_SUBST(DMEVENTD)
AC_SUBST(CFLOW_CMD)
AC_SUBST(CSCOPE_CMD)
2004-03-26 17:17:14 +03:00
################################################################################
dnl -- First and last lines should not contain files to generate in order to
dnl -- keep utility scripts running properly
2001-09-21 16:37:43 +04:00
AC_OUTPUT( \
Makefile \
make.tmpl \
2004-06-24 12:02:38 +04:00
daemons/Makefile \
daemons/clvmd/Makefile \
2005-12-02 22:52:06 +03:00
dmeventd/Makefile \
dmeventd/mirror/Makefile \
doc/Makefile \
include/Makefile \
2001-09-21 16:37:43 +04:00
lib/Makefile \
2002-11-18 17:04:08 +03:00
lib/format1/Makefile \
2004-06-07 23:10:21 +04:00
lib/format_pool/Makefile \
2004-06-24 12:02:38 +04:00
lib/locking/Makefile \
2004-05-05 01:25:57 +04:00
lib/mirror/Makefile \
lib/snapshot/Makefile \
2001-09-21 16:37:43 +04:00
man/Makefile \
2004-02-14 01:56:45 +03:00
po/Makefile \
2006-11-20 23:03:26 +03:00
scripts/Makefile \
2001-09-21 16:37:43 +04:00
tools/Makefile \
tools/version.h \
tools/fsadm/Makefile \
test/mm/Makefile \
2001-10-08 17:58:52 +04:00
test/device/Makefile \
2001-10-08 13:50:00 +04:00
test/format1/Makefile \
test/regex/Makefile \
test/filters/Makefile \
2001-09-21 16:37:43 +04:00
)
2003-11-06 20:14:06 +03:00
if test x$ODIRECT != xyes; then
2004-07-03 22:21:13 +04:00
AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
2003-11-06 20:14:06 +03:00
fi
if test x$FSADM == xyes; then
2004-07-03 22:21:13 +04:00
AC_MSG_WARN(fsadm support is untested)
fi
2005-12-02 22:52:06 +03:00
if test x$DMEVENTD == xyes; then
AC_MSG_WARN(dmeventd support is untested)
fi