configure.ac 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. # Additional info for config.intl.
  32. AC_SUBST(LIBINTL_DEP)
  33. AC_SUBST(INCINTL)
  34. LIBINTL_DEP=
  35. INCINTL=
  36. case $USE_INCLUDED_LIBINTL in
  37. yes)
  38. LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},-L&/..,; s,\.\./intl/libintl\.a,../intl -lintl,' `
  39. LIBINTL_DEP='${top_builddir}/../intl/libintl.a'
  40. INCINTL='-I${top_builddir}/../intl'
  41. ;;
  42. esac
  43. # intl is sometimes linked into shared libraries even without --enable-shared
  44. # (e.g. gdbsupport's inprocess agent): so always PICify, just in case.
  45. GCC_PICFLAG
  46. AC_SUBST(PICFLAG)
  47. BISON3_YES='#'
  48. BISON3_NO=
  49. if test "$INTLBISON" != :; then
  50. ac_bison3=no
  51. AC_MSG_CHECKING([bison 3 or later])
  52. changequote(<<,>>)dnl
  53. ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  54. case $ac_prog_version in
  55. [3-9].*)
  56. changequote([,])dnl
  57. ac_prog_version="$ac_prog_version, bison3"; ac_bison3=yes;;
  58. *) ac_prog_version="$ac_prog_version, old";;
  59. esac
  60. AC_MSG_RESULT([$ac_prog_version])
  61. if test $ac_bison3 = yes; then
  62. BISON3_YES=
  63. BISON3_NO='#'
  64. fi
  65. fi
  66. AC_SUBST(BISON3_YES)
  67. AC_SUBST(BISON3_NO)
  68. AC_CONFIG_FILES(Makefile config.intl)
  69. AC_OUTPUT