summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-05-18 10:36:11 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-05-18 12:43:25 +0200
commitfe00b163d67a6ec9c113fdc9c5ed06ad1d72c6d5 (patch)
tree3235ca24c4a4e774e82fcee937322a52427dde37 /configure.in
parent76cc477fbabf2ee7ceea48950cd1db32eb2e5fca (diff)
downloadlvm2-fe00b163d67a6ec9c113fdc9c5ed06ad1d72c6d5.tar.gz
configure: move DEFS to configure.h
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 13 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index 161f832e4..ba0b236df 100644
--- a/configure.in
+++ b/configure.in
@@ -201,6 +201,7 @@ AC_ARG_WITH(device-uid,
[set the owner used for new device nodes [UID=0]]),
DM_DEVICE_UID=$withval, DM_DEVICE_UID=0)
AC_MSG_RESULT($DM_DEVICE_UID)
+AC_DEFINE_UNQUOTED([DM_DEVICE_UID], [$DM_DEVICE_UID], [Define default owner for device node])
################################################################################
dnl -- Setup device group ownership
@@ -211,6 +212,7 @@ AC_ARG_WITH(device-gid,
[set the group used for new device nodes [GID=0]]),
DM_DEVICE_GID=$withval, DM_DEVICE_GID=0)
AC_MSG_RESULT($DM_DEVICE_GID)
+AC_DEFINE_UNQUOTED([DM_DEVICE_GID], [$DM_DEVICE_GID], [Define default group for device node])
################################################################################
dnl -- Setup device mode
@@ -221,6 +223,7 @@ AC_ARG_WITH(device-mode,
[set the mode used for new device nodes [MODE=0600]]),
DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600)
AC_MSG_RESULT($DM_DEVICE_MODE)
+AC_DEFINE_UNQUOTED([DM_DEVICE_MODE], [$DM_DEVICE_MODE], [Define default mode for device node])
AC_MSG_CHECKING(when to create device nodes)
AC_ARG_WITH(device-nodes-on,
@@ -1224,11 +1227,11 @@ AC_ARG_ENABLE(compat,
[enable support for old device-mapper versions]),
DM_COMPAT=$enableval, DM_COMPAT=no)
-if test "$DM_COMPAT" = yes; then
- AC_MSG_ERROR([--enable-compat is not currently supported.
+AS_IF([test "$DM_COMPAT" = yes],
+ [AC_DEFINE([DM_COMPAT], 1, [Define to enable compat protocol])
+ AC_MSG_ERROR([--enable-compat is not currently supported.
Since device-mapper version 1.02.66, only one version (4) of the device-mapper
-ioctl protocol is supported.])
-fi
+ioctl protocol is supported.])])
################################################################################
dnl -- Compatible units suffix mode
@@ -1248,6 +1251,8 @@ AC_ARG_ENABLE(ioctl,
AC_HELP_STRING([--disable-ioctl],
[disable ioctl calls to device-mapper in the kernel]),
DM_IOCTLS=$enableval)
+AS_IF([test "$DM_IOCTLS" = yes],
+ [AC_DEFINE([DM_IOCTLS], 1, [Define to enable ioctls calls to kernel])])
################################################################################
dnl -- Disable O_DIRECT
@@ -1506,14 +1511,15 @@ if test "$INTL" = yes; then
# FIXME - Move this - can be device-mapper too
INTL_PACKAGE="lvm2"
AC_PATH_TOOL(MSGFMT, msgfmt)
- if [[ -z "$MSGFMT" ]]; then
- AC_MSG_ERROR([msgfmt not found in path $PATH])
- fi
+
+ AS_IF(test -z "$MSGFMT"], [AC_MSG_ERROR([msgfmt not found in path $PATH])])
AC_ARG_WITH(localedir,
AC_HELP_STRING([--with-localedir=DIR],
[translation files in DIR [PREFIX/share/locale]]),
LOCALEDIR=$withval, LOCALEDIR='${prefix}/share/locale')
+ AC_DEFINE_UNQUOTED([INTL_PACKAGE], ["$INTL_PACKAGE"], [Internalization package])
+ AC_DEFINE_UNQUOTED([LOCALEDIR], ["$LOCALEDIR"], [Location of transaltion files])
fi
################################################################################
@@ -1784,11 +1790,6 @@ AC_SUBST(DLM_LIBS)
AC_SUBST(DL_LIBS)
AC_SUBST(DMEVENTD)
AC_SUBST(DMEVENTD_PATH)
-AC_SUBST(DM_COMPAT)
-AC_SUBST(DM_DEVICE_GID)
-AC_SUBST(DM_DEVICE_MODE)
-AC_SUBST(DM_DEVICE_UID)
-AC_SUBST(DM_IOCTLS)
AC_SUBST(DM_LIB_VERSION)
AC_SUBST(DM_LIB_PATCHLEVEL)
AC_SUBST(ELDFLAGS)
@@ -1798,12 +1799,10 @@ AC_SUBST(HAVE_LIBDL)
AC_SUBST(HAVE_REALTIME)
AC_SUBST(HAVE_VALGRIND)
AC_SUBST(INTL)
-AC_SUBST(INTL_PACKAGE)
AC_SUBST(JOBS)
AC_SUBST(LDDEPS)
AC_SUBST(LIBS)
AC_SUBST(LIB_SUFFIX)
-AC_SUBST(LOCALEDIR)
AC_SUBST(LVM1)
AC_SUBST(LVM1_FALLBACK)
AC_SUBST(LVM_VERSION)