configure.ac 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. AC_INIT
  2. AC_USE_SYSTEM_EXTENSIONS
  3. AC_CONFIG_SRCDIR(gettext.c)
  4. AC_CONFIG_HEADER(config.h)
  5. AC_CONFIG_MACRO_DIR(../config)
  6. AM_GNU_GETTEXT_VERSION(0.12.1)
  7. AM_GNU_GETTEXT([], [need-ngettext])
  8. # This replaces the extensive use of DEFS in the original Makefile.in.
  9. AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])
  10. AC_DEFINE(IN_LIBRARY, 1, [Define because this is a library.])
  11. AC_DEFINE(DEPENDS_ON_LIBICONV, 1, [Define because we depend on libiconv.])
  12. AC_DEFINE(ENABLE_RELOCATABLE, 1, [Define to enable relocation.])
  13. AC_DEFINE(NO_XMALLOC, 1, [Define if there is no xmalloc.])
  14. AC_DEFINE(set_relocation_prefix, libintl_set_relocation_prefix,
  15. [Define this entry point correctly.])
  16. AC_DEFINE(relocate, libintl_relocate,
  17. [Define this entry point correctly.])
  18. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
  19. AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
  20. AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
  21. AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
  22. AC_ARG_ENABLE(maintainer-mode,
  23. [ --enable-maintainer-mode enable rules only needed by maintainers],,
  24. enable_maintainer_mode=no)
  25. if test "x$enable_maintainer_mode" = xno; then
  26. MAINT='#'
  27. else
  28. MAINT=
  29. fi
  30. AC_SUBST(MAINT)
  31. dnl Variables for tags utilities; based on automake 1.16.4+'s init.m4
  32. if test -z "$CTAGS"; then
  33. CTAGS=ctags
  34. fi
  35. AC_SUBST([CTAGS])
  36. if test -z "$ETAGS"; then
  37. ETAGS=etags
  38. fi
  39. AC_SUBST([ETAGS])
  40. if test -z "$MKID"; then
  41. MKID=mkid
  42. fi
  43. AC_SUBST([MKID])
  44. # Additional info for config.intl.
  45. AC_SUBST(LIBINTL_DEP)
  46. AC_SUBST(INCINTL)
  47. LIBINTL_DEP=
  48. INCINTL=
  49. case $USE_INCLUDED_LIBINTL in
  50. yes)
  51. LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},&/..,' `
  52. LTLIBINTL=`echo $LTLIBINTL | sed 's,${top_builddir},&/..,' `
  53. LIBINTL_DEP='${top_builddir}/../intl/libintl.a'
  54. INCINTL='-I${top_builddir}/../intl'
  55. ;;
  56. esac
  57. BISON3_YES='#'
  58. BISON3_NO=
  59. if test "$INTLBISON" != :; then
  60. ac_bison3=no
  61. AC_MSG_CHECKING([bison 3 or later])
  62. changequote(<<,>>)dnl
  63. ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  64. case $ac_prog_version in
  65. [3-9].*)
  66. changequote([,])dnl
  67. ac_prog_version="$ac_prog_version, bison3"; ac_bison3=yes;;
  68. *) ac_prog_version="$ac_prog_version, old";;
  69. esac
  70. AC_MSG_RESULT([$ac_prog_version])
  71. if test $ac_bison3 = yes; then
  72. BISON3_YES=
  73. BISON3_NO='#'
  74. fi
  75. fi
  76. AC_SUBST(BISON3_YES)
  77. AC_SUBST(BISON3_NO)
  78. AC_ARG_ENABLE(host-shared,
  79. [AS_HELP_STRING([--enable-host-shared],
  80. [build host code as shared libraries])],
  81. [PICFLAG=-fPIC], [PICFLAG=])
  82. AC_SUBST(PICFLAG)
  83. AC_CONFIG_FILES(Makefile config.intl)
  84. AC_OUTPUT