From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH] libquota: Do not build libquota when disabled
Date: Tue, 10 Jan 2012 17:46:36 +0100 [thread overview]
Message-ID: <1326213996-13759-1-git-send-email-jack@suse.cz> (raw)
Due to missing QUOTA_CMT definition in configure.in, libquota was built
(and e.g. include file was installed) even when quota support was disabled.
Fix it. Also fix help text of the configure option when we are at it.
Signed-off-by: Jan Kara <jack@suse.cz>
---
configure | 11 ++++++-----
configure.in | 4 +++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 9f5eeb5..965f7cf 100755
--- a/configure
+++ b/configure
@@ -1462,7 +1462,7 @@ Optional Features:
--disable-testio-debug disable the use of the test I/O manager for debugging
--disable-libuuid do not build private uuid library
--disable-libblkid do not build private blkid library
- --enable-libquota enable quota support
+ --enable-quota enable quota support
--disable-debugfs disable support of debugfs program
--disable-imager disable support of e2image program
--disable-resizer disable support of e2resize program
@@ -5209,11 +5209,13 @@ fi
if test "${enable_quota+set}" = set; then :
enableval=$enable_quota; if test "$enableval" = "no"
then
+ QUOTA_CMT="#"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling quota support" >&5
$as_echo "Disabling quota support" >&6; }
else
$as_echo "#define CONFIG_QUOTA 1" >>confdefs.h
+ QUOTA_CMT=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling quota support" >&5
$as_echo "Enabling quota support" >&6; }
fi
@@ -7127,7 +7129,6 @@ int
main ()
{
char *data, *data2, *data3;
- const char *cdata2;
int i, pagesize;
int fd, fd2;
@@ -7152,10 +7153,10 @@ main ()
fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
if (fd2 < 0)
return 4;
- cdata2 = "";
- if (write (fd2, cdata2, 1) != 1)
+ data2 = "";
+ if (write (fd2, data2, 1) != 1)
return 5;
- data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+ data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
if (data2 == MAP_FAILED)
return 6;
for (i = 0; i < pagesize; ++i)
diff --git a/configure.in b/configure.in
index c304a8d..94e7c21 100644
--- a/configure.in
+++ b/configure.in
@@ -531,12 +531,14 @@ dnl
PKG_PROG_PKG_CONFIG
AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
AC_ARG_ENABLE([quota],
-[ --enable-libquota enable quota support],
+[ --enable-quota enable quota support],
if test "$enableval" = "no"
then
+ QUOTA_CMT="#"
AC_MSG_RESULT([Disabling quota support])
else
AC_DEFINE(CONFIG_QUOTA, 1)
+ QUOTA_CMT=""
AC_MSG_RESULT([Enabling quota support])
fi
,
--
1.7.1
next reply other threads:[~2012-01-10 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 16:46 Jan Kara [this message]
2012-01-10 19:38 ` [PATCH] libquota: Do not build libquota when disabled Jan Kara
2012-01-10 21:50 ` Aditya Kali
2012-01-11 0:13 ` Jan Kara
2012-01-11 18:58 ` Aditya Kali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326213996-13759-1-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).