1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([maddty], 0.0.0)
6 AC_SUBST(PACKAGE_VERSION)
8 AC_CONFIG_SRCDIR([rote.c])
10 dnl Checks for programs.
13 dnl Checks for header files.
16 AC_CHECK_HEADERS([sys/types.h unistd.h stdlib.h string.h])
18 dnl Check for libraries
19 AC_ARG_ENABLE([ncurses],
20 AS_HELP_STRING([--disable-ncurses],
21 [disables ncurses support (default enabled)]),
22 [enable_curses=n],[enable_curses=y])
23 if test "$enable_curses" = y; then
24 AC_CHECK_LIB([ncurses], [initscr], [],
25 AC_MSG_ERROR([Need ncurses to compile ncurses support.]))
26 CFLAGS="$CFLAGS -DUSE_NCURSES"
30 AS_HELP_STRING([--disable-pty],
31 [disables pty support (default enabled)]),
32 [enable_pty=n],[enable_pty=y])
34 if test "$enable_pty" = y; then
35 AC_CHECK_LIB([util], [forkpty], [],
36 AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.]))
37 CFLAGS="$CFLAGS -DUSE_PTY"
40 dnl Checks for library functions
41 AC_CHECK_FUNCS([memset select setenv])
43 AC_FUNC_SELECT_ARGTYPES
45 dnl Checks for typedefs, structures, and compiler characteristics.
52 AC_CONFIG_FILES([Makefile madtty.pc])