MyODBC installation
===================

1. Software requirements
   * libmysqlclient installed as a shared library
   * the mysql sources unpacked and configured for this machine
   * One of:
	* iODBC 2.50 or later, (http://www.openlinksw.com/iodbc/), installed
	* unixODBC Alpha 3 or later (http://genix.net/unixODBC/), installed

2. Configuration
   The only required option is
       --with-mysql-sources=DIR
   where DIR is the directory where the mysql source tree resides.
 
   If you are using iODBC:

      If your iODBC is not installed in it's default location - /usr/local,
      you might have to use

	  --with-iodbc=DIR

      or if the iODBC headers aren't residing in DIR/include, you can also use

          --with-iodbc-includes=INCDIR

      Same goes for libraries - if they aren't in DIR/lib, use

          --with-iodbc-libs=LIBDIR


   If you are using unixODBC:

      To make configure look for unixODBC instead of iODBC, use

          --with-unixODBC=DIR

      Where DIR is where unixODBC is installed.
  
      And (as usual), if the unixODBC headers and libraries aren't located
      in DIR/include and DIR/lib, use
 
          --with-unixODBC-libs=LIBDIR
	  --with-unixODBC-includes=INCDIR


   You might want to specify a prefix other than /usr/local for installation,
   I for example keep my ODBC drivers in /usr/local/odbc/lib, so I add

       --prefix=/usr/local/odbc

   Configuration example:
   
   $ ./configure --with-mysql-sources=/home/joe/src/mysql-3.22.19a


3. Building the ODBC driver

   $ make
   Shold do it.

   $ make install
   Will install libmyodbc.so


4. Configuring one or more myodbc datasources (iodbc specific)

   With ODBC, there are two kinds of datasources: 'system' and 'user'.
   User datasources are configured in either the file $ODBCINI points to
   or $HOME/.odbc.ini.
   System datasources are configured in a global file, usually 
   /usr/local/etc/odbc.ini.

   In the file you chose to use, for a mysql server on machine 'foo' listening
   on port 3306, add the following to set up a datasource for database 'test':

   [foo]
   DSN		= foo
   # the path where you installed myodbc.so
   Driver	= /usr/local/lib/libmyodbc.so
   Database	= test
   Server	= foo.domain.com
   Port		= 3306

   Then, connecting using SQLConnect("foo",user,password) or SQLDriverConnect
   ("DSN=foo;...") should work.

   Examples of other options you can use are:

   # to use a unix socket (remove the Server line)
   Socket	 = /tmp/mysql.sock
   
   # Mysqlclient options
   Options	 = 0

   # provide a default user and password
   User		 = joe
   Password	 = secret

   Please note that this configuration procedure is only temporary. In the near
   future, as iodbc evolves, hand editing of ini files will be obsolete.
