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