📄 configure.in
字号:
if test x$HAVE_SEPOL = xyes; then AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) 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 if selinux is available.]) LIBS="-lselinux $LIBS" else AC_MSG_WARN(Disabling selinux) fifi################################################################################dnl -- Check for getoptAC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))################################################################################dnl -- Internationalisation stuffAC_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="device-mapper" 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################################################################################dnl -- Where the linux src tree isAC_MSG_CHECKING(for kernel directory)AC_ARG_WITH(kerneldir, [ --with-kernel-dir=DIR linux kernel source in DIR []], [ kerneldir="$withval" ] )if test "${with_kernel_dir+set}" = set; then kerneldir="$with_kernel_dir"fiif test "${with_kernel-dir+set}" = set; then kerneldir="$with_kerneldir"fiif test "${with_kernel-src+set}" = set; then kerneldir="$with_kernel-src"fiif test "${with_kernel_src+set}" = set; then kerneldir="$with_kernel_src"fiif test "${with_kernel+set}" = set; then kerneldir="$with_kernel"fiAC_MSG_RESULT($kerneldir)if test "x${kerneldir}" = x; then missingkernel=yeselse test -d "${kerneldir}" || { AC_MSG_WARN(kernel dir $kerneldir not found); missingkernel=yes ; }fi################################################################################dnl -- Kernel version stringAC_MSG_CHECKING(for kernel version)AC_ARG_WITH(kernel-version, [ --with-kernel-version=VERSION linux kernel version] )if test "${with_kernel-version+set}" = set; then kernelvsn="$with_kernel-version"fiif test "${with_kernelvsn+set}" = set; then kernelvsn="$with_kernelvsn"fiif test "${with_kernel_version+set}" = set; then kernelvsn="$with_kernel_version"fiif test "${with_kernelversion+set}" = set; then kernelvsn="$with_kernelversion"fiif test "x${kernelvsn}" = x; then if test "x${missingkernel}" = "x"; then kernelvsn=`awk -F ' = ' '/^VERSION/ {v=$2} /^PATCH/ {p=$2} /^SUBLEVEL/ {s=$2} /^EXTRAVERSION/ {e=$2} END {printf "%d.%d.%d%s",v,p,s,e}' $kerneldir/Makefile` else kernelvsn="UNKNOWN" fifiAC_MSG_RESULT($kernelvsn)################################################################################dnl -- Temporary directory for kernel diffsAC_ARG_WITH(tmp-dir, [ --with-tmp-dir=DIR temp dir to make kernel patches [[/tmp/kerndiff]] ], [ tmpdir="$withval" ], [ tmpdir=/tmp/kerndiff ])if test "${with_tmp_dir+set}" = set; then tmpdir="$with_tmp_dir"fiif test "${with_tmpdir+set}" = set; then tmpdir="$with_tmpdir"fi################################################################################dnl -- which kernel interface to use (ioctl or fs)AC_MSG_CHECKING(for kernel interface choice)AC_ARG_WITH(interface, [ --with-interface=IFACE Choose kernel interface (ioctl or fs) [[ioctl]] ], [ interface="$withval" ], [ interface=ioctl ])if [[ "x$interface" != xfs -a "x$interface" != xioctl ]];then AC_MSG_ERROR(--with-interface=ioctl or --with-interface=fs required)fiAC_MSG_RESULT($interface)if test "-f VERSION" ; then DM_LIB_VERSION="\"`cat VERSION|sed -e \"s/([[0-9.]]*)/\0-$interface/\"`\""else DM_LIB_VERSION="Unknown version ($interface)"fiAC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])################################################################################dnl -- dmeventd pidfile and executable pathAH_TEMPLATE(DMEVENTD_PIDFILE, [Path to dmeventd pidfile.])if test "$DMEVENTD" = yes; then AC_ARG_WITH(dmeventd-pidfile, [ --with-dmeventd-pidfile=PATH dmeventd pidfile [[/var/run/dmeventd.pid]] ], [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"$withval") ], [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"/var/run/dmeventd.pid") ])fiAH_TEMPLATE(DMEVENTD_PATH, [Path to dmeventd binary.])if test "$DMEVENTD" = yes; then dmeventd_prefix="$exec_prefix" if test "x$dmeventd_prefix" = "xNONE"; then dmeventd_prefix="$prefix" fi if test "x$dmeventd_prefix" = "xNONE"; then dmeventd_prefix="" fi AC_ARG_WITH(dmeventd-path, [ --with-dmeventd-path=PATH dmeventd path [[${exec_prefix}/sbin/dmeventd]] ], [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$withval") ], [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$dmeventd_pref/sbin/dmeventd") ])fi################################################################################AC_SUBST(usrlibdir)AC_SUBST(JOBS)AC_SUBST(STATIC_LINK)AC_SUBST(OWNER)AC_SUBST(GROUP)AC_SUBST(LIBS)AC_SUBST(interface)AC_SUBST(kerneldir)AC_SUBST(missingkernel)AC_SUBST(kernelvsn)AC_SUBST(tmpdir)AC_SUBST(CFLAGS)AC_SUBST(COPTIMISE_FLAG)AC_SUBST(CLDFLAGS)AC_SUBST(LDDEPS)AC_SUBST(LIB_SUFFIX)AC_SUBST(DEBUG)AC_SUBST(DM_LIB_VERSION)AC_SUBST(COMPAT)AC_SUBST(DMIOCTLS)AC_SUBST(MSGFMT)AC_SUBST(LOCALEDIR)AC_SUBST(INTL_PACKAGE)AC_SUBST(INTL)AC_SUBST(DEVICE_UID)AC_SUBST(DEVICE_GID)AC_SUBST(DEVICE_MODE)AC_SUBST(DMEVENTD)AC_SUBST(PKGCONFIG)################################################################################dnl -- First and last lines should not contain files to generate in order to dnl -- keep utility scripts running properlyAC_CONFIG_FILES([\Makefile \make.tmpl \include/Makefile \dmsetup/Makefile \lib/Makefile \lib/libdevmapper.pc \dmeventd/Makefile \dmeventd/libdevmapper-event.pc \kernel/Makefile \man/Makefile \po/Makefile \])AC_OUTPUTif test "x${kerneldir}" != "x" ; then if test -d "${kerneldir}"; then if test ! -f "${kerneldir}/include/linux/dm-ioctl.h"; then AC_MSG_WARN(Your kernel source in ${kerneldir} needs patching) if test "x${kernelvsn}" != "xUNKNOWN"; then AC_MSG_WARN([For supported kernels, try 'make apply-patches' next to do this, or apply thedevice-mapper patches by hand.]) fi fi else AC_MSG_WARN(kernel directory $kerneldir not found) fi if test "x${kernelvsn}" = "xUNKNOWN"; then AC_MSG_WARN([kernel version not detected: 'make apply-patches' won't work.If your kernel already contains device-mapper it may be OK,otherwise you'll need to apply the device-mapper patches by hand.]) fifi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -