1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/third_party/heimdal/cf/roken.m4
Stefan Metzmacher 7055827b8f HEIMDAL: move code from source4/heimdal* to third_party/heimdal*
This makes it clearer that we always want to do heimdal changes
via the lorikeet-heimdal repository.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>

Autobuild-User(master): Joseph Sutton <jsutton@samba.org>
Autobuild-Date(master): Wed Jan 19 21:41:59 UTC 2022 on sn-devel-184
2022-01-19 21:41:59 +00:00

65 lines
1.3 KiB
Plaintext

dnl $Id$
dnl
dnl try to look for an installed roken library with sufficient stuff
dnl
dnl set LIB_roken to the what we should link with
dnl set DIR_roken to if the directory should be built
dnl set CPPFLAGS_roken to stuff to add to CPPFLAGS
dnl AC_ROKEN(version,directory-to-try,roken-dir,fallback-library,fallback-cppflags)
AC_DEFUN([AC_ROKEN], [
AC_ARG_WITH(roken,
AS_HELP_STRING([--with-roken=dir],[use the roken library in dir]),
[if test "$withval" = "no"; then
AC_MSG_ERROR(roken is required)
fi])
save_CPPFLAGS="${CPPFLAGS}"
case $with_roken in
yes|"")
dirs="$2" ;;
*)
dirs="$with_roken" ;;
esac
roken_installed=no
for i in $dirs; do
AC_MSG_CHECKING(for roken in $i)
CPPFLAGS="-I$i/include ${CPPFLAGS}"
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <roken.h>
#if ROKEN_VERSION < $1
#error old roken version, should be $1
fail
#endif
]])],[roken_installed=yes; break])
AC_MSG_RESULT($roken_installed)
done
CPPFLAGS="$save_CPPFLAGS"
if test "$roken_installed" != "yes"; then
DIR_roken="roken"
LIB_roken='$4'
CPPFLAGS_roken='$5'
AC_CONFIG_SUBDIRS(lib/roken)
else
LIB_roken="$i/lib/libroken.la"
CPPFLAGS_roken="-I$i/include"
fi
LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
AC_SUBST(LIB_roken)dnl
AC_SUBST(DIR_roken)dnl
AC_SUBST(CPPFLAGS_roken)dnl
])