3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_sql_iodbc])
9 if test x$with_[]modname != xno; then
11 dnl extra argument: --with-iodbc-include-dir
13 AC_ARG_WITH(iodbc-include-dir,
14 [AS_HELP_STRING([--with-iodbc-include-dir=DIR],
15 [Directory where the Iodbc includes may be found])],
18 AC_MSG_ERROR(Need iodbc-include-dir)
23 iodbc_include_dir="$withval"
27 dnl extra argument: --with-iodbc-lib-dir
29 AC_ARG_WITH(iodbc-lib-dir,
30 [AS_HELP_STRING([--with-iodbc-lib-dir=DIR],
31 [Directory where the Iodbc libraries may be found])],
34 AC_MSG_ERROR(Need iodbc-lib-dir)
39 iodbc_lib_dir="$withval"
43 dnl extra argument: --with-iodbc-dir
44 AC_ARG_WITH(iodbc-dir,
45 [AS_HELP_STRING([--with-iodbc-dir=DIR],
46 [Base directory where Iodbc is installed])],
49 AC_MSG_ERROR(Need iodbc-dir)
54 iodbc_lib_dir="$withval/lib"
55 iodbc_include_dir="$withval/include"
59 dnl Check for SQLConnect in -liodbc
60 smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
61 FR_SMART_CHECK_LIB(iodbc, SQLConnect)
62 if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
67 smart_try_dir="$iodbc_include_dir /usr/local/iodbc/include"
68 FR_SMART_CHECK_INCLUDE(isql.h)
69 if test "x$ac_cv_header_isql_h" != xyes; then
76 echo \*\*\* module modname is disabled.
79 dnl Don't change this section.
80 if test "x$fail" != x; then
81 if test "x${enable_strict_dependencies}" = xyes; then
82 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
84 AC_MSG_WARN([silently not building ]modname[.])
85 AC_MSG_WARN([FAILURE: ]modname[ requires:$fail.]);
90 sql_iodbc_ldflags="$SMART_LIBS"
91 sql_iodbc_cflags="$SMART_CFLAGS"
92 AC_SUBST(sql_iodbc_ldflags)
93 AC_SUBST(sql_iodbc_cflags)