Hi, I had a little problem while building nmh-1.0 with krb4.

I ran `../nmh-1.0/configure --with-krb4=/usr/athena && make' and got
the following error:

gcc -s -o ali ali.o aliasbr.o ../config/version.o ../config/config.o ../sbr/libmh.a 
../mts/smtp/libsmtp.a ../zotnet/libzot.a -lkrb -ldes  
collect2: ld returned 1 exit status
/usr/ccs/bin/ld: Can't find library for -lkrb


The reason why it doesn't work is that configure.in manages to
overwrite the KRB4_LIBS variable in the second test.  I added a new
variable for the directory of the kerberos libraries and used that
instead.  Patch appended.

/assar

--- configure.in        Thu Aug 27 06:59:39 1998
+++ /tmp/configure.in   Mon Feb 15 19:30:26 1999
@@ -324,17 +324,17 @@
     if test -d "$with_krb4/include/kerberosIV"; then
       KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
     fi
-    KRB4_LIBS="-L$with_krb4/lib"
+    krb4_libdir="-L$with_krb4/lib"
   elif test -d /usr/include/kerberosIV; then
     KRB4_INCLUDES="-I/usr/include/kerberosIV"
   fi
   AC_CHECK_LIB(krb4, krb_rd_req,
-    [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
+    [KRB4_LIBS="$krb4_libdir -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
     [AC_CHECK_LIB(krb, krb_rd_req,
-      [KRB4_LIBS="-lkrb -ldes"],
+      [KRB4_LIBS="$krb4_libdir -lkrb -ldes"],
       [AC_MSG_ERROR(Kerberos 4 libraries not found)],
-      $KRB4_LIBS -ldes)],
-    $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)
+      $krb4_libdir -ldes)],
+    $krb4_libdir -ldes425 -lkrb5 -lcrypto -lcom_err)
 fi
 AC_SUBST(KRB4_INCLUDES)dnl
 AC_SUBST(KRB4_LIBS)dnl

Reply via email to