X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=configure.ac;h=4fbfb7900fa4e98d48342ba94f3f71db59c70dae;hb=61e3ccf7d4bc013750421566cbe08c775b0c3001;hp=91fd994882ca8aa40ecf695ee79208dc147f945c;hpb=93c516d8991c4b6935fc03a24317ea0785e78a93;p=apps%2Fmadtty.git diff --git a/configure.ac b/configure.ac index 91fd994..4fbfb79 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rote], 0.2.6) +AC_INIT([maddty], 0.0.0) AC_SUBST(PACKAGE_NAME) AC_SUBST(PACKAGE_VERSION) -AC_CONFIG_SRCDIR([rote.c]) +AC_CONFIG_SRCDIR([madtty/madtty.h]) dnl Checks for programs. AC_PROG_CC @@ -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)])) +if test "${enable_curses}" != "no"; 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)])) +if test "${enable_pty}" != "no"; 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]) @@ -33,6 +44,6 @@ AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIGNAL -AC_CONFIG_FILES([Makefile rote-config]) +AC_CONFIG_FILES([am/vars.mk madtty/madtty.pc]) AC_OUTPUT