mdbtools/configure.in
2001-07-24 02:56:20 +00:00

77 lines
1.8 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/extras/mdb-dump.c)
AM_INIT_AUTOMAKE(mdbtools,0.3)
AC_PROG_CC(gcc)
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AM_PROG_LIBTOOL
AM_PROG_LEX
AC_PROG_YACC
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)
AC_CHECK_HEADERS(wordexp.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
dnl ---------------------------------------------------------------------
dnl Compile time options
dnl ---------------------------------------------------------------------
AC_ARG_WITH(iodbc,
[ --with-iodbc=/path/to/iodbc build odbc driver against iODBC])
if test "$with_iodbc"; then
CFLAGS="$CFLAGS -DIODBC";
ODBC_INC=$with_iodbc/include;
odbc=true
fi
AC_ARG_WITH(iodbc,
[ --with-unixodbc=/path/to/unixodbc build odbc driver against unixODBC])
if test "$with_unixodbc"; then
CFLAGS="$CFLAGS -DUNIXODBC"
ODBC_INC=$with_unixodbc/include
odbc=true
fi
AM_CONDITIONAL(ODBC, test x$odbc = xtrue)
AC_SUBST(ODBC)
AC_SUBST(ODBC_INC)
AC_ARG_ENABLE(sql,
[ --enable-sql Enable SQL engine])
if test "$enable_sql" = "yes" ; then
echo "SQL ENABLED!"
CFLAGS="$CFLAGS -DSQL"
sql=true
fi
AM_CONDITIONAL(SQL, test x$sql = xtrue)
AC_SUBST(SQL)
dnl Checks for library functions.
OLDLDFLAGS=$LDFLAGS
AC_CHECK_LIB(ncurses,initscr,[
READLINE_LIBS="$READLINE_LIBS -lncurses"
LDFLAGS="$LDFLAGS -lncurses"
],[])
AC_CHECK_LIB(readline, add_history, [
READLINE_LIBS="$READLINE_LIBS -lreadline"
AC_DEFINE(HAVE_READLINE,1,[ ])
],[])
LDFLAGS=$OLDLDFLAGS
AC_SUBST(READLINE_LIBS)
AC_OUTPUT(src/util/Makefile src/extras/Makefile Makefile include/Makefile src/Makefile src/libmdb/Makefile include/Makefile src/sql/Makefile src/odbc/Makefile)