Added copying conditions.
[libidn.git] / configure.ac
blob546055d3fe5df8228096efaf318a09073959bcf1
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(libstringprep, 0.0.2, bug-libstringprep@josefsson.org)
3 AC_CONFIG_SRCDIR(stringprep.h.in)
5 # Interfaces removed:    CURRENT++, AGE=0, REVISION=0
6 # Interfaces added:      CURRENT++, AGE++, REVISION=0
7 # No interfaces changed:                   REVISION++
8 LT_CURRENT=1
9 LT_AGE=1
10 LT_REVISION=0
11 AC_SUBST(LT_CURRENT)
12 AC_SUBST(LT_AGE)
13 AC_SUBST(LT_REVISION)
15 AM_INIT_AUTOMAKE
16 AM_CONFIG_HEADER(config.h)
18 # Checks for programs.
19 AC_PROG_LIBTOOL
20 AC_PROG_CXX
21 AC_PROG_CC
22 AC_PROG_CPP
23 AC_PROG_INSTALL
24 AC_PROG_LN_S
25 AC_PROG_MAKE_SET
26 AC_PROG_AWK
27 AM_MISSING_PROG(PERL, perl, $missing_dir)
28 AM_ICONV
30 # Checks for header files.
31 AC_HEADER_STDC
32 AC_CHECK_HEADERS(stdio.h stdarg.h sys/types.h stdlib.h string.h unistd.h \
33                  errno.h)
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_CONST
37 AC_TYPE_SIZE_T
39 # Checks for library functions.
40 AC_CHECK_FUNCS([memset strchr strdup])
42 # Check if locale stuff works
43 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
44         ac_cv_locale_works, [
45         AC_TRY_RUN([
46 #include <locale.h>
47 #include <langinfo.h>
48 int main ()
50   char* cs;
51   setlocale(LC_CTYPE, "");
52   cs = nl_langinfo(CODESET);
53   return !cs;
56                 ac_cv_locale_works=yes,
57                 ac_cv_locale_works=no,
58                 ac_cv_locale_works=no)
59         ])
60 if test "$ac_cv_locale_works" = "yes"; then
61   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
64 AC_CONFIG_FILES([Makefile libstringprep.pc stringprep.h])
65 AC_OUTPUT