Check version.
[libidn.git] / configure.ac
blob5198dd48bc13949e02fd7d8f002bc4c54744ceb6
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(libstringprep, 0.0.7, 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=3
9 LT_AGE=3
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
24 # Checks for header files.
25 AC_HEADER_STDC
26 AC_CHECK_HEADERS(sys/types.h string.h strings.h memory.h unistd.h errno.h)
28 # Checks for typedefs, structures, and compiler characteristics.
29 AC_TYPE_SIZE_T
31 # Checks for library functions.
32 AC_REPLACE_FUNCS(memset strdup)
34 # Check if locale stuff works
35 AC_CACHE_CHECK([if setlocale() and nl_langinfo() works],
36         ac_cv_locale_works, [
37         AC_TRY_RUN([
38 #include <locale.h>
39 #include <langinfo.h>
40 int main ()
42   char* cs;
43   setlocale(LC_CTYPE, "");
44   cs = nl_langinfo(CODESET);
45   return !cs;
48                 ac_cv_locale_works=yes,
49                 ac_cv_locale_works=no,
50                 ac_cv_locale_works=no)
51         ])
52 if test "$ac_cv_locale_works" = "yes"; then
53   AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() works.])
56 AC_CONFIG_FILES([Makefile libstringprep.pc stringprep.h])
57 AC_OUTPUT