Rename.
[libidn.git] / configure.ac
blob8fb5cf694f74434ee6d625c2a406803e3243150e
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(libidn, 0.1.0, bug-libidn@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=4
9 LT_AGE=4
10 LT_REVISION=0
11 AC_SUBST(LT_CURRENT)
12 AC_SUBST(LT_AGE)
13 AC_SUBST(LT_REVISION)
15 AM_INIT_AUTOMAKE(gnits)
16 AM_CONFIG_HEADER(config.h)
18 # Checks for programs.
19 AC_PROG_LIBTOOL
20 AC_PROG_CC
21 AM_MISSING_PROG(PERL, perl, $missing_dir)
22 AM_ICONV
23 AM_WITH_DMALLOC
25 # Checks for header files.
26 AC_HEADER_STDC
27 AC_CHECK_HEADERS(sys/types.h string.h strings.h memory.h unistd.h errno.h)
29 # Checks for typedefs, structures, and compiler characteristics.
30 AC_TYPE_SIZE_T
32 # Checks for library functions.
33 AC_REPLACE_FUNCS(memset strdup)
35 # Check if locale stuff works
36 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
37         ac_cv_locale_works, [
38         AC_TRY_RUN([
39 #include <locale.h>
40 #include <langinfo.h>
41 int main ()
43   char* cs;
44   setlocale(LC_CTYPE, "");
45   cs = nl_langinfo(CODESET);
46   return !cs;
49                 ac_cv_locale_works=yes,
50                 ac_cv_locale_works=no,
51                 ac_cv_locale_works=no)
52         ])
53 if test "$ac_cv_locale_works" = "yes"; then
54   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
57 AC_CONFIG_FILES([Makefile libidn.pc stringprep.h])
58 AC_OUTPUT