build/autoconf/codeset.m4
author Ted Mielczarek <ted@mielczarek.org>
Tue, 05 Apr 2016 10:09:12 -0400
changeset 329633 b65d504944ef45c9dd33ae45b922f5f438c12867
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
bug 1239083 - use moz.build files to build ICU. r=glandium,waldo Also fixes bug 926980 - load ICU data from an archive file. Stop invoking ICU's autoconf build system. Instead, have hand-authored moz.build files under config/external/icu to build what we need. In addition, we'll commit a pre-built copy of the ICU data file (currently icudt56l.dat) under config/external/icu/data to avoid having to build ICU host tools to generate it. config/external/icu/data also contains some assembly files which can generate an object file containing the ICU data file contents so that the JS shell (or standalone JS builds) can be linked directly to the data without having to deal with the external data file. This requires yasm or GNU as. Various bits of packaging have been updated to account for the ICU data file. XPCOM initialization now sets the ICU data directory so ICU can locate its data file. The update-icu.sh script has been modified to read the list of C/C++ source files out of the ICU Makefiles and update `sources.mozbuild` files under config/external/icu, as well as build a local copy of ICU using its autoconf build system to generate the ICU data file to be committed in-tree. MozReview-Commit-ID: 8Pfkzqt6S1W

# codeset.m4 serial AM1 (gettext-0.10.40)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

dnl From Bruno Haible.

AC_DEFUN([AM_LANGINFO_CODESET],
[
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
    [AC_TRY_LINK([#include <langinfo.h>],
      [char* cs = nl_langinfo(CODESET);],
      am_cv_langinfo_codeset=yes,
      am_cv_langinfo_codeset=no)
    ])
  if test $am_cv_langinfo_codeset = yes; then
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
      HAVE_LANGINFO_CODESET=1
  fi
  AC_SUBST(HAVE_LANGINFO_CODESET)
])