b2ad6cffe32bf2fff7237527faf2f7c78d9e5038
[freeradius.git] / src / modules / rlm_sql / configure.ac
1 AC_PREREQ([2.53])
2 AC_INIT(rlm_sql.c)
3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_sql])
5
6 fail=
7 SMART_LIBS=
8 SMART_CLFAGS=
9 if test x$with_[]modname != xno; then
10
11         AC_PROG_CC
12
13         mysubdirs=
14         if test "x$EXPERIMENTAL" = "xyes"; then
15           for foo in `find ./drivers -name configure -print`; do
16             bar=`echo $foo | sed 's%/configure$%%g'`
17             mysubdirs="$mysubdirs $bar"
18           done
19         else
20           for foo in `cat stable`; do
21             mysubdirs="$mysubdirs ./drivers/$foo"
22           done
23         fi
24
25         dnl # don't ask... this is done to avoid autoconf stupidities.
26         ln -s ../../../install-sh install-sh
27
28         dnl #
29         dnl #  Don't change the variable name here.  Autoconf goes bonkers
30         dnl #  if you do.
31         dnl #
32         AC_CONFIG_SUBDIRS($mysubdirs)
33         rm install-sh
34
35         dnl #
36         dnl # Don't bother looking for errors in the child directories
37         dnl #
38
39         targetname=modname
40 else
41         targetname=
42         echo \*\*\* module modname is disabled.
43 fi
44
45 if test x"$fail" != x""; then
46         if test x"${enable_strict_dependencies}" = x"yes"; then
47                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
48         else
49                 AC_MSG_WARN([silently not building ]modname[.])
50                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
51                 if test x"$headersuggestion" != x; then
52                         AC_MSG_WARN([$headersuggestion])
53                 fi
54                 if test x"$libsuggestion" != x; then
55                         AC_MSG_WARN([$libsuggestion])
56                 fi
57                 targetname=""
58         fi
59 fi
60
61
62 mod_ldflags=$SMART_LIBS
63 mod_cflags=$SMART_CFLAGS
64 AC_SUBST(mod_ldflags)
65 AC_SUBST(mod_cflags)
66 AC_SUBST(targetname)
67 AC_OUTPUT(all.mk)