Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.8KB

  1. # ============================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_check_pathname_style.html
  3. # ============================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CHECK_PATHNAME_STYLE_DOS
  8. #
  9. # DESCRIPTION
  10. #
  11. # Check if host OS uses DOS-style pathnames. This includes the use of
  12. # drive letters and backslashes. Under DOS, Windows, and OS/2, defines
  13. # HAVE_PATHNAME_STYLE_DOS and PATH_SEPARATOR to ';'. Otherwise, defines
  14. # PATH_SEPARATOR to ':'.
  15. #
  16. # This macro depends on the AC_CANONICAL_HOST.
  17. #
  18. # Use for enabling code to handle drive letters, backslashes in filenames
  19. # and semicolons in the PATH.
  20. #
  21. # LICENSE
  22. #
  23. # Copyright (c) 2008 Mark Elbrecht
  24. #
  25. # This program is free software; you can redistribute it and/or modify it
  26. # under the terms of the GNU General Public License as published by the
  27. # Free Software Foundation; either version 2 of the License, or (at your
  28. # option) any later version.
  29. #
  30. # This program is distributed in the hope that it will be useful, but
  31. # WITHOUT ANY WARRANTY; without even the implied warranty of
  32. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  33. # Public License for more details.
  34. #
  35. # You should have received a copy of the GNU General Public License along
  36. # with this program. If not, see <https://www.gnu.org/licenses/>.
  37. #
  38. # As a special exception, the respective Autoconf Macro's copyright owner
  39. # gives unlimited permission to copy, distribute and modify the configure
  40. # scripts that are the output of Autoconf when processing the Macro. You
  41. # need not follow the terms of the GNU General Public License when using
  42. # or distributing such scripts, even though portions of the text of the
  43. # Macro appear in them. The GNU General Public License (GPL) does govern
  44. # all other use of the material that constitutes the Autoconf Macro.
  45. #
  46. # This special exception to the GPL applies to versions of the Autoconf
  47. # Macro released by the Autoconf Archive. When you make and distribute a
  48. # modified version of the Autoconf Macro, you may extend this special
  49. # exception to the GPL to apply to your modified version as well.
  50. #serial 6
  51. AU_ALIAS([ACX_CHECK_PATHNAME_STYLE], [AX_CHECK_PATHNAME_STYLE])
  52. AC_DEFUN([AX_CHECK_PATHNAME_STYLE_DOS],
  53. [AC_MSG_CHECKING(for Windows and DOS and OS/2 style pathnames)
  54. AC_CACHE_VAL(ax_cv_pathname_style_dos,
  55. [AC_REQUIRE([AC_CANONICAL_HOST])
  56. ax_cv_pathname_style_dos="no"
  57. case ${host_os} in
  58. *djgpp | *mingw32* | *emx*) ax_cv_pathname_style_dos="yes" ;;
  59. esac
  60. ])
  61. AC_MSG_RESULT($ax_cv_pathname_style_dos)
  62. if test "$ax_cv_pathname_style_dos" = "yes"; then
  63. AC_DEFINE(HAVE_PATHNAME_STYLE_DOS,,[defined if running on a system with dos style paths])
  64. AC_DEFINE(PATH_SEPARATOR, ';')
  65. else
  66. AC_DEFINE(PATH_SEPARATOR, ':')
  67. fi
  68. ])