Fix texinfo-3.12 problems:
[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.
c862e87b
JM
7AC_REVISION([for Readline 4.0, version 2.14, from autoconf version] AC_ACVERSION)
8LIBVERSION=4.0
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
35AC_MINIX
36
d60d9f65
SS
37dnl BEGIN changes for CYGNUS cross-building for Cygwin
38
39dnl load up the cross-building cache file -- add more cases and cache
40dnl files as necessary
41if test "x$cross_compiling" = "xyes"; then
42 case "${host}" in
43 *-cygwin*)
44 cross_cache=${srcdir}/cross-build/cygwin.cache
45 if test -r "${cross_cache}"; then
46 echo "loading cross-build cache file ${cross_cache}"
47 . ${cross_cache}
48 fi
49 LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
50 unset cross_cache
51 ;;
52 *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
53 ;;
54 esac
55fi
56
57if test "x$cross_compiling" = "xyes"; then
58 CROSS_COMPILING_FLAG=-DCROSS_COMPILING
59else
60 CROSS_COMPILING_FLAG=
61fi
62AC_SUBST(CROSS_COMPILING_FLAG)
63
64if test -z "$CC_FOR_BUILD"; then
65 if test "x$cross_compiling" = "xno"; then
66 CC_FOR_BUILD='$(CC)'
67 else
68 CC_FOR_BUILD=gcc
69 fi
70fi
71AC_SUBST(CC_FOR_BUILD)
72
73dnl END changes for CYGNUS cross-building for Cygwin
74
d60d9f65
SS
75# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
76test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
77
78AC_PROG_GCC_TRADITIONAL
79AC_PROG_INSTALL
c862e87b
JM
80AC_CHECK_PROG(AR, ar, ar)
81dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
82dnl This allows people to set it when running configure or make
83test -n "$ARFLAGS" || ARFLAGS="cr"
d60d9f65
SS
84AC_PROG_RANLIB
85
c862e87b
JM
86MAKE_SHELL=/bin/sh
87AC_SUBST(MAKE_SHELL)
88
d60d9f65
SS
89AC_RETSIGTYPE
90
91AC_HEADER_STAT
92AC_HEADER_DIRENT
93
94AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
95
96AC_FUNC_STRCOLL
97
98AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
99 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
100 termcap.h termios.h termio.h sys/file.h locale.h)
101
102BASH_SIGNAL_CHECK
103BASH_REINSTALL_SIGHANDLERS
104
105BASH_FUNC_POSIX_SETJMP
106BASH_FUNC_LSTAT
107BASH_CHECK_GETPW_FUNCS
108BASH_FUNC_STRCOLL
109
110BASH_TYPE_SIGHANDLER
111BASH_HAVE_TIOCGWINSZ
112BASH_HAVE_TIOCSTAT
113BASH_HAVE_FIONREAD
114BASH_MISC_SPEED_T
115BASH_STRUCT_WINSIZE
116BASH_STRUCT_DIRENT_D_INO
117BASH_STRUCT_DIRENT_D_FILENO
118
119dnl yuck
120case "$host_os" in
121aix*) prefer_curses=yes ;;
122esac
123BASH_CHECK_LIB_TERMCAP
124if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
125 TERMCAP_LIB=-ltermcap #default
126fi
127
128case "$host_cpu" in
129*cray*) LOCAL_CFLAGS=-DCRAY ;;
130esac
131
132case "$host_os" in
133isc*) LOCAL_CFLAGS=-Disc386 ;;
134esac
135
c862e87b
JM
136# shared library configuration section
137#
138# Shared object configuration section. These values are generated by
139# ${srcdir}/support/shobj-conf
140#
141if test -f ${srcdir}/support/shobj-conf; then
142 AC_MSG_CHECKING(configuration for building shared libraries)
143 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
144 AC_SUBST(SHOBJ_CC)
145 AC_SUBST(SHOBJ_CFLAGS)
146 AC_SUBST(SHOBJ_LD)
147 AC_SUBST(SHOBJ_LDFLAGS)
148 AC_SUBST(SHOBJ_XLDFLAGS)
149 AC_SUBST(SHOBJ_LIBS)
150 AC_SUBST(SHOBJ_STATUS)
151 AC_SUBST(SHLIB_STATUS)
152 AC_SUBST(SHLIB_XLDFLAGS)
153 AC_SUBST(SHLIB_LIBSUFF)
154 AC_SUBST(SHLIB_LIBVERSION)
155 AC_SUBST(SHLIB_LIBS)
156 AC_MSG_RESULT($SHLIB_STATUS)
157fi
158
d60d9f65
SS
159BUILD_DIR=`pwd`
160AC_SUBST(BUILD_DIR)
161
162AC_SUBST(CFLAGS)
163AC_SUBST(LOCAL_CFLAGS)
164AC_SUBST(LOCAL_LDFLAGS)
165AC_SUBST(LOCAL_DEFS)
166
c862e87b
JM
167AC_SUBST(AR)
168AC_SUBST(ARFLAGS)
169
d60d9f65
SS
170AC_SUBST(host_cpu)
171AC_SUBST(host_os)
172
173AC_SUBST(LIBVERSION)
174
175AC_SUBST(TERMCAP_LIB)
176
c862e87b 177AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile],
d60d9f65
SS
178[
179# Makefile uses this timestamp file to record whether config.h is up to date.
180echo > stamp-h
181])
This page took 0.042168 seconds and 4 git commands to generate.