configmake.m4 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # configmake.m4 serial 1
  2. dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. # gl_CONFIGMAKE_PREP
  7. # ------------------
  8. # Guarantee all of the standard directory variables, even when used with
  9. # autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
  10. # 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
  11. AC_DEFUN([gl_CONFIGMAKE_PREP],
  12. [
  13. dnl Technically, datadir should default to datarootdir. But if
  14. dnl autoconf is too old to provide datarootdir, then reversing the
  15. dnl definition is a reasonable compromise. Only AC_SUBST a variable
  16. dnl if it was not already defined earlier by autoconf.
  17. if test "x$datarootdir" = x; then
  18. AC_SUBST([datarootdir], ['${datadir}'])
  19. fi
  20. dnl Copy the approach used in autoconf 2.60.
  21. if test "x$docdir" = x; then
  22. AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
  23. ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
  24. ['${datarootdir}/doc/${PACKAGE}'])])
  25. fi
  26. dnl The remaining variables missing from autoconf 2.59 are easier.
  27. if test "x$htmldir" = x; then
  28. AC_SUBST([htmldir], ['${docdir}'])
  29. fi
  30. if test "x$dvidir" = x; then
  31. AC_SUBST([dvidir], ['${docdir}'])
  32. fi
  33. if test "x$pdfdir" = x; then
  34. AC_SUBST([pdfdir], ['${docdir}'])
  35. fi
  36. if test "x$psdir" = x; then
  37. AC_SUBST([psdir], ['${docdir}'])
  38. fi
  39. if test "x$lispdir" = x; then
  40. AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
  41. fi
  42. if test "x$localedir" = x; then
  43. AC_SUBST([localedir], ['${datarootdir}/locale'])
  44. fi
  45. dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
  46. dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
  47. AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
  48. ])