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 2.2, version 2.07, from autoconf version] AC_ACVERSION)
11 AC_CONFIG_HEADER(config.h)
13 dnl make sure we are using a recent autoconf version
16 AC_CONFIG_AUX_DIR(./support)
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
38 dnl BEGIN changes for CYGNUS cross-building for Cygwin
40 dnl load up the cross-building cache file -- add more cases and cache
41 dnl files as necessary
42 if test "x$cross_compiling" = "xyes"; then
45 cross_cache=${srcdir}/cross-build/cygwin.cache
46 if test -r "${cross_cache}"; then
47 echo "loading cross-build cache file ${cross_cache}"
52 *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
57 if test "x$cross_compiling" = "xyes"; then
58 CROSS_COMPILING_FLAG=-DCROSS_COMPILING
62 AC_SUBST(CROSS_COMPILING_FLAG)
64 if test -z "$CC_FOR_BUILD"; then
65 if test "x$cross_compiling" = "xno"; then
71 AC_SUBST(CC_FOR_BUILD)
73 dnl END changes for CYGNUS cross-building for Cygwin
77 # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
78 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
80 AC_PROG_GCC_TRADITIONAL
89 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
93 AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
94 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
95 termcap.h termios.h termio.h sys/file.h locale.h)
98 BASH_REINSTALL_SIGHANDLERS
100 BASH_FUNC_POSIX_SETJMP
102 BASH_CHECK_GETPW_FUNCS
111 BASH_STRUCT_DIRENT_D_INO
112 BASH_STRUCT_DIRENT_D_FILENO
116 aix*) prefer_curses=yes ;;
118 BASH_CHECK_LIB_TERMCAP
119 if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
120 TERMCAP_LIB=-ltermcap #default
124 *cray*) LOCAL_CFLAGS=-DCRAY ;;
128 isc*) LOCAL_CFLAGS=-Disc386 ;;
135 AC_SUBST(LOCAL_CFLAGS)
136 AC_SUBST(LOCAL_LDFLAGS)
144 AC_SUBST(TERMCAP_LIB)
146 AC_OUTPUT([Makefile doc/Makefile examples/Makefile],
148 # Makefile uses this timestamp file to record whether config.h is up to date.