1 | dnl Run autoconf on this file to produce the system configuration |
---|
2 | dnl script "configure" |
---|
3 | |
---|
4 | # FileName [ configure.in ] |
---|
5 | # |
---|
6 | # PackageName [ vis ] |
---|
7 | # |
---|
8 | # Synopsis [ System configuration script for autoconf ] |
---|
9 | # |
---|
10 | # SeeAlso [ Makefile.in ] |
---|
11 | # |
---|
12 | # Author [ Stephen Edwards <sedwards@eecs.berkeley.edu> ] |
---|
13 | # |
---|
14 | # Copyright [ |
---|
15 | # Copyright (c) 1994-1996 The Regents of the Univ. of California. |
---|
16 | # All rights reserved. |
---|
17 | # |
---|
18 | # Permission is hereby granted, without written agreement and without license |
---|
19 | # or royalty fees, to use, copy, modify, and distribute this software and its |
---|
20 | # documentation for any purpose, provided that the above copyright notice and |
---|
21 | # the following two paragraphs appear in all copies of this software. |
---|
22 | # |
---|
23 | # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR |
---|
24 | # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT |
---|
25 | # OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF |
---|
26 | # CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
27 | # |
---|
28 | # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, |
---|
29 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
---|
30 | # FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN |
---|
31 | # "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE |
---|
32 | # MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
---|
33 | # ] |
---|
34 | # |
---|
35 | # Revision [$Id: configure.in,v 1.62 2004/08/20 18:31:32 fabio Exp $] |
---|
36 | |
---|
37 | # Require autoconf version 2.11 or above -- it checks to see if the C |
---|
38 | # compiler actually works! |
---|
39 | |
---|
40 | AC_PREREQ(2.11) |
---|
41 | |
---|
42 | AC_INIT(src/cmd/cmd.h) |
---|
43 | |
---|
44 | # Look for install.sh, config.guess, and config.sub in the "helpers" dir |
---|
45 | AC_CONFIG_AUX_DIR(helpers) |
---|
46 | |
---|
47 | #---------------------------------------------------------------------- |
---|
48 | |
---|
49 | # Configuration options |
---|
50 | #---------------------------------------------------------------------- |
---|
51 | |
---|
52 | # Give the configurer a chance to set the location of the GLU tree |
---|
53 | |
---|
54 | AC_SUBST(glulibdir) |
---|
55 | AC_ARG_WITH(glu-libdir, |
---|
56 | [ --with-glu-libdir=<libdir> Specify directories to search for the GLU library. |
---|
57 | Expects to find <libdir>/libglu.a], |
---|
58 | [glulibdir=$withval], [glulibdir=""]) |
---|
59 | |
---|
60 | AC_SUBST(gluincdir) |
---|
61 | AC_ARG_WITH(glu-incdir, |
---|
62 | [ --with-glu-incdir=<incdir> Specify directories to search for the GLU headers], |
---|
63 | [gluincdir=$withval], [gluincdir=""]) |
---|
64 | |
---|
65 | # Give the configurer a chance to set a different location for the VIS |
---|
66 | # headers and library |
---|
67 | |
---|
68 | AC_SUBST(vislibdir) |
---|
69 | AC_ARG_WITH(vis-libdir, |
---|
70 | [ --with-vis-libdir=<libdir> Specify directories to search for the VIS |
---|
71 | and headers. Defaults to \".\". |
---|
72 | Expects to find <libdir>/libvis.a], |
---|
73 | [vislibdir=$withval], |
---|
74 | [vislibdir="."]) |
---|
75 | |
---|
76 | # Give the configurer a chance to set a different location for the VIS |
---|
77 | # source. When specified, "srcdir" points to "master" source, and |
---|
78 | # "local_srcdir" points to the source under local development. |
---|
79 | |
---|
80 | AC_SUBST(local_srcdir) |
---|
81 | AC_ARG_WITH(local-srcdir, |
---|
82 | [ --with-local-srcdir=<srcdir> Specify the root directory to search for |
---|
83 | source for packages (the PKGS list). |
---|
84 | Expects to find, e.g., <srcdir>/tbl/tbl.c], |
---|
85 | [local_srcdir=$withval], |
---|
86 | [local_srcdir=$srcdir]) |
---|
87 | |
---|
88 | # Give the configurer a chance to set the BDD library |
---|
89 | |
---|
90 | AC_SUBST(BDDLIB) |
---|
91 | AC_ARG_WITH(bdd, |
---|
92 | [ --with-bdd=<bddPackage> Specify the BDD library to link against. |
---|
93 | Defaults to --with-bdd=cu.], |
---|
94 | [BDDLIB=$withval], |
---|
95 | [BDDLIB=cu]) |
---|
96 | |
---|
97 | #---------------------------------------------------------------------- |
---|
98 | # Checks for programs we need |
---|
99 | #---------------------------------------------------------------------- |
---|
100 | AC_PATH_PROG(ZCHAFF,zchaff) |
---|
101 | AC_PATH_PROG(SHARPSAT,sharpSAT) |
---|
102 | AC_PATH_PROG(AR, ar, ar) |
---|
103 | AC_PROG_RANLIB |
---|
104 | |
---|
105 | AC_CANONICAL_SYSTEM |
---|
106 | AC_SUBST(target) |
---|
107 | |
---|
108 | # Determine the name of the C compiler we're going to use |
---|
109 | |
---|
110 | AC_ARG_ENABLE(gcc, |
---|
111 | [ --enable-gcc Allow use of gcc if available], |
---|
112 | [gcc_ok=$enableval], [gcc_ok=no]) |
---|
113 | |
---|
114 | # We cannot set CC=g++ directly because many configuration test programs |
---|
115 | # do not compile with g++. Hence, when the user specifies --enable-gcc=g++, |
---|
116 | # we set CC=gcc during configuration, and then CC=g++ at the end. |
---|
117 | # The same applies to icpc and icc. |
---|
118 | if test "$gcc_ok" != no; then |
---|
119 | case "$gcc_ok" in |
---|
120 | yes | g++) |
---|
121 | CC=gcc ;; |
---|
122 | icpc) |
---|
123 | CC=icc ;; |
---|
124 | *) |
---|
125 | CC=$gcc_ok |
---|
126 | esac |
---|
127 | else |
---|
128 | if test -z "$CC" ; then |
---|
129 | # Balakrishna Kumthekar <kumtheka@colorado.edu> |
---|
130 | # As we do not support cc on RS6000, Cygwin and SunOS. |
---|
131 | case "$target" in |
---|
132 | rs6000-ibm-aix* | *-pc-cygwin32 | sparc-sun-sunos*) |
---|
133 | CC=gcc ;; |
---|
134 | *) |
---|
135 | CC=cc ;; |
---|
136 | esac |
---|
137 | fi |
---|
138 | fi |
---|
139 | AC_PROG_CC |
---|
140 | |
---|
141 | AC_ARG_ENABLE(64, |
---|
142 | [ --enable-64 Use 64-bit pointers on 64-bit Alpha machines], |
---|
143 | [use_sixty_four=$enableval], [use_sixty_four=no]) |
---|
144 | |
---|
145 | # Gcc does not support 32-bit pointers on the Alphas. |
---|
146 | if test "$gcc_ok" != no; then |
---|
147 | use_sixty_four=yes |
---|
148 | fi |
---|
149 | |
---|
150 | |
---|
151 | # Roderick Bloem (rbloem@colorado.edu): making a special case for |
---|
152 | # ultrix install, since it's annoying about setting groupids. |
---|
153 | case "$target" in |
---|
154 | mips-dec-ultrix*) |
---|
155 | INSTALL="helpers/install-sh -c" |
---|
156 | INSTALL_PROGRAM="\${INSTALL}" |
---|
157 | INSTALL_DATA="\${INSTALL} -m 644";; |
---|
158 | |
---|
159 | *) |
---|
160 | AC_PROG_INSTALL ;; |
---|
161 | esac |
---|
162 | |
---|
163 | # Determine the compiler flags to use |
---|
164 | |
---|
165 | DEBUG_CFLAGS="-g" |
---|
166 | DEBUG_LDFLAGS="" |
---|
167 | |
---|
168 | case "$target" in |
---|
169 | |
---|
170 | i686-pc-linux-gnu) |
---|
171 | # Linux with Intel compiler |
---|
172 | # -ansi: ANSI C conformance |
---|
173 | # -ip: inter-procedural optimization |
---|
174 | OPTIMIZE_CFLAGS="-g -O3 -ansi -ip" |
---|
175 | ;; |
---|
176 | |
---|
177 | sparc-sun-solaris* | i386-pc-solaris*) |
---|
178 | # Sparc and X86 Solaris: |
---|
179 | # -xO3: Highest safe level of optimization |
---|
180 | # -native: Optimize for the native processor (if supported) |
---|
181 | # -dalign: Generate double-word load/store for performance |
---|
182 | # (only for SPARC) |
---|
183 | # and other arcane compilation flags. |
---|
184 | if test "$GCC" = yes; then |
---|
185 | OPTIMIZE_CFLAGS="-O" |
---|
186 | else |
---|
187 | case "$target" in |
---|
188 | sparc-sun-solaris*) |
---|
189 | ALIGN=" -dalign" ;; |
---|
190 | *) |
---|
191 | ALIGN="" ;; |
---|
192 | esac |
---|
193 | AC_MSG_CHECKING([for -native]) |
---|
194 | CFLAGS="-xO3 -native$ALIGN" |
---|
195 | AC_CACHE_VAL(ac_cv_have_native, |
---|
196 | [ AC_TRY_RUN([ |
---|
197 | main(){exit(0);} |
---|
198 | ],ac_cv_have_native=yes,ac_cv_have_native=no,ac_cv_have_native=no)]) |
---|
199 | if test $ac_cv_have_native = yes ; then |
---|
200 | AC_MSG_RESULT(working) |
---|
201 | OPTIMIZE_CFLAGS="-xO3 -native$ALIGN" |
---|
202 | else |
---|
203 | AC_MSG_RESULT(broken) |
---|
204 | AC_MSG_CHECKING([for fallback optimization flags]) |
---|
205 | CFLAGS="-xO3 -fns -fsimple=2$ALIGN -ftrap=%none -xlibmil" |
---|
206 | AC_CACHE_VAL(ac_cv_have_fallback, |
---|
207 | [ AC_TRY_RUN([ |
---|
208 | main(){exit(0);} |
---|
209 | ],ac_cv_have_fallback=yes,ac_cv_have_fallback=no,ac_cv_have_fallback=no)]) |
---|
210 | if test $ac_cv_have_fallback = yes ; then |
---|
211 | AC_MSG_RESULT(working) |
---|
212 | OPTIMIZE_CFLAGS="-xO3 -fns -fsimple=2$ALIGN -ftrap=%none -xlibmil" |
---|
213 | else |
---|
214 | AC_MSG_RESULT(broken) |
---|
215 | OPTIMIZE_CFLAGS="-O" |
---|
216 | fi |
---|
217 | fi |
---|
218 | fi |
---|
219 | ;; |
---|
220 | |
---|
221 | mips-dec-ultrix*) |
---|
222 | # MIPS-based DECstations running Ultrix: |
---|
223 | # -std1: Produce non-ANSI code warnings, and define __STDC__ |
---|
224 | # -O: Use the global "ucode" optimizer |
---|
225 | # -Olimit 5000: Don't optimize routines bigger than 5000 basic blocks |
---|
226 | OPTIMIZE_CFLAGS="-std1 -O -Olimit 5000" ;; |
---|
227 | |
---|
228 | alpha-dec-osf*) |
---|
229 | # DEC Alpha running OSF: |
---|
230 | |
---|
231 | # 64-bit mode: |
---|
232 | # -g3: Produce symbol table information for optimized code |
---|
233 | # -O4: Enable every optimization |
---|
234 | # -std: Enforce the ANSI standard with extensions, define __STDC__ |
---|
235 | # -ieee_with_no_inexact: Disable (potentially slow) signaling |
---|
236 | # for inexact floating-point results |
---|
237 | # -tune host: Tune instructions for the compilation host machine |
---|
238 | OPTIMIZE_CFLAGS="-g3 -O4 -std -ieee_with_no_inexact -tune host" |
---|
239 | DEBUG_CFLAGS="-g -std -ieee_with_no_inexact" |
---|
240 | |
---|
241 | # -non_shared: Do not use shared libraries |
---|
242 | # -om: Generate an OMAGIC file for the om optimizer |
---|
243 | OPTIMIZE_LDFLAGS="-non_shared" |
---|
244 | |
---|
245 | if test "$use_sixty_four" = "no"; then |
---|
246 | # 32-bit mode: |
---|
247 | # -xtaso: Make the compiler respond to #pragma pointer_size directives |
---|
248 | OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS -xtaso" |
---|
249 | DEBUG_CFLAGS="$DEBUG_CFLAGS -xtaso" |
---|
250 | |
---|
251 | # -taso: Load the executable into the lower 31-bit address space |
---|
252 | OPTIMIZE_LDFLAGS="$OPTIMIZE_LDFLAGS -om -taso" |
---|
253 | DEBUG_LDFLAGS="$DEBUG_LDFLAGS -taso" |
---|
254 | |
---|
255 | AC_DEFINE(SIZEOF_VOID_P, 4) |
---|
256 | ac_sizeof_voidp=4 |
---|
257 | fi |
---|
258 | ;; |
---|
259 | |
---|
260 | hppa*-*-hpux*) |
---|
261 | # HP running HPUX |
---|
262 | # -Aa: Behave as an ANSI compiler |
---|
263 | # -D_HPUX_SOURCE: Include "HP-specific" symbols in the header |
---|
264 | # files (e.g., this means sys/resource.h has struct rusage) |
---|
265 | # +Onolimit: removes resource restrictions for optimization |
---|
266 | OPTIMIZE_CFLAGS="-O -Aa +Onolimit -D_HPUX_SOURCE" |
---|
267 | DEBUG_CFLAGS="-g -Aa -D_HPUX_SOURCE" ;; |
---|
268 | |
---|
269 | *) |
---|
270 | # Other systems: |
---|
271 | OPTIMIZE_CFLAGS="-O" ;; |
---|
272 | |
---|
273 | esac |
---|
274 | |
---|
275 | if test "$GCC" = yes; then |
---|
276 | case "$target" in |
---|
277 | i686-pc-linux-gnu | i386-pc-solaris* | i386-pc-cygwin32 | i386-*-freebsd*) |
---|
278 | AC_MSG_CHECKING([for -mcpu and -malign compiler options]) |
---|
279 | CFLAGS="-g -O3 -mcpu=pentiumpro -malign-double" |
---|
280 | AC_TRY_COMPILE(,,ac_have_mcpu=yes,ac_have_mcpu=no) |
---|
281 | if test "$ac_have_mcpu" = yes; then |
---|
282 | AC_MSG_RESULT(working) |
---|
283 | OPTIMIZE_CFLAGS="-g -O3 -mcpu=pentiumpro -malign-double" |
---|
284 | else |
---|
285 | AC_MSG_RESULT(broken) |
---|
286 | OPTIMIZE_CFLAGS="-g -O3" |
---|
287 | fi |
---|
288 | ;; |
---|
289 | sparc-sun-solaris*) |
---|
290 | AC_MSG_CHECKING([for -mtune compiler option]) |
---|
291 | CFLAGS="-g -O3 -mtune=ultrasparc" |
---|
292 | AC_TRY_COMPILE(,,ac_have_mtune=yes,ac_have_mtune=no) |
---|
293 | if test "$ac_have_mtune" = yes; then |
---|
294 | AC_MSG_RESULT(working) |
---|
295 | OPTIMIZE_CFLAGS="-g -O3 -mtune=ultrasparc" |
---|
296 | else |
---|
297 | AC_MSG_RESULT(not working) |
---|
298 | OPTIMIZE_CFLAGS="-g -O3" |
---|
299 | fi |
---|
300 | ;; |
---|
301 | *) |
---|
302 | OPTIMIZE_CFLAGS="-g -O3" |
---|
303 | ;; |
---|
304 | esac |
---|
305 | OPTIMIZE_LDFLAGS="" |
---|
306 | DEBUG_CFLAGS="-g" |
---|
307 | DEBUG_LDFLAGS="" |
---|
308 | fi |
---|
309 | |
---|
310 | AC_ARG_WITH(comp-mode, |
---|
311 | [ --with-comp-mode=<mode> Specify a special compilation mode: |
---|
312 | optimize (the default): Produce optimized |
---|
313 | code, with symbol table information |
---|
314 | if supported on the platform/compiler, |
---|
315 | and without asserts. |
---|
316 | debug: Produce unoptimized code with symbol table |
---|
317 | information and asserts enabled |
---|
318 | purify: Unoptimized code linked with purify |
---|
319 | quantify: Optimized code without asserts |
---|
320 | linked with quantify], |
---|
321 | [comp_mode=$withval], |
---|
322 | [comp_mode=optimize]) |
---|
323 | AC_SUBST(LINKER) |
---|
324 | AC_SUBST(PLINKER) |
---|
325 | |
---|
326 | LINKER="$CC" |
---|
327 | |
---|
328 | case "$comp_mode" in |
---|
329 | debug) |
---|
330 | CFLAGS="$DEBUG_CFLAGS" |
---|
331 | LDFLAGS="$DEBUG_LDFLAGS" ;; |
---|
332 | purify) |
---|
333 | CFLAGS="$DEBUG_CFLAGS" |
---|
334 | LDFLAGS="$DEBUG_LDFLAGS" |
---|
335 | AC_DEFINE(PURIFY) |
---|
336 | LINKER="purify -cache-dir=/tmp $CC" |
---|
337 | PLINKER="purify -log-file=./purify.log -cachedir=/tmp $CC" ;; |
---|
338 | quantify) |
---|
339 | CFLAGS="$OPTIMIZE_CFLAGS" |
---|
340 | LDFLAGS="$OPTIMIZE_LDFLAGS" |
---|
341 | AC_DEFINE(QUANTIFY) |
---|
342 | AC_DEFINE(NDEBUG) |
---|
343 | LINKER="quantify $CC" ;; |
---|
344 | optimize | *) |
---|
345 | CFLAGS="$OPTIMIZE_CFLAGS" |
---|
346 | LDFLAGS="$OPTIMIZE_LDFLAGS" |
---|
347 | AC_DEFINE(NDEBUG) ;; |
---|
348 | esac |
---|
349 | |
---|
350 | AC_PROG_LEX |
---|
351 | AC_MSG_CHECKING(if $LEX accepts the -o and -P options) |
---|
352 | |
---|
353 | AC_CACHE_VAL(ac_cv_flex_accepts_op, |
---|
354 | [ ac_cv_flex_accepts_op=yes ; |
---|
355 | echo "%%\ |
---|
356 | %%" | $LEX -Ptest -o/dev/null >/dev/null 2>&1 || ac_cv_flex_accepts_op=no ]) |
---|
357 | if test $ac_cv_flex_accepts_op = yes ; then |
---|
358 | AC_MSG_RESULT(yes) |
---|
359 | else |
---|
360 | AC_MSG_RESULT(no) |
---|
361 | AC_MSG_WARN([You either need a newer version of flex, or need to modify |
---|
362 | the defintion of LEX in the Makefile to point to a version that does |
---|
363 | accept -p -t and -o.]) |
---|
364 | fi |
---|
365 | |
---|
366 | AC_PROG_YACC |
---|
367 | AC_MSG_CHECKING([if $YACC accepts the -p, -t, and -o options]) |
---|
368 | AC_CACHE_VAL(ac_cv_yacc_accepts_pto, |
---|
369 | [ ac_cv_yacc_accepts_pto=yes ; |
---|
370 | echo "%token terminal\ |
---|
371 | %%\ |
---|
372 | nonterminal: terminal\ |
---|
373 | %%" > config.in |
---|
374 | $YACC -ptest -o /dev/null config.in >/dev/null 2>&1 || ac_cv_yacc_accepts_pto=no |
---|
375 | rm -f config.in ]) |
---|
376 | if test $ac_cv_yacc_accepts_pto = yes ; then |
---|
377 | AC_MSG_RESULT(yes) |
---|
378 | else |
---|
379 | AC_MSG_RESULT(no) |
---|
380 | AC_MSG_WARN([You either need a newer version of bison, or need to modify |
---|
381 | the defintion of YACC in the Makefile to point to a version that does |
---|
382 | accept -p -t and -o.]) |
---|
383 | fi |
---|
384 | |
---|
385 | #---------------------------------------------------------------------- |
---|
386 | # Checks for headers and libraries |
---|
387 | #---------------------------------------------------------------------- |
---|
388 | AC_HEADER_STDC |
---|
389 | |
---|
390 | AC_SUBST(LIBDIRS) |
---|
391 | |
---|
392 | # add -lucb to LIBS and -L/usr/ucblib to LIBDIRS |
---|
393 | # if there's a libucb.a available |
---|
394 | # (Solaris needs this for signals) |
---|
395 | |
---|
396 | ac_save_ldflags="$LDFLAGS" |
---|
397 | LDFLAGS=-L/usr/ucblib |
---|
398 | AC_CHECK_LIB(ucb,main,LIBDIRS="$LIBDIRS -L/usr/ucblib") |
---|
399 | LDFLAGS="$ac_save_ldflags" |
---|
400 | |
---|
401 | # add -lbsd if there's a libbsd.a available |
---|
402 | # (e.g., Linux needs this for bsd_ioctl) |
---|
403 | AC_CHECK_LIB(bsd,main) |
---|
404 | |
---|
405 | # Check if libreadline exists and the function readline can be used. |
---|
406 | # This implies checking for the availability of libtermcap or of a |
---|
407 | # suitable replacement. (We only look for libncurses.) |
---|
408 | AC_CACHE_VAL(vis_cv_termcap_lib, |
---|
409 | [AC_CHECK_LIB(termcap, tgetent, vis_cv_termcap_lib=-ltermcap, |
---|
410 | [AC_CHECK_LIB(ncurses, tgetent, vis_cv_termcap_lib=-lncurses, |
---|
411 | bash_cv_termcap_lib=none)])]) |
---|
412 | if test "$vis_cv_termcap_lib" != none; then |
---|
413 | AC_CHECK_LIB(readline, readline, ac_readline_flag=1, |
---|
414 | ac_readline_flag=0, $vis_cv_termcap_lib) |
---|
415 | if test $ac_readline_flag = 1 ; then |
---|
416 | LIBS="$LIBS -lreadline $vis_cv_termcap_lib" ; AC_DEFINE(HAVE_LIBREADLINE) |
---|
417 | fi |
---|
418 | fi |
---|
419 | |
---|
420 | # Check for the dirent header file, which is quite a mess |
---|
421 | AC_HEADER_DIRENT |
---|
422 | |
---|
423 | # Check for these system header files |
---|
424 | AC_CHECK_HEADERS(sys/termios.h sys/ioctl.h sys/time.h signal.h sys/signal.h readline/readline.h readline/history.h) |
---|
425 | |
---|
426 | # This is for Linux |
---|
427 | AC_CHECK_HEADERS(bsd/sgtty.h) |
---|
428 | |
---|
429 | # Some systems want both sys/ioctl.h and sys/termios.h, but others can |
---|
430 | # only have one -- check for that |
---|
431 | |
---|
432 | AC_MSG_CHECKING(whether sys/termios.h and sys/ioctl.h should both be included) |
---|
433 | |
---|
434 | AC_CACHE_VAL(ac_cv_ioctl_with_termios, |
---|
435 | [AC_TRY_CPP([ |
---|
436 | #include <sys/termios.h> |
---|
437 | #include <sys/ioctl.h> |
---|
438 | ], ac_cv_ioctl_with_termios=1, ac_cv_ioctl_with_termios=0 )]) |
---|
439 | if test $ac_cv_ioctl_with_termios = 1 ; then |
---|
440 | AC_MSG_RESULT(yes) ; AC_DEFINE(IOCTL_WITH_TERMIOS) |
---|
441 | else |
---|
442 | AC_MSG_RESULT(no) |
---|
443 | fi |
---|
444 | |
---|
445 | # cmdFile.c wants to be able to use TIOCGETC to do file completion, |
---|
446 | # but some systems (e.g., HPUX) don't have this |
---|
447 | # |
---|
448 | |
---|
449 | AC_MSG_CHECKING(for TIOCGETC) |
---|
450 | |
---|
451 | AC_CACHE_VAL(ac_cv_have_ioctl_with_tiocgetc, |
---|
452 | [if test $ac_cv_ioctl_with_termios = 1 ; then |
---|
453 | AC_EGREP_CPP(yes, |
---|
454 | [#include <sys/termios.h> |
---|
455 | #include <sys/ioctl.h> |
---|
456 | #ifdef TIOCGETC |
---|
457 | yes |
---|
458 | #endif], |
---|
459 | ac_cv_have_ioctl_with_tiocgetc=yes, |
---|
460 | ac_cv_have_ioctl_with_tiocgetc=no) |
---|
461 | else |
---|
462 | AC_EGREP_CPP(yes, |
---|
463 | [#include <sys/ioctl.h> |
---|
464 | #ifdef TIOCGETC |
---|
465 | yes |
---|
466 | #endif], |
---|
467 | ac_cv_have_ioctl_with_tiocgetc=yes, |
---|
468 | ac_cv_have_ioctl_with_tiocgetc=no) |
---|
469 | fi]) |
---|
470 | if test $ac_cv_have_ioctl_with_tiocgetc = "yes" ; then |
---|
471 | AC_MSG_RESULT(yes) ; AC_DEFINE(HAVE_IOCTL_WITH_TIOCGETC) |
---|
472 | else |
---|
473 | AC_MSG_RESULT(no) |
---|
474 | fi |
---|
475 | |
---|
476 | # # cmdFile.c wants to turn off interrupts, but some systems don't |
---|
477 | # # seem to know how to do that using TIOCLBIS |
---|
478 | # # |
---|
479 | # # This is probably fairly fragile, and it's probably cmdFile.c that should |
---|
480 | # # be fixed |
---|
481 | # # |
---|
482 | # # This has been very unreliable (e.g., on Solaris), so the facility has |
---|
483 | # # been turned off |
---|
484 | # |
---|
485 | # if test $ac_cv_have_ioctl_with_tiocgetc = "yes" ; then |
---|
486 | # |
---|
487 | # AC_MSG_CHECKING(for TIOCLBIS) |
---|
488 | # |
---|
489 | # AC_CACHE_VAL(ac_cv_have_term_interrupts, |
---|
490 | # [AC_EGREP_CPP(yes, |
---|
491 | # [#include <sys/ioctl.h> |
---|
492 | # #include <sys/termios.h> |
---|
493 | # #ifdef TIOCLBIS |
---|
494 | # yes |
---|
495 | # #endif |
---|
496 | # ], ac_cv_have_term_interrupts=1, |
---|
497 | # ac_cv_have_term_interrupts=0 )]) |
---|
498 | # |
---|
499 | # if test $ac_cv_have_term_interrupts = 1 ; then |
---|
500 | # AC_MSG_RESULT(yes) ; AC_DEFINE(HAVE_TERM_INTERRUPTS) |
---|
501 | # else |
---|
502 | # AC_MSG_RESULT(no) |
---|
503 | # fi |
---|
504 | # |
---|
505 | # fi # ac_cv_have_ioctl_with_tiocgetc |
---|
506 | |
---|
507 | #---------------------------------------------------------------------- |
---|
508 | # Checks for typedefs, structures, and compiler characteristics. |
---|
509 | #---------------------------------------------------------------------- |
---|
510 | |
---|
511 | # Check to see if the compiler understands "const" |
---|
512 | # #define it empty otherwise |
---|
513 | AC_C_CONST |
---|
514 | |
---|
515 | # Sort out "time.h" nonsense |
---|
516 | AC_HEADER_TIME |
---|
517 | |
---|
518 | AC_STRUCT_TM |
---|
519 | |
---|
520 | # Set RETSIGTYPE to the proper return type for a signal handler (void or int) |
---|
521 | AC_TYPE_SIGNAL |
---|
522 | |
---|
523 | # Roderick Bloem (rbloem@colorado.edu) : On Irix we need ttold |
---|
524 | case "$target" in |
---|
525 | mips-sgi-irix*) |
---|
526 | AC_DEFINE(NEED_TTOLD);; |
---|
527 | esac |
---|
528 | |
---|
529 | #---------------------------------------------------------------------- |
---|
530 | # Checks for library functions. |
---|
531 | #---------------------------------------------------------------------- |
---|
532 | |
---|
533 | AC_PROG_GCC_TRADITIONAL |
---|
534 | AC_FUNC_MEMCMP |
---|
535 | AC_TYPE_SIGNAL |
---|
536 | AC_CHECK_FUNCS(gettimeofday strchr strstr setvbuf getenv unlink mkstemp close) |
---|
537 | |
---|
538 | #----------------------------------------------------------------------- |
---|
539 | # Check for mawk, gawk, nawk, awk in that order |
---|
540 | #----------------------------------------------------------------------- |
---|
541 | AC_PROG_AWK |
---|
542 | |
---|
543 | #---------------------------------------------------------------------- |
---|
544 | # Create the Makefile from Makefile.in |
---|
545 | #---------------------------------------------------------------------- |
---|
546 | if test "$gcc_ok" = "g++"; then |
---|
547 | CC=$gcc_ok |
---|
548 | fi |
---|
549 | AC_OUTPUT(Makefile) |
---|