Fix more breakages from the multiple relax pass patch.
[deliverable/binutils-gdb.git] / readline / configure.in
CommitLineData
d60d9f65
SS
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.
1b17e766
EZ
7AC_REVISION([for Readline 4.1, version 2.22, from autoconf version] AC_ACVERSION)
8LIBVERSION=4.1
d60d9f65
SS
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
16dnl AC_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
1b17e766 35dnl AC_AIX
d60d9f65
SS
36AC_MINIX
37
d60d9f65
SS
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*)
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
50 LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
51 unset cross_cache
52 ;;
53 *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
54 ;;
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
d60d9f65
SS
76# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
77test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
78
79AC_PROG_GCC_TRADITIONAL
80AC_PROG_INSTALL
c862e87b
JM
81AC_CHECK_PROG(AR, ar, ar)
82dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
83dnl This allows people to set it when running configure or make
84test -n "$ARFLAGS" || ARFLAGS="cr"
d60d9f65
SS
85AC_PROG_RANLIB
86
c862e87b
JM
87MAKE_SHELL=/bin/sh
88AC_SUBST(MAKE_SHELL)
89
d60d9f65
SS
90AC_RETSIGTYPE
91
92AC_HEADER_STAT
93AC_HEADER_DIRENT
94
1b17e766
EZ
95AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \
96 strcasecmp tcgetattr)
d60d9f65
SS
97
98AC_FUNC_STRCOLL
99
100AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
101 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
102 termcap.h termios.h termio.h sys/file.h locale.h)
103
104BASH_SIGNAL_CHECK
105BASH_REINSTALL_SIGHANDLERS
106
107BASH_FUNC_POSIX_SETJMP
108BASH_FUNC_LSTAT
109BASH_CHECK_GETPW_FUNCS
110BASH_FUNC_STRCOLL
111
112BASH_TYPE_SIGHANDLER
113BASH_HAVE_TIOCGWINSZ
114BASH_HAVE_TIOCSTAT
115BASH_HAVE_FIONREAD
116BASH_MISC_SPEED_T
117BASH_STRUCT_WINSIZE
118BASH_STRUCT_DIRENT_D_INO
119BASH_STRUCT_DIRENT_D_FILENO
120
121dnl yuck
122case "$host_os" in
123aix*) prefer_curses=yes ;;
124esac
125BASH_CHECK_LIB_TERMCAP
126if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
127 TERMCAP_LIB=-ltermcap #default
128fi
129
130case "$host_cpu" in
131*cray*) LOCAL_CFLAGS=-DCRAY ;;
132esac
133
134case "$host_os" in
135isc*) LOCAL_CFLAGS=-Disc386 ;;
136esac
137
c862e87b
JM
138# shared library configuration section
139#
140# Shared object configuration section. These values are generated by
141# ${srcdir}/support/shobj-conf
142#
143if test -f ${srcdir}/support/shobj-conf; then
144 AC_MSG_CHECKING(configuration for building shared libraries)
1b17e766 145 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
c862e87b
JM
146 AC_SUBST(SHOBJ_CC)
147 AC_SUBST(SHOBJ_CFLAGS)
148 AC_SUBST(SHOBJ_LD)
149 AC_SUBST(SHOBJ_LDFLAGS)
150 AC_SUBST(SHOBJ_XLDFLAGS)
151 AC_SUBST(SHOBJ_LIBS)
152 AC_SUBST(SHOBJ_STATUS)
153 AC_SUBST(SHLIB_STATUS)
154 AC_SUBST(SHLIB_XLDFLAGS)
155 AC_SUBST(SHLIB_LIBSUFF)
156 AC_SUBST(SHLIB_LIBVERSION)
157 AC_SUBST(SHLIB_LIBS)
158 AC_MSG_RESULT($SHLIB_STATUS)
1b17e766
EZ
159
160 # shared library versioning
161 # quoted for m4 so I can use character classes
162 SHLIB_MAJOR=[`expr "$LIBVERSION" : '\([0-9]\)\..*'`]
163 SHLIB_MINOR=[`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`]
164 AC_SUBST(SHLIB_MAJOR)
165 AC_SUBST(SHLIB_MINOR)
c862e87b
JM
166fi
167
1b17e766
EZ
168case "$host_os" in
169msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
170*) BUILD_DIR=`pwd` ;;
171esac
172
d60d9f65
SS
173AC_SUBST(BUILD_DIR)
174
175AC_SUBST(CFLAGS)
176AC_SUBST(LOCAL_CFLAGS)
177AC_SUBST(LOCAL_LDFLAGS)
178AC_SUBST(LOCAL_DEFS)
179
c862e87b
JM
180AC_SUBST(AR)
181AC_SUBST(ARFLAGS)
182
d60d9f65
SS
183AC_SUBST(host_cpu)
184AC_SUBST(host_os)
185
186AC_SUBST(LIBVERSION)
187
188AC_SUBST(TERMCAP_LIB)
189
c862e87b 190AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile],
d60d9f65
SS
191[
192# Makefile uses this timestamp file to record whether config.h is up to date.
193echo > stamp-h
194])
This page took 0.070745 seconds and 4 git commands to generate.