2
dnl Configure script for readline library
4
dnl report bugs to chet@po.cwru.edu
6
dnl Process this file with autoconf to produce a configure script.
7
AC_REVISION([for Readline 4.0, version 2.14, from autoconf version] AC_ACVERSION)
11
AC_CONFIG_HEADER(config.h)
13
dnl make sure we are using a recent autoconf version
20
dnl configure defaults
24
dnl arguments to configure
25
AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval)
27
if test "$opt_curses" = "yes"; then
31
# We want these before the checks, so the checks can modify their values.
32
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
37
# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
38
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
40
AC_PROG_GCC_TRADITIONAL
42
AC_CHECK_PROG(AR, ar, ar)
43
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
44
dnl This allows people to set it when running configure or make
45
test -n "$ARFLAGS" || ARFLAGS="cr"
56
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
60
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
61
sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
62
termcap.h termios.h termio.h sys/file.h locale.h)
65
BASH_REINSTALL_SIGHANDLERS
67
BASH_FUNC_POSIX_SETJMP
69
BASH_CHECK_GETPW_FUNCS
78
BASH_STRUCT_DIRENT_D_INO
79
BASH_STRUCT_DIRENT_D_FILENO
83
aix*) prefer_curses=yes ;;
85
BASH_CHECK_LIB_TERMCAP
86
if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
87
TERMCAP_LIB=-ltermcap #default
91
*cray*) LOCAL_CFLAGS=-DCRAY ;;
95
isc*) LOCAL_CFLAGS=-Disc386 ;;
98
# shared library configuration section
100
# Shared object configuration section. These values are generated by
101
# ${srcdir}/support/shobj-conf
103
if test -f ${srcdir}/support/shobj-conf; then
104
AC_MSG_CHECKING(configuration for building shared libraries)
105
eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
107
AC_SUBST(SHOBJ_CFLAGS)
109
AC_SUBST(SHOBJ_LDFLAGS)
110
AC_SUBST(SHOBJ_XLDFLAGS)
112
AC_SUBST(SHOBJ_STATUS)
113
AC_SUBST(SHLIB_STATUS)
114
AC_SUBST(SHLIB_XLDFLAGS)
115
AC_SUBST(SHLIB_LIBSUFF)
116
AC_SUBST(SHLIB_LIBVERSION)
118
AC_MSG_RESULT($SHLIB_STATUS)
125
AC_SUBST(LOCAL_CFLAGS)
126
AC_SUBST(LOCAL_LDFLAGS)
137
AC_SUBST(TERMCAP_LIB)
139
AC_OUTPUT([Makefile],
141
# Makefile uses this timestamp file to record whether config.h is up to date.