1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson.
5 dnl This file is part of GNU Libidn.
7 dnl This program is free software: you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation, either version 3 of the License, or
10 dnl (at your option) any later version.
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 dnl GNU General Public License for more details.
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
21 AC_INIT([libidn], [1.0], [bug-libidn@gnu.org])
23 # Library code modified: REVISION++
24 # Interfaces changed/added/removed: CURRENT++ REVISION=0
25 # Interfaces added: AGE++
26 # Interfaces removed: AGE=0
27 AC_SUBST(LT_CURRENT, 16)
28 AC_SUBST(LT_REVISION, 29)
31 AC_CONFIG_AUX_DIR([build-aux])
32 AM_INIT_AUTOMAKE([1.10 gnits])
34 AC_CONFIG_HEADERS(config.h)
36 # Checks for programs.
37 AM_GNU_GETTEXT(external)
38 AM_GNU_GETTEXT_VERSION(0.16)
44 AM_MISSING_PROG(PERL, perl, $missing_dir)
45 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
49 if test "$am_cv_func_iconv" != "yes"; then
53 Your system does not have iconv(). The iconv() function is not
54 strictly required by the source code. However, that may change in
55 the future, unless you report that this may be a problem for you.
57 Please report this to $PACKAGE_BUGREPORT.
62 # Checks for header files.
65 # For gnulib stuff in gl/.
69 # Check if locale stuff works
72 # Run self-tests under valgrind?
73 if test "$cross_compiling" = no; then
74 AC_CHECK_PROGS(VALGRIND, valgrind)
76 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
77 opt_valgrind_tests=yes
82 AC_MSG_CHECKING([whether self tests are run under valgrind])
83 AC_ARG_ENABLE(valgrind-tests,
84 AS_HELP_STRING([--enable-valgrind-tests],
85 [run self tests under valgrind]),
86 opt_valgrind_tests=$enableval)
87 AC_MSG_RESULT($opt_valgrind_tests)
89 # Make it possible to disable TLD code.
90 AC_ARG_ENABLE(tld, AC_HELP_STRING([--disable-tld], [disable TLD code]),
91 enable_tld=$enableval, enable_tld=yes)
92 AM_CONDITIONAL(TLD, test "$enable_tld" != "no")
93 if test "$enable_tld" != "no"; then
94 AC_DEFINE(WITH_TLD, 1, [Define to 1 if you want TLD code.])
96 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
97 AC_MSG_RESULT($enable_tld)
103 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
105 if test "$enable_java" != "no"; then
108 AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
110 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
111 AC_MSG_CHECKING([if implementation in Java should be built])
112 AC_MSG_RESULT($enable_java)
115 AM_CONDITIONAL(CSHARP, test -n "$HAVE_CSHARPCOMP")
116 AC_MSG_CHECKING([[if implementation in C# should be built]])
117 if test -n "$HAVE_CSHARPCOMP"; then
122 AC_MSG_RESULT($ac_result)
124 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile doc/java/Makefile \
125 gl/Makefile lib/gl/Makefile lib/stringprep.h contrib/doxygen/Doxyfile \
126 doc/Makefile doc/specifications/Makefile doc/tld/Makefile \
127 lib/Makefile src/Makefile tests/Makefile examples/Makefile \
128 java/Makefile java/gnu/Makefile java/gnu/inet/Makefile \
129 java/gnu/inet/encoding/Makefile java/misc/Makefile \