PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/configure.ac

#
text | 69 lines | 59 code | 10 blank | 0 comment | 0 complexity | 7f91b5e892bbfdd802320e6fafdbcdb7 MD5 | raw file
  1. # Initialize Autoconf
  2. AC_PREREQ([2.60])
  3. AC_INIT([libXpm], [3.5.9],
  4. [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm])
  5. AC_CONFIG_SRCDIR([Makefile.am])
  6. AC_CONFIG_HEADERS([config.h])
  7. AC_CONFIG_MACRO_DIR([m4])
  8. # Initialize Automake
  9. AM_INIT_AUTOMAKE([foreign dist-bzip2])
  10. AM_MAINTAINER_MODE
  11. # Initialize libtool
  12. AC_PROG_LIBTOOL
  13. # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
  14. m4_ifndef([XORG_MACROS_VERSION],
  15. [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
  16. XORG_MACROS_VERSION(1.8)
  17. XORG_DEFAULT_OPTIONS
  18. # Checks for library functions
  19. AC_CHECK_FUNCS([strlcat])
  20. # Obtain compiler/linker options for dependencies
  21. PKG_CHECK_MODULES(XPM, xproto x11)
  22. PKG_CHECK_MODULES(SXPM, x11 xt xext xextproto, build_sxpm=true, build_sxpm=false)
  23. AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue)
  24. # Internationalization & localization support
  25. AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
  26. AC_MSG_CHECKING([where to install localized messages])
  27. AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>],
  28. [Path to install message files in (default: datadir/locale)]),
  29. [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
  30. AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
  31. if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
  32. AC_MSG_RESULT([nowhere])
  33. USE_GETTEXT="no"
  34. else
  35. AC_MSG_RESULT([$LOCALEDIR])
  36. fi
  37. if test "x$USE_GETTEXT" = "xyes" ; then
  38. AC_DEFINE([USE_GETTEXT], 1,
  39. [Define to 1 if you want to use the gettext() function.])
  40. fi
  41. AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
  42. # Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz
  43. # Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile
  44. AC_ARG_ENABLE(stat-zfile,
  45. AS_HELP_STRING([--enable-stat-zfile],
  46. [Search for files with .Z & .gz extensions automatically @<:@default=yes@:>@]),
  47. [STAT_ZFILE=$enableval], [STAT_ZFILE=yes])
  48. if test x$STAT_ZFILE = xyes ; then
  49. AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions])
  50. fi
  51. AC_CONFIG_FILES([Makefile
  52. doc/Makefile
  53. include/Makefile
  54. man/Makefile
  55. src/Makefile
  56. sxpm/Makefile
  57. cxpm/Makefile
  58. xpm.pc])
  59. AC_OUTPUT