1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(install-sh)
AC_PREREQ([2.50])
AC_CONFIG_HEADER(config.h)
AC_SUBST(TARGETS)
AC_SUBST(PLTARGETS)
m4_include([../ac_swi_c.m4])
havelib=no
AC_CHECK_LIB(odbc, SQLAllocEnv,
LIBS="-lodbc $LIBS"
havelib=yes)
if test $havelib = no; then
AC_CHECK_LIB(iodbc, SQLAllocEnv,
LIBS="-liodbc $LIBS"
havelib=yes)
fi
AC_CHECK_HEADERS(malloc.h sql.h time.h)
AC_CHECK_FUNCS(localtime mktime gmtime timegm)
AC_CHECK_TYPES([long long])
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_TYPES([SQLLEN, SQLULEN],,,
[#include <sql.h>
])
if test "$havelib" = yes &&
test "$ac_cv_header_sql_h" = yes; then
TARGETS="odbc4pl.$SO"
else
echo "ERROR: Cannot find odbc library or the header sql.h"
echo "WARNING: ODBC interface will not be built"
TARGETS=""
fi
PLTARGETS=`echo $TARGETS | sed "s/4pl\.$SO/.pl/g"`
AC_OUTPUT(Makefile)
|