AC_MSG_CHECKING([whether lex is flex in disguise])
# this may not be a valid way to test for flex, but it's cheap.
$LEX --version > /dev/null 2>&1
if test $? -ne 0 ; then
AC_MSG_RESULT()
AC_MSG_ERROR([registry requires gnu flex. sorry])
fi
AC_MSG_RESULT(yes)
fi
AC_PROG_YACC
# see if 'yacc' is bison in disguise
if test "$YACC" != "bison" ; then
AC_MSG_CHECKING([whether yacc is bison in disguise])
# this may not be a valid way to test for bison, but it's cheap.
$YACC --version > /dev/null 2>&1
if test $? -ne 0 ; then
AC_MSG_RESULT()
AC_MSG_ERROR([registry requires gnu bison. sorry])
fi
AC_MSG_RESULT(yes)
fi
# platform specifics
AC_WORDS_BIGENDIAN
AC_LONG_64_BITS
AC_PROG_INSTALL
dnl configure options
dnl
dnl debug - aka compiler symbols
dnl
AC_MSG_CHECKING(whether to include symbols)
AH_TEMPLATE(DBG, [define this to include debugging support])
AC_ARG_ENABLE(debug,
[
--enable-debug include compiler symbols],
[ case "$enable_debug" in
no)
AC_MSG_RESULT(no)
;;
yes)
AC_MSG_RESULT(yes)
DBG="-g"
AC_DEFINE(DBG)
;;
*)
AC_MSG_RESULT(no)
;;
esac ],
# ie: no --{enable,disable}-debug option, withval == ""
AC_MSG_RESULT(no)
)
AC_SUBST(DBG)
dnl
dnl warn - aka gcc warnings
dnl
dnl XXX: this should only be set for gcc....
AC_MSG_CHECKING(whether to set gcc warnings)
AH_TEMPLATE(WARN, [define this to set pedantic gcc warnings])
AC_ARG_ENABLE(warn,
[
--enable-warn pedantic gcc warnings],
[ case "$enable_debug" in
no)
AC_MSG_RESULT(no)
WARN=""
AC_DEFINE(WARN)
;;
yes)
AC_MSG_RESULT([yes -Wall])
WARN="-Wall"
AC_DEFINE(WARN)
;;
*)
AC_MSG_RESULT(no)
WARN=""
AC_DEFINE(WARN)
;;
esac ],
# ie: no --{enable,disable}-warn option, withval == ""
WARN=""
AC_DEFINE(WARN)
AC_MSG_RESULT(no)
)
AC_SUBST(WARN)
dnl
dnl libwarp - aka tcp_wrappers
dnl hijacked this from ssh, but mimiced the '*' "clause" for 'yes'
dnl
AC_MSG_CHECKING(whether to use libwrap)
AH_TEMPLATE(LIBWRAP, [define this to include libwrap (tcp_wrappers) support])
AH_TEMPLATE(HAVE_LIBWRAP, [])
AC_ARG_WITH(libwrap,
[
--with-libwrap[[=PATH]] libwrap (tcp_wrappers) support. PATH is dir above
lib, eg: /usr/local. (default)],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(LIBWRAP)
WRAPLIBS="-lwrap"
OLDLIBS="$LIBS"
LIBS="$WRAPLIBS $LIBS"
AC_TRY_LINK([ int allow_severity; int deny_severity; ],
[ hosts_access(); ],
[AC_DEFINE(LIBWRAP)
WRAPLIBS="-lwrap"
AC_DEFINE(HAVE_LIBWRAP) ],
[ AC_MSG_ERROR(Could not find libwrap. You must first install tcp_wrappers.) ])
LIBS="$OLDLIBS"
;;
*)
AC_MSG_RESULT(yes)
AC_DEFINE(LIBWRAP)
if test -d "$withval"; then
WRAPINCS="-I$withval/include"
WRAPLIBS="-L$withval/lib -lwrap -R$withval/lib"
else
WRAPLIBS="$withval"
fi
OLDLIBS="$LIBS"
OLDINCS="$INCLUDES"
LIBS="$WRAPLIBS $LIBS"
INCLUDES="$WRAPINCS"
AC_TRY_LINK([ int allow_severity; int deny_severity; ],
[ hosts_access(); ],
[],
[ AC_MSG_ERROR(Could not find libwrap. You must first install tcp_wrappers.) ])
LIBS="$OLDLIBS"
INCLUDES="$OLDINCS"
;;
esac ],
# XXX: is "no" correct?
AC_MSG_RESULT(yes)
AC_DEFINE(LIBWRAP)
WRAPLIBS="-lwrap"
OLDLIBS="$LIBS"
LIBS="$WRAPLIBS $LIBS"
AC_TRY_LINK([ int allow_severity; int deny_severity; ],
[ hosts_access(); ],
[AC_DEFINE(LIBWRAP)
WRAPLIBS="-lwrap"
AC_DEFINE(HAVE_LIBWRAP) ],
[ AC_MSG_ERROR(Could not find libwrap. You must first install tcp_wrappers.) ])
LIBS="$OLDLIBS"
)
AC_SUBST(WRAPINCS)
AC_SUBST(WRAPLIBS)
dnl
dnl skey - aka One Time Password mechanism
dnl
AC_MSG_CHECKING([whether to include skey support])
AH_TEMPLATE(SKEY, [define this to include support for skey])
AC_ARG_WITH(skey,
[ --with-skey[[=PATH]] libskey (skey) support. PATH is dir above lib,
eg: /usr/local],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(SKEY)
AC_SEARCH_LIBS([skeychallenge], [skey],
[ ],
[AC_MSG_ERROR(Could not find libskey. You must first install skey or provide a hint to the location of library and includes, as in --with-skey=/usr/local.)])
AC_MSG_CHECKING([whether to include RSA SecurID support])
AH_TEMPLATE(ACECLNT, [define this to include support for RSA SecurID])
AC_ARG_WITH(aceclnt,
[AS_HELP_STRING([--with-aceclnt[[=PATH]]],[libaceclnt (RSA SecurID) support. PATH is dir above lib, eg: /usr/local])],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(ACECLNT)
AC_SEARCH_LIBS([SD_Init], [aceclnt],
[ ],
[AC_MSG_ERROR(Could not find libaceclnt. You must first install aceclnt or provide a hint to the location of library and includes, as in --with-aceclnt=/usr/local)])