Skip to Content.
Sympa Menu

freetds - is there an autoconf guru in the house?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: is there an autoconf guru in the house?
  • Date: Sat, 3 Mar 2001 18:45:31 -0500 (EST)



I got the notion to allow the odbc bits to compile with either iODBC or
unixODBC, so I added two options to configure.in like such:

--

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)

--

So the problem is with AM_CONDITIONAL...running the configure script with
sh -x configure or sh -x configure --with-iodbc=/usr/local sets ODBC_TRUE
and ODBC_FALSE as expected. I then added this to the src/Makefile.am

--
if ODBC
SUBDIRS = tds ctlib dblib odbc server
else
SUBDIRS = tds ctlib dblib server
endif

--

so that odbc would only get compiled if a driver manager was
specified. Problem is that 'ODBC' alway evaluates to true. Anyone have
any clues?

Brian






Archive powered by MHonArc 2.6.24.

Top of Page