Skip site navigation (1) Skip section navigation (2)

Re: odbc patches

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Nick Gorham <nick(at)easysoft(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: odbc patches
Date: 2000-06-11 11:41:34
Message-ID: Pine.LNX.4.21.0006110914410.353-100000@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
I'm confused. What do --with-unixODBC-includes and --with-unixODBC-libs do
that --with-includes and --with-libraries wouldn't? Wouldn't it be enough
to have --with-unixodbc?


Bruce Momjian writes:

> Sorry.  Found your nice diff.  Applied.  Thanks.
> 
> 
> > Hello.
> > 
> > I have made the couple of mods required to make the odbc driver with
> > postgres build and use unixODBC (http://www.unixodbc.org)
> > 
> > This patch was applied against the postgresql-7.0beta1 build
> > 
> > Any problems let me know.
> > 
> > Nick Gorham
> 
> > Only in .: pg-beta-unixODBC.patch
> > diff -c -r -p1 ../pgsql/src/configure.in ./src/configure.in
> > *** ../pgsql/src/configure.in	Mon Feb 21 08:00:25 2000
> > --- ./src/configure.in	Thu Mar  2 16:42:40 2000
> > *************** AC_SUBST(ODBCINSTDIR)
> > *** 391,392 ****
> > --- 391,434 ----
> >   
> > + #check for unixODBC
> > + 
> > + use_unixODBC=no
> > + AC_ARG_WITH(unixODBC,
> > + [  --with-unixODBC[=DIR]   Use unixODBC located in DIR],
> > + [use_unixODBC=yes;unixODBC="$withval"],use_unixODBC=no)
> > + 
> > + if test "x$use_unixODBC" = "xyes"
> > + then
> > + 
> > + # default to /usr if not specified
> > + if test "x$unixODBC" = "x"
> > + then
> > +     unixODBC="/usr";
> > + fi
> > + 
> > + AC_ARG_WITH(unixODBC-includes,
> > +     [  --with-unixODBC-includes=DIR Find unixODBC headers in DIR],
> > +     unixODBC_includes="$withval",unixODBC_includes="$unixODBC/include")
> > + 
> > +     AC_ARG_WITH(unixODBC-libs,
> > +     [  --with-unixODBC-libs=DIR Find unixODBC libraries in DIR],
> > +     unixODBC_libs="$withval",unixODBC_libs="$unixODBC/lib")
> > + 
> > +     CPPFLAGS="$CPPFLAGS -I$unixODBC_includes"
> > +     AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h,
> > +         unixODBC_ok=yes;odbc_headers="$odbc_headers $ac_hdr",unixODBC_ok=no; break)
> > + 
> > + if test "x$unixODBC_ok" != "xyes"
> > + then
> > +     AC_MSG_ERROR([Unable to find the unixODBC headers in $1])
> > + fi
> > + 
> > + save_LIBS="$LIBS"
> > + LIBS="-L$unixODBC_libs $LIBS"
> > + 
> > + AC_CHECK_LIB(odbcinst,SQLGetPrivateProfileString,
> > + [AC_DEFINE(HAVE_SQLGETPRIVATEPROFILESTRING)
> > + LIBS="$LIBS -lodbcinst"],
> > + [LIBS="$save_LIBS"])
> > + fi
> > + 
> >   dnl Unless we specify the command line options
> > diff -c -r -p1 ../pgsql/src/include/config.h.in ./src/include/config.h.in
> > *** ../pgsql/src/include/config.h.in	Mon Feb 21 08:00:25 2000
> > --- ./src/include/config.h.in	Thu Mar  2 16:42:58 2000
> > ***************
> > *** 310,311 ****
> > --- 310,314 ----
> >   
> > + /* are we building against a libodbcinst */
> > + #undef HAVE_SQLGETPRIVATEPROFILESTRING
> > + 
> >   /* Set to 1 if you have <pwd.h> */
> > diff -c -r -p1 ../pgsql/src/interfaces/odbc/dlg_specific.c ./src/interfaces/odbc/dlg_specific.c
> > *** ../pgsql/src/interfaces/odbc/dlg_specific.c	Tue Nov 30 08:00:26 1999
> > --- ./src/interfaces/odbc/dlg_specific.c	Thu Mar  2 16:43:40 2000
> > ***************
> > *** 25,28 ****
> > --- 25,30 ----
> >   #include "gpps.h"
> > + #ifndef HAVE_SQLGETPRIVATEPROFILESTRING
> >   #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
> >   #define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)
> > + #endif
> >   #ifndef HAVE_STRICMP
> > diff -c -r -p1 ../pgsql/src/interfaces/odbc/misc.h ./src/interfaces/odbc/misc.h
> > *** ../pgsql/src/interfaces/odbc/misc.h	Thu Dec 31 00:26:44 1998
> > --- ./src/interfaces/odbc/misc.h	Thu Mar  2 16:43:23 2000
> > ***************
> > *** 17,20 ****
> >   #ifndef WIN32
> > ! #include "gpps.h"
> >   #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
> >   #endif
> > --- 17,21 ----
> >   #ifndef WIN32
> > ! #ifndef HAVE_SQLGETPRIVATEPROFILESTRING
> >   #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
> > + #endif
> >   #endif
> 
> 
> 

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e(at)gmx(dot)net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



In response to

Responses

pgsql-patches by date

Next:From: Peter EisentrautDate: 2000-06-11 11:46:01
Subject: Re: BeOS take 2
Previous:From: Peter EisentrautDate: 2000-06-11 11:41:03
Subject: Re: NO-CREATE-TABLE and NO-LOCK-TABLE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group