Fix.
[libidn.git] / configure.ac
blob4b3021aaa824ce2735279a220c0d0a8c28ce6b82
1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson.
4 dnl
5 dnl This file is part of GNU Libidn.
6 dnl
7 dnl GNU Libidn is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU Lesser General Public License as
9 dnl published by the Free Software Foundation; either version 2, or
10 dnl (at your option) any later version.
11 dnl
12 dnl GNU Libidn is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 dnl General Public License for more details.
16 dnl
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with GNU Libidn; see the file COPYING.LIB.  If not, write to
19 dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth
20 dnl Floor, Boston, MA 02110-1301, USA.
22 AC_INIT([libidn], [0.6.2], [bug-libidn@gnu.org])
24 # Library code modified:                              REVISION++
25 # Interfaces changed/added/removed:   CURRENT++       REVISION=0
26 # Interfaces added:                             AGE++
27 # Interfaces removed:                           AGE=0
28 AC_SUBST(LT_CURRENT, 16)
29 AC_SUBST(LT_REVISION, 16)
30 AC_SUBST(LT_AGE, 5)
32 AC_PREREQ(2.59)
33 AM_INIT_AUTOMAKE([1.9 gnits])
34 AB_INIT
35 AC_CONFIG_HEADERS(config.h)
37 # Checks for programs.
38 AM_GNU_GETTEXT(external)
39 AM_GNU_GETTEXT_VERSION(0.14.1)
40 AC_PROG_LIBTOOL
41 AC_PROG_CC
42 gl_EARLY
43 AM_MISSING_PROG(PERL, perl, $missing_dir)
44 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
45 AM_ICONV
46 AM_PATH_LISPDIR
48 if test "$am_cv_func_iconv" != "yes"; then
49   AC_MSG_NOTICE([
50 ***
52 Your system does not have iconv().  The iconv() function is not
53 strictly required by the source code.  However, that may change in
54 the future, unless you report that this may be a problem for you.
56 Please report this to $PACKAGE_BUGREPORT.
58 ***])
61 # Checks for header files.
62 AC_HEADER_STDC
63 AC_CHECK_HEADERS([locale.h])
65 # Checks for typedefs, structures, and compiler characteristics.
66 AX_CREATE_STDINT_H(lib/idn-int.h, sys/types.h)
68 # Checks for library functions.
69 AC_CHECK_FUNCS([setlocale])
71 # For gnulib stuff in gl/.
72 gl_INIT
74 # Check if locale stuff works
75 AM_LANGINFO_CODESET
77 # Make it possible to disable TLD code.
78 AC_ARG_ENABLE(tld, AC_HELP_STRING([--disable-tld], [disable TLD code]),
79                 enable_tld=$enableval, enable_tld=yes)
80 AM_CONDITIONAL(TLD, test "$enable_tld" != "no")
81 if test "$enable_tld" != "no"; then
82         AC_DEFINE(WITH_TLD, 1, [Define to 1 if you want TLD code.])
84 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
85 AC_MSG_RESULT($enable_tld)
87 # Check for gtk-doc.
88 GTK_DOC_CHECK(1.1)
90 # Check for java
91 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
92                 enable_java=no)
93 if test "$enable_java" != "no"; then
94         AC_PROG_JAVAC
95         AC_PROG_JAR
96         AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
98 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
99 AC_MSG_CHECKING([if implementation in Java should be built])
100 AC_MSG_RESULT($enable_java)
102 # Check for C#
103 AM_CONDITIONAL(CSHARP, test -n "$HAVE_CSHARPCOMP")
104 AC_MSG_CHECKING([[if implementation in C# should be built]])
105 if test -n "$HAVE_CSHARPCOMP"; then
106   ac_result=yes
107 else
108   ac_result=no
110 AC_MSG_RESULT($ac_result)
112 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile doc/java/Makefile \
113                 gl/Makefile lib/stringprep.h contrib/doxygen/Doxyfile \
114                 doc/Makefile doc/specifications/Makefile doc/tld/Makefile \
115                 lib/Makefile src/Makefile tests/Makefile examples/Makefile \
116                 java/Makefile java/gnu/Makefile java/gnu/inet/Makefile \
117                 java/gnu/inet/encoding/Makefile java/misc/Makefile \
118                 csharp/Makefile \
119                 po/Makefile.in])
120 AC_OUTPUT