Blame m4/configmake.m4

Packit Service fdd496
# configmake.m4 serial 2
Packit Service fdd496
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
Packit Service fdd496
dnl This file is free software; the Free Software Foundation
Packit Service fdd496
dnl gives unlimited permission to copy and/or distribute it,
Packit Service fdd496
dnl with or without modifications, as long as this notice is preserved.
Packit Service fdd496
Packit Service fdd496
# gl_CONFIGMAKE_PREP
Packit Service fdd496
# ------------------
Packit Service fdd496
# Guarantee all of the standard directory variables, even when used with
Packit Service fdd496
# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
Packit Service fdd496
# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
Packit Service fdd496
# and runstatedir in 1.14.1).
Packit Service fdd496
AC_DEFUN([gl_CONFIGMAKE_PREP],
Packit Service fdd496
[
Packit Service fdd496
  dnl Technically, datadir should default to datarootdir.  But if
Packit Service fdd496
  dnl autoconf is too old to provide datarootdir, then reversing the
Packit Service fdd496
  dnl definition is a reasonable compromise.  Only AC_SUBST a variable
Packit Service fdd496
  dnl if it was not already defined earlier by autoconf.
Packit Service fdd496
  if test "x$datarootdir" = x; then
Packit Service fdd496
    AC_SUBST([datarootdir], ['${datadir}'])
Packit Service fdd496
  fi
Packit Service fdd496
  dnl Copy the approach used in autoconf 2.60.
Packit Service fdd496
  if test "x$docdir" = x; then
Packit Service fdd496
    AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
Packit Service fdd496
      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
Packit Service fdd496
      ['${datarootdir}/doc/${PACKAGE}'])])
Packit Service fdd496
  fi
Packit Service fdd496
  dnl The remaining variables missing from autoconf 2.59 are easier.
Packit Service fdd496
  if test "x$htmldir" = x; then
Packit Service fdd496
    AC_SUBST([htmldir], ['${docdir}'])
Packit Service fdd496
  fi
Packit Service fdd496
  if test "x$dvidir" = x; then
Packit Service fdd496
    AC_SUBST([dvidir], ['${docdir}'])
Packit Service fdd496
  fi
Packit Service fdd496
  if test "x$pdfdir" = x; then
Packit Service fdd496
    AC_SUBST([pdfdir], ['${docdir}'])
Packit Service fdd496
  fi
Packit Service fdd496
  if test "x$psdir" = x; then
Packit Service fdd496
    AC_SUBST([psdir], ['${docdir}'])
Packit Service fdd496
  fi
Packit Service fdd496
  if test "x$lispdir" = x; then
Packit Service fdd496
    AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
Packit Service fdd496
  fi
Packit Service fdd496
  if test "x$localedir" = x; then
Packit Service fdd496
    AC_SUBST([localedir], ['${datarootdir}/locale'])
Packit Service fdd496
  fi
Packit Service fdd496
  dnl Added in autoconf 2.70
Packit Service fdd496
  if test "x$runstatedir" = x; then
Packit Service fdd496
    AC_SUBST([runstatedir], ['${localstatedir}/run'])
Packit Service fdd496
  fi
Packit Service fdd496
Packit Service fdd496
  dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
Packit Service fdd496
  dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
Packit Service fdd496
  AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
Packit Service fdd496
])