import from branch_1_1:
[freeradius.git] / src / modules / rlm_eap / configure.in
1 AC_PREREQ([2.53])
2 AC_INIT(rlm_eap.c)
3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_eap])
5
6 fail=
7 SMART_LIBS=
8 SMART_CLFAGS=
9 if test x$with_[]modname != xno; then
10
11         AC_PROG_CC
12
13         eapsubdirs=
14         for foo in `find ./types -name configure -print`; do
15           bar=`echo $foo | sed 's%/configure$%%g'`
16           eapsubdirs="$eapsubdirs $bar"
17         done
18
19         dnl # don't ask... this is done to avoid autoconf stupidities.
20         ln -s ../../../install-sh install-sh
21
22         dnl #
23         dnl #  Don't change the variable name here.  Autoconf goes bonkers
24         dnl #  if you do.
25         dnl #
26         AC_CONFIG_SUBDIRS($eapsubdirs)
27         rm install-sh
28
29         dnl #
30         dnl # Don't bother looking for errors in the child directories
31         dnl #
32
33         targetname=modname
34 else
35         targetname=
36         echo \*\*\* module modname is disabled.
37 fi
38
39 if test x"$fail" != x""; then
40         if test x"${enable_strict_dependencies}" = x"yes"; then
41                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
42         else
43                 AC_MSG_WARN([silently not building ]modname[.])
44                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
45                 if test x"$headersuggestion" != x; then
46                         AC_MSG_WARN([$headersuggestion])
47                 fi
48                 if test x"$libsuggestion" != x; then
49                         AC_MSG_WARN([$libsuggestion])
50                 fi
51                 targetname=""
52             eapsubdirs=""
53         fi
54 fi
55
56 eaptypes=types
57 if test x"$eapsubdirs" = x""; then
58         eaptypes=""
59 fi
60
61 eap_ldflags=$SMART_LIBS
62 eap_cflags=$SMART_CFLAGS
63 AC_SUBST(eaptypes)
64 AC_SUBST(eap_ldflags)
65 AC_SUBST(eap_cflags)
66 AC_SUBST(targetname)
67 AC_OUTPUT(Makefile)