File: BUILD.unix

package info (click to toggle)
myodbc 5.1.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, sid
  • size: 2,984 kB
  • ctags: 2,099
  • sloc: ansic: 33,649; cpp: 1,360; xml: 1,261; sh: 353; makefile: 264; perl: 43
file content (125 lines) | stat: -rw-r--r-- 3,664 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
+-------------------------------------------------------------+
| Connector/ODBC                                              |
| UNIX Platforms                                              |
+-------------------------------------------------------------+

INTRODUCTION
---------------------------------------------------------------

In this document, we provide a general and brief explaination 
of how to build the MyODBC driver on UNIX platforms.

NOTE:	This information is fairly generic. You may find other
README files with more detailed information about building 
MyODBC with specific flavours of UNIX.
	
WHAT YOU NEED
---------------------------------------------------------------

UNIX
----

UNIX or a UNIX-like operating system such as;

- Solaris
- Linux
- OSX

ODBC
----

You need an ODBC SDK, and you probably want an ODBC Driver 
Manager. 

ODBC has not, traditionally, been a standard part of any UNIX 
or UNIX-like platform. This causes a number of vendors to 
provide ODBC solutions which can be added to UNIX. In theory 
this should not be a problem, but in practice this can cause 
compatability and portability issues.

Recently; Linux distributions have been including unixODBC as a
standard option, and Apple OSX now has ODBC by default.

We recommend, and use, unixODBC on all UNIX-like platforms
except OSX where we use the default ODBC.

See:
	http://www.unixodbc.org/

Compiler Tools
--------------

We try to build using the native compiler tool set for the 
target platform. For example, this is SunStudio on Solaris. But
the GNU tool-chain is a common compiler that works across all 
platforms.

Source Code
-----------

You can get the source code from the bzr source repository (for
'bleeding edge' code) or more commonly, simply download the zip
or tarball of the source.

Source:
  bzr branch lp:myodbc
  https://code.launchpad.net/~myodbc-developers

Downloads:
  http://dev.mysql.com/downloads/connector/odbc/

BUILD
---------------------------------------------------------------

cmake
-------------

CMake is the build system used to create configure files for your 
system. Instructions are as follows:

cd into the MyODBC source directory, then run cmake. For example:

 $ cd /path/to/myodbc/source
 $ cmake -G "Unix Makefiles" .

CMake will look for iODBC by default. Alternatively, if you are using
unixODBC instead of iODBC, then you'll need to pass in the appropriate
parameter, such as:

 $ cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1

If the driver manager headers and/or libraries cannot be found, then you 
may specify their location by passing in these additional parameters:

 -DODBC_INCLUDES=/path/to/headers
 -DODBC_LIB_DIR=/path/to/libs

And you might need to help cmake find the MySQL headers, by setting 
the environment variable MYSQL_DIR to the appropriate location. For
example:

 $ export MYSQL_DIR=/usr/local/mysql
  
Upon success, CMake will create the appropriate make files. Then,
execute make:

 $ make

INSTALL
---------------------------------------------------------------

You probably want to be the root user, or use sudo, because installation
will probably require these extra privileges.  To install the MyODBC
library and tools, execute one of the following:

 $ sudo make install
 # make install

That will copy all of the MyODBC files to their appropriate locations. 

Next, you probably want to register the driver with the ODBC on your 
system. See your ODBC documentation for more about how to do this. 

For unixODBC, you could run ODBCConfig from a GUI as root, or use the 
odbcinst command line tool. You may also want to look at the 
myodbc-installer command-line tool for this.