"Fossies" - the Fresh Open Source Software Archive 
Member "tcsh-6.22.03/configure.ac" (18 Nov 2020, 10983 Bytes) of package /linux/misc/tcsh-6.22.03.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "configure.ac":
6.22.02_vs_6.22.03.
1 dnl Autoconf script for tcsh
2 dnl To rebuild the `configure' script from this, execute the command
3 dnl autoconf
4 dnl in the directory containing this script.
5 dnl
6 dnl You'll also need a version of config.guess from a gnu package
7 dnl
8 dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
9
10 AC_PREREQ([2.59])dnl Minimum Autoconf version required.
11 AC_INIT([tcsh], [6.22.03], [https://bugs.astron.com/])
12 AC_CONFIG_MACRO_DIR([m4])
13 AC_CONFIG_SRCDIR([tc.vers.c])
14 AC_CONFIG_HEADERS([config.h])
15 AC_CONFIG_TESTDIR([.], [.])
16
17 AC_PROG_INSTALL
18 AC_CANONICAL_HOST
19
20 AM_ICONV
21
22 AC_MSG_CHECKING([cached host tuple])
23 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
24 test x"$ac_cv_host_system_type" != x"$host"; }; then
25 AC_MSG_RESULT([different])
26 AC_MSG_ERROR([remove config.cache and re-run configure])
27 else
28 AC_MSG_RESULT(ok)
29 fi
30 ac_cv_host_system_type="$host"
31
32
33 changequote(, )dnl
34
35 case "${host}" in
36
37 ## Alpha (DEC) machines.
38 alpha*-dec-osf* )
39 tcsh_config_file=decosf1
40 ;;
41
42 ## Ultrix
43 *-dec-ultrix* )
44 tcsh_config_file=ultrix
45 ;;
46
47 ## DGUX
48 *-dg-dguxR4* )
49 tcsh_config_file=dgux5.4
50 ;;
51 m88k-dg-dgux5.4R* )
52 tcsh_config_file=dgux5.4
53 ;;
54
55 ## HP/UX
56 *-hp-hpux7* )
57 tcsh_config_file=hpux7
58 ;;
59 *-hp-hpux[89]* )
60 tcsh_config_file=hpux8
61 ;;
62 *-hp-hpux1[0-9]* )
63 tcsh_config_file=hpux11
64 ;;
65
66 ## IBM AIX systems
67 *-ibm-aix*)
68 tcsh_config_file=aix
69 ;;
70
71 ## SX-4
72 sx4-nec-*)
73 CC='cc -h0,ansi,novector,float0'
74 LDFLAGS='-Gsmall'
75 tcsh_config_file=superux8
76 ;;
77
78 ## IBM OS/390 systems
79 *-ibm-os390*)
80 CC='c89'
81 tcsh_config_file=os390
82 ;;
83
84 ## Android
85 *-*-android*)
86 tcsh_config_file=android
87 ;;
88
89 ## Linux
90 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
91 tcsh_config_file=linux
92 ;;
93
94 ## Motorola systems
95 m68k-motorola-sysv* )
96 tcsh_config_file=sysV68
97 ;;
98 m88k-motorola-sysv3* )
99 tcsh_config_file=sysV88
100 ;;
101
102 ## Minix systems
103 *-*-minix*)
104 tcsh_config_file=minix
105 ;;
106
107 ## NetBSD systems
108 *-*-netbsd*)
109 tcsh_config_file=bsd4.4
110 ;;
111
112 ## FreeBSD systems
113 *-*-freebsd*)
114 tcsh_config_file=bsd4.4
115 ;;
116
117 ## MidnightBSD systems
118 *-*-midnightbsd*)
119 tcsh_config_file=bsd4.4
120 ;;
121
122 ## DragonFlyBSD systems
123 *-*-dragonfly*)
124 tcsh_config_file=bsd4.4
125 ;;
126
127 ## MirBSD systems
128 *-*-mirbsd*)
129 tcsh_config_file=bsd4.4
130 ;;
131
132 ## OpenBSD systems
133 *-*-openbsd*)
134 tcsh_config_file=bsd4.4
135 ;;
136
137 ## BSDI systems
138 *-*-bsdi*)
139 tcsh_config_file=bsd4.4
140 ;;
141
142 ## Mac OS X Server
143 *-*-rhapsody* )
144 tcsh_config_file=bsd4.4
145 ;;
146
147 ## Mac OS X Server
148 *-*-darwin* )
149 tcsh_config_file=bsd4.4
150 ;;
151
152 ## DragonFly systems
153 *-*-dragonfly*)
154 tcsh_config_file=bsd4.4
155 ;;
156
157 ## Silicon Graphics machines
158 *-sgi-iri* )
159 tcsh_config_file=irix
160 case "${host_os}" in
161 irix[34]*) # Irix-3.x - Irix 4.x
162 NON_GNU_DFLAGS='-D__STDC__'
163 LIBS='-lsun -lbsd -lc_s'
164 ;;
165 irix5* | irix6.[01]*) # Irix 5.x, Irix 6.0 - 6.1
166 LIBS='-lbsd'
167 ;;
168 irix6.[2-9]*) # Irix 6.2 and later
169 tcsh_config_file=irix62
170 ;;
171 esac
172 ;;
173
174 ## Suns
175 *-sun-sunos3* )
176 tcsh_config_file=sunos35
177 ;;
178 *-sun-sunos4.0* )
179 tcsh_config_file=sunos40
180 ;;
181 *-sun-sunos4.1.[12]* )
182 tcsh_config_file=sunos41
183 ;;
184 *-sun-sunos4.1.[3456]* )
185 tcsh_config_file=sunos413
186 ;;
187 *-*-solaris2.[01] ) # Should handle sparc or x86
188 tcsh_config_file=sol2
189 ;;
190 *-sun-solaris2.2 ) # Sparc only release
191 tcsh_config_file=sol22
192 ;;
193 *-sun-solaris2.3 ) # Sparc only release
194 tcsh_config_file=sol23
195 ;;
196 *-*-solaris2.[45] ) # Should handle sparc, x86 and powerpc
197 tcsh_config_file=sol24
198 ;;
199 *-*-solaris2.[678] ) # Should handle sparc, x86 and powerpc
200 tcsh_config_file=sol26
201 ;;
202 *-*-solaris2.* ) # Should handle sparc, x86 and powerpc
203 tcsh_config_file=sol29
204 ;;
205
206 ## Dell SVR4
207 *-dell-sysv4* )
208 tcsh_config_file=sysv4
209 DFLAGS="$DFLAGS -DDELL"
210 ;;
211
212 ## SVR4 (Generic and otherwise)
213 *-*-sysv4* )
214 tcsh_config_file=sysv4
215 ;;
216
217 ## Tektronix systems
218 m68k-tektronix-bsd* )
219 tcsh_config_file=bsd
220 NON_GNU_DFLAGS='-DBSD -DUTek'
221 ;;
222 m88k-tektronix-sysv3* )
223 tcsh_config_file=tekXD88
224 ;;
225
226 ## SCO
227 *-sco3.2v5*)
228 tcsh_config_file=sco32v5
229 ;;
230 *-sco3.2v4*)
231 tcsh_config_file=sco32v4
232 ;;
233 *-sco3.2v2*)
234 tcsh_config_file=sco32v2
235 ;;
236
237 ## Siemens BS2000 Mainframe
238 bs2000-siemens-*)
239 tcsh_config_file=bs2000
240 ;;
241
242 ## Convex
243 *-convex*)
244 tcsh_config_file=convex
245 ;;
246
247 ## Cray
248 *-cray-unicos*)
249 tcsh_config_file=cray
250 ;;
251
252 ## Red Hat Cygwin
253 *-cygwin)
254 tcsh_config_file=cygwin
255 ;;
256
257 ## mips-compaq-nonstopux
258 *-*-nonstopux)
259 tcsh_config_file=sysv4
260 ;;
261
262 ## Apollo Domain/OS
263 *-apollo-*)
264 tcsh_config_file=apollo
265 ;;
266
267 ## QNX6
268 *-qnx6*)
269 tcsh_config_file=qnx6
270 ;;
271
272 * )
273 changequote([, ])dnl
274 AC_MSG_ERROR([Tcsh can't guess the configuration file name
275 for `${host}' systems.
276 Check tcsh's `Ported' file for manual configuration instructions.])
277 changequote(, )dnl
278 ;;
279
280 esac
281
282 echo "Tcsh will use configuration file \`$tcsh_config_file'."
283 changequote([, ])dnl
284 cp ${srcdir}/config/${tcsh_config_file} config_p.h
285 AH_BOTTOM(
286 [#include "config_p.h"
287 #include "config_f.h"])
288
289 dnl Checks for programs
290 AC_PROG_CC
291 AC_PROG_CPP
292 AC_PROG_GCC_TRADITIONAL
293
294 AC_PATH_PROG([GENCAT], [gencat])
295
296 dnl Require build CC to create gethost helper when cross building
297 if test "x${cross_compiling}" = xyes ; then
298 CC_FOR_GETHOST="cc"
299 else
300 CC_FOR_GETHOST="\$(CC)"
301 fi
302 AC_SUBST(CC_FOR_GETHOST)
303
304 if test "x$GCC" != xyes ; then
305 DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
306 CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
307 fi
308
309 dnl More recent Android requires PIEs
310 case "${host}" in
311 *-*-android*)
312 CFLAGS="${CFLAGS} -fPIE"
313 LDFLAGS="${LDFLAGS} -pie"
314 ;;
315 esac
316
317 dnl Checks for libraries
318 AC_SEARCH_LIBS(crypt, crypt)
319 AC_SEARCH_LIBS(getspnam, sec)
320 AC_SEARCH_LIBS([tgetent], [termlib tinfo termcap curses ncurses], [], [
321 AC_MSG_ERROR([unable to find the tgetent() function])
322 ])
323 AC_SEARCH_LIBS(gethostbyname, nsl)
324 AC_SEARCH_LIBS(connect, socket)
325 AC_SEARCH_LIBS(catgets, catgets)
326
327 dnl Checks for header files
328 AC_CHECK_HEADERS([auth.h crypt.h features.h inttypes.h paths.h] dnl
329 [shadow.h stdint.h utmp.h utmpx.h])
330 AC_CHECK_HEADERS([wchar.h],
331 [AC_CHECK_SIZEOF([wchar_t], [], [dnl
332 #include <stdio.h>
333 #include <wchar.h>])
334 AC_CHECK_HEADERS([wctype.h])])
335 AC_HEADER_DIRENT
336 AC_HEADER_STAT
337 AC_HEADER_STDC
338
339 dnl Checks for types
340 AC_CHECK_TYPES([long long])
341 AC_TYPE_GETGROUPS
342 AC_TYPE_MODE_T
343 AC_TYPE_SIZE_T
344 AC_TYPE_UID_T
345 AC_TYPE_UINT32_T
346
347 AC_DEFUN([AC_TYPE_SSIZE_T], [
348 AC_CHECK_TYPE(ssize_t,,
349 AC_DEFINE(ssize_t, int, [Define to `int' not defined in <sys/types.h>.]),
350 [
351 #include <sys/types.h>
352 ])
353 ])
354 AC_TYPE_SSIZE_T
355
356 AC_DEFUN([AC_TYPE_SOCKLEN_T], [
357 AC_CHECK_TYPE(socklen_t,,
358 AC_DEFINE(socklen_t, int, [Define to `int' if neither <sys/types.h> nor <sys/socket.h> define.]),
359 [
360 #include <sys/types.h>
361 #include <sys/socket.h>
362 ])
363 ])
364 AC_TYPE_SOCKLEN_T
365
366
367 dnl Checks for structures
368 AC_CHECK_MEMBERS([struct dirent.d_ino], , ,
369 [#ifdef HAVE_DIRENT_H
370 # include <dirent.h>
371 #else
372 # ifdef HAVE_NDIR_H
373 # include <ndir.h>
374 # else
375 # include <sys/dir.h>
376 # endif
377 # define dirent direct
378 #endif])
379 AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_user, struct utmp.ut_tv,
380 struct utmp.ut_xtime, struct utmpx.ut_host,
381 struct utmpx.ut_user, struct utmpx.ut_tv,
382 struct utmpx.ut_xtime], , ,
383 [#include <sys/types.h>
384 #ifdef HAVE_UTMPX_H
385 #include <utmpx.h>
386 #define utmp utmpx
387 #elif defined HAVE_UTMP_H
388 #include <utmp.h>
389 #endif])
390 AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], , ,
391 [#include <sys/types.h>
392 #include <sys/socket.h>])
393
394 dnl Checks for compiler characteristics
395 AC_C_CONST
396 AC_C_VOLATILE
397
398 dnl checks for library functions
399 AC_CHECK_DECLS([crypt, environ, gethostname, getpgrp], , ,
400 [#include "config_p.h"
401 AC_INCLUDES_DEFAULT([])
402 #ifdef HAVE_CRYPT_H
403 #include <crypt.h>
404 #endif
405 ])
406 AC_CHECK_FUNC([setlocale], [have_setlocale=yes], [have_setlocale=no])
407 AC_CHECK_FUNC([catgets], [have_catgets=yes], [have_catgets=no])
408 AC_CHECK_FUNCS([dup2 getauthid getcwd gethostname getpwent] dnl
409 [getutent getutxent mallinfo mblen memmove memset mkstemp nice] dnl
410 [nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth])
411 AC_FUNC_GETPGRP
412 AC_FUNC_MBRTOWC
413 if test "x${cross_compiling}" != xyes ; then
414 AC_FUNC_SETPGRP
415 else
416 ac_cv_func_setpgrp_void=yes
417 fi
418 AC_FUNC_STRCOLL
419
420 dnl This is not good enough; we need sockaddr_storage too.
421 dnl See whether we can use IPv6 related functions
422 dnl AC_DEFUN([IPv6_CHECK_FUNC], [
423 dnl changequote(, )dnl
424 dnl ac_tr_lib=HAVE_`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
425 dnl -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
426 dnl changequote([, ])dnl
427 dnl AC_CHECK_FUNC($1, [dnl
428 dnl AC_DEFINE_UNQUOTED($ac_tr_lib)
429 dnl ac_cv_lib_inet6_$1=no], [dnl
430 dnl AC_MSG_CHECKING([whether your system has IPv6 directory])
431 dnl AC_CACHE_VAL(ipv6_cv_dir, [dnl
432 dnl for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
433 dnl if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
434 dnl break
435 dnl fi
436 dnl done])dnl
437 dnl AC_MSG_RESULT($ipv6_cv_dir)
438 dnl if test $ipv6_cv_dir = no; then
439 dnl ac_cv_lib_inet6_$1=no
440 dnl else
441 dnl if test x$ipv6_libinet6 = x; then
442 dnl ipv6_libinet6=no
443 dnl SAVELDFLAGS="$LDFLAGS"
444 dnl LDFLAGS="-L$ipv6_cv_dir/lib"
445 dnl fi
446 dnl AC_CHECK_LIB(inet6, $1, [dnl
447 dnl AC_DEFINE_UNQUOTED($ac_tr_lib)
448 dnl if test $ipv6_libinet6 = no; then
449 dnl ipv6_libinet6=yes
450 dnl LIBS="$LIBS -linet6"
451 dnl fi],)dnl
452 dnl if test $ipv6_libinet6 = no; then
453 dnl LDFLAGS="$SAVELDFLAGS"
454 dnl fi
455 dnl fi])dnl
456 dnl if test $ac_cv_func_$1 = yes -o $ac_cv_lib_inet6_$1 = yes
457 dnl then
458 dnl ipv6_cv_$1=yes
459 dnl ifelse([$2], , :, [$2])
460 dnl else
461 dnl ipv6_cv_$1=no
462 dnl ifelse([$3], , :, [$3])
463 dnl fi])
464 dnl IPv6_CHECK_FUNC(getnameinfo, DFLAGS="$DFLAGS -DINET6")
465
466 AC_SUBST(DFLAGS)
467
468 dnl Checks for system services
469 if test "$have_setlocale" != no; then
470 AC_ARG_ENABLE([nls], AS_HELP_STRING([--disable-nls], [Disable NLS support]),
471 [], [enable_nls=yes])
472 if test "x$enable_nls" != xno; then
473 AC_DEFINE([NLS], [1], [Support NLS.])
474 fi
475 fi
476
477 if test "x$enable_nls" != xno -a "$have_catgets" != no -a -n "$GENCAT" ; then
478 AC_ARG_ENABLE([nls-catalogs], AS_HELP_STRING([--disable-nls-catalogs], [Disable NLS catalog support]),
479 [], [enable_nls_catalogs=yes])
480 if test "x$enable_nls_catalogs" != xno; then
481 BUILD_CATALOGS="yes"
482 AC_DEFINE([NLS_CATALOGS], [1], [Support NLS catalogs.])
483 fi
484 fi
485
486 AC_ARG_WITH(hesiod,
487 [ --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion],
488 [hesiod="$withval"], [hesiod=no])
489 if test "$hesiod" != no; then
490 HESLIB="-lhesiod"
491 AC_CHECK_FUNC(res_send, :,
492 AC_CHECK_LIB(resolv, res_send, HESLIB="$HESLIB -lresolv"))
493 HESDEF=-DHESIOD
494 if test "$hesiod" != yes; then
495 HESDEF="$HESDEF -I$hesiod/include"
496 HESLIB="-L$hesiod/lib $HESLIB"
497 fi
498 fi
499 AC_SUBST(HESDEF)
500 AC_SUBST(HESLIB)
501 AC_SUBST(BUILD_CATALOGS)
502
503 AC_CONFIG_FILES([Makefile nls/Makefile])
504 AC_OUTPUT