import from HEAD:
[freeradius.git] / src / modules / rlm_example / configure.in
1 AC_INIT(rlm_example.c)  # change 'example'
2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_example])  # change 'example'
4
5 if test x$with_[]modname != xno; then
6
7         AC_PROG_CC
8         AC_PROG_CPP
9
10         dnl put configuration checks here.  
11         dnl set $fail to what's missing, on fatal errors.
12         dnl use AC_MSG_WARN() on important messages.
13         AC_CHECK_LIB(c, printf,
14                 [ example_ldflags="$example_ldflags -lc" ],
15                 [ fail=$fail" printf" ]
16         )
17
18         AC_CHECK_HEADER(stdio.h,
19                 [ example_cflags="$example_cflags -I/usr/include" ],
20                 [ fail=$fail" stdio.h" ]
21         )
22
23         AC_CHECK_HEADERS(stdio.h stdlib.h)  # for the config.h defs
24         AC_CHECK_FUNCS(printf)  # for the config.h defs
25
26         targetname=modname     # keep this!  Don't change!
27 else
28         targetname=            # keep this!  Don't change!
29         echo \*\*\* module modname is disabled.  # keep this!  Don't change!
30 fi
31
32 dnl  Don't change this section.
33 if test x"$fail" != x""; then
34         if test x"${enable_strict_dependencies}" = x"yes"; then
35                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
36         else
37                 AC_MSG_WARN([silently not building ]modname[.])
38                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); 
39                 targetname=""
40         fi
41 fi
42
43
44 AC_SUBST(example_cflags)  # change 'example'
45 AC_SUBST(example_ldflags)  # change 'example'
46
47 AC_CONFIG_HEADER(config.h)  # delete if you don't want a config.h file.
48
49 AC_SUBST(targetname)  # keep this!  Don't change!
50 AC_OUTPUT(Makefile)  # keep this!  Don't change!