bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] issue warnings for more missing optional libraries


From: Pádraig Brady
Subject: [PATCH] issue warnings for more missing optional libraries
Date: Mon, 19 Oct 2009 11:26:24 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

I was going to mention some optional packages for coreutils in README-prereq

    libselinux-devel
    libcap-devel
    libattr-devel
    gmp-devel
    libacl-devel

However these names are linux specific and probably even fedora specific,
so what would be better I think is for configure to give appropriate warnings.
Well there are warnings actually for libselinux and libcap which one can easily 
miss
due to the default configure verbosity, so I've changed the example in 
README-hacking
to read `./configure --quiet`

I've also added similar warnings for missing libattr, gmp and libacl.
The first 2 are contained in coreutils while acl.m4 is part of gnulib.

The configure output with the patches is:

    configure: WARNING: GNU coreutils will be built without ACL support.
    configure: WARNING: libselinux was found but selinux/selinux.h is missing.
    configure: WARNING: GNU coreutils will be compiled without SELinux support.
    configure: WARNING: GNU coreutils will be built without xattr support.
    configure: WARNING: libcap library was not found or not usable.
    configure: WARNING: GNU coreutils will be built without capability support.
    configure: WARNING: GNU coreutils will be built without GMP support.

cheers,
Pádraig.
>From 961a5bd196c861ba41a2954e93d653fd8ff22a02 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Mon, 19 Oct 2009 11:12:40 +0100
Subject: [PATCH] maint: issue warnings for more missing optional libraries

* README-hacking: Suggest to use ./configure --quiet so that
any warnings are easily noticed.
* m4/gmp.m4 (cu_GMP): Warn if libgmp is not used.
* m4/jm-macros.m4 (coreutils_MACROS): Normalize the libcap warning.
* m4/xattr.m4 (gl_FUNC_XATTR): Warn if libattr not used.
---
 README-hacking  |    2 +-
 m4/gmp.m4       |    3 ++-
 m4/jm-macros.m4 |    3 ++-
 m4/xattr.m4     |    1 +
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/README-hacking b/README-hacking
index daaa4b1..c5d3128 100644
--- a/README-hacking
+++ b/README-hacking
@@ -35,7 +35,7 @@ which are extracted from other source packages:
 
 And there you are!  Just
 
-        $ ./configure #[--enable-gcc-warnings]
+        $ ./configure --quiet #[--enable-gcc-warnings]
         $ make
         $ make check
 
diff --git a/m4/gmp.m4 b/m4/gmp.m4
index 8e71120..95bb84c 100644
--- a/m4/gmp.m4
+++ b/m4/gmp.m4
@@ -30,7 +30,8 @@ AC_DEFUN([cu_GMP],
         LIB_GMP=$ac_cv_search___gmpz_init
         AC_DEFINE([HAVE_GMP], [1],
           [Define if you have GNU libgmp (or replacement)])
-       }])
+       }],
+      [AC_MSG_WARN([AC_PACKAGE_NAME will be built without GMP support.])])
     LIBS=$cu_saved_libs
   fi
 ])
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index f4d43f1..398cd47 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -118,7 +118,8 @@ AC_DEFUN([coreutils_MACROS],
       if test "X$enable_libcap" = "Xyes"; then
         AC_MSG_ERROR([libcap library was not found or not usable])
       else
-        AC_MSG_WARN([libcap library was not found or not usable, support for 
libcap will not be built])
+        AC_MSG_WARN([libcap library was not found or not usable.])
+        AC_MSG_WARN([AC_PACKAGE_NAME will be built without capability 
support.])
       fi
     fi
   else
diff --git a/m4/xattr.m4 b/m4/xattr.m4
index 878e86b..7351168 100644
--- a/m4/xattr.m4
+++ b/m4/xattr.m4
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_XATTR],
       use_xattr=1
     else
       use_xattr=0
+      AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
     fi
     AC_DEFINE_UNQUOTED([USE_XATTR], [$use_xattr],
                        [Define if you want extended attribute support.])
-- 
1.6.2.5

>From 768706d2da220ddbbdaff186fd78b057ea9607eb Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Mon, 19 Oct 2009 10:10:05 +0100
Subject: [PATCH] acl: warn if ACL support is not detected

m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found.
---
 m4/acl.m4 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/m4/acl.m4 b/m4/acl.m4
index 5340e2e..4f9a06d 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -116,6 +116,8 @@ int type = ACL_TYPE_EXTENDED;]],
     fi
     if test "x$enable_acl$use_acl" = "xyes0"; then
       AC_MSG_ERROR([ACLs enabled but support not detected])
+    elif test "x$enable_acl$use_acl" = "xauto0"; then
+      AC_MSG_WARN([AC_PACKAGE_NAME will be built without ACL support.])
     fi
   fi
   AC_SUBST([LIB_ACL])
-- 
1.6.2.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]