X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=configure.ac;h=a4aabb12f643d6fb293083cb34bb622337c1ed3a;hb=refs%2Fheads%2Forigin;hp=ec486c552250224e17290f4948d9fab3da71b025;hpb=1748b4c1fc413781b4e6cf1a66ed0c1c6980be5d;p=apps%2Fmadtty.git diff --git a/configure.ac b/configure.ac index ec486c5..a4aabb1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rote], 0.2.8) +AC_INIT([rote], 0.3.0) AC_SUBST(PACKAGE_NAME) AC_SUBST(PACKAGE_VERSION) @@ -16,10 +16,21 @@ AC_HEADER_STDBOOL AC_CHECK_HEADERS([sys/types.h unistd.h stdlib.h string.h]) dnl Check for libraries -AC_CHECK_LIB([ncurses], [initscr], [], - AC_MSG_ERROR([Need ncurses to compile librote.])) -AC_CHECK_LIB([util], [forkpty], [], - AC_MSG_ERROR([Need util library (forkpty function) to compile librote.])) +AC_ARG_ENABLE([ncurses],AS_HELP_STRING([--disable-ncurses],[disables ncurses support (default enabled)]),[enable_curses=n],[enable_curses=y]) + +if test "$enable_curses" = y; then + AC_CHECK_LIB([ncurses], [initscr], [], + AC_MSG_ERROR([Need ncurses to compile ncurses support.])) + CFLAGS="$CFLAGS -DUSE_NCURSES" +fi + +AC_ARG_ENABLE([pty],AS_HELP_STRING([--disable-pty],[disables pty support (default enabled)]),[enable_pty=n],[enable_pty=y]) + +if test "$enable_pty" = y; then + AC_CHECK_LIB([util], [forkpty], [], + AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.])) + CFLAGS="$CFLAGS -DUSE_PTY" +fi dnl Checks for library functions AC_CHECK_FUNCS([memset select setenv])