AC_INIT(x99_rlm.c) AC_REVISION($Revision: 1.7 $) AC_DEFUN(modname,[rlm_x99_token]) if test x$with_[]modname != xno; then dnl put configuration checks here. dnl set $fail to what's missing, on fatal errors. dnl use AC_MSG_WARN() on important messages. dnl test for almost-c99 compliant compiler AC_CHECK_HEADER(inttypes.h, , [ fail="$fail inttypes.h" ] ) dnl mostly for openssl AC_ARG_WITH(rlm-x99-token-lib-dir, [ --with-rlm-x99-token-lib-dir directory for x99_token libs], x99_token_ldflags="$x99_token_ldflags -L$withval") AC_ARG_WITH(rlm-x99-token-include-dir, [ --with-rlm-x99-token-include-dir directory for x99_token includes], x99_token_cflags="$x99_token_cflags -I$withval") dnl openssl x99_save_LIBS="$LIBS" LIBS="$LIBS $x99_token_ldflags" AC_CHECK_LIB(crypto, des_cbc_encrypt, [ x99_token_ldflags="$x99_token_ldflags -lcrypto" ], [ fail="$fail des_cbc_encrypt" ] ) LIBS="$x99_save_LIBS" targetname=modname # keep this! Don't change! else targetname= # keep this! Don't change! echo \*\*\* module modname is disabled. # keep this! Don't change! fi dnl Don't change this section. if test x"$fail" != x""; then if test x"${enable_strict_dependencies}" = x"yes"; then AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.]) else AC_MSG_WARN([silently not building ]modname[.]) AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); targetname="" fi fi x99_token_cflags="$x99_token_cflags -DX99_MODULE_NAME=\\\"modname\\\"" x99_token_cflags="$x99_token_cflags -DFREERADIUS" AC_SUBST(x99_token_cflags) AC_SUBST(x99_token_ldflags) dnl AC_CONFIG_HEADER(config.h) AC_SUBST(targetname) # keep this! Don't change! AC_OUTPUT(Makefile) # keep this! Don't change!