-AC_INIT(rlm_example.c) # change 'example'
+AC_PREREQ([2.53])
+AC_INIT(rlm_example.c) # change 'example'
AC_REVISION($Revision$)
-AC_DEFUN(modname,[rlm_example]) # change 'example'
+AC_DEFUN(modname,[rlm_example]) # change 'example'
if test x$with_[]modname != xno; then
+ AC_PROG_CC
+ AC_PROG_CPP
dnl put configuration checks here.
- dnl use AC_MSG_ERROR() on fatal errors.
+ dnl set $fail to what's missing, on fatal errors.
dnl use AC_MSG_WARN() on important messages.
-
AC_CHECK_LIB(c, printf,
[ example_ldflags="$example_ldflags -lc" ],
[ fail=$fail" printf" ]
[ fail=$fail" stdio.h" ]
)
+ AC_CHECK_HEADERS(stdio.h stdlib.h) # for the config.h defs
+ AC_CHECK_FUNCS(printf) # for the config.h defs
targetname=modname # keep this! Don't change!
else
echo \*\*\* module modname is disabled. # keep this! Don't change!
fi
-dnl Don't change this.
+dnl Don't change this section.
if test x"$fail" != x""; then
if test x"${enable_strict_dependencies}" = x"yes"; then
AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
AC_SUBST(example_cflags) # change 'example'
AC_SUBST(example_ldflags) # change 'example'
+AC_CONFIG_HEADER(config.h) # delete if you don't want a config.h file.
AC_SUBST(targetname) # keep this! Don't change!
AC_OUTPUT(Makefile) # keep this! Don't change!