OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [readline/] [configure.in] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
dnl
2
dnl Configure script for readline library
3
dnl
4
dnl report bugs to chet@po.cwru.edu
5
dnl
6
dnl Process this file with autoconf to produce a configure script.
7
AC_REVISION([for Readline 4.1, version 2.22, from autoconf version] AC_ACVERSION)
8
LIBVERSION=4.1
9
 
10
AC_INIT(readline.h)
11
AC_CONFIG_HEADER(config.h)
12
 
13
dnl make sure we are using a recent autoconf version
14
AC_PREREQ(2.10)
15
 
16
dnl AC_CONFIG_AUX_DIR(./support)
17
 
18
AC_CANONICAL_HOST
19
 
20
dnl configure defaults
21
opt_curses=no
22
opt_shared=no
23
 
24
dnl arguments to configure
25
AC_ARG_WITH(curses, --with-curses               use the curses library instead of the termcap library,opt_curses=$withval)
26
 
27
if test "$opt_curses" = "yes"; then
28
        prefer_curses=yes
29
fi
30
 
31
# We want these before the checks, so the checks can modify their values.
32
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
33
 
34
AC_PROG_CC
35
dnl AC_AIX
36
AC_MINIX
37
 
38
dnl BEGIN changes for CYGNUS cross-building for Cygwin
39
 
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
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
56
fi
57
 
58
if test "x$cross_compiling" = "xyes"; then
59
  CROSS_COMPILING_FLAG=-DCROSS_COMPILING
60
else
61
  CROSS_COMPILING_FLAG=
62
fi
63
AC_SUBST(CROSS_COMPILING_FLAG)
64
 
65
if 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
71
fi
72
AC_SUBST(CC_FOR_BUILD)
73
 
74
dnl END changes for CYGNUS cross-building for Cygwin
75
 
76
# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
77
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
78
 
79
AC_PROG_GCC_TRADITIONAL
80
AC_PROG_INSTALL
81
AC_CHECK_PROG(AR, ar, ar)
82
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
83
dnl This allows people to set it when running configure or make
84
test -n "$ARFLAGS" || ARFLAGS="cr"
85
AC_PROG_RANLIB
86
 
87
MAKE_SHELL=/bin/sh
88
AC_SUBST(MAKE_SHELL)
89
 
90
AC_RETSIGTYPE
91
 
92
AC_HEADER_STAT
93
AC_HEADER_DIRENT
94
 
95
AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \
96
                strcasecmp tcgetattr)
97
 
98
AC_FUNC_STRCOLL
99
 
100
AC_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
 
104
BASH_SIGNAL_CHECK
105
BASH_REINSTALL_SIGHANDLERS
106
 
107
BASH_FUNC_POSIX_SETJMP
108
BASH_FUNC_LSTAT
109
BASH_CHECK_GETPW_FUNCS
110
BASH_FUNC_STRCOLL
111
 
112
BASH_TYPE_SIGHANDLER
113
BASH_HAVE_TIOCGWINSZ
114
BASH_HAVE_TIOCSTAT
115
BASH_HAVE_FIONREAD
116
BASH_MISC_SPEED_T
117
BASH_STRUCT_WINSIZE
118
BASH_STRUCT_DIRENT_D_INO
119
BASH_STRUCT_DIRENT_D_FILENO
120
 
121
dnl yuck
122
case "$host_os" in
123
aix*)   prefer_curses=yes ;;
124
esac
125
BASH_CHECK_LIB_TERMCAP
126
if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
127
        TERMCAP_LIB=-ltermcap   #default
128
fi
129
 
130
case "$host_cpu" in
131
*cray*) LOCAL_CFLAGS=-DCRAY ;;
132
*s390*) LOCAL_CFLAGS=-fsigned-char ;;
133
esac
134
 
135
case "$host_os" in
136
isc*)   LOCAL_CFLAGS=-Disc386 ;;
137
esac
138
 
139
# shared library configuration section
140
#
141
# Shared object configuration section.  These values are generated by
142
# ${srcdir}/support/shobj-conf
143
#
144
if test -f ${srcdir}/support/shobj-conf; then
145
        AC_MSG_CHECKING(configuration for building shared libraries)
146
        eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
147
        AC_SUBST(SHOBJ_CC)
148
        AC_SUBST(SHOBJ_CFLAGS)
149
        AC_SUBST(SHOBJ_LD)
150
        AC_SUBST(SHOBJ_LDFLAGS)
151
        AC_SUBST(SHOBJ_XLDFLAGS)
152
        AC_SUBST(SHOBJ_LIBS)
153
        AC_SUBST(SHOBJ_STATUS)
154
        AC_SUBST(SHLIB_STATUS)
155
        AC_SUBST(SHLIB_XLDFLAGS)
156
        AC_SUBST(SHLIB_LIBSUFF)
157
        AC_SUBST(SHLIB_LIBVERSION)
158
        AC_SUBST(SHLIB_LIBS)
159
        AC_MSG_RESULT($SHLIB_STATUS)
160
 
161
        # shared library versioning
162
        # quoted for m4 so I can use character classes
163
        SHLIB_MAJOR=[`expr "$LIBVERSION" : '\([0-9]\)\..*'`]
164
        SHLIB_MINOR=[`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`]
165
        AC_SUBST(SHLIB_MAJOR)
166
        AC_SUBST(SHLIB_MINOR)
167
fi
168
 
169
case "$host_os" in
170
msdosdjgpp*)    BUILD_DIR=`pwd.exe` ;;  # to prevent //d/path/file
171
*)              BUILD_DIR=`pwd` ;;
172
esac
173
 
174
AC_SUBST(BUILD_DIR)
175
 
176
AC_SUBST(CFLAGS)
177
AC_SUBST(LOCAL_CFLAGS)
178
AC_SUBST(LOCAL_LDFLAGS)
179
AC_SUBST(LOCAL_DEFS)
180
 
181
AC_SUBST(AR)
182
AC_SUBST(ARFLAGS)
183
 
184
AC_SUBST(host_cpu)
185
AC_SUBST(host_os)
186
 
187
AC_SUBST(LIBVERSION)
188
 
189
AC_SUBST(TERMCAP_LIB)
190
 
191
AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile],
192
[
193
# Makefile uses this timestamp file to record whether config.h is up to date.
194
echo > stamp-h
195
])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.