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