# OpenSP autoconf support

We have dropped the old SP Makefiles in favour of the GNU configuration tools automake, autoconf and libtool. If building OpenSP doesn't work out of the box on your system, we'd like to receive feedback and patches for your operating system.

## Usage

    % ./configure; make; make install

## configure options

`--help`
  Print a full list of options. This document only deals with the non-standard options.
`--enable-http`
  Include support for HTTP.
`--enable-default-catalog=pathlist`
  Provide one or more default catalog files or sysids.
`--enable-default-search-path=pathlist`
  Provide a default value for SGML_SEARCH_PATH.

## Local defines

If you have some extra additions to OpenSP, you can set CFLAGS/CXXFLAGS and/or LDFLAGS/LIBS at configure time:

    CXXFLAGS=-Dmyhacks LDFLAGS=-L/opt/myhacks LIBS=-lmyhacks ./configure

Check the invocation of ld in Makefile for the exact semantics of LDFLAGS and LIBS.

## Tested platforms

- RedHat Linux 5.2 (egcs 1.0.3, glibc 2.0.7)
- RedHat Linux 6.0 (gcc 2.95.1, glibc 2.1.1)
- SuSE Linux 5.3 (gcc 2.7.2.1, libc 5.5.46)
- Solaris 2.6 (gcc 2.8.1)

## Shared library support

By default, `./configure` attempts to build shared libraries and link against them. This is done via the `libtool` utility, a utility that knows how to build shared libraries on a number of platforms.

By default, only shared libraries are built. If you have difficulties building shared libraries, or you want to build static versions, you can use the `--{enable,disable}-{shared,static}` options to configure libtool to your likings.

According to the libtool 1.2 docs, shared libraries work on:

- AIX 3.x (*-*-aix3*)
- AIX 4.x (*-*-aix4*)
- AmigaOS (*-*-amigaos*)
- Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*)
- FreeBSD 2.x, 3.x (*-*-freebsd2*, *-*-freebsd3*)
- GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld)
- HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) [see note]
- IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
- NetBSD 1.x (*-*-netbsd*)
- OpenBSD 2.x (*-*-openbsd*)
- OS/2 using EMX (*-*-os2*)
- SCO OpenServer 5.x (*-*-sco3.2v5*)
- Solaris 2.x (*-*-solaris2*)
- SunOS 4.x, a.k.a. Solaris 1.x (*-*-sunos4*)
- UnixWare 2.x (*-*-sysv4.2uw2*)
- UTS 4.x (*-*-uts4*)
- All ELF targets that use both the GNU C compiler (gcc) and GNU ld

One more note from the libtool documentation: the HP/UX sed seems to be badly broken, install GNU sed before attempting to build - libtool depends on a working sed.

Note: shared libraries seem to be broken on HP-UX 10.* with gcc-2.95.2. Use `--disable-shared`.