1 dnl Process this file with autoconf to produce a configure script.
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 AC_ARG_ENABLE([widec],AS_HELP_STRING([--enable-widec],[enables wide character support (default disabled)]),[enable_widec=y],[enable_widec=n])
19 dnl Check for libraries
20 AC_ARG_ENABLE([ncurses],AS_HELP_STRING([--disable-ncurses],[disables ncurses support (default enabled)]),[enable_curses=n],[enable_curses=y])
22 if test "$enable_widec" = y; then
23 CFLAGS="$CFLAGS -DUSE_UTF8"
31 AC_SUBST(ROTE_LIB_NAME)
34 if test "$enable_curses" = y; then
35 if test "$enable_widec" = y; then
36 AC_CHECK_LIB([ncursesw], [initscr], [], AC_MSG_ERROR([Need ncursesw to compile ncurses support with wide characters.]))
38 AC_CHECK_LIB([ncurses], [initscr], [], AC_MSG_ERROR([Need ncurses to compile ncurses support.]))
40 CFLAGS="$CFLAGS -DUSE_NCURSES"
48 AC_ARG_ENABLE([pty],AS_HELP_STRING([--disable-pty],[disables pty support (default enabled)]),[enable_pty=n],[enable_pty=y])
50 if test "$enable_pty" = y; then
51 AC_CHECK_LIB([util], [forkpty], [],
52 AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.]))
53 CFLAGS="$CFLAGS -DUSE_PTY"
61 dnl Checks for library functions
62 AC_CHECK_FUNCS([memset select setenv])
64 AC_FUNC_SELECT_ARGTYPES
66 dnl Checks for typedefs, structures, and compiler characteristics.
73 AC_CONFIG_FILES([Makefile rote-config rote.h])