mkdirp.m4 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. ## -*- Autoconf -*-
  2. # Copyright (C) 2003-2017 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # AM_PROG_MKDIR_P
  8. # ---------------
  9. # Check for 'mkdir -p'.
  10. AC_DEFUN([AM_PROG_MKDIR_P],
  11. [AC_PREREQ([2.60])dnl
  12. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  13. dnl FIXME we are no longer going to remove this! adjust warning
  14. dnl FIXME message accordingly.
  15. AC_DIAGNOSE([obsolete],
  16. [$0: this macro is deprecated, and will soon be removed.
  17. You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
  18. and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.])
  19. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  20. dnl while keeping a definition of mkdir_p for backward compatibility.
  21. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  22. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  23. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  24. dnl adjustment using top_builddir (which is defined more often than
  25. dnl MKDIR_P).
  26. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  27. case $mkdir_p in
  28. [[\\/$]]* | ?:[[\\/]]*) ;;
  29. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  30. esac
  31. ])