source: trunk/third/tcsh/configure.in @ 14620

Revision 14620, 4.9 KB checked in by ghudson, 25 years ago (diff)
Recognize Solaris 2.7. (Use the 2.6 config file; seems to work fine.)
Line 
1dnl Autoconf script for tcsh
2dnl To rebuild the `configure' script from this, execute the command
3dnl     autoconf
4dnl in the directory containing this script.
5dnl
6dnl You'll also need a version of config.guess from a gnu package
7dnl
8dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
9dnl
10
11AC_PREREQ(2.12)dnl Minimum Autoconf version required.
12AC_INIT(tc.vers.c)
13
14tcsh_configure_args="$@"
15# Shift out arguments leaving the optional platform name.
16while test -n "$1" ; do
17 case "$1" in
18  -*) shift ;;
19  *) break ;;
20 esac
21done
22
23AC_MSG_CHECKING(for the canonical name of this system)
24if test "$1" = '' ; then
25  PATH=$srcdir:$PATH # Prefer the tcsh source directory, it might be there.
26  export PATH
27  new_canonical=`(config.guess) 2>/dev/null` || new_canonical=unknown
28else
29  new_canonical="$1"
30fi
31AC_CACHE_VAL(tcsh_cv_canonical, tcsh_cv_canonical=${new_canonical})
32AC_MSG_RESULT($tcsh_cv_canonical)
33
34if test  "$tcsh_cv_canonical" != "$new_canonical"
35then
36  AC_MSG_WARN([Cache configured for \`${tcsh_cv_canonical}'.])
37  AC_MSG_WARN([This system is \`${new_canonical}'.])
38  AC_MSG_WARN([Assuming invalid cache - removing \`${cache_file}'.])
39  AC_MSG_WARN([Restarting...])
40  rm -f "$cache_file"
41  exec ${CONFIG_SHELL-/bin/sh} $0 "$tcsh_configure_args"
42fi
43
44changequote(, )dnl
45
46case "${tcsh_cv_canonical}" in
47
48  ## Alpha (DEC) machines.
49  alpha-dec-osf* )
50    tcsh_config_file=decosf1
51  ;;
52
53  ## Ultrix
54  *-dec-ultrix* )
55    tcsh_config_file=ultrix
56  ;;
57
58  ## DGUX
59  *-dg-dguxR4* )
60    tcsh_config_file=dgux5.4
61  ;;
62  m88k-dg-dgux5.4R* )
63    tcsh_config_file=dgux5.4
64  ;;
65
66  ## HP/UX
67  *-hp-hpux7* )
68    tcsh_config_file=hpux7
69  ;;
70  *-hp-hpux[89]* )
71    tcsh_config_file=hpux8
72  ;;
73  *-hp-hpux10* )
74    tcsh_config_file=hpux8
75  ;;
76
77  ## IBM AIX systems
78  *-ibm-aix*)
79    tcsh_config_file=aix
80  ;;
81
82  ## Linux
83  *-*-linux* )
84    tcsh_config_file=linux
85  ;;
86
87  ## Motorola systems
88  m68k-motorola-sysv* )
89    tcsh_config_file=sysV68
90  ;;
91  m88k-motorola-sysv3* )
92    tcsh_config_file=sysV88
93  ;;
94
95  ## NetBSD systems
96  *-*-netbsd*)
97    tcsh_config_file=bsd4.4
98  ;;
99
100  ## FreeBSD systems
101  *-*-freebsd*)
102    tcsh_config_file=bsd4.4
103  ;;
104
105  ## OpenBSD systems
106  *-*-openbsd*)
107    tcsh_config_file=bsd4.4
108  ;;
109
110  ## BSDI systems
111  *-*-bsdi*)
112    tcsh_config_file=bsd4.4
113  ;;
114
115  ## Silicon Graphics machines
116  *-sgi-iri* )
117    tcsh_config_file=sgi
118    NON_GNU_DFLAGS='-D__STDC__'
119    case "${tcsh_cv_canonical}" in
120      *-irix[34]*)
121        LIBS='-lsun -lbsd -lc_s'
122      ;;
123    esac
124  ;;
125
126  ## Suns
127  *-sun-sunos3* )
128    tcsh_config_file=sunos35
129  ;;
130  *-sun-sunos4.0* )
131    tcsh_config_file=sunos40
132  ;;
133  *-sun-sunos4.1.[12]* )
134    tcsh_config_file=sunos41
135  ;;
136  *-sun-sunos4.1.[3456]* )
137    tcsh_config_file=sunos413
138  ;;
139  *-*-solaris2.[01]* ) # Should handle sparc or x86
140    tcsh_config_file=sol2
141  ;;
142  *-sun-solaris2.2* ) # Sparc only release
143    tcsh_config_file=sol22
144  ;;
145  *-sun-solaris2.3* ) # Sparc only release
146    tcsh_config_file=sol23
147  ;;
148  *-*-solaris2.[45]* ) # Should handle sparc, x86 and powerpc
149    tcsh_config_file=sol24
150  ;;
151  *-*-solaris2.[67]* ) # Should handle sparc, x86 and powerpc
152    tcsh_config_file=sol26
153  ;;
154
155  ## Dell SVR4
156  *-dell-sysv4* )
157    tcsh_config_file=sysv4
158    DFLAGS="$DFLAGS -DDELL"
159  ;;
160
161  ## SVR4 (Generic and otherwise)
162  *-*-sysv4* )
163    tcsh_config_file=sysv4
164  ;;
165
166  ## Tektronix systems
167  m68k-tektronix-bsd* )
168    tcsh_config_file=bsd
169    NON_GNU_DFLAGS='-DBSD -DUTek'
170  ;;
171  m88k-tektronix-sysv3* )
172    tcsh_config_file=tekXD88
173  ;;
174
175  ## SCO
176  *-sco3.2v5*)
177    tcsh_config_file=sco32v5
178  ;;
179  *-sco3.2v4*)
180    tcsh_config_file=sco32v4
181  ;;
182  *-sco3.2v2*)
183    tcsh_config_file=sco32v2
184  ;;
185
186  ## Siemens Nixdorf BS2000
187  bs2000-sni-posix)
188    tcsh_config_file=bs2000
189  ;;
190  ## Cray
191  *-cray-unicos*)
192    tcsh_config_file=cray
193  ;;
194
195  * )
196  changequote([, ])dnl
197  AC_MSG_ERROR([Tcsh can't guess the configuration file name
198for \`${tcsh_cv_canonical}' systems.
199Check tcsh's \`Ported' file for manual configuration instructions.])
200  changequote(, )dnl
201  ;;
202
203esac
204
205echo "Tcsh will use configuration file \`$tcsh_config_file'."
206changequote([, ])dnl
207
208AC_CONFIG_HEADER(config.h:config/${tcsh_config_file}:config.h.in)
209AC_PROG_CC
210AC_PROG_CPP
211AC_PROG_GCC_TRADITIONAL
212
213if test $ac_cv_prog_gcc = no ; then
214  DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
215  CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
216fi
217
218AC_CHECK_FUNC(crypt)
219if test $ac_cv_func_crypt = no; then
220  AC_CHECK_LIB(crypt, crypt)
221fi
222AC_CHECK_LIB(termlib, tgetent)
223if test $ac_cv_lib_termlib_tgetent = no ; then
224  AC_CHECK_LIB(curses, tgetent)
225  if test $ac_cv_lib_curses_tgetent = no ; then
226    AC_CHECK_LIB(termcap, tgetent)
227  fi
228fi
229AC_CHECK_FUNC(gethostbyname)
230if test $ac_cv_func_gethostbyname = no; then
231      AC_CHECK_LIB(nsl, gethostbyname)
232fi
233AC_CHECK_FUNC(connect)
234if test $ac_cv_func_connect = no; then
235  AC_CHECK_LIB(socket, connect)
236fi
237AC_SUBST(DFLAGS)
238
239AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send, HES_RES_LIB=-lresolv))
240AC_SUBST(HES_RES_LIB)
241AC_SUBST(lbindir)
242
243AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.