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

Misc autoconf fixes

This commit is contained in:
Alasdair Kergon 2004-07-03 18:21:13 +00:00
parent 44486e80d9
commit b7b07552e5
3 changed files with 9980 additions and 2105 deletions

View File

@ -1,5 +1,6 @@
Version 2.00.20 -
==============================
Version 2.00.20 - 3 July 2004
=============================
More autoconf fixes.
Fix device number handling for 2.6 kernels.
Version 2.00.19 - 29 June 2004

11594
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,25 @@
##
## Copyright 1999-2000 Sistina Software, Inc.
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
##
## This is free software released under the GNU General Public License.
## There is no warranty for this software. See the file COPYING for
## details.
## This file is part of the LVM2.
##
## See the file CONTRIBUTORS for a list of contributors.
## 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.
##
## This file is maintained by:
## AJ Lewis <lewis@sistina.com>
##
## File name: configure.in
##
## Description: Input file for autoconf. Generates the configure script
## that tries to keep everything nice and portable. It also
## simplifies distribution package building considerably.
## 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
################################################################################
AC_PREREQ(2.53)
################################################################################
dnl -- Process this file with autoconf to produce a configure script.
AC_INIT(lib/device/dev-cache.h)
################################################################################
dnl -- setup the directory where autoconf has auxilary files
dnl -- Setup the directory where autoconf has auxilary files
AC_CONFIG_AUX_DIR(autoconf)
################################################################################
@ -73,7 +70,18 @@ AC_PROG_RANLIB
dnl -- Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h)
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.
@ -82,8 +90,22 @@ AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_STRUCT_ST_RDEV
AC_HEADER_TIME
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
@ -95,13 +117,13 @@ AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneou
################################################################################
dnl -- Setup the ownership of the files
echo $ac_n "Setting file owner to""... $ac_c" 1>&6
AC_MSG_CHECKING(file owner)
OWNER="root"
AC_ARG_WITH(user,
[ --with-user=USER Set the owner of installed files ],
[ OWNER="$withval" ])
echo "$ac_t""$OWNER" 1>&6
AC_MSG_RESULT($OWNER)
if test x$OWNER != x; then
OWNER="-o $OWNER"
@ -109,12 +131,12 @@ fi
################################################################################
dnl -- Setup the group ownership of the files
echo $ac_n "Setting group owner to""... $ac_c" 1>&6
AC_MSG_CHECKING(group owner)
GROUP="root"
AC_ARG_WITH(group,
[ --with-group=GROUP Set the group owner of installed files ],
[ GROUP="$withval" ])
echo "$ac_t""$GROUP" 1>&6
AC_MSG_RESULT($GROUP)
if test x$GROUP != x; then
GROUP="-g $GROUP"
@ -122,10 +144,10 @@ fi
################################################################################
dnl -- LVM1 tool fallback option
echo $ac_n "checking whether to enable lvm1 fallback""... $ac_c" 1>&6
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)
echo "$ac_t""$LVM1_FALLBACK" 1>&6
AC_MSG_RESULT($LVM1_FALLBACK)
if test x$LVM1_FALLBACK = xyes; then
CFLAGS="$CFLAGS -DLVM1_FALLBACK"
@ -133,19 +155,18 @@ fi
################################################################################
dnl -- format1 inclusion type
echo $ac_n "checking whether to include support for lvm1 metadata""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to include support for lvm1 metadata)
AC_ARG_WITH(lvm1,
[ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
[TYPE=internal] ],
[ LVM1="$withval" ],
[ LVM1="internal" ])
echo "$ac_t""$LVM1" 1>&6
AC_MSG_RESULT($LVM1)
if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
then AC_MSG_ERROR(
--with-lvm1 parameter invalid
)
exit
fi;
if test x$LVM1 = xinternal; then
@ -154,19 +175,18 @@ fi
################################################################################
dnl -- format_pool inclusion type
echo $ac_n "checking whether to include support for GFS pool metadata""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to include support for GFS pool metadata)
AC_ARG_WITH(pool,
[ --with-pool=TYPE GFS pool read-only support: internal/shared/none
[TYPE=internal] ],
[ POOL="$withval" ],
[ POOL="internal" ])
echo "$ac_t""$POOL" 1>&6
AC_MSG_RESULT($POOL)
if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
then AC_MSG_ERROR(
--with-pool parameter invalid
)
exit
fi;
if test x$POOL = xinternal; then
@ -175,18 +195,17 @@ fi
################################################################################
dnl -- cluster_locking inclusion type
echo $ac_n "checking whether to include support for cluster locking""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to include support for cluster locking)
AC_ARG_WITH(cluster,
[ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
[TYPE=internal] ],
[ CLUSTER="$withval" ])
echo "$ac_t""$CLUSTER" 1>&6
AC_MSG_RESULT($CLUSTER)
if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
then AC_MSG_ERROR(
--with-cluster parameter invalid
)
exit
fi;
if test x$CLUSTER = xinternal; then
@ -195,19 +214,18 @@ fi
################################################################################
dnl -- snapshots inclusion type
echo $ac_n "checking whether to include snapshots""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to include snapshots)
AC_ARG_WITH(snapshots,
[ --with-snapshots=TYPE Snapshot support: internal/shared/none
[TYPE=internal] ],
[ SNAPSHOTS="$withval" ],
[ SNAPSHOTS="internal" ])
echo "$ac_t""$SNAPSHOTS" 1>&6
AC_MSG_RESULT($SNAPSHOTS)
if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
then AC_MSG_ERROR(
--with-snapshots parameter invalid
)
exit
fi;
if test x$SNAPSHOTS = xinternal; then
@ -216,19 +234,18 @@ fi
################################################################################
dnl -- mirrors inclusion type
echo $ac_n "checking whether to include mirrors""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to include mirrors)
AC_ARG_WITH(mirrors,
[ --with-mirrors=TYPE Mirror support: internal/shared/none
[TYPE=internal] ],
[ MIRRORS="$withval" ],
[ MIRRORS="internal" ])
echo "$ac_t""$MIRRORS" 1>&6
AC_MSG_RESULT($MIRRORS)
if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
then AC_MSG_ERROR(
--with-mirrors parameter invalid
)
exit
fi;
if test x$MIRRORS = xinternal; then
@ -237,17 +254,17 @@ fi
################################################################################
dnl -- Enables staticly-linked tools
echo $ac_n "checking whether to use static linking""... $ac_c" 1>&6
AC_MSG_CHECKING(whether to use static linking)
AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries
statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
echo "$ac_t""$STATIC_LINK" 1>&6
AC_MSG_RESULT($STATIC_LINK)
################################################################################
dnl -- Enable readline
echo $ac_n "checking whether to enable readline""... $ac_c" 1>&6
AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support], \
AC_MSG_CHECKING(whether to enable readline)
AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support],
READLINE=$enableval, READLINE=no)
echo "$ac_t""$READLINE" 1>&6
AC_MSG_RESULT($READLINE)
if test x$READLINE = xyes; then
CFLAGS="$CFLAGS -DREADLINE_SUPPORT"
@ -255,17 +272,17 @@ fi
################################################################################
dnl -- Disable selinux
echo $ac_n "checking whether to enable selinux support""... $ac_c" 1>&6
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support], \
AC_MSG_CHECKING(whether to enable selinux support)
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
SELINUX=$enableval)
echo "$ac_t""$SELINUX" 1>&6
AC_MSG_RESULT($SELINUX)
################################################################################
dnl -- Build cluster LVM daemon
echo $ac_n "checking whether to build cluster LVM daemon""... $ac_c" 1>&6
AC_ARG_WITH(clvmd, [ --with-clvmd Build cluster LVM Daemon], \
AC_MSG_CHECKING(whether to build cluster LVM daemon)
AC_ARG_WITH(clvmd, [ --with-clvmd Build cluster LVM Daemon],
CLVMD=$withval, CLVMD=no)
echo "$ac_t""$CLVMD" 1>&6
AC_MSG_RESULT($CLVMD)
dnl -- If clvmd enabled without cluster locking, automagically include it
if test x$CLVMD = xyes && test x$CLUSTER = xnone; then
@ -274,10 +291,10 @@ fi
################################################################################
dnl -- Enable debugging
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \
DEBUG=yes, DEBUG=no)
echo "$ac_t""$DEBUG" 1>&6
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
@ -286,18 +303,18 @@ fi
################################################################################
dnl -- Override optimisation
echo $ac_n "checking for C optimisation flag""... $ac_c" 1>&6
AC_MSG_CHECKING(for C optimisation flag)
AC_ARG_WITH(optimisation,
[ --with-optimisation=OPT C optimisation flag [OPT=-O2] ],
[ COPTIMISE_FLAG="$withval" ])
echo "$ac_t""$COPTIMISE_FLAG" 1>&6
AC_MSG_RESULT($COPTIMISE_FLAG)
################################################################################
dnl -- Disable devmapper
echo $ac_n "checking whether to use device-mapper""... $ac_c" 1>&6
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \
DEVMAPPER=no)
echo "$ac_t""$DEVMAPPER" 1>&6
AC_MSG_CHECKING(whether to use device-mapper)
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction],
DEVMAPPER=$enableval)
AC_MSG_RESULT($DEVMAPPER)
if test x$DEVMAPPER = xyes; then
CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT"
@ -305,10 +322,10 @@ fi
################################################################################
dnl -- Disable O_DIRECT
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6
AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \
ODIRECT=no)
echo "$ac_t""$ODIRECT" 1>&6
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)
if test x$ODIRECT = xyes; then
CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT"
@ -316,10 +333,10 @@ fi
################################################################################
dnl -- Enable cmdlib
echo $ac_n "checking whether to compile liblvm2cmd.so""... $ac_c" 1>&6
AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library], \
CMDLIB=yes, CMDLIB=no)
echo "$ac_t""$CMDLIB" 1>&6
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)
if test x$CMDLIB = xyes; then
CFLAGS="$CFLAGS -DCMDLIB"
@ -327,9 +344,10 @@ fi
################################################################################
dnl -- Enable fsadm
echo $ac_n "checking whether to build fsadm""... $ac_c" 1>&6
AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm], FSADM=yes)
echo "$ac_t""$FSADM" 1>&6
AC_MSG_CHECKING(whether to build fsadm)
AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm],
FSADM=$enableval)
AC_MSG_RESULT($FSADM)
################################################################################
dnl -- Mess with default exec_prefix
@ -342,7 +360,7 @@ dnl -- Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(mkdir rmdir uname)
AC_CHECK_FUNCS(mkdir rmdir uname,,AC_MSG_ERROR(bailing out))
################################################################################
dnl -- Check for termcap (Shamelessly copied from parted 1.4.17)
@ -358,7 +376,6 @@ Note: if you are using precompiled packages you will also need the development
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.
)
exit
)
fi
@ -381,19 +398,20 @@ if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
then AC_MSG_ERROR(
Features cannot be 'shared' when building statically
)
exit
fi
################################################################################
dnl -- Check for is_selinux_enabled
if test x$SELINUX = xyes; then
AC_MSG_CHECKING(for is_selinux_enabled function)
AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
AC_MSG_RESULT($HAVE_SELINUX)
if test x$HAVE_SELINUX = xyes; then
CFLAGS="$CFLAGS -DHAVE_SELINUX"
LIBS="-lselinux $LIBS"
else
echo "Disabling selinux" 1>&6
AC_MSG_WARN(Disabling selinux)
fi
fi
@ -413,7 +431,6 @@ support with --disable-readline or download and install readline from:
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).
)
exit
)
AC_CHECK_FUNC(rl_completion_matches, CFLAGS="$CFLAGS -DHAVE_RL_COMPLETION_MATCHES")
@ -421,10 +438,10 @@ fi
################################################################################
dnl -- Internationalisation stuff
echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\
INTL=yes, INTL=no)
echo "$ac_t""$INTL" 1>&6
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)
if test x$INTL = xyes; then
INTL_PACKAGE="lvm2"
@ -433,7 +450,6 @@ if test x$INTL = xyes; then
then AC_MSG_ERROR(
msgfmt not found in path $PATH
)
exit
fi;
AC_ARG_WITH(localedir,
@ -453,6 +469,45 @@ AC_ARG_WITH(staticdir,
[ STATICDIR="$withval" ],
[ STATICDIR='${exec_prefix}/sbin' ])
################################################################################
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 = xyes; then
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
if test x$DEVMAPPER = xyes; then
AC_CHECK_HEADERS(libdevmapper.h,,AC_MSG_ERROR(bailing out))
fi
if test x$HAVE_SELINUX = xyes; then
AC_CHECK_HEADERS(selinux/selinux.h,,AC_MSG_ERROR(bailing out))
fi
################################################################################
if test "-f VERSION"; then
@ -525,14 +580,9 @@ test/filters/Makefile \
)
if test x$ODIRECT != xyes; then
echo
echo Warning: O_DIRECT disabled.
echo Use of pvmove may cause machine to lock up under low memory conditions.
echo
AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
fi
if test x$FSADM == xyes; then
echo
echo Warning: fsadm support is untested.
echo
AC_MSG_WARN(fsadm support is untested)
fi