1258
|
1 dnl configure.in |
|
2 dnl |
|
3 dnl Process this file with autoconf to produce a configure script. |
|
4 dnl |
|
5 dnl Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton |
|
6 ### |
|
7 ### This file is part of Octave. |
|
8 ### |
|
9 ### Octave is free software; you can redistribute it and/or modify it |
|
10 ### under the terms of the GNU General Public License as published by the |
|
11 ### Free Software Foundation; either version 2, or (at your option) any |
|
12 ### later version. |
|
13 ### |
|
14 ### Octave is distributed in the hope that it will be useful, but WITHOUT |
|
15 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
16 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
17 ### for more details. |
|
18 ### |
|
19 ### You should have received a copy of the GNU General Public License |
|
20 ### along with Octave; see the file COPYING. If not, write to the Free |
1315
|
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1258
|
22 |
|
23 AC_REVISION() |
|
24 AC_PREREQ(2.0) |
|
25 AC_INIT(info.c) |
|
26 AC_CONFIG_HEADER(config.h) |
|
27 |
|
28 AC_CANONICAL_HOST |
|
29 if test -z "$host"; then |
|
30 host=unknown |
|
31 fi |
|
32 canonical_host_type=$host |
|
33 if test "$host" = unknown; then |
|
34 AC_MSG_WARN([configuring Info for unknown system type |
|
35 ]) |
|
36 fi |
|
37 |
|
38 ### some defaults |
|
39 |
|
40 AC_PREFIX_DEFAULT(/usr/local) |
|
41 |
|
42 ### See which C compiler to use (we expect to find gcc). |
|
43 |
|
44 AC_PROG_CC |
|
45 AC_PROG_CPP |
|
46 AC_PROG_GCC_TRADITIONAL |
|
47 |
|
48 ### Special checks for odd OS specific things. |
|
49 |
|
50 AC_ISC_POSIX |
|
51 AC_MINIX |
|
52 AC_AIX |
|
53 AC_CHECK_LIB(sun, getpwnam) |
|
54 |
|
55 ### Does the C compiler handle alloca() and const correctly? |
|
56 |
|
57 AC_ALLOCA |
|
58 AC_C_CONST |
|
59 |
|
60 ### Checks for header files. |
|
61 |
|
62 AC_HEADER_STDC |
|
63 AC_CHECK_HEADERS(pwd.h string.h unistd.h sys/time.h sys/fcntl.h) |
|
64 AC_CHECK_HEADERS(sys/ttold.h sys/ptem.h) |
|
65 AC_TIME_WITH_SYS_TIME |
|
66 |
|
67 ### Use sgtty on Ultrix so that using DEC Migrate to convert a Mips |
|
68 ### binary to an Alpha binary will work. Also on Alpha/OSF to avoid |
|
69 ### a readline bug. |
|
70 |
|
71 case "$canonical_host_type" in |
|
72 mips-dec-ultrix* | alpha-dec-osf*) |
|
73 AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H, 1)], []) |
|
74 |
|
75 if test "$ac_cv_header_sgtty_h" = no; then |
|
76 AC_CHECK_HEADERS(termios.h termio.h sgtty.h, [break], []) |
|
77 fi |
|
78 ;; |
|
79 *) |
|
80 AC_CHECK_HEADERS(termios.h termio.h sgtty.h, [break], []) |
|
81 ;; |
|
82 esac |
|
83 |
|
84 if test "$ac_cv_header_termios_h" = yes \ |
|
85 || test "$ac_cv_header_termio_h" = yes \ |
|
86 || test "$ac_cv_header_sgtty_h" = yes; then |
|
87 true |
|
88 else |
|
89 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) |
|
90 fi |
|
91 |
|
92 ### Checks for functions. |
|
93 |
|
94 AC_CHECK_FUNCS(setvbuf getcwd bzero bcopy rindex stricmp strnicmp strerror) |
|
95 |
|
96 ### Checks for OS specific cruft. |
|
97 |
|
98 AC_FUNC_SETVBUF_REVERSED |
|
99 |
|
100 TERMLIBS="" |
2379
|
101 for termlib in termcap terminfo ncurses curses termlib ; do |
2278
|
102 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
1258
|
103 case "${TERMLIBS}" in |
|
104 *-l${termlib}*) |
|
105 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS]) |
|
106 break |
|
107 ;; |
|
108 esac |
|
109 done |
|
110 AC_SUBST(TERMLIBS) |
|
111 |
|
112 ### Checks for other programs. |
|
113 |
|
114 AC_PROG_RANLIB |
|
115 |
|
116 AC_PROG_INSTALL |
|
117 |
|
118 ### Do the substitutions. |
|
119 |
|
120 AC_OUTPUT([Makefile]) |