Export modern API.
[libidn.git] / configure.ac
blob1a01e3f04c9790238ed8b86acc285600b0dd2cff
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.2.4, bug-libidn@gnu.org)
23 # Interfaces removed:    CURRENT++, AGE=0, REVISION=0
24 # Interfaces added:      CURRENT++, AGE++, REVISION=0
25 # No interfaces changed:                   REVISION++
26 LT_CURRENT=10
27 LT_AGE=0
28 LT_REVISION=4
29 AC_SUBST(LT_CURRENT)
30 AC_SUBST(LT_AGE)
31 AC_SUBST(LT_REVISION)
33 AM_INIT_AUTOMAKE(gnits)
34 AM_CONFIG_HEADER(config.h)
36 # Checks for programs.
37 AC_PROG_LIBTOOL
38 AC_PROG_CC
39 AM_MISSING_PROG(PERL, perl, $missing_dir)
40 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
41 AM_ICONV
42 AM_WITH_DMALLOC
43 AM_PATH_LISPDIR
45 # Checks for header files.
46 AC_HEADER_STDC
47 AC_CHECK_HEADERS(sys/types.h string.h strings.h memory.h unistd.h errno.h)
49 # Checks for typedefs, structures, and compiler characteristics.
50 AC_TYPE_SIZE_T
51 AX_CREATE_STDINT_H(lib/idn-int.h)
53 # For gnulib stuff.
54 gl_FUNC_MEMSET
55 gl_FUNC_STRDUP
56 AC_CHECK_FUNCS(getopt_long,, [AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])
58 # Check if locale stuff works
59 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
60         ac_cv_locale_works, [
61         AC_TRY_RUN([
62 #include <locale.h>
63 #include <langinfo.h>
64 int main ()
66   char* cs;
67   setlocale(LC_CTYPE, "");
68   cs = nl_langinfo(CODESET);
69   return !cs;
72                 ac_cv_locale_works=yes,
73                 ac_cv_locale_works=no,
74                 ac_cv_locale_works=no)
75         ])
76 if test "$ac_cv_locale_works" = "yes"; then
77   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
80 # Check for gtk-doc.
81 AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]))
82 if test "x$with_html_dir" = "x" ; then
83   HTML_DIR='${datadir}/gtk-doc/html'
84 else
85   HTML_DIR=$with_html_dir
87 AC_SUBST(HTML_DIR)
88 AC_ARG_ENABLE(gtk-doc,
89         AC_HELP_STRING([--enable-gtk-doc], [Build API reference using GTK-DOC]),
90         enable_gtk_doc="$enableval")
91 if test "$enable_gtk_doc" = "yes"; then
92         GTKDOC=reference
94 AC_SUBST(GTKDOC)
95 AM_MISSING_PROG(GTKDOC_SCAN, gtkdoc-scan, $missing_dir)
96 AM_MISSING_PROG(GTKDOC_MKTMPL, gtkdoc-mktmpl, $missing_dir)
97 AM_MISSING_PROG(GTKDOC_MKDB, gtkdoc-mkdb, $missing_dir)
98 AM_MISSING_PROG(GTKDOC_MKHTML, gtkdoc-mkhtml, $missing_dir)
99 AM_MISSING_PROG(GTKDOC_FIXXREF, gtkdoc-fixxref, $missing_dir)
101 AC_CONFIG_FILES([Makefile libidn.pc reference/Makefile \
102                 lib/stringprep.h src/idn.ggo \
103                 gl/Makefile gl/m4/Makefile \
104                 contrib/doxygen/Doxyfile m4/Makefile \
105                 doc/Makefile doc/specifications/Makefile \
106                 lib/Makefile src/Makefile tests/Makefile examples/Makefile])
107 AC_OUTPUT