Use valid HTML.
[libidn.git] / configure.ac
blob0228447d020cc84b3745dbdbc472973f978882ad
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.1.12, bug-libidn@gnu.org)
22 AC_CONFIG_SRCDIR(stringprep.h.in)
24 # Interfaces removed:    CURRENT++, AGE=0, REVISION=0
25 # Interfaces added:      CURRENT++, AGE++, REVISION=0
26 # No interfaces changed:                   REVISION++
27 LT_CURRENT=11
28 LT_AGE=2
29 LT_REVISION=0
30 AC_SUBST(LT_CURRENT)
31 AC_SUBST(LT_AGE)
32 AC_SUBST(LT_REVISION)
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_MISSING_PROG(GENGETOPT, gengetopt, $missing_dir)
43 AM_ICONV
44 AM_WITH_DMALLOC
45 AM_PATH_LISPDIR
47 # Checks for header files.
48 AC_HEADER_STDC
49 AC_CHECK_HEADERS(sys/types.h string.h strings.h memory.h unistd.h errno.h)
51 # Checks for typedefs, structures, and compiler characteristics.
52 AC_TYPE_SIZE_T
54 # Checks for library functions.
55 AC_REPLACE_FUNCS(memset strdup)
57 # Check if locale stuff works
58 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
59         ac_cv_locale_works, [
60         AC_TRY_RUN([
61 #include <locale.h>
62 #include <langinfo.h>
63 int main ()
65   char* cs;
66   setlocale(LC_CTYPE, "");
67   cs = nl_langinfo(CODESET);
68   return !cs;
71                 ac_cv_locale_works=yes,
72                 ac_cv_locale_works=no,
73                 ac_cv_locale_works=no)
74         ])
75 if test "$ac_cv_locale_works" = "yes"; then
76   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
79 # Check for getopt in standard library.
80 AC_CHECK_FUNCS(getopt_long,, [AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])
82 # Check for gtk-doc.
83 AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]))
84 if test "x$with_html_dir" = "x" ; then
85   HTML_DIR='${datadir}/gtk-doc/html'
86 else
87   HTML_DIR=$with_html_dir
89 AC_SUBST(HTML_DIR)
90 AC_ARG_ENABLE(gtk-doc,
91         AC_HELP_STRING([--enable-gtk-doc], [Build API reference using GTK-DOC]),
92         enable_gtk_doc="$enableval")
93 if test "$enable_gtk_doc" = "yes"; then
94         GTKDOC=reference
96 AC_SUBST(GTKDOC)
97 AM_MISSING_PROG(GTKDOC_SCAN, gtkdoc-scan, $missing_dir)
98 AM_MISSING_PROG(GTKDOC_MKTMPL, gtkdoc-mktmpl, $missing_dir)
99 AM_MISSING_PROG(GTKDOC_MKDB, gtkdoc-mkdb, $missing_dir)
100 AM_MISSING_PROG(GTKDOC_MKHTML, gtkdoc-mkhtml, $missing_dir)
101 AM_MISSING_PROG(GTKDOC_FIXXREF, gtkdoc-fixxref, $missing_dir)
103 AC_CONFIG_FILES([Makefile libidn.pc stringprep.h reference/Makefile idn.ggo])
104 AC_OUTPUT