1 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2 dnl This file is part of the GNU LIBICONV Library.
4 dnl The GNU LIBICONV Library is free software; you can redistribute it
5 dnl and/or modify it under the terms of the GNU Library General Public
6 dnl License as published by the Free Software Foundation; either version 2
7 dnl of the License, or (at your option) any later version.
9 dnl The GNU LIBICONV Library is distributed in the hope that it will be
10 dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl Library General Public License for more details.
14 dnl You should have received a copy of the GNU Library General Public
15 dnl License along with the GNU LIBICONV Library; see the file COPYING.LIB.
16 dnl If not, write to the Free Software Foundation, Inc., 59 Temple Place -
17 dnl Suite 330, Boston, MA 02111-1307, USA. */
24 VERSION=$PACKAGE_VERSION
25 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
26 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
30 AC_CONFIG_SRCDIR(lib/iconv.c)
31 AC_CONFIG_AUX_DIR(autoconf)
32 AC_CONFIG_HEADERS(lib/config.h src/config.h)
35 dnl checks for installer options
37 AC_ARG_ENABLE([extra-encodings],
38 [AC_HELP_STRING([--enable-extra-encodings],
39 [add support for a few rarely used encodings])],
40 [AC_DEFINE([ENABLE_EXTRA], 1,
41 [Define to 1 to enable a few rarely used encodings.])
42 USE_EXTRA_ENCODINGS=yes],
43 [USE_EXTRA_ENCODINGS=no])
44 AC_SUBST([USE_EXTRA_ENCODINGS])
46 dnl checks for programs
50 AC_PROG_GCC_TRADITIONAL
57 dnl check for host type
59 CL_CANONICAL_HOST(autoconf)
61 dnl checks for UNIX variants that set DEFS
67 dnl checks for compiler output filename suffixes
72 dnl check for build configuration
77 AM_GNU_GETTEXT([external])
79 dnl checks for header files
81 AC_CHECK_HEADERS(locale.h)
83 dnl checks for typedefs
87 dnl checks for functions and declarations
89 if test "$am_cv_func_iconv" = yes -a -z "$am_cv_proto_iconv_arg1"; then
96 AC_CHECK_FUNCS(mbrtowc wcrtomb mbsinit setlocale)
100 CL_WORDS_LITTLEENDIAN
102 dnl check whether OS supports plug libraries
106 linux*) OS="linux" ;;
107 solaris*) OS="solaris" ;;
110 if test -n "$OS"; then
113 PLUGLIB="libiconv_plug.so"
119 if test -d "${srcdir}/tests"; then
120 TESTS_MAKEFILE=tests/Makefile
124 AC_CONFIG_SUBDIRS(libcharset)
125 AC_OUTPUT(Makefile lib/Makefile src/Makefile po/Makefile.in man/Makefile ${TESTS_MAKEFILE} include/iconv.h)