Remove libtool bug workaround.
[libidn.git] / configure.ac
blob27567e2c4d729ba04f199fe6bd814b62c6cf4c23
1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2002, 2003 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.1 of
10 dnl the License, or (at your option) any later version.
11 dnl
12 dnl GNU Libidn 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 Lesser General Public License for more details.
16 dnl
17 dnl You should have received a copy of the GNU Lesser General Public
18 dnl License along with GNU Libidn; if not, write to the Free Software
19 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 AC_INIT(libidn, 0.3.4, 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 LT_CURRENT=12
28 LT_REVISION=1
29 LT_AGE=1
30 AC_SUBST(LT_CURRENT)
31 AC_SUBST(LT_REVISION)
32 AC_SUBST(LT_AGE)
34 AM_INIT_AUTOMAKE(gnits)
35 AM_CONFIG_HEADER(config.h)
37 # Checks for programs.
38 AC_PROG_LIBTOOL
39 AC_PROG_CC
40 AM_MISSING_PROG(PERL, perl, $missing_dir)
41 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
42 AM_ICONV
43 AM_PATH_LISPDIR
45 # Checks for header files.
46 AC_HEADER_STDC
47 AC_CHECK_HEADERS(unistd.h errno.h)
49 # Checks for typedefs, structures, and compiler characteristics.
50 AX_CREATE_STDINT_H(lib/idn-int.h)
52 # Need getopt.
53 AC_CHECK_FUNCS(getopt_long,, [AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])
55 # Check if locale stuff works
56 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
57         ac_cv_locale_works, [
58         AC_TRY_RUN([
59 #include <locale.h>
60 #include <langinfo.h>
61 int main ()
63   char* cs;
64   setlocale(LC_CTYPE, "");
65   cs = nl_langinfo(CODESET);
66   return !cs;
69                 ac_cv_locale_works=yes,
70                 ac_cv_locale_works=no,
71                 ac_cv_locale_works=no)
72         ])
73 if test "$ac_cv_locale_works" = "yes"; then
74   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
77 # Check for gtk-doc.
78 GTK_DOC_CHECK(1.1)
80 # Docbook
81 AM_MISSING_PROG(DOCBOOK2HTML, docbook2html, $missing_dir)
82 AM_MISSING_PROG(DOCBOOK2TXT, docbook2txt, $missing_dir)
83 AM_MISSING_PROG(DOCBOOK2PDF, docbook2pdf, $missing_dir)
84 AM_MISSING_PROG(DOCBOOK2PS, docbook2ps, $missing_dir)
86 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile \
87                 lib/stringprep.h src/idn.ggo \
88                 contrib/doxygen/Doxyfile m4/Makefile \
89                 doc/Makefile doc/specifications/Makefile \
90                 lib/Makefile src/Makefile tests/Makefile examples/Makefile])
91 AC_OUTPUT