This patch causes libapparmor's configure script to exit with an error
if any of the language bindings are requested but swig has not been
found earlier in the configure script. Without this script, configure
would bury the inability to find swig in its output, without informing
the user that building any of the language bindings would fail.

Patch is for both trunk and 2.8.3.

Signed-off-by: Steve Beattie <[email protected]>

---
 libraries/libapparmor/configure.in |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

Index: b/libraries/libapparmor/configure.in
===================================================================
--- a/libraries/libapparmor/configure.in
+++ b/libraries/libapparmor/configure.in
@@ -22,6 +22,7 @@ AC_ARG_WITH(python,
 [  --with-python           enable the python wrapper  [[default=no]]],
 [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
@@ -37,6 +37,7 @@ AC_ARG_WITH(perl,
 [ --with-perl           enable the perl wrapper [[default=no]]],
 [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
@@ -52,6 +51,7 @@ AC_ARG_WITH(ruby,
 [ --with-ruby           enable the ruby wrapper [[default=no]]],
 [AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
 if test "$with_ruby" = "yes"; then
+   test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling ruby 
bindings])
    AC_PATH_PROG([RUBY], [ruby])
 fi
 
 

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to