From 8ee322e11778f9e274831ba71a91a1a7772f34ab Mon Sep 17 00:00:00 2001 From: btakahashi Date: Sun, 24 Sep 2006 19:29:03 +0000 Subject: [PATCH] a --- Makefile.in | 2 +- configure.ac | 21 ++++++++++++++++----- rote-config.in | 3 ++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index a31f3ff..cc95315 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,7 +27,7 @@ ROTE_VERSION=@PACKAGE_VERSION@ ROTE_SONAME=librote.so.0 CC=@CC@ -CFLAGS=@CFLAGS@ -Wall -fPIC -DUSE_NCURSES -DUSE_PTY +CFLAGS=@CFLAGS@ -Wall -fPIC LIBS=@LIBS@ LDFLAGS=@LDFLAGS@ prefix=@prefix@ 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]) diff --git a/rote-config.in b/rote-config.in index f5728af..cb9a119 100644 --- a/rote-config.in +++ b/rote-config.in @@ -5,6 +5,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ version=@PACKAGE_VERSION@ +libs=@LIBS@ if test $# -eq 0; then echo "Usage: rote-config [--cflags] [--libs]" @@ -18,7 +19,7 @@ while test $# -gt 0; do echo "-I$includedir" ;; --libs) - echo "-L$libdir -lrote" + echo "$libs -L$libdir -lrote" ;; --version) echo "ROTE version $version" -- 2.20.1