a
[apps/madtty.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT([rote], 0.3.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],AS_HELP_STRING([--disable-ncurses],[disables ncurses support (default enabled)]),[enable_curses=n],[enable_curses=y])
20
21 if test "$enable_curses" = y; then
22    AC_CHECK_LIB([ncurses], [initscr], [],
23                 AC_MSG_ERROR([Need ncurses to compile ncurses support.]))
24    CFLAGS="$CFLAGS -DUSE_NCURSES"
25 fi
26
27 AC_ARG_ENABLE([pty],AS_HELP_STRING([--disable-pty],[disables pty support (default enabled)]),[enable_pty=n],[enable_pty=y])
28
29 if test "$enable_pty" = y; then
30    AC_CHECK_LIB([util], [forkpty], [],
31    AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.]))
32    CFLAGS="$CFLAGS -DUSE_PTY"
33 fi
34
35 dnl Checks for library functions
36 AC_CHECK_FUNCS([memset select setenv])
37 AC_FUNC_MALLOC
38 AC_FUNC_SELECT_ARGTYPES
39
40 dnl Checks for typedefs, structures, and compiler characteristics.
41 AC_C_CONST
42 AC_HEADER_TIME
43 AC_C_INLINE
44 AC_TYPE_PID_T
45 AC_TYPE_SIGNAL
46
47 AC_CONFIG_FILES([Makefile rote-config])
48 AC_OUTPUT
49