Initial revision
[TestXSLT.git] / libiconv / configure.in
1 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2 dnl This file is part of the GNU LIBICONV Library.
3 dnl
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.
8 dnl
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.
13 dnl
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.  */
18
19 AC_PREREQ(2.52)
20
21 AC_INIT(libiconv,1.8)
22
23 PACKAGE=$PACKAGE_NAME
24 VERSION=$PACKAGE_VERSION
25 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
26 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
27 AC_SUBST(PACKAGE)
28 AC_SUBST(VERSION)
29
30 AC_CONFIG_SRCDIR(lib/iconv.c)
31 AC_CONFIG_AUX_DIR(autoconf)
32 AC_CONFIG_HEADERS(lib/config.h src/config.h)
33 AC_PROG_MAKE_SET
34
35 dnl           checks for installer options
36
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])
45
46 dnl           checks for programs
47
48 AC_PROG_CC
49 AC_PROG_CPP
50 AC_PROG_GCC_TRADITIONAL
51 CL_PROG_RANLIB
52 AC_PROG_INSTALL
53 CL_PROG_CP
54 CL_PROG_LN
55 CL_PROG_LN_S
56
57 dnl           check for host type
58
59 CL_CANONICAL_HOST(autoconf)
60
61 dnl           checks for UNIX variants that set DEFS
62
63 AC_AIX
64 AC_MINIX
65 AC_ISC_POSIX
66
67 dnl           checks for compiler output filename suffixes
68
69 AC_OBJEXT
70 AC_EXEEXT
71
72 dnl           check for build configuration
73
74 AM_DISABLE_STATIC
75 AM_PROG_LIBTOOL
76 AM_ICONV
77 AM_GNU_GETTEXT([external])
78
79 dnl           checks for header files
80
81 AC_CHECK_HEADERS(locale.h)
82
83 dnl           checks for typedefs
84
85 AC_MBSTATE_T
86
87 dnl           checks for functions and declarations
88
89 if test "$am_cv_func_iconv" = yes -a -z "$am_cv_proto_iconv_arg1"; then
90   ICONV_CONST=""
91 else
92   ICONV_CONST="const"
93 fi
94 AC_SUBST(ICONV_CONST)
95
96 AC_CHECK_FUNCS(mbrtowc wcrtomb mbsinit setlocale)
97
98 AC_EILSEQ
99
100 CL_WORDS_LITTLEENDIAN
101
102 dnl           check whether OS supports plug libraries
103
104 OS=""
105 case "$host_os" in
106   linux*)   OS="linux" ;;
107   solaris*) OS="solaris" ;;
108   osf*)     OS="osf" ;;
109 esac
110 if test -n "$OS"; then
111   AC_SUBST(OS)
112   AC_SUBST(GCC)
113   PLUGLIB="libiconv_plug.so"
114 else
115   PLUGLIB=""
116 fi
117 AC_SUBST(PLUGLIB)
118
119 if test -d "${srcdir}/tests"; then
120   TESTS_MAKEFILE=tests/Makefile
121 else
122   TESTS_MAKEFILE=""
123 fi
124 AC_CONFIG_SUBDIRS(libcharset)
125 AC_OUTPUT(Makefile lib/Makefile src/Makefile po/Makefile.in man/Makefile ${TESTS_MAKEFILE} include/iconv.h)