document rlm_otp fd leak fix
[freeradius.git] / src / modules / rlm_smb / configure.in
1 AC_PREREQ([2.53])
2 AC_INIT(rlm_smb.c)
3 AC_CONFIG_HEADER(config.h)
4 AC_REVISION($Revision$)
5 AC_DEFUN(modname,[rlm_smb])
6
7 if test x$with_[]modname != xno; then
8
9         AC_PROG_CC
10         AC_PROG_CPP
11
12         dnl extra argument: --with-rlm-smb-lib-dir
13         rlm_smb_lib_dir=
14         AC_ARG_WITH(rlm-smb-lib-dir,
15         [  --with-rlm-smb-lib-dir=DIR       Directory for samba library files []],
16         [ case "$withval" in
17             no)
18                 AC_MSG_ERROR(Need rlm-smb-lib-dir)
19                 ;;
20             yes)
21                 ;;
22             *)
23                 rlm_smb_lib_dir="$withval"
24                 ;;
25           esac ]
26         )
27
28         dnl extra argument: --with-rlm-smb-include-dir
29         rlm_smb_inc_dir=
30         AC_ARG_WITH(rlm-smb-include-dir,
31         [  --with-rlm-smb-include-dir=DIR   Directory for samba include files []],
32         [ case "$withval" in
33             no)
34                 AC_MSG_ERROR(Need rlm-smb-include-dir)
35                 ;;
36             yes)
37                 ;;
38             *)
39                 rlm_smb_include_dir="$withval"
40                 ;;
41           esac ]
42         )
43
44         AC_CHECK_HEADERS(arpa/inet.h \
45                         dirent.h \
46                         sys/vfs.h \
47                         netinet/in.h \
48                         netinet/tcp.h \
49                         sys/uio.h \
50                         sys/signal.h \
51                         sys/socket.h \
52                         unistd.h \
53                         ctype.h \
54                         netdb.h \
55                         signal.h \
56                         )
57
58         targetname=modname
59         smb_cflags="-I."
60 else
61         targetname=
62         echo \*\*\* module modname is disabled.
63 fi
64
65 if test x"$fail" != x""; then
66         if test x"${enable_strict_dependencies}" = x"yes"; then
67                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
68         else
69                 AC_MSG_WARN([silently not building ]modname[.])
70                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); 
71                 targetname=""
72         fi
73 fi
74
75 AC_SUBST(smb_cflags)
76 AC_SUBST(smb_ldflags)
77 AC_SUBST(targetname)
78 AC_OUTPUT(Makefile)