OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / lib / libidn / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Copyright (C) 2002, 2003, 2004 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
20
21 AC_INIT([libidn], [0.5.2], [bug-libidn@gnu.org])
22
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=15
28 LT_REVISION=2
29 LT_AGE=4
30 AC_SUBST(LT_CURRENT)
31 AC_SUBST(LT_REVISION)
32 AC_SUBST(LT_AGE)
33
34 AC_PREREQ(2.59)
35 AM_INIT_AUTOMAKE([1.8 gnits])
36 AB_INIT
37 AC_CONFIG_HEADERS(config.h)
38
39 # Checks for programs.
40 AM_GNU_GETTEXT(external)
41 AM_GNU_GETTEXT_VERSION(0.14.1)
42 AC_PROG_LIBTOOL
43 AC_PROG_CC
44 AM_MISSING_PROG(PERL, perl, $missing_dir)
45 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
46 AM_ICONV
47 AM_PATH_LISPDIR
48
49 # Checks for header files.
50 AC_HEADER_STDC
51 AC_CHECK_HEADERS(unistd.h errno.h)
52
53 # Checks for typedefs, structures, and compiler characteristics.
54 AX_CREATE_STDINT_H(lib/idn-int.h, sys/types.h)
55
56 # Need getopt.
57 GETOPT_H=
58 AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
59 AC_CHECK_FUNCS([getopt_long_only], [],
60   [GETOPT_H=getopt.h
61    AC_LIBOBJ([getopt])
62    AC_LIBOBJ([getopt1])
63    AC_DEFINE([optarg], [rpl_optarg],
64      [Define to rpl_optarg if the replacement variable should be used.])
65    AC_DEFINE([optind], [rpl_optind],
66      [Define to rpl_optind if the replacement variable should be used.])
67    AC_DEFINE([optopt], [rpl_optopt],
68      [Define to rpl_optopt if the replacement variable should be used.])
69    AC_DEFINE([getopt], [rpl_getopt],
70      [Define to rpl_getopt if the replacement function should be used.])
71    AC_DEFINE([getopt_long], [rpl_getopt_long],
72      [Define to rpl_getopt_long if the replacement function should be used.])
73    AC_DEFINE([getopt_long_only], [rpl_getopt_long_only],
74      [Define to rpl_getopt_long_only if the replacement function should be used.])])
75 AC_SUBST([GETOPT_H])
76
77 # Check if locale stuff works
78 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
79         ac_cv_locale_works, [
80         AC_RUN_IFELSE([AC_LANG_SOURCE([[
81 #include <locale.h>
82 #include <langinfo.h>
83 int main ()
84 {
85   char* cs;
86   setlocale(LC_CTYPE, "");
87   cs = nl_langinfo(CODESET);
88   return !cs;
89 }
90 ]])],[ac_cv_locale_works=yes],[ac_cv_locale_works=no],[ac_cv_locale_works=no])
91         ])
92 if test "$ac_cv_locale_works" = "yes"; then
93   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
94 fi
95
96 # Make it possible to disable TLD code.
97 AC_ARG_ENABLE(tld, AC_HELP_STRING([--disable-tld], [disable TLD code]),
98                 enable_tld=$enableval, enable_tld=yes)
99 AM_CONDITIONAL(TLD, test "$enable_tld" != "no")
100 if test "$enable_tld" != "no"; then
101         AC_DEFINE(WITH_TLD, 1, [Define to 1 if you want TLD code.])
102 fi
103 AC_MSG_CHECKING([if TLD API for specific TLD rules should be built])
104 AC_MSG_RESULT($enable_tld)
105
106 # Check for gtk-doc.
107 GTK_DOC_CHECK(1.1)
108
109 # Check for java
110 AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
111                 enable_java=no)
112 if test "$enable_java" != "no"; then
113         AC_PROG_JAVAC
114         AC_PROG_JAR
115         AC_PROG_JAVADOC
116 fi
117 AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
118 AC_MSG_CHECKING([if implementation in Java should be built])
119 AC_MSG_RESULT($enable_java)
120
121 AC_CONFIG_FILES([Makefile libidn.pc doc/reference/Makefile doc/java/Makefile \
122                 lib/stringprep.h contrib/doxygen/Doxyfile \
123                 doc/Makefile doc/specifications/Makefile doc/tld/Makefile \
124                 lib/Makefile src/Makefile tests/Makefile examples/Makefile \
125                 java/Makefile java/gnu/Makefile java/gnu/inet/Makefile \
126                 java/gnu/inet/encoding/Makefile java/misc/Makefile \
127                 po/Makefile.in])
128 AC_OUTPUT