Use AM_JAVACFLAGS instead of JAVACFLAGS. See
[libidn.git] / configure.ac
blobcbc6d9afca02300d41cf804b334c2a258acd94a9
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 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_PREREQ(2.61)
23 AC_INIT([libidn], [0.6.12], [bug-libidn@gnu.org])
25 # Library code modified:                              REVISION++
26 # Interfaces changed/added/removed:   CURRENT++       REVISION=0
27 # Interfaces added:                             AGE++
28 # Interfaces removed:                           AGE=0
29 AC_SUBST(LT_CURRENT, 16)
30 AC_SUBST(LT_REVISION, 26)
31 AC_SUBST(LT_AGE, 5)
33 AC_CONFIG_AUX_DIR([build-aux])
34 AM_INIT_AUTOMAKE([1.10 gnits])
35 AB_INIT
36 AC_CONFIG_HEADERS(config.h)
38 # Checks for programs.
39 AM_GNU_GETTEXT(external)
40 AM_GNU_GETTEXT_VERSION(0.16)
41 AC_LIBTOOL_WIN32_DLL
42 AC_PROG_CC
43 gl_EARLY
44 lgl_EARLY
45 AC_PROG_LIBTOOL
46 AM_MISSING_PROG(PERL, perl, $missing_dir)
47 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
48 AM_ICONV
49 AM_PATH_LISPDIR
51 if test "$am_cv_func_iconv" != "yes"; then
52   AC_MSG_NOTICE([
53 ***
55 Your system does not have iconv().  The iconv() function is not
56 strictly required by the source code.  However, that may change in
57 the future, unless you report that this may be a problem for you.
59 Please report this to $PACKAGE_BUGREPORT.
61 ***])
64 # Checks for header files.
65 AC_HEADER_STDC
67 # For gnulib stuff in gl/.
68 gl_INIT
69 lgl_INIT
71 # Check if locale stuff works
72 AM_LANGINFO_CODESET
74 # Run self-tests under valgrind?
75 if test "$cross_compiling" = no; then
76   AC_CHECK_PROGS(VALGRIND, valgrind)
78 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
79   opt_valgrind_tests=yes
80 else
81   opt_valgrind_tests=no
82   VALGRIND=
83 fi 
84 AC_MSG_CHECKING([whether self tests are run under valgrind])
85 AC_ARG_ENABLE(valgrind-tests,
86         AS_HELP_STRING([--enable-valgrind-tests],
87                        [run self tests under valgrind]),
88   opt_valgrind_tests=$enableval)
89 AC_MSG_RESULT($opt_valgrind_tests)
91 # Make it possible to disable TLD code.
92 AC_ARG_ENABLE(tld, AC_HELP_STRING([--disable-tld], [disable TLD code]),
93                 enable_tld=$enableval, enable_tld=yes)
94 AM_CONDITIONAL(TLD, test "$enable_tld" != "no")
95 if test "$enable_tld" != "no"; then
96         AC_DEFINE(WITH_TLD, 1, [Define to 1 if you want TLD code.])
98 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
99 AC_MSG_RESULT($enable_tld)
101 # Check for gtk-doc.
102 GTK_DOC_CHECK(1.1)
104 # Check for java
105 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
106                 enable_java=no)
107 if test "$enable_java" != "no"; then
108         AC_PROG_JAVAC
109         AC_PROG_JAR
110         AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
112 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
113 AC_MSG_CHECKING([if implementation in Java should be built])
114 AC_MSG_RESULT($enable_java)
116 # Check for C#
117 AM_CONDITIONAL(CSHARP, test -n "$HAVE_CSHARPCOMP")
118 AC_MSG_CHECKING([[if implementation in C# should be built]])
119 if test -n "$HAVE_CSHARPCOMP"; then
120   ac_result=yes
121 else
122   ac_result=no
124 AC_MSG_RESULT($ac_result)
126 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile doc/java/Makefile \
127                 gl/Makefile lib/gl/Makefile lib/stringprep.h contrib/doxygen/Doxyfile \
128                 doc/Makefile doc/specifications/Makefile doc/tld/Makefile \
129                 lib/Makefile src/Makefile tests/Makefile examples/Makefile \
130                 java/Makefile java/gnu/Makefile java/gnu/inet/Makefile \
131                 java/gnu/inet/encoding/Makefile java/misc/Makefile \
132                 csharp/Makefile \
133                 po/Makefile.in])
134 AC_OUTPUT