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.

75 lines
2.7KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cf_ebcdic.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CF_EBCDIC
  8. #
  9. # DESCRIPTION
  10. #
  11. # If the target character set is EBCDIC, defines variables cf_cv_ebcdic,
  12. # EBCDIC, and NOT_ASCII.
  13. #
  14. # I originally wrote this and submitted it to the Lynx distribution.
  15. # Editorial revisions by Tom Dickey, et. al.
  16. #
  17. # LICENSE
  18. #
  19. # Copyright (c) 2008 Paul Gilmartin <pg@sweng.stortek.com>
  20. #
  21. # This program is free software: you can redistribute it and/or modify it
  22. # under the terms of the GNU General Public License as published by the
  23. # Free Software Foundation, either version 3 of the License, or (at your
  24. # option) any later version.
  25. #
  26. # This program is distributed in the hope that it will be useful, but
  27. # WITHOUT ANY WARRANTY; without even the implied warranty of
  28. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  29. # Public License for more details.
  30. #
  31. # You should have received a copy of the GNU General Public License along
  32. # with this program. If not, see <https://www.gnu.org/licenses/>.
  33. #
  34. # As a special exception, the respective Autoconf Macro's copyright owner
  35. # gives unlimited permission to copy, distribute and modify the configure
  36. # scripts that are the output of Autoconf when processing the Macro. You
  37. # need not follow the terms of the GNU General Public License when using
  38. # or distributing such scripts, even though portions of the text of the
  39. # Macro appear in them. The GNU General Public License (GPL) does govern
  40. # all other use of the material that constitutes the Autoconf Macro.
  41. #
  42. # This special exception to the GPL applies to versions of the Autoconf
  43. # Macro released by the Autoconf Archive. When you make and distribute a
  44. # modified version of the Autoconf Macro, you may extend this special
  45. # exception to the GPL to apply to your modified version as well.
  46. #serial 6
  47. dnl Check whether character set is EBCDIC.
  48. AU_ALIAS([CF_EBCDIC], [AX_CF_EBCDIC])
  49. AC_DEFUN([AX_CF_EBCDIC],[
  50. AC_MSG_CHECKING(if character set is EBCDIC)
  51. AC_CACHE_VAL(cf_cv_ebcdic,[
  52. AC_TRY_COMPILE([ ],
  53. [ /* TryCompile function for CharSet.
  54. Treat any failure as ASCII for compatibility with existing art.
  55. Use compile-time rather than run-time tests for cross-compiler
  56. tolerance. */
  57. #if '0'!=240
  58. make an error "Character set is not EBCDIC"
  59. #endif ],
  60. [ # TryCompile action if true
  61. cf_cv_ebcdic=yes ],
  62. [ # TryCompile action if false
  63. cf_cv_ebcdic=no])
  64. # end of TryCompile ])
  65. # end of CacheVal CvEbcdic
  66. AC_MSG_RESULT($cf_cv_ebcdic)
  67. case "$cf_cv_ebcdic" in #(vi
  68. yes) AC_DEFINE(EBCDIC)
  69. AC_DEFINE(NOT_ASCII);; #(vi
  70. *) ;;
  71. esac
  72. ])dnl