1# Process this file with autoconf to produce a configure script. 2 3AC_INIT([GNU Typist], [esyscmd(./version.sh)], [bug-gtypist@gnu.org], [gtypist]) 4AM_INIT_AUTOMAKE([1.8.2 gnu dist-xz]) 5AC_CONFIG_SRCDIR([src/gtypist.c]) 6AM_CONFIG_HEADER([config.h]) 7AC_USE_SYSTEM_EXTENSIONS 8 9# Checks for programs 10 11AC_PROG_AWK 12AC_PROG_CC 13AC_ISC_POSIX 14AC_PROG_INSTALL 15AC_PROG_LN_S 16AC_PROG_MAKE_SET 17AC_PROG_RANLIB 18AC_PROG_YACC 19 20# Set of available languages. 21 22ALL_LINGUAS="cs de es eu fi fr nl pl ru tr zh_CN zh_TW" 23 24# Checks for header files. 25 26AC_HEADER_STDC 27AC_CHECK_HEADERS([unistd.h alloca.h argz.h errno.h fcntl.h langinfo.h libintl.h limits.h locale.h malloc.h stddef.h stdio_ext.h stdlib.h string.h strings.h sys/param.h unistd.h]) 28 29# Checks for typedefs, structures, and compiler characteristics. 30 31AC_HEADER_STDBOOL 32AC_C_CONST 33AC_C_INLINE 34AC_C_VOLATILE 35AC_TYPE_SIZE_T 36 37# Checks for library functions. 38 39AC_PROG_GCC_TRADITIONAL 40AC_FUNC_ALLOCA 41AC_FUNC_MALLOC 42AC_FUNC_REALLOC 43AC_TYPE_SIGNAL 44AC_FUNC_STRTOD 45AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify dcgettext getcwd getwd mempcpy memset munmap nl_langinfo setlocale stpcpy strcasecmp strchr strcspn strdup strstr strtoul]) 46 47# check for libncursesw 48 49AC_CHECK_HEADER(ncursesw/ncurses.h, HAVE_NCURSESW_H=1) 50AC_CHECK_LIB(ncursesw, add_wch, HAVE_LIBNCURSESW=1) 51if test -n "$HAVE_NCURSESW_H" -a -n "$HAVE_LIBNCURSESW"; then 52 LIBS="-lncursesw $LIBS" 53else 54 echo -e "Error: both library and header files for the ncursesw library\n"\ 55 "are required to build this package. See INSTALL file for"\ 56 "further information. On Debian/Ubuntu you need to install libncursesw5-dev." 57 exit 1; 58fi 59AC_SEARCH_LIBS(cbreak, tinfo, [], 60 [AC_MSG_ERROR([Can't find cbreak() in -lncursesw or -ltinfo])]) 61 62 63# iconv 64 65AM_ICONV 66 67# Internationalization macros 68 69AM_GNU_GETTEXT_VERSION([0.18.2]) 70AM_GNU_GETTEXT(external) 71 72# Manual page generation 73 74GEN_MAN="help2man ./gtypist -o gtypist.1 -n 'a typing tutor with lessons for different keyboards and languages'" 75AC_SUBST(GEN_MAN) 76 77# This is necessary for tools/gtypist-mode.el 78 79AM_PATH_LISPDIR 80 81# Generate files 82 83AC_CONFIG_FILES([lessons/Makefile tools/Makefile doc/Makefile src/Makefile 84 Makefile po/Makefile.in m4/Makefile]) 85AC_OUTPUT 86