2000-09-18 12:26:23 -04:00
|
|
|
dnl configuration script for expat
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
dnl Copyright 2000 Clark Cooper
|
|
|
|
dnl
|
|
|
|
dnl This file is part of EXPAT.
|
|
|
|
dnl
|
|
|
|
dnl EXPAT is free software; you can redistribute it and/or modify it
|
|
|
|
dnl under the terms of the License (based on the MIT/X license) contained
|
|
|
|
dnl in the file COPYING that comes with this distribution.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_INIT(Makefile.in)
|
|
|
|
AC_CONFIG_AUX_DIR(conftools)
|
|
|
|
|
2000-09-26 09:52:33 -04:00
|
|
|
dnl
|
|
|
|
dnl Follow the GNU/Linux convention of odd number minor version for
|
|
|
|
dnl beta/development releases and even number minor version for stable
|
|
|
|
dnl releases. Edit is bumped with each release and set to 0 with
|
|
|
|
dnl change to major or minor version.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
EXPAT_MAJOR_VERSION=1
|
2000-12-27 14:37:37 -05:00
|
|
|
EXPAT_MINOR_VERSION=95
|
|
|
|
EXPAT_EDIT=2
|
2000-09-26 09:52:33 -04:00
|
|
|
|
|
|
|
EXPAT_VERSION=$EXPAT_MAJOR_VERSION.$EXPAT_MINOR_VERSION.$EXPAT_EDIT
|
2000-09-18 12:26:23 -04:00
|
|
|
VERSION=$EXPAT_VERSION
|
|
|
|
|
2000-09-26 09:52:33 -04:00
|
|
|
dnl
|
|
|
|
dnl Increment LIBREVISION if source code has changed at all
|
|
|
|
dnl
|
|
|
|
dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
|
|
|
|
dnl
|
|
|
|
dnl If the API changes compatibly (i.e. simply adding a new function
|
|
|
|
dnl without changing or removing earlier interfaces), then increment LIBAGE.
|
|
|
|
dnl
|
|
|
|
dnl If the API changes incompatibly set LIBAGE back to 0
|
|
|
|
dnl
|
|
|
|
|
2000-12-27 14:37:37 -05:00
|
|
|
LIBCURRENT=1
|
|
|
|
LIBREVISION=0
|
|
|
|
LIBAGE=1
|
2000-09-23 23:43:37 -04:00
|
|
|
|
2001-03-10 10:41:50 -05:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
2000-09-28 13:53:00 -04:00
|
|
|
|
2001-08-23 07:27:26 -04:00
|
|
|
sinclude(conftools/libtool.m4)
|
|
|
|
sinclude(conftools/ac_c_bigendian_cross.m4)
|
|
|
|
|
2000-09-28 13:53:00 -04:00
|
|
|
AC_LIBTOOL_WIN32_DLL
|
2000-09-18 12:26:23 -04:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
AC_SUBST(VERSION)
|
2000-12-27 14:37:37 -05:00
|
|
|
AC_SUBST(EXPAT_MAJOR_VERSION)
|
|
|
|
AC_SUBST(EXPAT_MINOR_VERSION)
|
|
|
|
AC_SUBST(EXPAT_EDIT)
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2000-09-23 23:43:37 -04:00
|
|
|
AC_SUBST(LIBCURRENT)
|
|
|
|
AC_SUBST(LIBREVISION)
|
|
|
|
AC_SUBST(LIBAGE)
|
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
2001-07-25 13:25:46 -04:00
|
|
|
if test "$GCC" = yes ; then
|
2001-07-26 16:48:06 -04:00
|
|
|
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions"
|
2001-07-25 13:25:46 -04:00
|
|
|
fi
|
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(fcntl.h unistd.h)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
2001-07-24 15:54:20 -04:00
|
|
|
|
|
|
|
dnl Note: Avoid using AC_C_BIGENDIAN because it does not
|
|
|
|
dnl work in a cross compile.
|
|
|
|
AC_C_BIGENDIAN_CROSS
|
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_FUNC_MMAP
|
2001-03-10 10:41:50 -05:00
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
if test -z "$HAVE_MMAP"; then
|
2001-02-28 22:47:12 -05:00
|
|
|
FILEMAP_OBJ=unixfilemap.o
|
2000-09-18 12:26:23 -04:00
|
|
|
else
|
2001-02-28 22:47:12 -05:00
|
|
|
FILEMAP_OBJ=readfilemap.o
|
2000-09-18 12:26:23 -04:00
|
|
|
fi
|
2001-03-10 10:41:50 -05:00
|
|
|
AC_SUBST(FILEMAP_OBJ)
|
2000-09-18 12:26:23 -04:00
|
|
|
|
|
|
|
AC_CHECK_FUNCS(memmove bcopy)
|
|
|
|
|
2001-02-28 22:47:12 -05:00
|
|
|
dnl Generate makefiles only for the directories that are present;
|
|
|
|
dnl this allows this (and the generated configure script) to work
|
|
|
|
dnl in "embedded distributions", where only part of the Expat sources
|
|
|
|
dnl are included in the sources for another project.
|
|
|
|
|
|
|
|
OUTPUT="Makefile lib/Makefile lib/expat.h"
|
2001-07-20 23:37:12 -04:00
|
|
|
if test -d ${srcdir}/xmlwf; then
|
2001-02-28 22:47:12 -05:00
|
|
|
OUTPUT="$OUTPUT xmlwf/Makefile"
|
|
|
|
fi
|
2001-07-20 23:37:12 -04:00
|
|
|
if test -d ${srcdir}/examples; then
|
2001-02-28 22:47:12 -05:00
|
|
|
OUTPUT="$OUTPUT examples/Makefile"
|
|
|
|
fi
|
2001-08-17 15:23:02 -04:00
|
|
|
if test -d ${srcdir}/tests; then
|
|
|
|
OUTPUT="$OUTPUT tests/Makefile"
|
|
|
|
fi
|
2001-02-28 22:47:12 -05:00
|
|
|
AC_OUTPUT($OUTPUT)
|