[apparmor] [patch 02/10] libapparmor - fail configure if interpreter for lang bindings not found
Tyler Hicks
tyhicks at canonical.com
Fri Sep 6 18:18:58 UTC 2013
On 2013-09-05 01:36:57, Steve Beattie wrote:
> This patch causes libapparmor's configure script to exit with an error
> if a language binding is asked for and the relevant interpreter is not
> found. The previous behavior was to *silently* disable the binding.
I like the behavior that you're proposing better than the old behavior.
If you ask for it, you should expect that it will be built or an error
notifying you of the problem.
>
> This patch is for both trunk and 2.8.3
>
> Signed-off-by: Steve Beattie <steve at nxnw.org>
Acked-by: Tyler Hicks <tyhicks at canonical.com>
>
> (There probably also needs to be a patch to check for
> a proper ruby development environment. However, that
> would involve adding additional autoconf macros to the tree;
> http://www.gnu.org/software/autoconf-archive/ax_ruby_devel.html looks
> like a reasonable candidate, but this need to grab semi-random stuff
> off the internet to do relatively common stuff is one of my gripes
> with autotools.)
>
> ---
> libraries/libapparmor/configure.in | 25 ++++++++++---------------
> 1 file changed, 10 insertions(+), 15 deletions(-)
>
> Index: b/libraries/libapparmor/configure.in
> ===================================================================
> --- a/libraries/libapparmor/configure.in
> +++ b/libraries/libapparmor/configure.in
> @@ -23,14 +23,11 @@ AC_ARG_WITH(python,
> [AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
> if test "$with_python" = "yes"; then
> test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling python bindings])
> - AC_PATH_PROG(PYTHON, python, no)
> - if test x$PYTHON = xno; then
> - enable_python = no
> - else
> - sinclude(m4/ac_python_devel.m4)
> - AC_PYTHON_DEVEL
> - AM_PATH_PYTHON
> - fi
> + AC_PATH_PROG(PYTHON, python)
> + test -z "$PYTHON" && AC_MSG_ERROR([python is required when enabling python bindings])
> + sinclude(m4/ac_python_devel.m4)
> + AC_PYTHON_DEVEL
> + AM_PATH_PYTHON
> fi
>
> AC_MSG_CHECKING(Checking for perl)
> @@ -39,13 +36,10 @@ AC_ARG_WITH(perl,
> [AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
> if test "$with_perl" = "yes"; then
> test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling perl bindings])
> - AC_PATH_PROG(PERL, perl, no)
> - if test x$PERL = xno; then
> - enable_perl=no
> - else
> - perl_includedir="`$PERL -e 'use Config; print $Config{archlib}'`/CORE"
> - AC_CHECK_FILE($perl_includedir/perl.h, enable_perl=yes, enable_perl=no)
> - fi
> + AC_PATH_PROG(PERL, perl)
> + test -z "$PERL" && AC_MSG_ERROR([perl is required when enabling perl bindings])
> + perl_includedir="`$PERL -e 'use Config; print $Config{archlib}'`/CORE"
> + AC_CHECK_FILE($perl_includedir/perl.h, enable_perl=yes, enable_perl=no)
> fi
>
>
> @@ -56,6 +50,7 @@ AC_ARG_WITH(ruby,
> if test "$with_ruby" = "yes"; then
> test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling ruby bindings])
> AC_PATH_PROG([RUBY], [ruby])
> + test -z "$RUBY" && AC_MSG_ERROR([ruby is required when enabling ruby bindings])
> fi
>
>
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130906/cc8cd74c/attachment.pgp>
More information about the AppArmor
mailing list