]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - readline/configure.in
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / readline / configure.in
CommitLineData
c5ba05bf
EZ
1dnl
2dnl Configure script for readline library
3dnl
4dnl report bugs to chet@po.cwru.edu
5dnl
6dnl Process this file with autoconf to produce a configure script.
7AC_REVISION([for Readline 2.2, version 2.07, from autoconf version] AC_ACVERSION)
8LIBVERSION=2.2
9
10AC_INIT(readline.h)
11AC_CONFIG_HEADER(config.h)
12
13dnl make sure we are using a recent autoconf version
14AC_PREREQ(2.10)
15
16AC_CONFIG_AUX_DIR(./support)
17
18AC_CANONICAL_HOST
19
20dnl configure defaults
21opt_curses=no
22opt_shared=no
23
24dnl arguments to configure
25AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval)
26
27if test "$opt_curses" = "yes"; then
28 prefer_curses=yes
29fi
30
31# We want these before the checks, so the checks can modify their values.
32test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
33
34AC_PROG_CC
35AC_MINIX
36
37
38dnl BEGIN changes for CYGNUS cross-building for Cygwin
39
40dnl load up the cross-building cache file -- add more cases and cache
41dnl files as necessary
42if test "x$cross_compiling" = "xyes"; then
43 case "${host}" in
44 *-cygwin*)
18ee5bf8
CF
45 cross_cache=${srcdir}/cross-build/cygwin.cache
46 if test -r "${cross_cache}"; then
47 echo "loading cross-build cache file ${cross_cache}"
48 . ${cross_cache}
49 fi
9f0dcc0f 50 CFLAGS="$CFLAGS -I${srcdir}/../libtermcap"
18ee5bf8
CF
51 unset cross_cache
52 ;;
53 *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
54 ;;
c5ba05bf
EZ
55 esac
56fi
57
58if test "x$cross_compiling" = "xyes"; then
59 CROSS_COMPILING_FLAG=-DCROSS_COMPILING
60else
61 CROSS_COMPILING_FLAG=
62fi
63AC_SUBST(CROSS_COMPILING_FLAG)
64
65if test -z "$CC_FOR_BUILD"; then
66 if test "x$cross_compiling" = "xno"; then
67 CC_FOR_BUILD='$(CC)'
68 else
69 CC_FOR_BUILD=gcc
70 fi
71fi
72AC_SUBST(CC_FOR_BUILD)
73
74dnl END changes for CYGNUS cross-building for Cygwin
75
76
77
78# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
79test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
80
81AC_PROG_GCC_TRADITIONAL
82AC_PROG_INSTALL
83AC_PROG_RANLIB
84
85AC_RETSIGTYPE
86
87AC_HEADER_STAT
88AC_HEADER_DIRENT
89
90AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
91
92AC_FUNC_STRCOLL
93
94AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
95 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
96 termcap.h termios.h termio.h sys/file.h locale.h)
97
98BASH_SIGNAL_CHECK
99BASH_REINSTALL_SIGHANDLERS
100
101BASH_FUNC_POSIX_SETJMP
102BASH_FUNC_LSTAT
103BASH_CHECK_GETPW_FUNCS
104BASH_FUNC_STRCOLL
105
106BASH_TYPE_SIGHANDLER
107BASH_HAVE_TIOCGWINSZ
108BASH_HAVE_TIOCSTAT
109BASH_HAVE_FIONREAD
110BASH_MISC_SPEED_T
111BASH_STRUCT_WINSIZE
112BASH_STRUCT_DIRENT_D_INO
113BASH_STRUCT_DIRENT_D_FILENO
114
115dnl yuck
116case "$host_os" in
117aix*) prefer_curses=yes ;;
b51d8b22 118esac
c5ba05bf
EZ
119BASH_CHECK_LIB_TERMCAP
120if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
121 TERMCAP_LIB=-ltermcap #default
122fi
123
124case "$host_cpu" in
125*cray*) LOCAL_CFLAGS=-DCRAY ;;
126esac
127
128case "$host_os" in
129isc*) LOCAL_CFLAGS=-Disc386 ;;
130esac
131
132BUILD_DIR=`pwd`
133AC_SUBST(BUILD_DIR)
134
135AC_SUBST(CFLAGS)
136AC_SUBST(LOCAL_CFLAGS)
137AC_SUBST(LOCAL_LDFLAGS)
138AC_SUBST(LOCAL_DEFS)
139
140AC_SUBST(host_cpu)
141AC_SUBST(host_os)
b51d8b22 142
c5ba05bf 143AC_SUBST(LIBVERSION)
0b909fe1 144
c5ba05bf 145AC_SUBST(TERMCAP_LIB)
0b909fe1 146
c5ba05bf
EZ
147AC_OUTPUT([Makefile doc/Makefile examples/Makefile],
148[
149# Makefile uses this timestamp file to record whether config.h is up to date.
150echo > stamp-h
151])