FreeTDS User Guide: A Guide to Installing, Configuring and Running FreeTDS | ||
---|---|---|
Prev | Chapter 2. Build FreeTDS | Next |
If you've built other GNU projects, building FreeTDS is a fairly straightforward process. We have a terse and verbose description.
Note: FreeTDS is known to build with GNU and BSD make. If you encounter a large number of build errors, and your operating system's make is not GNU make (as is the case on most non-GNU/Linux systems), you may wish to install GNU make from ftp.gnu.org.
$ ./configure --prefix=/usr/local/freetds $ make $ su root Password: $ make install
The GNU development system can generate code for a wide variety of hardware architectures and operating systems, virtually all of which can run FreeTDS in consequence. The work of building and installing the FreeTDS libraries begins with the command configure, which generates the Makefile that governs how the code is compiled, linked, and installed. Once you've "configured" the project, make will manage the rest of the build.
The simplest form of running configure is:
$ ./configureand sometimes that's enough. configure accepts some command-line arguments, too, and you may need to provide some, depending on what your environment looks like.
There are a few optional arguments to configure that may be important to you.
./configure options
install architecture-independent files in PREFIX
The default is /usr/local if this argument is not passed to configure. In versions prior to 0.60, the default was /usr/local/freetds.
read-only single-machine data in DIR
The default is PREFIX/etc (PREFIX being the value of --prefix=PREFIX, above) if this argument is not passed to configure. In versions prior to 0.60, the default was /usr/local/freetds/etc/.
Specifies the default TDS version. (There are a couple of ways to set the TDS version at run-time. This parameter takes effect if no run-time settings are provided.) Acceptable values are 4.2, 4.6, 5.0, 7.0, and 8.0.
The default is 5.0 if this argument is not passed to configure.
Build with ODBC support and to use the iODBC Driver Manager. (Requires iODBC to have already been installed.)
Build with ODBC support and to use the unixODBC Driver Manager.(Requires unixODBC to have already been installed.)
Enable Microsoft behavior in the db-lib API where it diverges from Sybase. (For instance, Microsoft uses different names for the members of its date structure.) Typically only needed for porting Win32 applications to Unix.
Force FreeTDS to use threadsafe versions of functions where available, such as using gethostbyname_r() instead of the older and non-safe gethostbyname(). Is not widely tested on all platform but has been tested on: Linux, FreeBSD, HP-UX 10.20 and should work on Solaris, Tru64, IRIX (reported to work). Is also a good idea to enable this switch if you configure Apache with multi-threading support. From 0.61 version this option is turned on by default in RPM building.
Enable close compatibility with Sybase's ABI, at the expense of other features. Currently, this enables the generation of a dbopen() entry point in db-lib, which may clash with the DBM function with the same name. Absolutely not required for use with other free software.
This enable some extra check in FreeTDS code. Currently is not widely used and it should be used for debugging purpose.
Enable some code still in developing. Should be used only by developer or brave users :)
Now you're ready to build. Follow these easy steps.
Download the tarball and unpack it.
Alternatively, get the latest build from CVS [1] .
Change to the freetds directory.
run ./configure with any options you need.
make; make install; make clean
You normally need to be root to make install, unless you use the --prefix flag during configuration to install into your own directory.
With any luck, you've built and installed the FreeTDS libraries.
[1] | CVS users will need the GNU autotools: Autoconf, Automake, and libtool. |