help-shishi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting shishi from autoconf


From: Simon Josefsson
Subject: Re: Detecting shishi from autoconf
Date: Mon, 15 May 2006 21:52:21 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Elrond <address@hidden> writes:

> Hi,
>
> Okay, I've probably missed something obvious...
>
> Can someone get me a pointer on how to detect shishi (and
> shisa) from autoconf?
>
> Or is it as simple as this?
>
>       AC_CHECK_HEADER(shishi.h,
>               AC_CHECK_LIB(shishi, shishi_init,
>                       LIB_SHISHI=-lshishi
>                       AC_SUBST(LIB_SHISHI)
>                       AC_DEFINE(HAVE_SHISHI)))

The manual has a node on this, see:

http://josefsson.org/shishi/manual/html_node/Autoconf-tests.html#Autoconf-tests

But, yes, your test will work.  If you want to support -rpath and
stuff, here's what I use in GSS:

# Test for Shishi.
AC_ARG_ENABLE(kerberos5,
  AC_HELP_STRING([--disable-kerberos5],
    [disable Kerberos V5 mechanism unconditionally]),
  kerberos5=$enableval)
if test "$kerberos5" != "no" ; then
  AC_LIB_HAVE_LINKFLAGS(shishi,, [#include <shishi.h>], [shishi ();])
  if test "$ac_cv_libshishi" = yes; then
    AC_DEFINE(USE_KERBEROS5, 1, [Define to 1 if you want Kerberos 5 mech.])
    INCLUDE_GSS_KRB5='#include <gss/krb5.h>'
    kerberos5=yes
  else
    kerberos5=no
  fi
fi
AC_MSG_CHECKING([if the Kerberos V5 mechanism should be supported])
AC_MSG_RESULT($kerberos5)
AM_CONDITIONAL(KRB5, test "$kerberos5" = "yes")
AC_SUBST(INCLUDE_GSS_KRB5)

The AC_LIB_HAVE_LINKFLAGS macro is part of gnulib, see gl/m4/lib-*.m4
in Shishi.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]