bd16a6588a61230f99fabc3680b5587ce9432b7a
[freeradius.git] / src / modules / rlm_idn / configure.ac
1 AC_INIT(rlm_idn.c)
2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_idn])
4
5 if test x$with_[]modname != xno; then
6
7         AC_PROG_CC
8         AC_PROG_CPP
9
10         FR_SMART_CHECK_LIB(idn, idna_to_ascii_8z)
11         if test "x$ac_cv_lib_idn_idna_to_ascii_8z" != "xyes"; then
12                 fail="$fail libidn"
13         fi
14
15         FR_SMART_CHECK_INCLUDE(idna.h)
16         if test "$ac_cv_header_idna_h" != "yes"; then
17                 fail="$fail idna.h"
18         fi
19         targetname=modname
20 else
21         targetname=
22         echo \*\*\* module modname is disabled.
23 fi
24
25 if test x"$fail" != x""; then
26         if test x"${enable_strict_dependencies}" = x"yes"; then
27                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
28         else
29                 AC_MSG_WARN([silently not building ]modname[.])
30                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
31                 targetname=""
32         fi
33 fi
34
35 mod_ldflags="${SMART_LIBS}"
36 mod_cflags="${SMART_CFLAGS}"
37
38 AC_SUBST(mod_ldflags)
39 AC_SUBST(mod_cflags)
40 AC_SUBST(targetname)
41 AC_OUTPUT(all.mk)
42