Wrap.
[libidn.git] / configure.ac
blobfefeacbc87240ad1883fd1ec05724e6889d95e74
1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson.
4 dnl
5 dnl This file is part of GNU Libidn.
6 dnl
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.
11 dnl
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.
16 dnl
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/>.
20 AC_PREREQ(2.61)
21 AC_INIT([libidn], [1.1], [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, 30)
29 AC_SUBST(LT_AGE, 5)
31 AC_CONFIG_AUX_DIR([build-aux])
32 AM_INIT_AUTOMAKE([1.10])
33 AB_INIT
34 AC_CONFIG_HEADERS(config.h)
36 # Checks for programs.
37 AM_GNU_GETTEXT(external)
38 AM_GNU_GETTEXT_VERSION(0.16)
39 AC_LIBTOOL_WIN32_DLL
40 AC_PROG_CC
41 gl_EARLY
42 lgl_EARLY
43 AC_PROG_LIBTOOL
44 AM_MISSING_PROG(PERL, perl, $missing_dir)
45 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
46 AM_ICONV
47 AM_PATH_LISPDIR
49 if test "$am_cv_func_iconv" != "yes"; then
50   AC_MSG_NOTICE([
51 ***
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.
59 ***])
62 # Checks for header files.
63 AC_HEADER_STDC
65 # For gnulib stuff in gl/.
66 gl_INIT
67 lgl_INIT
69 # Check if locale stuff works
70 AM_LANGINFO_CODESET
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
78 else
79   opt_valgrind_tests=no
80   VALGRIND=
81 fi 
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)
99 # Check for gtk-doc.
100 GTK_DOC_CHECK(1.1)
102 # Check for java
103 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
104                 enable_java=no)
105 if test "$enable_java" != "no"; then
106         AC_PROG_JAVAC
107         AC_PROG_JAR
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)
114 # Check for C#
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
118   ac_result=yes
119 else
120   ac_result=no
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 \
126                 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