configure.ac 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. dnl configuration script for expat
  2. dnl Process this file with autoconf to produce a configure script.
  3. dnl
  4. dnl Copyright 2000 Clark Cooper
  5. dnl
  6. dnl This file is part of EXPAT.
  7. dnl
  8. dnl EXPAT is free software; you can redistribute it and/or modify it
  9. dnl under the terms of the License (based on the MIT/X license) contained
  10. dnl in the file COPYING that comes with this distribution.
  11. dnl
  12. AC_INIT(Makefile.in)
  13. AC_CONFIG_AUX_DIR(conftools)
  14. AC_CONFIG_MACRO_DIR(.)
  15. dnl
  16. dnl Follow the GNU/Linux convention of odd number minor version for
  17. dnl beta/development releases and even number minor version for stable
  18. dnl releases. Edit is bumped with each release and set to 0 with
  19. dnl change to major or minor version.
  20. dnl
  21. EXPAT_MAJOR_VERSION=1
  22. EXPAT_MINOR_VERSION=95
  23. EXPAT_EDIT=2
  24. EXPAT_VERSION=$EXPAT_MAJOR_VERSION.$EXPAT_MINOR_VERSION.$EXPAT_EDIT
  25. VERSION=$EXPAT_VERSION
  26. PACKAGE=expat
  27. dnl
  28. dnl Increment LIBREVISION if source code has changed at all
  29. dnl
  30. dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
  31. dnl
  32. dnl If the API changes compatibly (i.e. simply adding a new function
  33. dnl without changing or removing earlier interfaces), then increment LIBAGE.
  34. dnl
  35. dnl If the API changes incompatibly set LIBAGE back to 0
  36. dnl
  37. LIBCURRENT=1
  38. LIBREVISION=0
  39. LIBAGE=1
  40. AC_CONFIG_HEADER(config.h)
  41. AC_CANONICAL_SYSTEM
  42. case "$host_os" in
  43. *os2*)
  44. # Use a custom made libtool replacement
  45. echo Using aplibtool
  46. LIBTOOL="$srcdir/../../../apr/build/aplibtool"
  47. ;;
  48. *)
  49. AC_LIBTOOL_WIN32_DLL
  50. AC_PROG_LIBTOOL
  51. ;;
  52. esac
  53. blddir=`pwd`
  54. AC_SUBST(blddir)
  55. AC_SUBST(PACKAGE)
  56. AC_SUBST(VERSION)
  57. AC_SUBST(EXPAT_MAJOR_VERSION)
  58. AC_SUBST(EXPAT_MINOR_VERSION)
  59. AC_SUBST(EXPAT_EDIT)
  60. AC_SUBST(LIBCURRENT)
  61. AC_SUBST(LIBREVISION)
  62. AC_SUBST(LIBAGE)
  63. dnl Checks for programs.
  64. AC_PROG_CC
  65. AC_PROG_INSTALL
  66. dnl Checks for libraries.
  67. dnl Checks for header files.
  68. AC_HEADER_STDC
  69. AC_CHECK_HEADERS(fcntl.h unistd.h string.h)
  70. dnl Checks for typedefs, structures, and compiler characteristics.
  71. dnl check for endianness
  72. if test "$cross_compiling" = "no"; then
  73. AC_C_BIGENDIAN
  74. else
  75. AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,[byte order is unknown due to cross-compilation])
  76. fi
  77. if test "$ac_cv_c_bigendian" = "yes"; then
  78. AC_DEFINE(XML_BYTE_ORDER,21,[21 for big endian or 12 for little])
  79. else
  80. AC_DEFINE(XML_BYTE_ORDER,12,[z])
  81. fi
  82. AC_DEFINE(XML_NS,,[Define me])
  83. AC_DEFINE(XML_DTD,,[Define me])
  84. AC_DEFINE(XML_CONTEXT_BYTES,1024,[1024])
  85. AC_C_CONST
  86. AC_TYPE_OFF_T
  87. AC_TYPE_SIZE_T
  88. dnl Checks for library functions.
  89. AC_FUNC_MEMCMP
  90. AC_FUNC_MMAP
  91. AC_SUBST(FILEMAP_OBJ)
  92. if test -z "$HAVE_MMAP"; then
  93. FILEMAP_OBJ=unixfilemap.o
  94. else
  95. FILEMAP_OBJ=readfilemap.o
  96. fi
  97. AC_CHECK_FUNCS(memmove bcopy)
  98. AC_OUTPUT(Makefile lib/Makefile lib/expat.h)