view readline/configure.in @ 2252:65463608112d

[project @ 1996-05-22 18:40:45 by jwe]
author jwe
date Wed, 22 May 1996 18:40:45 +0000
parents a3e4d62de24c
children 5e862d11b116
line wrap: on
line source

dnl Process this file with autoconf to produce a configure script.
AC_INIT(readline.c)

AC_CANONICAL_HOST
if test -z "$host"; then
  host=unknown
fi
target_host_type=$host
canonical_host_type=$host


### some defaults

AC_PREFIX_DEFAULT(/usr/local)

exec_prefix='$(prefix)'
bindir='$(exec_prefix)/bin'
datadir='$(prefix)/lib'
libdir='$(exec_prefix)/lib'
includedir='$(prefix)/include/octave'
mandir='$(prefix)/man/man1'
infodir='$(prefix)/info'

### Enable creation of shared libraries.  Currently only works with
### gcc on some systems.

AC_ARG_ENABLE(shared,
  [  --shared                create shared libraries (not all systems)],
  [if test $enableval = no; then SHARED_LIBS=false; else SHARED_LIBS=true; fi],
  SHARED_LIBS=false)
AC_SUBST(SHARED_LIBS)

if $SHARED_LIBS; then
  CPICFLAG=-fPIC
  SHLEXT=so
  case "$canonical_host_type" in
    alpha-dec-osf*)
      CPICFLAG=
    ;;
    rs6000-ibm-aix*)
      CPICFLAG=
    ;;
    hppa*-hp-hpux*)
      SHLEXT=sl
    ;;
  esac
else
  CPICFLAG=
  SHLEXT=
fi
AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG])
AC_MSG_RESULT([defining SHLEXT to be $SHLEXT])
AC_SUBST(CPICFLAG)
AC_SUBST(SHLEXT)

AC_CONFIG_HEADER(config.h)

AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_PROG_RANLIB

TERMLIBS=""
for termlib in termcap terminfo curses termlib; do
  AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"])
  case "${TERMLIBS}" in
    *-l${termlib}*)
      AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS])
      break
    ;;
  esac
done
AC_SUBST(TERMLIBS)

AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h sgtty.h termio.h unistd.h varargs.h sys/file.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/time.h sys/pte.h sys/ptem.h sys/stream.h)
AC_CHECK_HEADERS(sys/select.h stdlib.h string.h)

AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(getwd select strerror strcasecmp strncasecmp)

AC_OUTPUT(doc/Makefile examples/Makefile Makefile)