configure.in revision 26497
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.1, version 2.04, from autoconf version] AC_ACVERSION)
8LIBVERSION=2.1
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
20# We want these before the checks, so the checks can modify their values.
21test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
22
23AC_PROG_CC
24
25# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
26test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
27
28AC_PROG_GCC_TRADITIONAL
29AC_PROG_INSTALL
30AC_PROG_RANLIB
31
32AC_RETSIGTYPE
33
34AC_HEADER_STAT
35AC_HEADER_DIRENT
36
37AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
38
39AC_FUNC_STRCOLL
40
41AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
42		sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
43		termcap.h termios.h termio.h sys/file.h locale.h)
44
45BASH_SIGNAL_CHECK
46BASH_REINSTALL_SIGHANDLERS
47
48BASH_FUNC_POSIX_SETJMP
49BASH_FUNC_LSTAT
50BASH_CHECK_GETPW_FUNCS
51BASH_FUNC_STRCOLL
52
53BASH_TYPE_SIGHANDLER
54BASH_HAVE_TIOCGWINSZ
55BASH_HAVE_TIOCSTAT
56BASH_HAVE_FIONREAD
57BASH_MISC_SPEED_T
58BASH_STRUCT_DIRENT_D_INO
59BASH_STRUCT_DIRENT_D_FILENO
60
61case "$host_cpu" in
62*cray*)	LOCAL_CFLAGS=-DCRAY ;;
63esac
64
65case "$host_os" in
66isc*)	LOCAL_CFLAGS=-Disc386 ;;
67esac
68
69AC_SUBST(CFLAGS)
70AC_SUBST(LOCAL_CFLAGS)
71AC_SUBST(LOCAL_DEFS)
72
73AC_SUBST(host_cpu)
74AC_SUBST(host_os)
75
76AC_SUBST(LIBVERSION)
77
78AC_OUTPUT([Makefile doc/Makefile examples/Makefile],
79[
80# Makefile uses this timestamp file to record whether config.h is up to date.
81echo > stamp-h
82])
83