configure.ac 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright © 2003 Keith Packard, Noah Levitt
  3. #
  4. # Permission to use, copy, modify, distribute, and sell this software and its
  5. # documentation for any purpose is hereby granted without fee, provided that
  6. # the above copyright notice appear in all copies and that both that
  7. # copyright notice and this permission notice appear in supporting
  8. # documentation, and that the name of Keith Packard not be used in
  9. # advertising or publicity pertaining to distribution of the software without
  10. # specific, written prior permission. Keith Packard makes no
  11. # representations about the suitability of this software for any purpose. It
  12. # is provided "as is" without express or implied warranty.
  13. #
  14. # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15. # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16. # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17. # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18. # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19. # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20. # PERFORMANCE OF THIS SOFTWARE.
  21. #
  22. # Initialize Autoconf
  23. AC_PREREQ([2.60])
  24. #
  25. # This is the package version number, not the shared library
  26. # version. This version number will be substituted into Xft.h
  27. # Please bump the minor library number at each release as well.
  28. #
  29. AC_INIT([libXft], [2.3.2],
  30. [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXft])
  31. AC_CONFIG_SRCDIR([Makefile.am])
  32. AC_CONFIG_HEADERS([config.h])
  33. # Initialize Automake
  34. AM_INIT_AUTOMAKE([foreign dist-bzip2])
  35. # Initialize libtool
  36. AC_PROG_LIBTOOL
  37. # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
  38. m4_ifndef([XORG_MACROS_VERSION],
  39. [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
  40. XORG_MACROS_VERSION(1.8)
  41. XORG_DEFAULT_OPTIONS
  42. # Set library version for Xft.h from package version set in AC_INIT
  43. # copied from PACKAGE_VERSION_* settings in XORG_VERSION
  44. AC_CONFIG_HEADERS([include/X11/Xft/Xft.h])
  45. AC_DEFINE_UNQUOTED([XFT_MAJOR],
  46. [`echo $PACKAGE_VERSION | cut -d . -f 1`],
  47. [Major version of Xft])
  48. AC_DEFINE_UNQUOTED([XFT_MINOR],
  49. [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`],
  50. [Minor version of Xft])
  51. AC_DEFINE_UNQUOTED([XFT_REVISION],
  52. [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`],
  53. [Micro revision of Xft])
  54. XFT_LT_VERSION=`echo $PACKAGE_VERSION | tr '.' ':'`
  55. AC_SUBST([XFT_LT_VERSION])
  56. #
  57. # Check for Xrender
  58. #
  59. PKG_CHECK_MODULES(XRENDER, xrender >= 0.8.2 x11)
  60. # Check freetype configuration
  61. PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.1.6)
  62. # Check fontconfig configuration
  63. PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.5.92)
  64. AC_SUBST(XRENDER_CFLAGS)
  65. AC_SUBST(XRENDER_LIBS)
  66. AC_SUBST(FREETYPE_CFLAGS)
  67. AC_SUBST(FREETYPE_LIBS)
  68. AC_SUBST(FONTCONFIG_CFLAGS)
  69. AC_SUBST(FONTCONFIG_LIBS)
  70. if test "$VERSION" = "" ; then
  71. VERSION=$PACKAGE_VERSION;
  72. fi
  73. AC_CONFIG_FILES([Makefile
  74. xft.pc
  75. src/Makefile
  76. man/Makefile])
  77. AC_OUTPUT