Change bug report address
[platform/upstream/kbd.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
5 AC_INIT(kbd, 1.14, gladkov.alexey@gmail.com)
6 AC_CONFIG_SRCDIR([src/showkey.c])
7 AC_CONFIG_HEADERS(config.h)
8
9 # Checks for programs.
10 AC_PROG_YACC
11 AC_PROG_CC
12 AC_PROG_LEX
13 AC_PROG_INSTALL
14 AC_PROG_LN_S
15 AC_PROG_MAKE_SET
16
17 # Checks for libraries.
18
19 # Checks for header files.
20 AC_HEADER_DIRENT
21 AC_HEADER_STDC
22 AC_HEADER_SYS_WAIT
23 AC_CHECK_HEADERS([fcntl.h libintl.h locale.h memory.h stdlib.h string.h \
24 sys/file.h sys/ioctl.h termios.h unistd.h])
25
26 # Checks for typedefs, structures, and compiler characteristics.
27 AC_C_CONST
28 AC_C_INLINE
29 AC_TYPE_SIZE_T
30 AC_STRUCT_TM
31 AC_TYPE_UID_T
32
33 # Checks for library functions.
34 AC_FUNC_CHOWN
35 AC_FUNC_CLOSEDIR_VOID
36 AC_FUNC_FORK
37 AC_PROG_GCC_TRADITIONAL
38 AC_FUNC_MALLOC
39 AC_FUNC_REALLOC
40 AC_FUNC_SETPGRP
41 AC_TYPE_SIGNAL
42 AC_FUNC_STAT
43 AC_CHECK_FUNCS([alarm memset setlocale strcasecmp strchr strdup strerror \
44 strspn strstr strtol strtoul])
45
46 OPTIONAL_PROGS=
47 AC_ARG_ENABLE(optional-progs,
48         AS_HELP_STRING(--enable-optional-progs, [Build and install a optional programs]),
49         [OPTIONAL_PROGS=1])
50 AC_SUBST(OPTIONAL_PROGS)
51
52 # For lib/nls.h: do we have <libintl.h> and gettext() ?
53
54 AC_ARG_ENABLE(nls, AS_HELP_STRING(--enable-nls, [NLS support]),
55         [enable_nls=1], [enable_nls=])
56
57 if test "$enable_nls" = "1"; then
58         AC_DEFINE(ENABLE_NLS)
59 fi
60
61 # Does xgettext exist and take the option --foreign-user?
62 FOREIGN=
63 HAVE_XGETTEXT=no
64 if (test "$enable_nls" = "1" && type xgettext > /dev/null 2>&1); then
65         msg=`xgettext --foreign-user 2>&1 | grep unrecognized`
66         if test -z "$msg"; then
67                 FOREIGN="--foreign-user"
68         fi
69         HAVE_XGETTEXT=yes
70 fi
71 AC_SUBST(FOREIGN)
72 AC_SUBST(HAVE_XGETTEXT)
73
74 AC_CONFIG_FILES([Makefile
75                 data/Makefile
76                 man/Makefile
77                 po/Makefile
78                 src/Makefile])
79 AC_OUTPUT