*** empty log message ***
[libidn.git] / configure.ac
blobd5ded3cd50bd96d88b27db9b9154e90120bf0d65
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.8], [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, 22)
30 AC_SUBST(LT_AGE, 5)
32 AC_PREREQ(2.60)
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_LIBTOOL_WIN32_DLL
41 AC_PROG_CC
42 gl_EARLY
43 lgl_EARLY
44 AC_PROG_LIBTOOL
45 AM_MISSING_PROG(PERL, perl, $missing_dir)
46 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
47 AM_ICONV
48 AM_PATH_LISPDIR
50 if test "$am_cv_func_iconv" != "yes"; then
51   AC_MSG_NOTICE([
52 ***
54 Your system does not have iconv().  The iconv() function is not
55 strictly required by the source code.  However, that may change in
56 the future, unless you report that this may be a problem for you.
58 Please report this to $PACKAGE_BUGREPORT.
60 ***])
63 # Checks for header files.
64 AC_HEADER_STDC
66 # For gnulib stuff in gl/.
67 gl_INIT
68 lgl_INIT
70 # Check if locale stuff works
71 AM_LANGINFO_CODESET
73 # Run self-tests under valgrind?
74 if test "$cross_compiling" = no; then
75   AC_CHECK_PROGS(VALGRIND, valgrind)
77 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
78   opt_valgrind_tests=yes
79 else
80   opt_valgrind_tests=no
81   VALGRIND=
82 fi 
83 AC_MSG_CHECKING([whether self tests are run under valgrind])
84 AC_ARG_ENABLE(valgrind-tests,
85         AS_HELP_STRING([--enable-valgrind-tests],
86                        [run self tests under valgrind]),
87   opt_valgrind_tests=$enableval)
88 AC_MSG_RESULT($opt_valgrind_tests)
90 # Make it possible to disable TLD code.
91 AC_ARG_ENABLE(tld, AC_HELP_STRING([--disable-tld], [disable TLD code]),
92                 enable_tld=$enableval, enable_tld=yes)
93 AM_CONDITIONAL(TLD, test "$enable_tld" != "no")
94 if test "$enable_tld" != "no"; then
95         AC_DEFINE(WITH_TLD, 1, [Define to 1 if you want TLD code.])
97 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
98 AC_MSG_RESULT($enable_tld)
100 # Check for gtk-doc.
101 GTK_DOC_CHECK(1.1)
103 # Check for java
104 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
105                 enable_java=no)
106 if test "$enable_java" != "no"; then
107         AC_PROG_JAVAC
108         AC_PROG_JAR
109         AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
111 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
112 AC_MSG_CHECKING([if implementation in Java should be built])
113 AC_MSG_RESULT($enable_java)
115 # Check for C#
116 AM_CONDITIONAL(CSHARP, test -n "$HAVE_CSHARPCOMP")
117 AC_MSG_CHECKING([[if implementation in C# should be built]])
118 if test -n "$HAVE_CSHARPCOMP"; then
119   ac_result=yes
120 else
121   ac_result=no
123 AC_MSG_RESULT($ac_result)
125 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile doc/java/Makefile \
126                 gl/Makefile lib/gl/Makefile lib/stringprep.h contrib/doxygen/Doxyfile \
127                 doc/Makefile doc/specifications/Makefile doc/tld/Makefile \
128                 lib/Makefile src/Makefile tests/Makefile examples/Makefile \
129                 java/Makefile java/gnu/Makefile java/gnu/inet/Makefile \
130                 java/gnu/inet/encoding/Makefile java/misc/Makefile \
131                 csharp/Makefile \
132                 po/Makefile.in])
133 AC_OUTPUT