The configure script gives you a great deal of control over how you configure your MyODBC build. Typically you do this using options on the configure command line. You can also affect configure using certain environment variables. For a list of options and environment variables supported by configure, run this command:
shell> ./configure --help
Some of the more commonly used configure options are described here:
To compile MyODBC, you need to supply the MySQL client
include and library files path using the
--with-mysql-path=
option, where DIR
DIR
is the
directory where the MySQL is installed.
MySQL compile options can be determined by running
.
DIR
/bin/mysql_config
Supply the standard header and library files path for your
ODBC Driver Manager(iodbc
or
unixobc
).
If you are using iodbc
and
iodbc
is not installed in its
default location (/usr/local
),
you might have to use the
--with-iodbc=
option, where DIR
DIR
is the
directory where iodbc is installed.
If the iodbc headers do not reside in
,
you can use the
DIR
/include--with-iodbc-includes=
option to specify their location.
INCDIR
The applies to libraries. If they are not in
,
you can use the
DIR
/lib--with-iodbc-libs=
option.
LIBDIR
If you are using unixODBC
, use the
--with-unixODBC=
option (case sensitive) to make
configure look for
DIR
unixODBC
instead of
iodbc
by default,
DIR
is the directory where
unixODBC is installed.
If the unixODBC headers and libraries aren't located
in
and
DIR
/include
,
use the
DIR
/lib--with-unixODBC-includes=
and
INCDIR
--with-unixODBC-libs=
options.
LIBDIR
You might want to specify an installation prefix other
than /usr/local
. For example, to
install the MyODBC drivers in
/usr/local/odbc/lib
, use the
--prefix=/usr/local/odbc
option.
The final configuration command will look something like this:
shell>./configure --prefix=/usr/local \
--with-iodbc=/usr/local \
--with-mysql-path=/usr/local/mysql
This is a translation of the MySQL Reference Manual that can be found at dev.mysql.com. The original Reference Manual is in English, and this translation is not necessarily as up to date as the English version.