1use ExtUtils::MakeMaker; 2 3##### CHANGE THESE ACCORDING TO YOUR CONFIGURATION ##### 4 5# location of Kerberos 5 libraries 6my $KRB5_LIBDIR = '/usr/local/krb5/lib'; 7 8# any extra libraries? 9# add -lresolv here if you get errors like the following (usually on linux): 10# undefined symbol: __res_search 11my $KRB5_EXTRALIBS = '-lresolv'; 12 13# location of Kerberos 5 includes 14my $KRB5_INCDIR = '/usr/local/krb5/include'; 15 16# any extra include flags? 17my $KRB5_EXTRAINCS = ''; 18 19##### DO NOT CHANGE ANYTHING BELOW HERE ##### 20 21# check for libk5crypto -- only in krb5-1.1 and above 22print "Checking for libk5crypto..."; 23my $cryptolib; 24if ( -r "${KRB5_LIBDIR}/libk5crypto.a" || -r "${KRB5_LIBDIR}/libk5crypto.so" ) { 25 print "yes\n"; 26 $cryptolib = '-lk5crypto'; 27} 28else { 29 print "no. I'll use libcrypto instead.\n"; 30 $cryptolib = '-lcrypto'; 31} 32 33WriteMakefile( 34 'NAME' => 'Authen::Krb5', 35 'VERSION_FROM' => 'Krb5.pm', 36 'LIBS' => ["-L${KRB5_LIBDIR} -lkrb5 ${cryptolib} -lcom_err $KRB5_EXTRALIBS"], 37 'DEFINE' => '', 38 'INC' => "-I${KRB5_INCDIR} $KRB5_EXTRAINCS" 39); 40