import from branch_1_1:
[freeradius.git] / src / modules / rlm_eap / types / rlm_eap_peap / configure.in
1 #
2 # Autoconf input file.
3 #
4 # Version:      $Id$
5 #
6
7 AC_PREREQ([2.53])
8 AC_INIT(rlm_eap_peap.c)
9 AC_REVISION($Revision$)
10 AC_DEFUN(modname,[rlm_eap_peap])
11
12 fail=
13 eap_peap_ldflags=
14 eap_peap_cflags=
15
16 if test x$with_[]modname != xno; then
17
18         dnl ############################################################
19         dnl # Check for command line options
20         dnl ############################################################
21
22         AC_ARG_WITH(rlm-eap-peap-lib-dir,
23         [  --with-rlm-eap-peap-lib-dir      directory for eap-peap libs],
24         eap_peap_ldflags="-L$withval")
25
26         AC_ARG_WITH(rlm-eap-peap-include-dir,
27         [  --with-rlm-eap-peap-include-dir  directory for eap-peap includes],
28         eap_peap_cflags="-I$withval")
29
30         dnl ############################################################
31         dnl # Check for OpenSSL support
32         dnl ############################################################
33
34         AC_MSG_CHECKING(for OpenSSL support)
35         if test "x$OPENSSL_LIBS" != "x"; then
36                 AC_MSG_RESULT(yes)
37         else
38                 AC_MSG_RESULT(no)
39                 fail="OpenSSL"
40         fi
41
42         targetname=modname
43 else
44         targetname=
45         echo \*\*\* module modname is disabled.
46 fi
47
48 if test x"$fail" != x""; then
49         if test x"${enable_strict_dependencies}" = x"yes"; then
50                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
51         else
52                 AC_MSG_WARN([silently not building ]modname[.])
53                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
54                 if test x"$headersuggestion" != x; then
55                         AC_MSG_WARN([$headersuggestion])
56                 fi
57                 if test x"$libsuggestion" != x; then
58                         AC_MSG_WARN([$libsuggestion])
59                 fi
60                 targetname=""
61         fi
62 fi
63
64 AC_SUBST(eap_peap_ldflags)
65 AC_SUBST(eap_peap_cflags)
66 AC_SUBST(targetname)
67 AC_CONFIG_HEADER([config.h])
68 AC_OUTPUT(Makefile)