Description: don't link with -lresolv
 Don't link with -lresolv to avoid unnecessary shared library
 dependencies. Strip unnecessary -I/usr/include and -L/usr/lib
 flags which may cause problems.
Author: Russ Allbery <rra@debian.org>
Reviewed-By: Jonathan Yu <jawnsy@cpan.org>
Origin: vendor
Forwarded: not-needed
Index: libauthen-krb5-perl-1.9/Makefile.PL
===================================================================
--- libauthen-krb5-perl-1.9.orig/Makefile.PL
+++ libauthen-krb5-perl-1.9/Makefile.PL
@@ -8,7 +8,8 @@
 # any extra libraries?
 # add -lresolv here if you get errors like the following (usually on linux):
 #  undefined symbol: __res_search
-my $KRB5_EXTRALIBS = '-lresolv';
+# Only needed with static linking, so not needed on Debian.
+#my $KRB5_EXTRALIBS = '-lresolv';
 
 # location of Kerberos 5 includes
 my $KRB5_INCDIR = '/usr/include';
@@ -18,22 +19,10 @@
 
 ##### DO NOT CHANGE ANYTHING BELOW HERE #####
 
-# check for libk5crypto -- only in krb5-1.1 and above
-print "Checking for libk5crypto...";
-my $cryptolib;
-if ( -r "${KRB5_LIBDIR}/libk5crypto.a" || -r "${KRB5_LIBDIR}/libk5crypto.so" ) {
-	print "yes\n";
-	$cryptolib = '-lk5crypto';
-}
-else {
-	print "no.  I'll use libcrypto instead.\n";
-	$cryptolib = '-lcrypto';
-}
-
 WriteMakefile(
     'NAME'	=> 'Authen::Krb5',
     'VERSION_FROM' => 'Krb5.pm',
-    'LIBS'	=> ["-L${KRB5_LIBDIR} -lkrb5 ${cryptolib} -lcom_err $KRB5_EXTRALIBS"],
+    'LIBS'     => [`krb5-config --libs`],
     'DEFINE'	=> '',
-    'INC'	=> "-I${KRB5_INCDIR} $KRB5_EXTRAINCS"
+    'INC'      => `krb5-config --cflags`
 );
