Imported Upstream version 3.3.1
[debian/amanda] / config / amanda / krb5-security.m4
index 1cf0d7a5f1058ec258b671b3cb69b07b7f0b24dd..9c8cf30e048eaa45afcc9817d4fd5fee728af27b 100644 (file)
@@ -7,17 +7,9 @@
 #   Handle configuration for KRB5 security, implementing the --with-krb5-security
 #   option.  If libraries are found, they are added to the relevant compiler flags.
 #
-#   Defines KRB5_SECURITY, and sets AM_CONDITIONAL WANT_KRB5_SECURITY,
-#   if the user has selected this mechanism.  Also, the following parameters
-#   are taken from options and defined:
-#
-#    - SERVER_HOST_PRINCIPAL
-#    - SERVER_HOST_INSTANCE
-#    - SERVER_HOST_KEY_FILE
-#    - CLIENT_HOST_PRINCIPAL
-#    - CLIENT_HOST_INSTANCE
-#    - CLIENT_HOST_KEY_FILE
-#    - TICKET_LIFETIME
+#   Defines and substitutes KRB5_SECURITY, and sets AM_CONDITIONAL 
+#   WANT_KRB5_SECURITY, if the user has selected this mechanism.  Also, the
+#   following parameters are taken from options, defined, and substituted:
 #
 AC_DEFUN([AMANDA_KRB5_SECURITY],
 [
@@ -90,7 +82,10 @@ AC_DEFUN([AMANDA_KRB5_SECURITY],
                 AMANDA_ADD_CPPFLAGS([-I$KRB5_DIR_FOUND/include])
             fi
                 AC_CHECK_LIB(krb5support,main)
-            AMANDA_ADD_LDFLAGS([-L$KRB5_LIBDIR_FOUND])
+
+            if test "$KRB5_LIBDIR_FOUND" != "$libdir" ; then
+                AMANDA_ADD_LDFLAGS([-L$KRB5_LIBDIR_FOUND])
+            fi
 
             AC_DEFINE(KRB5_SECURITY,1,
                 [Define if Kerberos 5 security is to be enabled. ])
@@ -102,4 +97,5 @@ AC_DEFUN([AMANDA_KRB5_SECURITY],
     fi
 
     AM_CONDITIONAL(WANT_KRB5_SECURITY, test x"$KRB5_SECURITY" = x"yes")
+    AC_SUBST(KRB5_SECURITY)
 ])