Update tag value for tizen 2.0 build
[external/libidn.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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/>.
19
20 AC_PREREQ(2.61)
21 AC_INIT([GNU Libidn], [1.15], [bug-libidn@gnu.org])
22 AC_COPYRIGHT([Copyright (c) 2002-2008 Simon Josefsson <simon@josefsson.org>.])
23
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, 44)
30 AC_SUBST(LT_AGE, 5)
31
32 # For DEF file.
33 DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
34 AC_SUBST(DLL_VERSION)
35
36 AC_CONFIG_AUX_DIR([build-aux])
37 AC_CONFIG_MACRO_DIR([m4])
38 AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
39 AC_CONFIG_HEADERS(config.h)
40
41 # Checks for programs.
42 AC_LIBTOOL_WIN32_DLL
43 AC_PROG_CC
44 lgl_EARLY
45 gl_EARLY
46 AC_PROG_LIBTOOL
47 AM_MISSING_PROG(PERL, perl, $missing_dir)
48 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
49 AM_GNU_GETTEXT(external)
50 AM_GNU_GETTEXT_VERSION(0.17)
51 AM_ICONV
52 AM_PATH_LISPDIR
53
54 if test "$am_cv_func_iconv" != "yes"; then
55   AC_MSG_NOTICE([
56 ***
57
58 Your system does not have iconv().  The iconv() function is not
59 strictly required by the source code.  However, that may change in
60 the future, unless you report that this may be a problem for you.
61
62 Please report this to $PACKAGE_BUGREPORT.
63
64 ***])
65 fi
66
67 # Checks for header files.
68 AC_HEADER_STDC
69
70 # For gnulib stuff in gl/.
71 gl_INIT
72 lgl_INIT
73
74 # Check if locale stuff works
75 AM_LANGINFO_CODESET
76
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.])
83 fi
84 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
85 AC_MSG_RESULT($enable_tld)
86
87 # Check for gtk-doc.
88 GTK_DOC_CHECK(1.1)
89
90 # Check for java
91 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
92                 enable_java=no)
93 AM_PROG_GCJ
94
95 enable_java=no
96
97 if test "$enable_java" != "no"; then
98         AC_PROG_JAR
99         AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
100 fi
101 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
102 AC_MSG_CHECKING([if implementation in Java should be built])
103 AC_MSG_RESULT($enable_java)
104
105 # Check for C#
106 AM_CONDITIONAL(CSHARP, test -n "$HAVE_CSHARPCOMP")
107 AC_MSG_CHECKING([[if implementation in C# should be built]])
108 if test -n "$HAVE_CSHARPCOMP"; then
109   enable_csharp=yes
110 else
111   enable_csharp=no
112 fi
113 AC_MSG_RESULT($enable_csharp)
114
115 sj_VALGRIND
116 sj_UPDATE_HEADER_VERSION([$srcdir/lib/stringprep.h])
117
118 AC_ARG_ENABLE([gcc-warnings],
119   [AS_HELP_STRING([--enable-gcc-warnings],
120                   [turn on lots of GCC warnings (for developers)])],
121   [case $enableval in
122      yes|no) ;;
123      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
124    esac
125    gl_gcc_warnings=$enableval],
126   [gl_gcc_warnings=no]
127 )
128
129 if test "$gl_gcc_warnings" = yes; then
130   gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
131   gl_WARN_ADD([-Wframe-larger-than=80], [WSTACK_CFLAGS])
132
133   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
134   nw="$nw -Wc++-compat"             # We don't care strongly about C++ compilers
135   nw="$nw -Woverlength-strings"     # Some of our strings are too large
136   nw="$nw -Wsign-conversion"        # Too many warnings for now
137   nw="$nw -Wconversion"             # Too many warnings for now
138   nw="$nw -Wtraditional"            # Warns on #elif which we use often
139   nw="$nw -Wtraditional-conversion" # Too many warnings for now
140   nw="$nw -Wmissing-noreturn"       # Too many warnings for now
141   nw="$nw -Wunreachable-code"       # Too many false positives
142   nw="$nw -Wlogical-op"             # Too many false positives
143
144   gl_MANYWARN_ALL_GCC([ws])
145   gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw])
146   for w in $ws; do
147     gl_WARN_ADD([$w])
148   done
149
150   gl_WARN_ADD([-Wno-missing-field-initializers])
151   gl_WARN_ADD([-fdiagnostics-show-option])
152 fi
153
154 AC_CONFIG_FILES([
155   Makefile
156   libidn.pc
157   csharp/Makefile
158   contrib/doxygen/Doxyfile
159   doc/Makefile
160   doc/cyclo/Makefile
161   doc/java/Makefile
162   doc/reference/Makefile
163   doc/specifications/Makefile
164   doc/tld/Makefile
165   examples/Makefile
166   gl/Makefile
167   gltests/Makefile
168   java/Makefile
169   java/gnu/Makefile
170   java/gnu/inet/Makefile
171   java/gnu/inet/encoding/Makefile
172   java/misc/Makefile
173   lib/Makefile
174   lib/gl/Makefile
175   lib/gltests/Makefile
176   po/Makefile.in
177   src/Makefile
178   tests/Makefile
179 ])
180 AC_OUTPUT
181
182 AC_MSG_NOTICE([summary of build options:
183
184   version:          ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
185   Host type:        ${host}
186   Install prefix:   ${prefix}
187   Compiler:         ${CC}
188   Warning flags:    ${WARN_CFLAGS}
189   Library types:    Shared=${enable_shared}, Static=${enable_static}
190   Valgrind:         ${VALGRIND}
191   Version script:   $have_ld_version_script
192   TLD code:         $enable_tld
193   Build Java port:  $enable_java
194   Build C# port:    $enable_csharp
195 ])