configure.ac 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.60)
  3. AC_INIT([texi2html], [5.0], [bug-texinfo@gnu.org])
  4. dnl 1.9 because we need tar-ustar, and tar-ustar because we have long
  5. dnl filenames for some test files
  6. AM_INIT_AUTOMAKE([gnu 1.9 dist-bzip2 dist-zip tar-ustar])
  7. dnl Disable Autoconf, Automake, and some other maintainer tools without the
  8. dnl --enable-maintainer-mode argument.
  9. AM_MAINTAINER_MODE
  10. AM_CONDITIONAL([TEXI2HTML],[true])
  11. AM_GNU_GETTEXT([external])
  12. dnl it is not completly clear that we need that or not, since gettext is
  13. dnl not fully used. Set to whatever gettextize inserts.
  14. AM_GNU_GETTEXT_VERSION([0.18.3])
  15. dnl Misc variable settings
  16. dnl PACKAGE_DATE=`${SHELL} "$srcdir"/mdate-sh "$srcdir"/configure.ac`
  17. dnl AC_SUBST([PACKAGE_DATE])
  18. dnl Checks for programs.
  19. AC_PROG_LN_S
  20. AC_PROG_MKDIR_P
  21. AC_ARG_VAR([PERL], [The path to the 'perl' executable.])
  22. AC_PATH_PROG([PERL], [perl], [/usr/bin/env perl], [/opt/perl5/bin:"$PATH"])
  23. USE_EXTERNAL_LIBINTL=no
  24. AC_ARG_WITH([external-libintl-perl],
  25. AC_HELP_STRING([--with-external-libintl-perl],
  26. [use external libintl-perl if found (default: no)]),
  27. [if test $withval = 'yes'; then
  28. USE_EXTERNAL_LIBINTL=yes
  29. fi]
  30. )
  31. AC_SUBST([USE_EXTERNAL_LIBINTL])
  32. USE_UNICODE=unknown
  33. AC_ARG_WITH([encode],
  34. AC_HELP_STRING([--with-encode],
  35. [use encode (default: runtime detection)]),
  36. [if test $withval = 'no'; then
  37. USE_UNICODE=0
  38. else
  39. USE_UNICODE=1
  40. fi],
  41. [])
  42. USE_EXTERNAL_EASTASIANWIDTH=no
  43. AC_ARG_WITH([external-Unicode-EastAsianWidth],
  44. AC_HELP_STRING([--with-external-Unicode-EastAsianWidth],
  45. [use external Unicode-EastAsianWidth if found (default: no)]),
  46. [if test $withval = 'yes'; then
  47. USE_EXTERNAL_EASTASIANWIDTH=yes
  48. fi]
  49. )
  50. AC_SUBST([USE_EXTERNAL_EASTASIANWIDTH])
  51. USE_EXTERNAL_UNIDECODE=no
  52. AC_ARG_WITH([external-Text-Unidecode],
  53. AC_HELP_STRING([--with-external-Text-Unidecode],
  54. [use external Text::Unidecode if found (default: no)]),
  55. [if test $withval = 'yes'; then
  56. USE_EXTERNAL_UNIDECODE=yes
  57. fi]
  58. )
  59. AC_SUBST([USE_UNICODE])
  60. AC_SUBST([USE_EXTERNAL_UNIDECODE])
  61. t2h_try_translations=
  62. AC_ARG_ENABLE([translations],
  63. AC_HELP_STRING([--enable-translations],
  64. [try to rebuild translation files (default: detected)]),
  65. [if test $enableval = 'no'; then
  66. t2h_try_translations='no'
  67. else
  68. t2h_try_translations='yes'
  69. fi],
  70. [ if $PERL -e "use 5.0; use Data::Dumper;" > /dev/null 2>&1;
  71. then
  72. t2h_try_translations='yes'
  73. else
  74. t2h_try_translations='no'
  75. fi
  76. ])
  77. if test "z$t2h_try_translations" = 'zyes'; then
  78. USE_DATA_DUMPER=1
  79. REQUIRE_DATA_DUMPER="use Data::Dumper"
  80. else
  81. USE_DATA_DUMPER=0
  82. REQUIRE_DATA_DUMPER=1
  83. fi
  84. AC_SUBST([USE_DATA_DUMPER])
  85. AC_SUBST([REQUIRE_DATA_DUMPER])
  86. # top_builddir and subdir differs between standalone texi2html and
  87. # texi2html in texinfo
  88. t2h_po_dir=
  89. AC_SUBST([t2h_po_dir])
  90. t2h_po_top_builddir='..'
  91. AC_SUBST([t2h_po_top_builddir])
  92. AC_PROG_INSTALL
  93. dnl Checks for libraries.
  94. dnl Checks for header files.
  95. dnl Checks for typedefs, structures, and compiler characteristics.
  96. dnl Checks for library functions.
  97. # For teTeX and TeX Live.
  98. AC_CANONICAL_HOST
  99. AC_ARG_ENABLE(multiplatform,
  100. [ --enable-multiplatform put executables in bin/PLATFORM])
  101. test "x$enable_multiplatform" = xyes \
  102. && test "x$bindir" = 'x${exec_prefix}/bin' \
  103. && bindir="$bindir/$host"
  104. dnl The bulk config files.
  105. AC_CONFIG_FILES([ po_messages/Makefile.in po_document/Makefile.in \
  106. po_messages/POTFILES.in \
  107. po_document/POTFILES.in \
  108. po_messages/Makevars \
  109. po_document/Makevars \
  110. Makefile \
  111. test/Makefile \
  112. test/contents/Makefile \
  113. test/coverage/Makefile \
  114. test/info_coverage/Makefile \
  115. test/formatting/Makefile \
  116. test/indices/Makefile \
  117. test/invalid/Makefile \
  118. test/misc/Makefile \
  119. test/encodings/Makefile \
  120. test/macros/Makefile \
  121. test/manuals/Makefile \
  122. test/nested_formats/Makefile \
  123. test/sectioning/Makefile \
  124. test/htmlxref/Makefile \
  125. test/htmlxref-only_mono/Makefile \
  126. test/htmlxref-only_split/Makefile \
  127. test/xemacs_manual/Makefile \
  128. test/texi2html_manual/Makefile \
  129. test/tar_manual/Makefile \
  130. test/singular_manual/Makefile \
  131. test/layout/Makefile \
  132. test/tex_html/Makefile \
  133. test/tex_html_manuals/Makefile \
  134. test/tex_html_singular/Makefile \
  135. test/many_input_files/Makefile \
  136. test/path_separator
  137. ])
  138. dnl scripts
  139. AC_CONFIG_FILES([texi2html_configured.pl:texi2html.pl],
  140. [chmod +x texi2html_configured.pl])
  141. AC_CONFIG_FILES([check_texinfo.pl], [chmod +x check_texinfo.pl])
  142. AC_CONFIG_FILES([manage_i18n.pl], [chmod +x manage_i18n.pl])
  143. AC_OUTPUT