2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(kbd, 1.14, gladkov.alexey@gmail.com)
6 AC_CONFIG_SRCDIR([src/showkey.c])
7 AC_CONFIG_HEADERS(config.h)
17 # Checks for libraries.
19 # Checks for header files.
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])
26 # Checks for typedefs, structures, and compiler characteristics.
33 # Checks for library functions.
37 AC_PROG_GCC_TRADITIONAL
43 AC_CHECK_FUNCS([alarm memset setlocale strcasecmp strchr strdup strerror \
44 strspn strstr strtol strtoul])
47 AC_ARG_ENABLE(optional-progs,
48 AS_HELP_STRING(--enable-optional-progs, [Build and install a optional programs]),
50 AC_SUBST(OPTIONAL_PROGS)
52 # For lib/nls.h: do we have <libintl.h> and gettext() ?
54 AC_ARG_ENABLE(nls, AS_HELP_STRING(--enable-nls, [NLS support]),
55 [enable_nls=1], [enable_nls=])
57 if test "$enable_nls" = "1"; then
61 # Does xgettext exist and take the option --foreign-user?
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"
72 AC_SUBST(HAVE_XGETTEXT)
74 AC_CONFIG_FILES([Makefile