[freetds] Bug or not bug?

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Mar 28 04:56:33 EDT 2007


I was looking at
http://sourceforge.net/tracker/index.php?func=detail&aid=1674575&group_i
d=33106&atid=407806. I still don't understand if this is wanted or
not... from configure --help

  --with-unixodbc=DIR     build odbc driver against unixODBC in DIR

this tell, "I want to build with unixODBC support with unixODBC
installed in DIR" but what does it mean if there is no DIR? "I want
unixODBC support"? In this case I think default detection should be used
and should produce an error if sql.h/sqlext.h are not found. Instead we
do not check for headers, from configure.ac


AC_ARG_WITH(unixodbc,
AS_HELP_STRING([--with-unixodbc=DIR], [build odbc driver against
unixODBC in DIR]))
if test "$with_unixodbc"; then
        if echo "$with_unixodbc" | grep -v '^/'; then
                with_unixodbc="$PWD/$with_unixodbc"
        fi
        CPPFLAGS="$CPPFLAGS -DUNIXODBC"
        if test -f "$with_unixodbc/bin/odbc_config"; then
                ODBC_CONFIG="$with_unixodbc/bin/odbc_config"
                ODBC_INC="-I`$ODBC_CONFIG --include-prefix`"
                LDFLAGS="$LDFLAGS -L`$ODBC_CONFIG --lib-prefix`"
        else
                # if not available do not use system default
                ODBC_CONFIG=""
                ODBC_INC="-I$with_unixodbc/include"
                LDFLAGS="$LDFLAGS -L$with_unixodbc/lib"
        fi
        ODBCLIB="-lodbc"
        odbc=true
        unixodbc=true
fi
....
        # odbc not specified, try to detect it
        echo looking for installed odbc driver manager
        if test "$odbc" != "true" -a $tds_mingw = yes; then
                odbc=true
                unixodbc=true
                CPPFLAGS="$CPPFLAGS -DUNIXODBC"
                ODBCLIB="-lodbc32"
        elif test "$odbc" != "true"; then
                AC_CHECK_LIB(iodbc, SQLConnect,
[AC_CHECK_HEADER([isql.h], [odbc=true
        iodbc=true
        CPPFLAGS="$CPPFLAGS -DIODBC"
        ODBCLIB="-liodbc"])],
                [AC_CHECK_LIB(odbc, SQLConnect,
[AC_CHECK_HEADER([sql.h], [odbc=true
        unixodbc=true
        CPPFLAGS="$CPPFLAGS -DUNIXODBC"
        ODBCLIB="-lodbc"])] )] )
        fi


freddy77





More information about the FreeTDS mailing list