rename the project into madtty.
[apps/madtty.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT([maddty], 0.0.0)
4
5 AC_SUBST(PACKAGE_NAME)
6 AC_SUBST(PACKAGE_VERSION)
7
8 AC_CONFIG_SRCDIR([rote.c])
9
10 dnl Checks for programs.
11 AC_PROG_CC
12
13 dnl Checks for header files.
14 AC_HEADER_STDC
15 AC_HEADER_STDBOOL
16 AC_CHECK_HEADERS([sys/types.h unistd.h stdlib.h string.h])
17
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"
27 fi
28
29 AC_ARG_ENABLE([pty],
30               AS_HELP_STRING([--disable-pty],
31                              [disables pty support (default enabled)]),
32                              [enable_pty=n],[enable_pty=y])
33
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"
38 fi
39
40 dnl Checks for library functions
41 AC_CHECK_FUNCS([memset select setenv])
42 AC_FUNC_MALLOC
43 AC_FUNC_SELECT_ARGTYPES
44
45 dnl Checks for typedefs, structures, and compiler characteristics.
46 AC_C_CONST
47 AC_HEADER_TIME
48 AC_C_INLINE
49 AC_TYPE_PID_T
50 AC_TYPE_SIGNAL
51
52 AC_CONFIG_FILES([Makefile madtty.pc])
53 AC_OUTPUT
54