[5417] in Moira
Autoconf patch for detecting krb4
daemon@ATHENA.MIT.EDU (Evan Broder)
Wed Mar 18 11:06:09 2009
Message-ID: <49C10D94.2090506@mit.edu>
Date: Wed, 18 Mar 2009 11:04:52 -0400
From: Evan Broder <broder@MIT.EDU>
MIME-Version: 1.0
To: moiradev@mit.edu
Content-Type: multipart/mixed;
boundary="------------030207080805050006090701"
This is a multi-part message in MIME format.
--------------030207080805050006090701
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi -
Currently the autoconf code to configure the krb4 libraries and
includes only conditionalizes adding the argument passed to --with-krb4
if it's not "yes". This triggers if the argument takes its default
value, or "no", which results in a spurious -Ino/include and -Lno/lib
being added to the CPPFLAGS and LDFLAGS, respectively.
This isn't an issue currently, because both the compiler and the linker
will ignore the nonexistent directories, but it does cause my shared
libmoira patch to fail to build because libtool will error out when the
-Lno/lib path doesn't exist.
A patch that I believe fixes this is attached.
Thanks,
- Evan
--------------030207080805050006090701
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
name="no-krb4-libs-unless-asked.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="no-krb4-libs-unless-asked.patch"
Index: configure.in
===================================================================
RCS file: /mit/moiradev/repository/moira/configure.in,v
retrieving revision 1.46
diff -u -r1.46 configure.in
--- configure.in 25 Feb 2009 22:30:34 -0000 1.46
+++ configure.in 18 Mar 2009 14:58:46 -0000
@@ -115,14 +115,16 @@
[ --with-krb4=PREFIX Specify location of krb4],
[krb4="$withval"], [krb4=no])
AC_MSG_RESULT($krb4)
-if test "$krb4" != yes; then
- MR_INCLUDE($krb4/include)
- if test -d "$krb4/include/kerberosIV"; then
- MR_INCLUDE($krb4/include/kerberosIV)
+if test "$krb4" != no; then
+ if test "$krb4" != yes; then
+ MR_INCLUDE($krb4/include)
+ if test -d "$krb4/include/kerberosIV"; then
+ MR_INCLUDE($krb4/include/kerberosIV)
+ fi
+ MR_LIBS($krb4/lib)
+ elif test -d /usr/include/kerberosIV; then
+ MR_INCLUDE(/usr/include/kerberosIV)
fi
- MR_LIBS($krb4/lib)
-elif test -d /usr/include/kerberosIV; then
- MR_INCLUDE(/usr/include/kerberosIV)
fi
AC_CHECK_LIB(k5crypto, main, crypto="k5crypto",
[AC_CHECK_LIB(crypto, main, crypto="crypto")])
--------------030207080805050006090701--