1 |
578 |
markom |
# Process this file with autoconf to produce a configure script.
|
2 |
|
|
|
3 |
|
|
# while Expect is in alpha/beta, disable caching so as not to confuse
|
4 |
|
|
# people trying to fix configure bugs
|
5 |
|
|
dnl CYGNUS LOCAL: allow caching
|
6 |
|
|
define([AC_CACHE_LOAD], )
|
7 |
|
|
define([AC_CACHE_SAVE], )
|
8 |
|
|
dnl END CYGNUS LOCAL
|
9 |
|
|
|
10 |
|
|
AC_INIT(expect.h)
|
11 |
|
|
|
12 |
|
|
dnl CYGNUS LOCAL: find aux files in ..
|
13 |
|
|
AC_CONFIG_AUX_DIR($srcdir/..)
|
14 |
|
|
dnl END CYGNUS LOCAL
|
15 |
|
|
dnl AC_CANONICAL_SYSTEM
|
16 |
|
|
|
17 |
|
|
# note when updating version numbers here, also update pkgIndex.in (see
|
18 |
|
|
# comments in Makefile)
|
19 |
|
|
EXP_MAJOR_VERSION=5
|
20 |
|
|
EXP_MINOR_VERSION=26
|
21 |
|
|
EXP_MICRO_VERSION=0
|
22 |
|
|
EXP_VERSION=$EXP_MAJOR_VERSION.$EXP_MINOR_VERSION
|
23 |
|
|
EXP_VERSION_NODOTS=$EXP_MAJOR_VERSION$EXP_MINOR_VERSION
|
24 |
|
|
EXP_VERSION_FULL=$EXP_VERSION.$EXP_MICRO_VERSION
|
25 |
|
|
|
26 |
|
|
# Tcl's handling of shared_lib_suffix requires this symbol exist
|
27 |
|
|
VERSION=$EXP_MAJOR_VERSION.$EXP_MINOR_VERSION
|
28 |
|
|
|
29 |
|
|
# Too many people send me configure output without identifying the version.
|
30 |
|
|
# This forced identification should reduce my pain significantly.
|
31 |
|
|
echo "configuring Expect $EXP_MAJOR_VERSION.$EXP_MINOR_VERSION.$EXP_MICRO_VERSION"
|
32 |
|
|
|
33 |
|
|
dnl AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
|
34 |
|
|
AC_CANONICAL_SYSTEM
|
35 |
|
|
|
36 |
|
|
AC_CONFIG_HEADER(expect_cf.h)
|
37 |
|
|
|
38 |
|
|
# /bin/sh on some systems is too deficient (in particular, Ultrix 4.3
|
39 |
|
|
# sh lacks unset and we *need* that), but all these systems come with
|
40 |
|
|
# alternatives, so take user's choice or whatever we're using here and
|
41 |
|
|
# allow it to be seen by Make.
|
42 |
|
|
AC_MSG_CHECKING([shell to use within Make])
|
43 |
|
|
EXP_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
44 |
|
|
AC_MSG_RESULT($CONFIG_SHELL)
|
45 |
|
|
|
46 |
|
|
# If `configure' is invoked (in)directly via `make', ensure that it
|
47 |
|
|
# encounters no `make' conflicts.
|
48 |
|
|
#
|
49 |
|
|
unset MFLAGS MAKEFLAGS
|
50 |
|
|
MFLAGS=""
|
51 |
|
|
MAKEFLAGS=""
|
52 |
|
|
|
53 |
|
|
CY_AC_PATH_TCLCONFIG
|
54 |
|
|
CY_AC_LOAD_TCLCONFIG
|
55 |
|
|
CC=$TCL_CC
|
56 |
|
|
EXP_AND_TCL_LIBS=$TCL_LIBS
|
57 |
|
|
CY_AC_PATH_TKCONFIG
|
58 |
|
|
CY_AC_LOAD_TKCONFIG
|
59 |
|
|
EXP_AND_TK_LIBS=$TK_LIBS
|
60 |
|
|
|
61 |
|
|
# CYGNUS LOCAL dj/cygwin
|
62 |
|
|
AC_CANONICAL_HOST
|
63 |
|
|
# If we built a cygwin-specific tcl, use it here.
|
64 |
|
|
case "${host}" in
|
65 |
|
|
*-*-cygwin*)
|
66 |
|
|
if test -d $srcdir/../tcl/cygwin/.
|
67 |
|
|
then
|
68 |
|
|
TCL_BUILD_LIB_SPEC="../tcl/cygwin/libtcl_cygwin.a"
|
69 |
|
|
# Use the same static lib for installed_expect
|
70 |
|
|
TCL_LIB_SPEC="../tcl/cygwin/libtcl_cygwin.a"
|
71 |
|
|
EXP_CYGWIN_ALTTCL='-DCYGWIN_ALTTCL'
|
72 |
|
|
fi
|
73 |
|
|
;;
|
74 |
|
|
esac
|
75 |
|
|
|
76 |
|
|
# An explanation is in order for the strange things going on with the
|
77 |
|
|
# various LIBS. There are three separate definitions for LIBS. The
|
78 |
|
|
# reason is that some systems require shared libraries include
|
79 |
|
|
# references to their dependent libraries, i.e., any additional
|
80 |
|
|
# libraries that must be linked to. And some systems get upset if the
|
81 |
|
|
# references are repeated on the link line. So therefore, we create
|
82 |
|
|
# one for Expect and Tk (EXP_AND_TK_LIBS), one for Expect and Tcl
|
83 |
|
|
# (EXP_AND_TCL_LIBS), and finally, one for building Expect's own
|
84 |
|
|
# shared library. Tcl's tclConfig.sh insists that any shared libs
|
85 |
|
|
# that it "helps" build must pass the libraries as LIBS (see comment
|
86 |
|
|
# near end of this configure file). I would do but since we're close
|
87 |
|
|
# to hitting config's max symbols, we take one short cut and pack the
|
88 |
|
|
# LIBS into EXP_SHLIB_LD_LIBS (which is basically what Tcl wants to do
|
89 |
|
|
# for us). The point, however, is that there's no separate LIBS or
|
90 |
|
|
# EXP_LIBS symbol passed out of configure. One additional point for
|
91 |
|
|
# confusion is that LIBS is what configure uses to do all library
|
92 |
|
|
# tests, so we have to swap definitions of LIBS peridically. When we
|
93 |
|
|
# are swapping out the one for Expect's shared library, we save it in
|
94 |
|
|
# EXP_LIBS. Sigh.
|
95 |
|
|
|
96 |
|
|
dnl AC_PROG_CC insists on sticking crap -g and -O in CFLAGS
|
97 |
|
|
dnl but I want to control it. Can't just throw it out at the
|
98 |
|
|
dnl end alas, because the user might have defined CFLAGS.
|
99 |
|
|
dnl CYGNUS LOCAL: just use AC_PROG_CC; we don't care.
|
100 |
|
|
dnl OLD_CFLAGS=$CFLAGS
|
101 |
|
|
OLD_CFLAGS=$CFLAGS
|
102 |
|
|
AC_PROG_CC
|
103 |
|
|
CFLAGS=$OLD_CFLAGS
|
104 |
|
|
dnl CFLAGS=$OLD_CFLAGS
|
105 |
|
|
dnl END CYGNUS LOCAL
|
106 |
|
|
|
107 |
|
|
CY_AC_C_WORKS
|
108 |
|
|
|
109 |
|
|
# this'll use a BSD compatible install or our included install-sh
|
110 |
|
|
AC_PROG_INSTALL
|
111 |
|
|
|
112 |
|
|
# Tcl sets TCL_RANLIB appropriately for shared library if --enable-shared
|
113 |
|
|
AC_PROG_RANLIB
|
114 |
|
|
UNSHARED_RANLIB=$RANLIB
|
115 |
|
|
|
116 |
|
|
# these are the other subdirectories we need to configure
|
117 |
|
|
AC_CONFIG_SUBDIRS(testsuite)
|
118 |
|
|
|
119 |
|
|
# This is for LynxOS, which needs a flag to force true POSIX when
|
120 |
|
|
# building. The flag varies depending how old the compiler is.
|
121 |
|
|
# -X is for the old "cc" and "gcc" (based on 1.42)
|
122 |
|
|
# -mposix is for the new gcc (at least 2.5.8)
|
123 |
|
|
# This modifies the value of $CC to have the POSIX flag added
|
124 |
|
|
# so it'll configure correctly
|
125 |
|
|
CY_AC_TCL_LYNX_POSIX
|
126 |
|
|
|
127 |
|
|
AC_TYPE_PID_T
|
128 |
|
|
AC_RETSIGTYPE
|
129 |
|
|
dnl AC_TIME_WITH_SYS_TIME
|
130 |
|
|
AC_HEADER_TIME
|
131 |
|
|
AC_HEADER_SYS_WAIT
|
132 |
|
|
|
133 |
|
|
dnl CYGNUS LOCAL: always respect CFLAGS.
|
134 |
|
|
EXP_CFLAGS=""
|
135 |
|
|
dnl case "${host}" in
|
136 |
|
|
# Use -g on all systems but Linux where it upsets the dynamic X libraries.
|
137 |
|
|
dnl i[[3456]]86-*-linux*) EXP_CFLAGS="" ;;
|
138 |
|
|
dnl esac
|
139 |
|
|
dnl END CYGNUS LOCAL
|
140 |
|
|
EXP_CFLAGS="$EXP_CFLAGS $EXP_CYGWIN_ALTTCL"
|
141 |
|
|
|
142 |
|
|
AC_MSG_CHECKING([if running Mach])
|
143 |
|
|
mach=0
|
144 |
|
|
case "${host}" in
|
145 |
|
|
# Both Next and pure Mach behave identically with respect
|
146 |
|
|
# to a few things, so just lump them together as "mach"
|
147 |
|
|
*-*-mach*) mach=1 ;;
|
148 |
|
|
*-*-next*) mach=1 ; next=1 ;;
|
149 |
|
|
esac
|
150 |
|
|
|
151 |
|
|
if test $mach -eq 1 ; then
|
152 |
|
|
AC_MSG_RESULT(yes)
|
153 |
|
|
else
|
154 |
|
|
AC_MSG_RESULT(no)
|
155 |
|
|
fi
|
156 |
|
|
|
157 |
|
|
AC_MSG_CHECKING([if running MachTen])
|
158 |
|
|
# yet another Mach clone
|
159 |
|
|
if test -r /MachTen -a "$cross_compiling" != "yes" ; then
|
160 |
|
|
AC_MSG_RESULT(yes)
|
161 |
|
|
mach=1
|
162 |
|
|
else
|
163 |
|
|
AC_MSG_RESULT(no)
|
164 |
|
|
fi
|
165 |
|
|
|
166 |
|
|
AC_MSG_CHECKING([if on Pyramid])
|
167 |
|
|
if test -r /bin/pyr -a "$cross_compiling" != "yes" ; then
|
168 |
|
|
AC_MSG_RESULT(yes)
|
169 |
|
|
pyr=1
|
170 |
|
|
else
|
171 |
|
|
AC_MSG_RESULT(no)
|
172 |
|
|
pyr=0
|
173 |
|
|
fi
|
174 |
|
|
|
175 |
|
|
AC_MSG_CHECKING([if on Apollo])
|
176 |
|
|
if test -r /usr/apollo/bin -a "$cross_compiling" != "yes" ; then
|
177 |
|
|
AC_MSG_RESULT(yes)
|
178 |
|
|
apollo=1
|
179 |
|
|
else
|
180 |
|
|
AC_MSG_RESULT(no)
|
181 |
|
|
apollo=0
|
182 |
|
|
fi
|
183 |
|
|
|
184 |
|
|
AC_MSG_CHECKING([if on Interactive])
|
185 |
|
|
if test "x`(uname -s) 2>/dev/null`" = xIUNIX; then
|
186 |
|
|
AC_MSG_RESULT(yes)
|
187 |
|
|
iunix=1
|
188 |
|
|
else
|
189 |
|
|
AC_MSG_RESULT(no)
|
190 |
|
|
iunix=0
|
191 |
|
|
fi
|
192 |
|
|
|
193 |
|
|
AC_MSG_CHECKING([if stty reads stdout])
|
194 |
|
|
|
195 |
|
|
# On some systems stty can't be run in the background (svr4) or get it
|
196 |
|
|
# wrong because they fail to complain (next, mach), so don't attempt
|
197 |
|
|
# the test on some systems.
|
198 |
|
|
|
199 |
|
|
stty_reads_stdout=""
|
200 |
|
|
case "${host}" in
|
201 |
|
|
*-*-solaris*) stty_reads_stdout=0 ;;
|
202 |
|
|
*-*-irix*) stty_reads_stdout=0 ;;
|
203 |
|
|
*-*-sco3.2v[[45]]*) stty_reads_stdout=1 ;;
|
204 |
|
|
i[[3456]]86-*-sysv4.2MP) stty_reads_stdout=0 ;;
|
205 |
|
|
i[[3456]]86-*-linux*) stty_reads_stdout=0 ;;
|
206 |
|
|
# Not sure about old convex but 5.2 definitely reads from stdout
|
207 |
|
|
c[[12]]-*-*) stty_reads_stdout=1 ;;
|
208 |
|
|
*-*-aix[[34]]*) stty_reads_stdout=0 ;;
|
209 |
|
|
*-*-hpux9*) stty_reads_stdout=0 ;;
|
210 |
|
|
*-*-hpux10*) stty_reads_stdout=0 ;;
|
211 |
|
|
*-*-hpux11*) stty_reads_stdout=0 ;;
|
212 |
|
|
*-*-osf[[234]]*) stty_reads_stdout=0 ;;
|
213 |
|
|
*-*-ultrix4.4) stty_reads_stdout=0 ;;
|
214 |
|
|
*-*-dgux*) stty_reads_stdout=0 ;;
|
215 |
|
|
*-*-cygwin*) stty_reads_stdout=0 ;;
|
216 |
|
|
esac
|
217 |
|
|
|
218 |
|
|
if test $mach -eq 1 ; then
|
219 |
|
|
stty_reads_stdout=1
|
220 |
|
|
fi
|
221 |
|
|
if test $apollo -eq 1 ; then
|
222 |
|
|
stty_reads_stdout=1
|
223 |
|
|
fi
|
224 |
|
|
if test $pyr -eq 1 ; then
|
225 |
|
|
stty_reads_stdout=1
|
226 |
|
|
fi
|
227 |
|
|
|
228 |
|
|
# if we still don't know, test
|
229 |
|
|
if test x"${stty_reads_stdout}" = x"" ; then
|
230 |
|
|
/bin/stty > /dev/null 2> /dev/null
|
231 |
|
|
if test $? -ne 0 ; then
|
232 |
|
|
stty_reads_stdout=1
|
233 |
|
|
else
|
234 |
|
|
stty_reads_stdout=0
|
235 |
|
|
fi
|
236 |
|
|
fi
|
237 |
|
|
|
238 |
|
|
if test ${stty_reads_stdout} -eq 1 ; then
|
239 |
|
|
AC_MSG_RESULT(yes)
|
240 |
|
|
AC_DEFINE(STTY_READS_STDOUT)
|
241 |
|
|
else
|
242 |
|
|
AC_MSG_RESULT(no)
|
243 |
|
|
fi
|
244 |
|
|
|
245 |
|
|
# Solaris 2.4 and later requires __EXTENSIONS__ in order to see all sorts
|
246 |
|
|
# of traditional but nonstandard stuff in header files.
|
247 |
|
|
AC_MSG_CHECKING([if running Solaris])
|
248 |
|
|
solaris=0
|
249 |
|
|
case "${host}" in
|
250 |
|
|
*-*-solaris*) solaris=1;;
|
251 |
|
|
esac
|
252 |
|
|
|
253 |
|
|
if test $solaris -eq 1 ; then
|
254 |
|
|
AC_MSG_RESULT(yes)
|
255 |
|
|
AC_DEFINE(SOLARIS)
|
256 |
|
|
else
|
257 |
|
|
AC_MSG_RESULT(no)
|
258 |
|
|
fi
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
# On a few systems, libm.a is the same as libc.a
|
262 |
|
|
# Don't bother to test against Tcl and Tk libs, they always include -lm
|
263 |
|
|
AC_CHECK_FUNC(sin, , LIBS="${LIBS} -lm" )
|
264 |
|
|
|
265 |
|
|
# On Interactive UNIX, -Xp must be added to LIBS in order to find strftime.
|
266 |
|
|
# This test should really be done by Tcl. So just check Tcl's definition.
|
267 |
|
|
# If defective, add to all three LIBS. (It's not actually necessary for
|
268 |
|
|
# EXP_LIBS since -Xp will just be ignored the way that EXP_LIBS is used in
|
269 |
|
|
# the Makefile, but we include it for consistency.)
|
270 |
|
|
if test $iunix -eq 1 ; then
|
271 |
|
|
EXP_LIBS=$LIBS
|
272 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
273 |
|
|
AC_CHECK_FUNC(strftime, , [
|
274 |
|
|
EXP_LIBS="${LIBS} -Xp"
|
275 |
|
|
EXP_AND_TCL_LIBS="${LIBS} -Xp"
|
276 |
|
|
EXP_AND_TK_LIBS="${LIBS} -Xp"
|
277 |
|
|
])
|
278 |
|
|
LIBS=EXP_LIBS
|
279 |
|
|
fi
|
280 |
|
|
|
281 |
|
|
#
|
282 |
|
|
# Ok, lets find the tcl source trees so we can use the headers
|
283 |
|
|
#
|
284 |
|
|
CY_AC_PATH_TCLH
|
285 |
|
|
if test x"$no_tcl" = x"true" ; then
|
286 |
|
|
echo " ERROR: Can't find Tcl headers or library."
|
287 |
|
|
echo " See README for information on how to obtain Tcl."
|
288 |
|
|
echo " If Tcl is installed, see INSTALL on how to tell"
|
289 |
|
|
echo " configure where Tcl is installed."
|
290 |
|
|
exit 1
|
291 |
|
|
fi
|
292 |
|
|
CY_AC_PATH_ITCLH
|
293 |
|
|
|
294 |
|
|
# have to whether we're generating shared libs before configuring debugger
|
295 |
|
|
AC_MSG_CHECKING([if generating shared or nonshared library])
|
296 |
|
|
AC_ARG_ENABLE(shared,
|
297 |
|
|
[ --enable-shared build libexpect as a shared library],
|
298 |
|
|
[enable_shared=$enableval], [enable_shared=no])
|
299 |
|
|
if test "$enable_shared" = "yes" && test "x${TCL_SHLIB_SUFFIX}" != "x" ; then
|
300 |
|
|
AC_MSG_RESULT(both shared and unshared)
|
301 |
|
|
else
|
302 |
|
|
AC_MSG_RESULT(unshared)
|
303 |
|
|
fi
|
304 |
|
|
|
305 |
|
|
# Now that we've found the Tcl sources, configure the debugger
|
306 |
|
|
# this is a little tricky because it has its own configure script
|
307 |
|
|
# which produces a Makefile and cf file. We only want the cf file,
|
308 |
|
|
# so switch to a temporary directory and run the debugger's configure.
|
309 |
|
|
# Then save the cf file and delete the rest.
|
310 |
|
|
#
|
311 |
|
|
# Incidentally, the debugger can't depend on Expect's cf file, because
|
312 |
|
|
# the debugger is designed to be independent of Expect.
|
313 |
|
|
#
|
314 |
|
|
|
315 |
|
|
test -n "$verbose" && echo "configuring Tcl debugger"
|
316 |
|
|
tmpdir=./Dbg$$
|
317 |
|
|
mkdir ${tmpdir}
|
318 |
|
|
|
319 |
|
|
if test "${enable_shared}" = "yes"; then
|
320 |
|
|
dbg_config_flags='--enable-shared'
|
321 |
|
|
else
|
322 |
|
|
dbg_config_flags='--disable-shared'
|
323 |
|
|
fi
|
324 |
|
|
# (cd;pwd) in next several commands converts relative dirs to absolute.
|
325 |
|
|
# This is required because the debugger src is at a different level in
|
326 |
|
|
# the filesystem than Expect src (where we are presently), thereby
|
327 |
|
|
# making the relative pathnames incorrect.
|
328 |
|
|
if test "x$with_tclconfig" != "x" ; then
|
329 |
|
|
dbg_config_flags="$dbg_config_flags --with-tclconfig=`(cd ${with_tclconfig}; pwd)`"
|
330 |
|
|
fi
|
331 |
|
|
if test "x$with_tcllibdir" != "x" ; then
|
332 |
|
|
dbg_config_flags="$dbg_config_flags --with-tcllibdir=`(cd ${with_tcllibdir}; pwd)`"
|
333 |
|
|
fi
|
334 |
|
|
if test "x$with_tcllib" != "x" ; then
|
335 |
|
|
dbg_config_flags="$dbg_config_flags --with-tcllib=`(cd ${with_tcllib}; pwd)`"
|
336 |
|
|
fi
|
337 |
|
|
if test "x$with_tclinclude" != "x" ; then
|
338 |
|
|
dbg_config_flags="$dbg_config_flags --with-tclinclude=`(cd ${with_tclinclude}; pwd)`"
|
339 |
|
|
fi
|
340 |
|
|
case "$cache_file" in
|
341 |
|
|
/*)
|
342 |
|
|
dbg_config_flags="$dbg_config_flags --cache-file=$cache_file"
|
343 |
|
|
;;
|
344 |
|
|
*)
|
345 |
|
|
dbg_config_flags="$dbg_config_flags --cache-file=../$cache_file"
|
346 |
|
|
;;
|
347 |
|
|
esac
|
348 |
|
|
|
349 |
|
|
cp ${srcdir}/Dbgconfigure ${srcdir}/Dbg.h ${srcdir}/Dbg_cf.h.in ${srcdir}/install-sh ${tmpdir}
|
350 |
|
|
cp $srcdir/DbgMkfl.in ${tmpdir}/Makefile.in
|
351 |
|
|
(cd $tmpdir; ${CONFIG_SHELL-/bin/sh} Dbgconfigure --with-tclinclude=`echo ${TCLHDIR} | sed -e 's/-I//'` $dbg_config_flags)
|
352 |
|
|
cp ${tmpdir}/Dbg_cf.h .
|
353 |
|
|
rm -rf $tmpdir
|
354 |
|
|
test -n "$verbose" && echo "configured Tcl debugger"
|
355 |
|
|
|
356 |
|
|
# some people would complain if this explanation wasn't provided...
|
357 |
|
|
|
358 |
|
|
echo "Begin tests for function/library dependencies. Tests may be repeated"
|
359 |
|
|
echo "up to three times. First test is for building Expect's shared library."
|
360 |
|
|
echo "Second set is for building with Tcl. Third is for building with Tk."
|
361 |
|
|
|
362 |
|
|
######################################################################
|
363 |
|
|
# required by Sequent ptx2
|
364 |
|
|
unset ac_cv_func_gethostname
|
365 |
|
|
AC_CHECK_FUNC(gethostname, gethostname=1 , gethostname=0)
|
366 |
|
|
if test $gethostname -eq 0 ; then
|
367 |
|
|
unset ac_cv_lib_inet_gethostname
|
368 |
|
|
AC_CHECK_LIB(inet, gethostname, LIBS="$LIBS -linet")
|
369 |
|
|
fi
|
370 |
|
|
# save results and retry for Tcl
|
371 |
|
|
EXP_LIBS=$LIBS
|
372 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
373 |
|
|
unset ac_cv_func_gethostname
|
374 |
|
|
AC_CHECK_FUNC(gethostname, gethostname=1 , gethostname=0)
|
375 |
|
|
if test $gethostname -eq 0 ; then
|
376 |
|
|
unset ac_cv_lib_inet_gethostname
|
377 |
|
|
AC_CHECK_LIB(inet, gethostname, LIBS="$LIBS -linet")
|
378 |
|
|
fi
|
379 |
|
|
# save Tcl results and retry for Tk
|
380 |
|
|
EXP_AND_TCL_LIBS=$LIBS
|
381 |
|
|
LIBS=$EXP_AND_TK_LIBS
|
382 |
|
|
unset ac_cv_func_gethostname
|
383 |
|
|
AC_CHECK_FUNC(gethostname, gethostname=1 , gethostname=0)
|
384 |
|
|
if test $gethostname -eq 0 ; then
|
385 |
|
|
unset ac_cv_lib_inet_gethostname
|
386 |
|
|
AC_CHECK_LIB(inet, gethostname, LIBS="$LIBS -linet")
|
387 |
|
|
fi
|
388 |
|
|
# save Tk results and reset for Expect
|
389 |
|
|
EXP_AND_TK_LIBS=$LIBS
|
390 |
|
|
LIBS=$EXP_LIBS
|
391 |
|
|
|
392 |
|
|
######################################################################
|
393 |
|
|
# required by Fischman's ISC 4.0
|
394 |
|
|
unset ac_cv_func_socket
|
395 |
|
|
AC_CHECK_FUNC(socket, socket=1 , socket=0)
|
396 |
|
|
if test $socket -eq 0 ; then
|
397 |
|
|
unset ac_cv_lib_inet_socket
|
398 |
|
|
AC_CHECK_LIB(inet, socket, LIBS="$LIBS -linet")
|
399 |
|
|
fi
|
400 |
|
|
# save results and retry for Tcl
|
401 |
|
|
EXP_LIBS=$LIBS
|
402 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
403 |
|
|
unset ac_cv_func_socket
|
404 |
|
|
AC_CHECK_FUNC(socket, socket=1 , socket=0)
|
405 |
|
|
if test $socket -eq 0 ; then
|
406 |
|
|
unset ac_cv_lib_inet_socket
|
407 |
|
|
AC_CHECK_LIB(inet, socket, LIBS="$LIBS -linet")
|
408 |
|
|
fi
|
409 |
|
|
# save Tcl results and retry for Tk
|
410 |
|
|
EXP_AND_TCL_LIBS=$LIBS
|
411 |
|
|
LIBS=$EXP_AND_TK_LIBS
|
412 |
|
|
unset ac_cv_func_socket
|
413 |
|
|
AC_CHECK_FUNC(socket, socket=1 , socket=0)
|
414 |
|
|
if test $socket -eq 0 ; then
|
415 |
|
|
unset ac_cv_lib_inet_socket
|
416 |
|
|
AC_CHECK_LIB(inet, socket, LIBS="$LIBS -linet")
|
417 |
|
|
fi
|
418 |
|
|
# save Tk results and reset for Expect
|
419 |
|
|
EXP_AND_TK_LIBS=$LIBS
|
420 |
|
|
LIBS=$EXP_LIBS
|
421 |
|
|
|
422 |
|
|
######################################################################
|
423 |
|
|
unset ac_cv_func_select
|
424 |
|
|
AC_CHECK_FUNC(select, select=1 , select=0)
|
425 |
|
|
if test $select -eq 0 ; then
|
426 |
|
|
unset ac_cv_lib_inet_select
|
427 |
|
|
AC_CHECK_LIB(inet, select, LIBS="$LIBS -linet")
|
428 |
|
|
fi
|
429 |
|
|
# save results and retry for Tcl
|
430 |
|
|
EXP_LIBS=$LIBS
|
431 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
432 |
|
|
unset ac_cv_func_select
|
433 |
|
|
AC_CHECK_FUNC(select, select=1 , select=0)
|
434 |
|
|
if test $select -eq 0 ; then
|
435 |
|
|
unset ac_cv_lib_inet_select
|
436 |
|
|
AC_CHECK_LIB(inet, select, LIBS="$LIBS -linet")
|
437 |
|
|
fi
|
438 |
|
|
# save Tcl results and retry for Tk
|
439 |
|
|
EXP_AND_TCL_LIBS=$LIBS
|
440 |
|
|
LIBS=$EXP_AND_TK_LIBS
|
441 |
|
|
unset ac_cv_func_select
|
442 |
|
|
AC_CHECK_FUNC(select, select=1 , select=0)
|
443 |
|
|
if test $select -eq 0 ; then
|
444 |
|
|
unset ac_cv_lib_inet_select
|
445 |
|
|
AC_CHECK_LIB(inet, select, LIBS="$LIBS -linet")
|
446 |
|
|
fi
|
447 |
|
|
# save Tk results and reset for Expect
|
448 |
|
|
EXP_AND_TK_LIBS=$LIBS
|
449 |
|
|
LIBS=$EXP_LIBS
|
450 |
|
|
|
451 |
|
|
######################################################################
|
452 |
|
|
unset ac_cv_func_getpseudotty
|
453 |
|
|
AC_CHECK_FUNC(getpseudotty, getpseudotty=1 , getpseudotty=0)
|
454 |
|
|
if test $getpseudotty -eq 0 ; then
|
455 |
|
|
unset ac_cv_lib_seq_getpseudotty
|
456 |
|
|
AC_CHECK_LIB(seq, getpseudotty)
|
457 |
|
|
fi
|
458 |
|
|
# save results and retry for Tcl
|
459 |
|
|
EXP_LIBS=$LIBS
|
460 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
461 |
|
|
unset ac_cv_func_getpseudotty
|
462 |
|
|
AC_CHECK_FUNC(getpseudotty, getpseudotty=1 , getpseudotty=0)
|
463 |
|
|
if test $getpseudotty -eq 0 ; then
|
464 |
|
|
unset ac_cv_lib_seq_getpseudotty
|
465 |
|
|
AC_CHECK_LIB(seq, getpseudotty)
|
466 |
|
|
fi
|
467 |
|
|
# save Tcl results and retry for Tk
|
468 |
|
|
EXP_AND_TCL_LIBS=$LIBS
|
469 |
|
|
LIBS=$EXP_AND_TK_LIBS
|
470 |
|
|
unset ac_cv_func_getpseudotty
|
471 |
|
|
AC_CHECK_FUNC(getpseudotty, getpseudotty=1 , getpseudotty=0)
|
472 |
|
|
if test $getpseudotty -eq 0 ; then
|
473 |
|
|
unset ac_cv_lib_seq_getpseudotty
|
474 |
|
|
AC_CHECK_LIB(seq, getpseudotty)
|
475 |
|
|
fi
|
476 |
|
|
# save Tk results and reset for Expect
|
477 |
|
|
EXP_AND_TK_LIBS=$LIBS
|
478 |
|
|
LIBS=$EXP_LIBS
|
479 |
|
|
|
480 |
|
|
######################################################################
|
481 |
|
|
# Check for FreeBSD/NetBSD openpty()
|
482 |
|
|
# CYGNUS LOCAL: Don't do this on Linux. Alpha Linux Red Hat 4.2 has
|
483 |
|
|
# openpty, but it doesn't work correctly.
|
484 |
|
|
case "${host}" in
|
485 |
|
|
*-*-linux*) ;;
|
486 |
|
|
*)
|
487 |
|
|
unset ac_cv_func_openpty
|
488 |
|
|
AC_CHECK_FUNC(openpty, openpty=1 , openpty=0)
|
489 |
|
|
if test $openpty -eq 0 ; then
|
490 |
|
|
unset ac_cv_lib_util_openpty
|
491 |
|
|
AC_CHECK_LIB(util, openpty, [
|
492 |
|
|
# we only need to define OPENPTY once, but since we are overriding
|
493 |
|
|
# the default behavior, we must also handle augment LIBS too.
|
494 |
|
|
# This needn't be done in the 2nd and 3rd tests.
|
495 |
|
|
AC_DEFINE(HAVE_OPENPTY)
|
496 |
|
|
LIBS="$LIBS -lutil"
|
497 |
|
|
])
|
498 |
|
|
fi
|
499 |
|
|
# save results and retry for Tcl
|
500 |
|
|
EXP_LIBS=$LIBS
|
501 |
|
|
LIBS=$EXP_AND_TCL_LIBS
|
502 |
|
|
unset ac_cv_func_openpty
|
503 |
|
|
AC_CHECK_FUNC(openpty, openpty=1 , openpty=0)
|
504 |
|
|
if test $openpty -eq 0 ; then
|
505 |
|
|
unset ac_cv_lib_util_openpty
|
506 |
|
|
AC_CHECK_LIB(util, openpty, [
|
507 |
|
|
AC_DEFINE(HAVE_OPENPTY)
|
508 |
|
|
LIBS="$LIBS -lutil"
|
509 |
|
|
])
|
510 |
|
|
fi
|
511 |
|
|
# save Tcl results and retry for Tk
|
512 |
|
|
EXP_AND_TCL_LIBS=$LIBS
|
513 |
|
|
LIBS=$EXP_AND_TK_LIBS
|
514 |
|
|
unset ac_cv_func_openpty
|
515 |
|
|
AC_CHECK_FUNC(openpty, openpty=1 , openpty=0)
|
516 |
|
|
if test $openpty -eq 0 ; then
|
517 |
|
|
unset ac_cv_lib_util_openpty
|
518 |
|
|
AC_CHECK_LIB(util, openpty, [
|
519 |
|
|
AC_DEFINE(HAVE_OPENPTY)
|
520 |
|
|
LIBS="$LIBS -lutil"
|
521 |
|
|
])
|
522 |
|
|
fi
|
523 |
|
|
# save Tk results and reset for Expect
|
524 |
|
|
EXP_AND_TK_LIBS=$LIBS
|
525 |
|
|
LIBS=$EXP_LIBS
|
526 |
|
|
|
527 |
|
|
# CYGNUS LOCAL: Link against luser32 on Cygwin.
|
528 |
|
|
case "${host}" in
|
529 |
|
|
*-*-cygwin*) EXP_AND_TCL_LIBS="$EXP_AND_TCL_LIBS -luser32" ;;
|
530 |
|
|
esac
|
531 |
|
|
;;
|
532 |
|
|
esac
|
533 |
|
|
|
534 |
|
|
######################################################################
|
535 |
|
|
# End of library/func checking
|
536 |
|
|
######################################################################
|
537 |
|
|
|
538 |
|
|
######################################################################
|
539 |
|
|
#
|
540 |
|
|
# Look for various header files
|
541 |
|
|
#
|
542 |
|
|
AC_CHECK_HEADER(sys/sysmacros.h, AC_DEFINE(HAVE_SYSMACROS_H))
|
543 |
|
|
AC_CHECK_HEADER(stdlib.h, ,AC_DEFINE(NO_STDLIB_H))
|
544 |
|
|
|
545 |
|
|
#
|
546 |
|
|
# Look for inttypes.h. Sometimes there are data type conflicts
|
547 |
|
|
# with sys/types.h, so we have to use our own special test.
|
548 |
|
|
#
|
549 |
|
|
dnl AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H))
|
550 |
|
|
CY_AC_INTTYPES_H
|
551 |
|
|
|
552 |
|
|
# Oddly, some systems have stdarg but don't support prototypes
|
553 |
|
|
# Tcl avoids the whole issue by not using stdarg on UNIX at all!
|
554 |
|
|
dnl AC_CHECK_HEADER(stdarg.h, AC_DEFINE(HAVE_STDARG_H))
|
555 |
|
|
|
556 |
|
|
AC_CHECK_HEADER(varargs.h, AC_DEFINE(HAVE_VARARGS_H))
|
557 |
|
|
AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
|
558 |
|
|
AC_CHECK_HEADER(sys/stropts.h, AC_DEFINE(HAVE_STROPTS_H))
|
559 |
|
|
AC_CHECK_HEADER(sys/sysconfig.h, AC_DEFINE(HAVE_SYSCONF_H))
|
560 |
|
|
AC_CHECK_HEADER(sys/fcntl.h, AC_DEFINE(HAVE_SYS_FCNTL_H))
|
561 |
|
|
AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H))
|
562 |
|
|
AC_CHECK_HEADER(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
563 |
|
|
AC_CHECK_HEADER(sys/ptem.h, AC_DEFINE(HAVE_SYS_PTEM_H))
|
564 |
|
|
AC_CHECK_HEADER(sys/strredir.h, AC_DEFINE(HAVE_STRREDIR_H))
|
565 |
|
|
AC_CHECK_HEADER(sys/strpty.h, AC_DEFINE(HAVE_STRPTY_H))
|
566 |
|
|
|
567 |
|
|
dnl #echo checking for ucbinclude/sys/ioctl.h (ucb-style ioctl.h under SV)
|
568 |
|
|
dnl #if test -f /usr/ucbinclude/sys/ioctl.h ; then
|
569 |
|
|
dnl # AC_DEFINE(HAVE_UCB_IOCTL_H)
|
570 |
|
|
dnl #fi
|
571 |
|
|
|
572 |
|
|
AC_MSG_CHECKING([for sys/bsdtypes.h])
|
573 |
|
|
if test "ISC_${ISC}" = "ISC_1" ; then
|
574 |
|
|
AC_MSG_RESULT(yes)
|
575 |
|
|
# if on ISC 1, we need to get FD_SET macros
|
576 |
|
|
AC_HAVE_HEADERS(sys/bsdtypes.h)
|
577 |
|
|
else
|
578 |
|
|
AC_MSG_RESULT(no)
|
579 |
|
|
fi
|
580 |
|
|
|
581 |
|
|
#
|
582 |
|
|
# Look for functions that may be missing
|
583 |
|
|
#
|
584 |
|
|
dnl AC_CHECK_FUNC(memcpy, AC_DEFINE(HAVE_MEMCPY))
|
585 |
|
|
AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE))
|
586 |
|
|
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF))
|
587 |
|
|
AC_CHECK_FUNC(strftime, AC_DEFINE(HAVE_STRFTIME))
|
588 |
|
|
AC_CHECK_FUNC(strchr, AC_DEFINE(HAVE_STRCHR))
|
589 |
|
|
AC_CHECK_FUNC(timezone, AC_DEFINE(HAVE_TIMEZONE))
|
590 |
|
|
|
591 |
|
|
# dnl check for memcpy by hand
|
592 |
|
|
# because Unixware 2.0 handles it specially and refuses to compile
|
593 |
|
|
# autoconf's automatic test that is a call with no arguments
|
594 |
|
|
AC_MSG_CHECKING([for memcpy])
|
595 |
|
|
AC_TRY_LINK(,[
|
596 |
|
|
char *s1, *s2;
|
597 |
|
|
memcpy(s1,s2,0);
|
598 |
|
|
],
|
599 |
|
|
AC_MSG_RESULT(yes)
|
600 |
|
|
AC_DEFINE(HAVE_MEMCPY)
|
601 |
|
|
,
|
602 |
|
|
AC_MSG_RESULT(no)
|
603 |
|
|
)
|
604 |
|
|
|
605 |
|
|
# Some systems only define WNOHANG if _POSIX_SOURCE is defined
|
606 |
|
|
# The following merely tests that sys/wait.h can be included
|
607 |
|
|
# and if so that WNOHANG is not defined. The only place I've
|
608 |
|
|
# seen this is ISC.
|
609 |
|
|
AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
|
610 |
|
|
AC_TRY_RUN([
|
611 |
|
|
#include
|
612 |
|
|
main() {
|
613 |
|
|
#ifndef WNOHANG
|
614 |
|
|
return 0;
|
615 |
|
|
#else
|
616 |
|
|
return 1;
|
617 |
|
|
#endif
|
618 |
|
|
}],
|
619 |
|
|
AC_MSG_RESULT(yes)
|
620 |
|
|
AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
|
621 |
|
|
,
|
622 |
|
|
AC_MSG_RESULT(no)
|
623 |
|
|
,
|
624 |
|
|
[case "${host}" in
|
625 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
626 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
627 |
|
|
esac]
|
628 |
|
|
)
|
629 |
|
|
|
630 |
|
|
AC_MSG_CHECKING([if any value exists for WNOHANG])
|
631 |
|
|
rm -rf wnohang
|
632 |
|
|
AC_TRY_RUN([
|
633 |
|
|
#include
|
634 |
|
|
#include
|
635 |
|
|
main() {
|
636 |
|
|
#ifdef WNOHANG
|
637 |
|
|
FILE *fp = fopen("wnohang","w");
|
638 |
|
|
fprintf(fp,"%d",WNOHANG);
|
639 |
|
|
fclose(fp);
|
640 |
|
|
return 0;
|
641 |
|
|
#else
|
642 |
|
|
return 1;
|
643 |
|
|
#endif
|
644 |
|
|
}],
|
645 |
|
|
AC_MSG_RESULT(yes)
|
646 |
|
|
AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
|
647 |
|
|
rm -f wnohang
|
648 |
|
|
,
|
649 |
|
|
AC_MSG_RESULT(no)
|
650 |
|
|
AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
|
651 |
|
|
,
|
652 |
|
|
[case "${host}" in
|
653 |
|
|
*-*-cygwin*) AC_MSG_RESULT(yes)
|
654 |
|
|
AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) ;;
|
655 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
656 |
|
|
esac]
|
657 |
|
|
)
|
658 |
|
|
|
659 |
|
|
#
|
660 |
|
|
# check how signals work
|
661 |
|
|
#
|
662 |
|
|
|
663 |
|
|
# Check for the data type of the mask used in select().
|
664 |
|
|
# This picks up HP braindamage which defines fd_set and then
|
665 |
|
|
# proceeds to ignore it and use int.
|
666 |
|
|
# Pattern matching on int could be loosened.
|
667 |
|
|
# Can't use ac_header_egrep since that doesn't see prototypes with K&R cpp.
|
668 |
|
|
AC_MSG_CHECKING([mask type of select])
|
669 |
|
|
if egrep "select\(size_t, int" /usr/include/sys/time.h >/dev/null 2>&1; then
|
670 |
|
|
AC_MSG_RESULT(int)
|
671 |
|
|
AC_DEFINE(SELECT_MASK_TYPE, int)
|
672 |
|
|
else
|
673 |
|
|
AC_MSG_RESULT(none)
|
674 |
|
|
fi
|
675 |
|
|
|
676 |
|
|
dnl # Check for the data type of the function used in signal(). This
|
677 |
|
|
dnl # must be before the test for rearming.
|
678 |
|
|
dnl # echo checking return type of signal handlers
|
679 |
|
|
dnl AC_HEADER_EGREP([(void|sighandler_t).*signal], signal.h, retsigtype=void,AC_DEFINE(RETSIGTYPE, int) retsigtype=int)
|
680 |
|
|
|
681 |
|
|
# FIXME: check if alarm exists
|
682 |
|
|
AC_MSG_CHECKING([if signals need to be re-armed])
|
683 |
|
|
AC_TRY_RUN([
|
684 |
|
|
#include
|
685 |
|
|
#define RETSIGTYPE $retsigtype
|
686 |
|
|
|
687 |
|
|
int signal_rearms = 0;
|
688 |
|
|
|
689 |
|
|
RETSIGTYPE
|
690 |
|
|
child_sigint_handler(n)
|
691 |
|
|
int n;
|
692 |
|
|
{
|
693 |
|
|
}
|
694 |
|
|
|
695 |
|
|
RETSIGTYPE
|
696 |
|
|
parent_sigint_handler(n)
|
697 |
|
|
int n;
|
698 |
|
|
{
|
699 |
|
|
signal_rearms++;
|
700 |
|
|
}
|
701 |
|
|
|
702 |
|
|
main()
|
703 |
|
|
{
|
704 |
|
|
signal(SIGINT,parent_sigint_handler);
|
705 |
|
|
|
706 |
|
|
if (0 == fork()) {
|
707 |
|
|
signal(SIGINT,child_sigint_handler);
|
708 |
|
|
kill(getpid(),SIGINT);
|
709 |
|
|
kill(getpid(),SIGINT);
|
710 |
|
|
kill(getppid(),SIGINT);
|
711 |
|
|
} else {
|
712 |
|
|
int status;
|
713 |
|
|
|
714 |
|
|
wait(&status);
|
715 |
|
|
unlink("core");
|
716 |
|
|
exit(signal_rearms);
|
717 |
|
|
}
|
718 |
|
|
}],
|
719 |
|
|
AC_MSG_RESULT(yes)
|
720 |
|
|
AC_DEFINE(REARM_SIG)
|
721 |
|
|
,
|
722 |
|
|
AC_MSG_RESULT(no)
|
723 |
|
|
,
|
724 |
|
|
[case "${host}" in
|
725 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
726 |
|
|
*) AC_MSG_WARN([Expect can't be cross compiled]) ;;
|
727 |
|
|
esac]
|
728 |
|
|
)
|
729 |
|
|
|
730 |
|
|
# HPUX7 has trouble with the big cat so split it
|
731 |
|
|
# Owen Rees 29Mar93
|
732 |
|
|
SEDDEFS="${SEDDEFS}CONFEOF
|
733 |
|
|
cat >> conftest.sed <
|
734 |
|
|
"
|
735 |
|
|
#
|
736 |
|
|
|
737 |
|
|
# There are multiple versions of getpty, alas.
|
738 |
|
|
# I don't remember who has the first one, but Convex just added one
|
739 |
|
|
# so check for it. Unfortunately, there is no header so the only
|
740 |
|
|
# reasonable way to make sure is to look it we are on a Convex.
|
741 |
|
|
AC_MSG_CHECKING([if on Convex])
|
742 |
|
|
convex=0
|
743 |
|
|
case "${host}" in
|
744 |
|
|
c[[12]]-*-*) convex=1;;
|
745 |
|
|
esac
|
746 |
|
|
|
747 |
|
|
if test $convex -eq 1 ; then
|
748 |
|
|
AC_MSG_RESULT(yes)
|
749 |
|
|
AC_DEFINE(CONVEX)
|
750 |
|
|
else
|
751 |
|
|
AC_MSG_RESULT(no)
|
752 |
|
|
fi
|
753 |
|
|
|
754 |
|
|
EXP_LDFLAGS=
|
755 |
|
|
|
756 |
|
|
AC_MSG_CHECKING([if on NeXT])
|
757 |
|
|
if test -r /NextApps -a "$cross_compiling" != "yes" ; then
|
758 |
|
|
AC_MSG_RESULT(yes)
|
759 |
|
|
# "-m" flag suppresses complaints about multiple strtod
|
760 |
|
|
EXP_LDFLAGS="$EXP_LDFLAGS -m"
|
761 |
|
|
else
|
762 |
|
|
AC_MSG_RESULT(no)
|
763 |
|
|
fi
|
764 |
|
|
|
765 |
|
|
|
766 |
|
|
AC_MSG_CHECKING([if on HP])
|
767 |
|
|
if test "x`(uname) 2>/dev/null`" = xHP-UX; then
|
768 |
|
|
AC_MSG_RESULT(yes)
|
769 |
|
|
hp=1
|
770 |
|
|
else
|
771 |
|
|
AC_MSG_RESULT(no)
|
772 |
|
|
hp=0
|
773 |
|
|
fi
|
774 |
|
|
|
775 |
|
|
AC_MSG_CHECKING([sane default stty arguments])
|
776 |
|
|
DEFAULT_STTY_ARGS="sane"
|
777 |
|
|
|
778 |
|
|
if test $mach -eq 1 ; then
|
779 |
|
|
DEFAULT_STTY_ARGS="cooked"
|
780 |
|
|
fi
|
781 |
|
|
|
782 |
|
|
if test $hp -eq 1 ; then
|
783 |
|
|
DEFAULT_STTY_ARGS="sane kill "
|
784 |
|
|
fi
|
785 |
|
|
|
786 |
|
|
AC_MSG_RESULT($DEFAULT_STTY_ARG)
|
787 |
|
|
|
788 |
|
|
# Look for various features to determine what kind of pty
|
789 |
|
|
# we have. For some weird reason, ac_compile_check would not
|
790 |
|
|
# work, but ac_test_program does.
|
791 |
|
|
#
|
792 |
|
|
AC_MSG_CHECKING([for HP style pty allocation])
|
793 |
|
|
# following test fails on DECstations and other things that don't grok -c
|
794 |
|
|
# but that's ok, since they don't have PTYMs anyway
|
795 |
|
|
if test -r /dev/ptym/ptyp0 2>/dev/null -a "$cross_compiling" != "yes" ; then
|
796 |
|
|
AC_MSG_RESULT(yes)
|
797 |
|
|
AC_DEFINE(HAVE_PTYM)
|
798 |
|
|
else
|
799 |
|
|
AC_MSG_RESULT(no)
|
800 |
|
|
fi
|
801 |
|
|
|
802 |
|
|
AC_MSG_CHECKING([for HP style pty trapping])
|
803 |
|
|
AC_HEADER_EGREP([struct.*request_info], sys/ptyio.h,
|
804 |
|
|
AC_MSG_RESULT(yes)
|
805 |
|
|
AC_DEFINE(HAVE_PTYTRAP)
|
806 |
|
|
,
|
807 |
|
|
AC_MSG_RESULT(no)
|
808 |
|
|
)
|
809 |
|
|
|
810 |
|
|
AC_MSG_CHECKING([for AIX new-style pty allocation])
|
811 |
|
|
if test -r /dev/ptc -a -r /dev/pts -a "$cross_compiling" != "yes" ; then
|
812 |
|
|
AC_MSG_RESULT(yes)
|
813 |
|
|
AC_DEFINE(HAVE_PTC_PTS)
|
814 |
|
|
else
|
815 |
|
|
AC_MSG_RESULT(no)
|
816 |
|
|
fi
|
817 |
|
|
|
818 |
|
|
AC_MSG_CHECKING([for SGI old-style pty allocation])
|
819 |
|
|
if test -r /dev/ptc -a ! -r /dev/pts -a "$cross_compiling" != "yes" ; then
|
820 |
|
|
AC_MSG_RESULT(yes)
|
821 |
|
|
AC_DEFINE(HAVE_PTC)
|
822 |
|
|
else
|
823 |
|
|
AC_MSG_RESULT(no)
|
824 |
|
|
fi
|
825 |
|
|
|
826 |
|
|
# On SCO OpenServer, two types of ptys are available: SVR4 streams and c-list.
|
827 |
|
|
# The library routines to open the SVR4 ptys are broken on certain systems and
|
828 |
|
|
# the SCO command to increase the number of ptys only configure c-list ones
|
829 |
|
|
# anyway. So we chose these, which have a special numbering scheme.
|
830 |
|
|
#
|
831 |
|
|
AC_MSG_CHECKING([for SCO style pty allocation])
|
832 |
|
|
sco_ptys=""
|
833 |
|
|
case "${host}" in
|
834 |
|
|
*-sco3.2v[[45]]*) sco_clist_ptys=1 svr4_ptys_broken=1;;
|
835 |
|
|
esac
|
836 |
|
|
|
837 |
|
|
if test x"${sco_clist_ptys}" != x"" ; then
|
838 |
|
|
AC_MSG_RESULT(yes)
|
839 |
|
|
AC_DEFINE(HAVE_SCO_CLIST_PTYS)
|
840 |
|
|
else
|
841 |
|
|
AC_MSG_RESULT(no)
|
842 |
|
|
fi
|
843 |
|
|
|
844 |
|
|
AC_MSG_CHECKING([for SVR4 style pty allocation])
|
845 |
|
|
if test -r /dev/ptmx -a "x$svr4_ptys_broken" = x -a "$cross_compiling" != "yes" ; then
|
846 |
|
|
AC_MSG_RESULT(yes)
|
847 |
|
|
AC_DEFINE(HAVE_PTMX)
|
848 |
|
|
# aargg. Some systems need libpt.a to use /dev/ptmx
|
849 |
|
|
AC_CHECK_FUNC(ptsname, , LIBS="${LIBS} -lpt")
|
850 |
|
|
# I've never seen Tcl or Tk include -lpt so don't bother with explicit test
|
851 |
|
|
AC_CHECK_FUNC(ptsname, , EXP_AND_TCL_LIBS="${EXP_AND_TCL_LIBS} -lpt")
|
852 |
|
|
AC_CHECK_FUNC(ptsname, , EXP_AND_TK_LIBS="${EXP_AND_TK_LIBS} -lpt")
|
853 |
|
|
# CYGNUS LOCAL: IA-64
|
854 |
|
|
# On some systems (e.g., IA-64 Linux), we need to define _XOPEN_SOURCE
|
855 |
|
|
# in order to get a declaration for ptsname. It is safe to simply
|
856 |
|
|
# define that whenever we are using ptsname.
|
857 |
|
|
AC_MSG_CHECKING([for NSIG definition with _XOPEN_SOURCE])
|
858 |
|
|
AC_TRY_COMPILE([
|
859 |
|
|
/* _XOPEN_SOURCE can remove NSIG on UnixWare or OSF/1. */
|
860 |
|
|
#define _XOPEN_SOURCE
|
861 |
|
|
#include
|
862 |
|
|
char junk[NSIG];],
|
863 |
|
|
[],
|
864 |
|
|
AC_DEFINE(_XOPEN_SOURCE)
|
865 |
|
|
AC_MSG_RESULT(yes)
|
866 |
|
|
,
|
867 |
|
|
AC_MSG_RESULT(no)
|
868 |
|
|
,
|
869 |
|
|
)
|
870 |
|
|
# END CYGNUS LOCAL
|
871 |
|
|
else
|
872 |
|
|
AC_MSG_RESULT(no)
|
873 |
|
|
fi
|
874 |
|
|
|
875 |
|
|
# In OSF/1 case, SVR4 are somewhat different.
|
876 |
|
|
# Gregory Depp 17Aug93
|
877 |
|
|
AC_MSG_CHECKING([for OSF/1 style pty allocation])
|
878 |
|
|
if test -r /dev/ptmx_bsd -a "$cross_compiling" != "yes" ; then
|
879 |
|
|
AC_DEFINE(HAVE_PTMX_BSD)
|
880 |
|
|
AC_MSG_RESULT(yes)
|
881 |
|
|
else
|
882 |
|
|
AC_MSG_RESULT(no)
|
883 |
|
|
fi
|
884 |
|
|
|
885 |
|
|
# Set the pty handling for Cygwin
|
886 |
|
|
case "${host}" in
|
887 |
|
|
*-*-cygwin*) AC_DEFINE(HAVE_PTMX) ;;
|
888 |
|
|
*) ;;
|
889 |
|
|
esac
|
890 |
|
|
|
891 |
|
|
tcgetattr=0
|
892 |
|
|
tcsetattr=0
|
893 |
|
|
AC_CHECK_FUNC(tcgetattr, tcgetattr=1)
|
894 |
|
|
AC_CHECK_FUNC(tcsetattr, tcsetattr=1)
|
895 |
|
|
if test $tcgetattr -eq 1 -a $tcsetattr -eq 1 ; then
|
896 |
|
|
AC_DEFINE(HAVE_TCSETATTR)
|
897 |
|
|
AC_DEFINE(POSIX)
|
898 |
|
|
fi
|
899 |
|
|
|
900 |
|
|
# first check for the pure bsd
|
901 |
|
|
AC_MSG_CHECKING([for struct sgttyb])
|
902 |
|
|
AC_TRY_RUN([
|
903 |
|
|
#include
|
904 |
|
|
main()
|
905 |
|
|
{
|
906 |
|
|
struct sgttyb tmp;
|
907 |
|
|
exit(0);
|
908 |
|
|
}],
|
909 |
|
|
AC_MSG_RESULT(yes)
|
910 |
|
|
AC_DEFINE(HAVE_SGTTYB)
|
911 |
|
|
PTY_TYPE=sgttyb
|
912 |
|
|
,
|
913 |
|
|
AC_MSG_RESULT(no)
|
914 |
|
|
,
|
915 |
|
|
[case "${host}" in
|
916 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
917 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
918 |
|
|
esac]
|
919 |
|
|
)
|
920 |
|
|
|
921 |
|
|
# mach systems have include files for unimplemented features
|
922 |
|
|
# so avoid doing following test on those systems
|
923 |
|
|
if test $mach -eq 0 ; then
|
924 |
|
|
|
925 |
|
|
# next check for the older style ttys
|
926 |
|
|
# note that if we detect termio.h (only), we still set PTY_TYPE=termios
|
927 |
|
|
# since that just controls which of pty_XXXX.c file is use and
|
928 |
|
|
# pty_termios.c is set up to handle pty_termio.
|
929 |
|
|
AC_MSG_CHECKING([for struct termio])
|
930 |
|
|
AC_TRY_RUN([#include
|
931 |
|
|
main()
|
932 |
|
|
{
|
933 |
|
|
struct termio tmp;
|
934 |
|
|
exit(0);
|
935 |
|
|
}],
|
936 |
|
|
AC_DEFINE(HAVE_TERMIO)
|
937 |
|
|
PTY_TYPE=termios
|
938 |
|
|
AC_MSG_RESULT(yes)
|
939 |
|
|
,
|
940 |
|
|
AC_MSG_RESULT(no)
|
941 |
|
|
,
|
942 |
|
|
[case "${host}" in
|
943 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
944 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
945 |
|
|
esac]
|
946 |
|
|
)
|
947 |
|
|
|
948 |
|
|
# now check for the new style ttys (not yet posix)
|
949 |
|
|
AC_MSG_CHECKING([for struct termios])
|
950 |
|
|
AC_TRY_RUN([
|
951 |
|
|
# ifdef HAVE_INTTYPES_H
|
952 |
|
|
# include
|
953 |
|
|
# endif
|
954 |
|
|
# include
|
955 |
|
|
main()
|
956 |
|
|
{
|
957 |
|
|
struct termios tmp;
|
958 |
|
|
exit(0);
|
959 |
|
|
}],
|
960 |
|
|
AC_DEFINE(HAVE_TERMIOS)
|
961 |
|
|
PTY_TYPE=termios
|
962 |
|
|
AC_MSG_RESULT(yes)
|
963 |
|
|
,
|
964 |
|
|
AC_MSG_RESULT(no)
|
965 |
|
|
,
|
966 |
|
|
[case "${host}" in
|
967 |
|
|
*-*-cygwin*) AC_DEFINE(HAVE_TERMIOS)
|
968 |
|
|
PTY_TYPE=termios
|
969 |
|
|
AC_MSG_RESULT(yes) ;;
|
970 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
971 |
|
|
esac]
|
972 |
|
|
)
|
973 |
|
|
fi
|
974 |
|
|
|
975 |
|
|
AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
|
976 |
|
|
AC_TRY_RUN([
|
977 |
|
|
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
|
978 |
|
|
#ifdef HAVE_INTTYPES_H
|
979 |
|
|
#include
|
980 |
|
|
#endif
|
981 |
|
|
#include
|
982 |
|
|
main() {
|
983 |
|
|
#if defined(TCGETS) || defined(TCGETA)
|
984 |
|
|
return 0;
|
985 |
|
|
#else
|
986 |
|
|
return 1;
|
987 |
|
|
#endif
|
988 |
|
|
}],
|
989 |
|
|
AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
|
990 |
|
|
AC_MSG_RESULT(yes)
|
991 |
|
|
,
|
992 |
|
|
AC_MSG_RESULT(no)
|
993 |
|
|
,
|
994 |
|
|
[case "${host}" in
|
995 |
|
|
*-*-cygwin*) AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
|
996 |
|
|
AC_MSG_RESULT(yes) ;;
|
997 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
998 |
|
|
esac]
|
999 |
|
|
)
|
1000 |
|
|
|
1001 |
|
|
AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
|
1002 |
|
|
AC_TRY_RUN([
|
1003 |
|
|
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
|
1004 |
|
|
#ifdef HAVE_INTTYPES_H
|
1005 |
|
|
#include
|
1006 |
|
|
#endif
|
1007 |
|
|
#include
|
1008 |
|
|
main() {
|
1009 |
|
|
#ifdef TIOCGWINSZ
|
1010 |
|
|
return 0;
|
1011 |
|
|
#else
|
1012 |
|
|
return 1;
|
1013 |
|
|
#endif
|
1014 |
|
|
}],
|
1015 |
|
|
AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
|
1016 |
|
|
AC_MSG_RESULT(yes)
|
1017 |
|
|
,
|
1018 |
|
|
AC_MSG_RESULT(no)
|
1019 |
|
|
,
|
1020 |
|
|
[case "${host}" in
|
1021 |
|
|
*-*-cygwin*) AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
|
1022 |
|
|
AC_MSG_RESULT(yes) ;;
|
1023 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
1024 |
|
|
esac]
|
1025 |
|
|
)
|
1026 |
|
|
|
1027 |
|
|
# finally check for Cray style ttys
|
1028 |
|
|
AC_MSG_CHECKING([for Cray-style ptys])
|
1029 |
|
|
SETUID=":"
|
1030 |
|
|
AC_TRY_RUN([
|
1031 |
|
|
main(){
|
1032 |
|
|
#ifdef CRAY
|
1033 |
|
|
return 0;
|
1034 |
|
|
#else
|
1035 |
|
|
return 1;
|
1036 |
|
|
#endif
|
1037 |
|
|
}
|
1038 |
|
|
],
|
1039 |
|
|
PTY_TYPE=unicos
|
1040 |
|
|
SETUID="chmod u+s"
|
1041 |
|
|
AC_MSG_RESULT(yes)
|
1042 |
|
|
,
|
1043 |
|
|
AC_MSG_RESULT(no)
|
1044 |
|
|
,
|
1045 |
|
|
[case "${host}" in
|
1046 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
1047 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
1048 |
|
|
esac]
|
1049 |
|
|
)
|
1050 |
|
|
|
1051 |
|
|
#
|
1052 |
|
|
# Check for select and/or poll. If both exist, we prefer select.
|
1053 |
|
|
# if neither exists, define SIMPLE_EVENT.
|
1054 |
|
|
#
|
1055 |
|
|
select=0
|
1056 |
|
|
poll=0
|
1057 |
|
|
unset ac_cv_func_select
|
1058 |
|
|
AC_CHECK_FUNC(select, select=1)
|
1059 |
|
|
AC_CHECK_FUNC(poll, poll=1)
|
1060 |
|
|
AC_MSG_CHECKING([event handling])
|
1061 |
|
|
if test $select -eq 1 ; then
|
1062 |
|
|
EVENT_TYPE=select
|
1063 |
|
|
EVENT_ABLE=event
|
1064 |
|
|
AC_MSG_RESULT(via select)
|
1065 |
|
|
elif test $poll -eq 1 ; then
|
1066 |
|
|
EVENT_TYPE=poll
|
1067 |
|
|
EVENT_ABLE=event
|
1068 |
|
|
AC_MSG_RESULT(via poll)
|
1069 |
|
|
else
|
1070 |
|
|
EVENT_TYPE=simple
|
1071 |
|
|
EVENT_ABLE=noevent
|
1072 |
|
|
AC_MSG_RESULT(none)
|
1073 |
|
|
AC_DEFINE(SIMPLE_EVENT)
|
1074 |
|
|
fi
|
1075 |
|
|
|
1076 |
|
|
AC_HAVE_FUNCS(_getpty)
|
1077 |
|
|
AC_HAVE_FUNCS(getpty)
|
1078 |
|
|
|
1079 |
|
|
#
|
1080 |
|
|
# check for timezones
|
1081 |
|
|
#
|
1082 |
|
|
AC_MSG_CHECKING([for SV-style timezone])
|
1083 |
|
|
AC_TRY_RUN([
|
1084 |
|
|
extern char *tzname[2];
|
1085 |
|
|
extern int daylight;
|
1086 |
|
|
main()
|
1087 |
|
|
{
|
1088 |
|
|
int *x = &daylight;
|
1089 |
|
|
char **y = tzname;
|
1090 |
|
|
|
1091 |
|
|
exit(0);
|
1092 |
|
|
}],
|
1093 |
|
|
AC_DEFINE(HAVE_SV_TIMEZONE)
|
1094 |
|
|
AC_MSG_RESULT(yes),
|
1095 |
|
|
AC_MSG_RESULT(no)
|
1096 |
|
|
,
|
1097 |
|
|
[case "${host}" in
|
1098 |
|
|
*-*-cygwin*) AC_MSG_RESULT(no) ;;
|
1099 |
|
|
*) AC_MSG_ERROR([Expect can't be cross compiled]) ;;
|
1100 |
|
|
esac]
|
1101 |
|
|
)
|
1102 |
|
|
|
1103 |
|
|
# only look for Tk stuff if we have X11 and user doesn't say not to
|
1104 |
|
|
AC_ARG_WITH(x, [ --with-x whether or not to use X (default yes)], , with_x=yes)
|
1105 |
|
|
if test "$with_x" = "no"; then
|
1106 |
|
|
no_tk=true
|
1107 |
|
|
else
|
1108 |
|
|
CY_AC_PATH_TKH
|
1109 |
|
|
fi
|
1110 |
|
|
if test x"$no_tk" != x"true" ; then
|
1111 |
|
|
# libexpectk no longer exists
|
1112 |
|
|
# X_PROGS="expectk \$(LIBEXPECTK)"
|
1113 |
|
|
X_PROGS=expectk
|
1114 |
|
|
# should really generate following symbol, but I'm hitting configure's limit on substs.
|
1115 |
|
|
X_PROGS_INSTALLED=expectk_installed
|
1116 |
|
|
else
|
1117 |
|
|
X_PROGS="# no X support on this system"
|
1118 |
|
|
AC_MSG_WARN([No X based programs will be built])
|
1119 |
|
|
echo " WARNING: Can't find Tk headers or library. You can still"
|
1120 |
|
|
echo " build expect, but not expectk. See Expect's README for"
|
1121 |
|
|
echo " information on how to obtain Tk. If Tk is installed, see"
|
1122 |
|
|
echo " Expect's INSTALL on how to tell configure where Tk is"
|
1123 |
|
|
echo " installed."
|
1124 |
|
|
fi
|
1125 |
|
|
|
1126 |
|
|
# consume these flags so that user can invoke Expect's configure with
|
1127 |
|
|
# the same command as Tcl's configure
|
1128 |
|
|
AC_ARG_ENABLE(load,
|
1129 |
|
|
[ --disable-load disallow dynamic loading],
|
1130 |
|
|
[disable_dl=$enableval], [disable_dl=no])
|
1131 |
|
|
|
1132 |
|
|
AC_ARG_ENABLE(gcc,
|
1133 |
|
|
[ --enable-gcc allow use of gcc if available],
|
1134 |
|
|
[enable_gcc=$enableval], [enable_gcc=no])
|
1135 |
|
|
|
1136 |
|
|
|
1137 |
|
|
# Following comment stolen from Tcl's configure.in:
|
1138 |
|
|
# Note: in the following variable, it's important to use the absolute
|
1139 |
|
|
# path name of the Tcl directory rather than "..": this is because
|
1140 |
|
|
# AIX remembers this path and will attempt to use it at run-time to look
|
1141 |
|
|
# up the Tcl library.
|
1142 |
|
|
|
1143 |
|
|
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
|
1144 |
|
|
EXP_LIB_VERSION=$EXP_VERSION
|
1145 |
|
|
else
|
1146 |
|
|
EXP_LIB_VERSION=$EXP_VERSION_NODOTS
|
1147 |
|
|
fi
|
1148 |
|
|
if test $iunix -eq 1 ; then
|
1149 |
|
|
EXP_LIB_VERSION=$EXP_VERSION_NODOTS
|
1150 |
|
|
fi
|
1151 |
|
|
|
1152 |
|
|
# also remove dots on systems that don't support filenames > 14
|
1153 |
|
|
# (are there systems which support shared libs and restrict filename lengths!?)
|
1154 |
|
|
AC_SYS_LONG_FILE_NAMES
|
1155 |
|
|
if test $ac_cv_sys_long_file_names = no; then
|
1156 |
|
|
EXP_LIB_VERSION=$EXP_VERSION_NODOTS
|
1157 |
|
|
fi
|
1158 |
|
|
|
1159 |
|
|
EXP_BUILD_LIB_SPEC="-L`pwd` -lexpect${EXP_LIB_VERSION}"
|
1160 |
|
|
EXP_LIB_SPEC="-L\${exec_prefix}/lib -lexpect${EXP_LIB_VERSION}"
|
1161 |
|
|
EXP_UNSHARED_LIB_FILE=libexpect${EXP_LIB_VERSION}.a
|
1162 |
|
|
EXP_BUILD_LIB_SPEC=${EXP_UNSHARED_LIB_FILE}
|
1163 |
|
|
|
1164 |
|
|
AC_MSG_CHECKING([for type of library to build])
|
1165 |
|
|
if test "$enable_shared" = "yes" && test "x${TCL_SHLIB_SUFFIX}" != "x" ; then
|
1166 |
|
|
EXP_SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
|
1167 |
|
|
# EXP_SHARED_LIB_FILE=libexpect$EXP_LIB_VERSION$TCL_SHLIB_SUFFIX
|
1168 |
|
|
eval "EXP_SHARED_LIB_FILE=libexpect${TCL_SHARED_LIB_SUFFIX}"
|
1169 |
|
|
EXP_LIB_FILE=$EXP_SHARED_LIB_FILE
|
1170 |
|
|
EXP_LIB_FILES="$EXP_SHARED_LIB_FILE $EXP_UNSHARED_LIB_FILE"
|
1171 |
|
|
AC_MSG_RESULT(both shared and unshared)
|
1172 |
|
|
else
|
1173 |
|
|
EXP_SHLIB_CFLAGS=
|
1174 |
|
|
EXP_SHARED_LIB_FILE="reconfigure_Tcl_for_shared_library"
|
1175 |
|
|
EXP_LIB_FILE=$EXP_UNSHARED_LIB_FILE
|
1176 |
|
|
EXP_LIB_FILES="$EXP_UNSHARED_LIB_FILE"
|
1177 |
|
|
AC_MSG_RESULT(unshared)
|
1178 |
|
|
fi
|
1179 |
|
|
|
1180 |
|
|
# CYGNUS LOCAL
|
1181 |
|
|
# We always link expect statically (against $EXP_UNSHARED_LIB_FILE)
|
1182 |
|
|
# so we can run it out of the build directory without hurting
|
1183 |
|
|
# ourselves and others.
|
1184 |
|
|
dnl EXP_LIB_FILE=$EXP_UNSHARED_LIB_FILE
|
1185 |
|
|
|
1186 |
|
|
# now broken out into EXP_AND_TCL_LIBS and EXP_AND_TK_LIBS. Had to do this
|
1187 |
|
|
# in order to avoid repeating lib specs to which some systems object.
|
1188 |
|
|
EXP_AND_TCL_LIBS="$EXP_AND_TCL_LIBS $TCL_LD_SEARCH_FLAGS"
|
1189 |
|
|
EXP_AND_TK_LIBS="$EXP_AND_TK_LIBS $TCL_LD_SEARCH_FLAGS"
|
1190 |
|
|
|
1191 |
|
|
# Sigh - Tcl defines SHLIB_LD_LIBS to be either empty or ${LIBS} and
|
1192 |
|
|
# LIBS is intended to be expanded by Make. But since we're too close
|
1193 |
|
|
# to hitting config's max symbols, pack everything together here and
|
1194 |
|
|
# do test ourselves. Ugh.
|
1195 |
|
|
#
|
1196 |
|
|
if test "x$TCL_SHLIB_LD_LIBS" = "x" ; then
|
1197 |
|
|
EXP_SHLIB_LD_LIBS=""
|
1198 |
|
|
else
|
1199 |
|
|
# seems a little strange to build in Tcl's build-lib, but
|
1200 |
|
|
# that's what Tk does.
|
1201 |
|
|
EXP_SHLIB_LD_LIBS="$TCL_BUILD_LIB_SPEC $TCL_DL_LIBS $LIBS -lc"
|
1202 |
|
|
fi
|
1203 |
|
|
|
1204 |
|
|
dnl CYGNUS LOCAL
|
1205 |
|
|
dnl check for win32 dependencies
|
1206 |
|
|
CY_AC_CYGWIN32
|
1207 |
|
|
CY_AC_EXEEXT
|
1208 |
|
|
|
1209 |
|
|
#--------------------------------------------------------------------
|
1210 |
|
|
# This section is based on analogous thing in Tk installation. - DEL
|
1211 |
|
|
# Various manipulations on the search path used at runtime to
|
1212 |
|
|
# find shared libraries:
|
1213 |
|
|
# 2. On systems such as AIX and Ultrix that use "-L" as the
|
1214 |
|
|
# search path option, colons cannot be used to separate
|
1215 |
|
|
# directories from each other. Change colons to " -L".
|
1216 |
|
|
# 3. Create two sets of search flags, one for use in cc lines
|
1217 |
|
|
# and the other for when the linker is invoked directly. In
|
1218 |
|
|
# the second case, '-Wl,' must be stripped off and commas must
|
1219 |
|
|
# be replaced by spaces.
|
1220 |
|
|
#--------------------------------------------------------------------
|
1221 |
|
|
|
1222 |
|
|
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
|
1223 |
|
|
|
1224 |
|
|
# If Tcl and Expect are installed in different places, adjust the library
|
1225 |
|
|
# search path to reflect this.
|
1226 |
|
|
|
1227 |
|
|
if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
|
1228 |
|
|
LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}"
|
1229 |
|
|
fi
|
1230 |
|
|
|
1231 |
|
|
if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
|
1232 |
|
|
LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
|
1233 |
|
|
fi
|
1234 |
|
|
|
1235 |
|
|
# The statement below is very tricky! It actually *evaluates* the
|
1236 |
|
|
# string in TCL_LD_SEARCH_FLAGS, which causes a substitution of the
|
1237 |
|
|
# variable LIB_RUNTIME_DIR.
|
1238 |
|
|
|
1239 |
|
|
eval "EXP_CC_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""
|
1240 |
|
|
if test "$GCC" = yes; then
|
1241 |
|
|
true
|
1242 |
|
|
else
|
1243 |
|
|
EXP_LD_SEARCH_FLAGS=`echo ${EXP_CC_SEARCH_FLAGS} |sed -e "s|-Wl,||g" -e "s|,| |g"`
|
1244 |
|
|
fi
|
1245 |
|
|
|
1246 |
|
|
#
|
1247 |
|
|
# Set up makefile substitutions
|
1248 |
|
|
#
|
1249 |
|
|
AC_SUBST(EXP_MAJOR_VERSION)
|
1250 |
|
|
AC_SUBST(EXP_MINOR_VERSION)
|
1251 |
|
|
AC_SUBST(EXP_MICRO_VERSION)
|
1252 |
|
|
AC_SUBST(EXP_VERSION_FULL)
|
1253 |
|
|
AC_SUBST(EXP_VERSION)
|
1254 |
|
|
AC_SUBST(CC)
|
1255 |
|
|
AC_SUBST(EXP_CONFIG_SHELL)
|
1256 |
|
|
AC_SUBST(EXP_SHARED_LIB_FILE)
|
1257 |
|
|
AC_SUBST(EXP_UNSHARED_LIB_FILE)
|
1258 |
|
|
AC_SUBST(EXP_SHLIB_CFLAGS)
|
1259 |
|
|
AC_SUBST(EXP_LIB_FILE)
|
1260 |
|
|
AC_SUBST(EXP_LIB_FILES)
|
1261 |
|
|
AC_SUBST(EXP_BUILD_LIB_SPEC)
|
1262 |
|
|
AC_SUBST(EXP_LIB_SPEC)
|
1263 |
|
|
AC_SUBST(EXP_CFLAGS)
|
1264 |
|
|
AC_SUBST(EXP_LDFLAGS)
|
1265 |
|
|
AC_SUBST(EXP_LD_SEARCH_FLAGS)
|
1266 |
|
|
AC_SUBST(EXP_AND_TCL_LIBS)
|
1267 |
|
|
AC_SUBST(EXP_AND_TK_LIBS)
|
1268 |
|
|
AC_SUBST(EXP_SHLIB_LD_LIBS)
|
1269 |
|
|
AC_SUBST(X_PROGS)
|
1270 |
|
|
AC_SUBST(PTY_TYPE)
|
1271 |
|
|
AC_SUBST(EVENT_TYPE)
|
1272 |
|
|
AC_SUBST(EVENT_ABLE)
|
1273 |
|
|
AC_SUBST(SETUID)
|
1274 |
|
|
AC_SUBST(UNSHARED_RANLIB)
|
1275 |
|
|
AC_SUBST(DEFAULT_STTY_ARGS)
|
1276 |
|
|
AC_OUTPUT(Makefile pkgIndex)
|