2
dnl configure.ac: Configure template for zsh.
3
dnl Process this file with autoconf to produce a configure script.
5
dnl Copyright (c) 1995-1997 Richard Coleman
6
dnl All rights reserved.
8
dnl Permission is hereby granted, without written agreement and without
9
dnl license or royalty fees, to use, copy, modify, and distribute this
10
dnl software and to distribute modified versions of this software for any
11
dnl purpose, provided that the above copyright notice and the following
12
dnl two paragraphs appear in all copies of this software.
14
dnl In no event shall Richard Coleman or the Zsh Development Group be liable
15
dnl to any party for direct, indirect, special, incidental, or consequential
16
dnl damages arising out of the use of this software and its documentation,
17
dnl even if Richard Coleman and the Zsh Development Group have been advised of
18
dnl the possibility of such damage.
20
dnl Richard Coleman and the Zsh Development Group specifically disclaim any
21
dnl warranties, including, but not limited to, the implied warranties of
22
dnl merchantability and fitness for a particular purpose. The software
23
dnl provided hereunder is on an "as is" basis, and Richard Coleman and the
24
dnl Zsh Development Group have no obligation to provide maintenance,
25
dnl support, updates, enhancements, or modifications.
30
AC_CONFIG_HEADER(config.h)
32
dnl What version of zsh are we building ?
33
. ${srcdir}/Config/version.mk
34
echo "configuring for zsh $VERSION"
36
dnl ----------------------------------------------
37
dnl CHECK FOR MACHINE/VENDOR/OPERATING SYSTEM TYPE
38
dnl ----------------------------------------------
39
dnl Find out machine type, vendor, and operating system
40
dnl What type of host is this?
42
AC_DEFINE_UNQUOTED(MACHTYPE, "$host_cpu",
43
[Define to be the machine type (microprocessor class or machine model).])
44
AC_DEFINE_UNQUOTED(VENDOR, "$host_vendor",
45
[Define to be a string corresponding the vendor of the machine.])
46
AC_DEFINE_UNQUOTED(OSTYPE, "$host_os",
47
[Define to be the name of the operating system.])
49
dnl -----------------------------
50
dnl CHECKING COMMAND LINE OPTIONS
51
dnl -----------------------------
52
dnl Handle --program-prefix, --program-suffix, etc.
55
dnl Handle setting of compile flags (CPPFLAGS, CFLAGS, LDFLAGS, LIBS).
56
zsh_COMPILE_FLAGS($CPPFLAGS, $CFLAGS, $LDFLAGS, $LIBS)
58
dnl Do you want to debug zsh?
59
ifdef([zsh-debug],[undefine([zsh-debug])])dnl
61
[Define to 1 if you want to debug zsh.])
62
AC_ARG_ENABLE(zsh-debug,
63
AC_HELP_STRING([--enable-zsh-debug], [compile with debug code and debugger symbols]),
64
[if test x$enableval = xyes; then
68
dnl Do you want zsh memory allocation routines.
69
ifdef([zsh-mem],[undefine([zsh-mem])])dnl
70
AH_TEMPLATE([ZSH_MEM],
71
[Define to 1 if you want to use zsh's own memory allocation routines])
72
AC_ARG_ENABLE(zsh-mem,
73
AC_HELP_STRING([--enable-zsh-mem], [compile with zsh memory allocation routines]),
74
[if test x$enableval = xyes; then
78
dnl Do you want to debug zsh memory allocation routines.
79
ifdef([zsh-mem-debug],[undefine([zsh-mem-debug])])dnl
80
AH_TEMPLATE([ZSH_MEM_DEBUG],
81
[Define to 1 if you want to debug zsh memory allocation routines.])
82
AC_ARG_ENABLE(zsh-mem-debug,
83
AC_HELP_STRING([--enable-zsh-mem-debug], [debug zsh memory allocation routines]),
84
[if test x$enableval = xyes; then
85
AC_DEFINE(ZSH_MEM_DEBUG)
88
dnl Do you want to print warnings when errors in memory allocation.
89
AH_TEMPLATE([ZSH_MEM_WARNING],
90
[Define to 1 if you want to turn on warnings of memory allocation errors])
91
ifdef([zsh-mem-warning],[undefine([zsh-mem-warning])])dnl
92
AC_ARG_ENABLE(zsh-mem-warning,
93
AC_HELP_STRING([--enable-zsh-mem-warning], [print warnings for errors in memory allocation]),
94
[if test x$enableval = xyes; then
95
AC_DEFINE(ZSH_MEM_WARNING)
98
dnl Do you want to turn on error checking for free().
99
ifdef([zsh-secure-free],[undefine([zsh-secure-free])])dnl
100
AH_TEMPLATE([ZSH_SECURE_FREE],
101
[Define to 1 if you want to turn on memory checking for free().])
102
AC_ARG_ENABLE(zsh-secure-free,
103
AC_HELP_STRING([--enable-zsh-secure-free], [turn on error checking for free()]),
104
[if test x$enableval = xyes; then
105
AC_DEFINE(ZSH_SECURE_FREE)
108
dnl Do you want debugging information on internal hash tables.
109
dnl This turns on the `hashinfo' builtin command.
110
ifdef([zsh-hash-debug],[undefine([zsh-hash-debug])])dnl
111
AH_TEMPLATE([ZSH_HASH_DEBUG],
112
[Define to 1 if you want to get debugging information on internal
113
hash tables. This turns on the `hashinfo' builtin.])
114
AC_ARG_ENABLE(zsh-hash-debug,
115
AC_HELP_STRING([--enable-zsh-hash-debug], [turn on debugging of internal hash tables]),
116
[if test x$enableval = xyes; then
117
AC_DEFINE(ZSH_HASH_DEBUG)
120
dnl Pathnames for global zsh scripts
121
ifdef([etcdir],[undefine([etcdir])])dnl
122
AC_ARG_ENABLE(etcdir,
123
AC_HELP_STRING([--enable-etcdir=DIR], [the default directory for global zsh scripts]),
124
[etcdir="$enableval"], [etcdir=/etc])
126
ifdef([zshenv],[undefine([zshenv])])dnl
127
AC_ARG_ENABLE(zshenv,
128
AC_HELP_STRING([--enable-zshenv=FILE], [the full pathname of the global zshenv script]),
129
[zshenv="$enableval"],
130
[if test "x$etcdir" = xno; then
133
zshenv="$etcdir/zshenv"
135
AH_TEMPLATE([GLOBAL_ZSHENV],
136
[The global file to source absolutely first whenever zsh is run;
137
if undefined, don't source anything.])
138
if test "x$zshenv" != xno; then
139
AC_DEFINE_UNQUOTED(GLOBAL_ZSHENV, "$zshenv")
142
ifdef([zshrc],[undefine([zshrc])])dnl
144
AC_HELP_STRING([--enable-zshrc=FILE], [the full pathname of the global zshrc script]),
145
[zshrc="$enableval"],
146
[if test "x$etcdir" = xno; then
149
zshrc="$etcdir/zshrc"
151
AH_TEMPLATE([GLOBAL_ZSHRC],
152
[The global file to source whenever zsh is run;
153
if undefined, don't source anything])
154
if test "x$zshrc" != xno; then
155
AC_DEFINE_UNQUOTED(GLOBAL_ZSHRC, "$zshrc")
158
ifdef([zprofile],[undefine([zprofile])])dnl
159
AC_ARG_ENABLE(zprofile,
160
AC_HELP_STRING([--enable-zprofile=FILE], [the full pathname of the global zprofile script]),
161
[zprofile="$enableval"],
162
[if test "x$etcdir" = xno; then
165
zprofile="$etcdir/zprofile"
167
AH_TEMPLATE([GLOBAL_ZPROFILE],
168
[The global file to source whenever zsh is run as a login shell,
169
before zshrc is read; if undefined, don't source anything.])
170
if test "x$zprofile" != xno; then
171
AC_DEFINE_UNQUOTED(GLOBAL_ZPROFILE, "$zprofile")
174
ifdef([zlogin],[undefine([zlogin])])dnl
175
AC_ARG_ENABLE(zlogin,
176
AC_HELP_STRING([--enable-zlogin=FILE], [the full pathname of the global zlogin script]),
177
[zlogin="$enableval"],
178
[if test "x$etcdir" = xno; then
181
zlogin="$etcdir/zlogin"
183
AH_TEMPLATE([GLOBAL_ZLOGIN],
184
[The global file to source whenever zsh is run as a login shell;
185
if undefined, don't source anything])
186
if test "x$zlogin" != xno; then
187
AC_DEFINE_UNQUOTED(GLOBAL_ZLOGIN, "$zlogin")
190
ifdef([zlogout],[undefine([zlogout])])dnl
191
AC_ARG_ENABLE(zlogout,
192
AC_HELP_STRING([--enable-zlogout=FILE], [the full pathname of the global zlogout script]),
193
[zlogout="$enableval"],
194
[if test "x$etcdir" = xno; then
197
zlogout="$etcdir/zlogout"
199
AH_TEMPLATE([GLOBAL_ZLOGOUT],
200
[The global file to source whenever zsh was run as a login shell.
201
This is sourced right before exiting. If undefined, don't source
203
if test "x$zlogout" != xno; then
204
AC_DEFINE_UNQUOTED(GLOBAL_ZLOGOUT, "$zlogout")
209
AC_SUBST(zprofile)dnl
213
dnl Do you want dynamically loaded binary modules.
214
ifdef([dynamic],[undefine([dynamic])])dnl
215
AC_ARG_ENABLE(dynamic,
216
AC_HELP_STRING([--disable-dynamic], [turn off dynamically loaded binary modules]),
217
[dynamic="$enableval"], [dynamic=yes])
219
dnl Do you want to disable restricted on r* commands
220
ifdef([restricted-r],[undefine([restricted-r])])dnl
221
AH_TEMPLATE([RESTRICTED_R],
222
[Undefine this if you don't want to get a restricted shell
223
when zsh is exec'd with basename that starts with r.
224
By default this is defined.])
225
AC_ARG_ENABLE(restricted-r,
226
AC_HELP_STRING([--disable-restricted-r], [turn off r* invocation for restricted shell]),
227
[if test x$enableval = xyes; then
228
AC_DEFINE(RESTRICTED_R)
230
AC_DEFINE(RESTRICTED_R)
233
dnl Do you want to disable use of locale functions
234
AH_TEMPLATE([CONFIG_LOCALE],
235
[Undefine if you don't want local features. By default this is defined.])
236
AC_ARG_ENABLE([locale],
237
AC_HELP_STRING([--disable-locale], [turn off locale features]),
238
[if test x$enableval = xyes; then
239
AC_DEFINE(CONFIG_LOCALE)
241
AC_DEFINE(CONFIG_LOCALE)
244
dnl Do you want to compile as K&R C.
245
AC_ARG_ENABLE(ansi2knr,
246
AC_HELP_STRING([--enable-ansi2knr], [translate source to K&R C before compiling]),
247
[ansi2knr="$enableval"], [ansi2knr=default])
249
ifdef([fndir],[undefine([fndir])])dnl
251
AC_HELP_STRING([--enable-fndir=DIR], [the directory in which to install functions]),
252
dnl ${VERSION} to be determined at compile time.
253
[if test x$enableval = xyes; then
254
fndir=${datadir}/${tzsh_name}/'${VERSION}'/functions
257
fi], [fndir=${datadir}/${tzsh_name}/'${VERSION}'/functions])
259
ifdef([sitefndir],[undefine([sitefndir])])dnl
260
AC_ARG_ENABLE(site-fndir,
261
AC_HELP_STRING([--enable-site-fndir=DIR], [same for site functions (not version specific)]),
262
[if test x$enableval = xyes; then
263
sitefndir=${datadir}/${tzsh_name}/site-functions
265
sitefndir="$enableval"
266
fi], [sitefndir=${datadir}/${tzsh_name}/site-functions])
268
ifdef([function_subdirs],[undefine([function_subdirs])])
269
AC_ARG_ENABLE(function-subdirs,
270
AC_HELP_STRING([--enable-function-subdirs], [install functions in subdirectories]))
272
if test "x${enable_function_subdirs}" != x &&
273
test "x${enable_function_subdirs}" != xno; then
274
FUNCTIONS_SUBDIRS=yes
280
AC_SUBST(sitefndir)dnl
281
AC_SUBST(FUNCTIONS_SUBDIRS)dnl
283
dnl Directories for scripts such as newuser.
285
ifdef([scriptdir],[undefine([scriptdir])])dnl
286
AC_ARG_ENABLE(scriptdir,
287
AC_HELP_STRING([--enable-scriptdir=DIR], [the directory in which to install scripts]),
288
dnl ${VERSION} to be determined at compile time.
289
[if test x$enableval = xyes; then
290
scriptdir=${datadir}/${tzsh_name}/'${VERSION}'/scripts
292
scriptdir="$enableval"
293
fi], [scriptdir=${datadir}/${tzsh_name}/'${VERSION}'/scripts])
295
ifdef([sitescriptdir],[undefine([sitescriptdir])])dnl
296
AC_ARG_ENABLE(site-scriptdir,
297
AC_HELP_STRING([--enable-site-scriptdir=DIR], [same for site scripts (not version specific)]),
298
[if test x$enableval = xyes; then
299
sitescriptdir=${datadir}/${tzsh_name}/scripts
301
sitescriptdir="$enableval"
302
fi], [sitescriptdir=${datadir}/${tzsh_name}/scripts])
304
AC_SUBST(scriptdir)dnl
305
AC_SUBST(sitescriptdir)dnl
307
dnl htmldir is already handled, but if it wasn't set, use
308
dnl the standard zsh default.
309
if test x$htmldir = x'${docdir}' || test x$htmldir = x; then
310
htmldir='$(datadir)/$(tzsh)/htmldoc'
313
AH_TEMPLATE([CUSTOM_PATCHLEVEL],
314
[Define to a custom value for the ZSH_PATCHLEVEL parameter])
315
AC_ARG_ENABLE(custom-patchlevel,
316
AC_HELP_STRING([--enable-custom-patchlevel], [set a custom ZSH_PATCHLEVEL value]),
317
[if test x$enableval != x && test x$enableval != xno; then
318
AC_DEFINE_UNQUOTED([CUSTOM_PATCHLEVEL], ["$enableval"])
321
dnl Do you want maildir support?
322
ifdef([maildir_support],[undefine([maildir_support])])dnl
323
AH_TEMPLATE([MAILDIR_SUPPORT],
324
[Define for Maildir support])
325
AC_ARG_ENABLE(maildir-support,
326
AC_HELP_STRING([--enable-maildir-support], [enable maildir support in MAIL and MAILPATH]),
327
[if test x$enableval = xyes; then
328
AC_DEFINE(MAILDIR_SUPPORT)
331
dnl Do you want to set a maximum function depth?
332
ifdef([max_function_depth],[undefine([max_function_depth])])dnl
333
AH_TEMPLATE([MAX_FUNCTION_DEPTH],
334
[Define for function depth limits])
335
AC_ARG_ENABLE(max-function-depth,
336
AC_HELP_STRING([--enable-max-function-depth=MAX], [limit function depth to MAX, default 1000]),
337
[if test x$enableval = xyes; then
338
AC_DEFINE(MAX_FUNCTION_DEPTH, 1000)
339
elif test x$enableval != xno; then
340
AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval)
342
[AC_DEFINE(MAX_FUNCTION_DEPTH, 1000)]
345
ifdef([default_readnullcmd],[undefine([default_readnullcmd])])dnl
346
AH_TEMPLATE([DEFAULT_READNULLCMD],
347
[Define default pager used by readnullcmd])
348
AC_ARG_ENABLE(readnullcmd,
349
AC_HELP_STRING([--enable-readnullcmd=PAGER], [pager used when READNULLCMD is not set]),
350
[if test x$enableval = xyes; then
351
AC_DEFINE(DEFAULT_READNULLCMD,"more")
352
elif test x$enableval != xno; then
353
AC_DEFINE_UNQUOTED(DEFAULT_READNULLCMD,"$enableval")
355
[AC_DEFINE(DEFAULT_READNULLCMD,"more")]
358
dnl Do you want to look for pcre support?
360
AC_HELP_STRING([--enable-pcre],
361
[enable the search for the pcre library (may create run-time library dependencies)]))
363
dnl Do you want to look for capability support?
365
AC_HELP_STRING([--enable-cap],
366
[enable the search for POSIX capabilities (may require additional headers to be added by hand)]))
369
AC_HELP_STRING([--disable-gdbm], [turn off search for gdbm library]),
370
[gdbm="$enableval"], [gdbm=yes])
372
dnl ------------------
373
dnl CHECK THE COMPILER
374
dnl ------------------
375
dnl We want these before the checks, so the checks can modify their values.
376
test -z "${CFLAGS+set}" && CFLAGS= auto_cflags=1
377
test -z "${LDFLAGS+set}" && LDFLAGS= auto_ldflags=1
381
dnl Check for large file support.
383
dnl Gross hack for ReliantUNIX - GCC does not understand getconf options
384
dnl For now just disable LFS in this case
386
if test "$host" = mips-sni-sysv4 && test -n "$GCC"; then
392
dnl if the user hasn't specified CFLAGS, then
393
dnl if compiler is gcc, then use -O2 and some warning flags
395
if test -n "$auto_cflags" && test ."$ansi2knr" != .yes; then
396
if test "${enable_zsh_debug}" = yes; then
397
if test -n "$GCC"; then
398
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -ggdb"
403
if test -n "$GCC"; then
404
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -O2"
410
if test -n "$auto_ldflags"; then
411
case "${enable_zsh_debug}$host_os" in
412
yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid on these systems
413
darwin*) LDFLAGS=-Wl,-x ;;
422
dnl Sco doesn't define any useful compiler symbol,
423
dnl so we will check for sco and define __sco if
426
sco*) CFLAGS="-D__sco $CFLAGS" ;;
436
*" -s "*) strip_exeldflags=true strip_libldflags=true
437
LDFLAGS=`echo " $LDFLAGS " | sed "$sed"` ;;
438
*) strip_exeldflags=false strip_libldflags=false ;;
441
case " ${EXELDFLAGS+$EXELDFLAGS }" in
443
*" -s "*) strip_exeldflags=true
444
EXELDFLAGS=`echo " $EXELDFLAGS " | sed "$sed"` ;;
445
*) strip_exeldflags=false ;;
448
case " ${LIBLDFLAGS+$LIBLDFLAGS }" in
450
*" -s "*) strip_libldflags=true
451
LIBLDFLAGS=`echo " $LIBLDFLAGS " | sed "$sed"` ;;
452
*) strip_libldflags=false ;;
457
AC_SUBST(EXELDFLAGS)dnl
458
AC_SUBST(LIBLDFLAGS)dnl
460
AC_PROG_CPP dnl Figure out how to run C preprocessor.
461
AC_PROG_GCC_TRADITIONAL dnl Do we need -traditional flag for gcc.
462
AC_C_CONST dnl Does compiler support `const'.
464
dnl Default preprocessing on Mac OS X produces warnings
465
dnl Mac OS X 10.6 (darwin10.x.x) does not need this.
467
darwin[[0-9]].*) CPP="$CPP -traditional-cpp" ;;
471
AC_MSG_CHECKING([whether to use prototypes])
472
if test ."$ansi2knr" = .yes || test ."$ansi2knr" = .no; then
476
if test ."$fp_cv_prog_cc_stdc" = .no; then
482
AH_TEMPLATE([PROTOTYPES],
483
[Define to 1 if ANSI function prototypes are usable.])
484
if test "$ansi2knr" = yes; then
485
AC_MSG_RESULT(${msg}no)
488
AC_MSG_RESULT(${msg}yes)
489
AC_DEFINE(PROTOTYPES)
494
AC_FUNC_ALLOCA dnl Check how to get `alloca'.
496
dnl If the compiler supports union initialisation
497
AC_CACHE_CHECK(if the compiler supports union initialisation,
498
zsh_cv_c_have_union_init,
499
[AC_TRY_COMPILE([union{void *p;long l;}u={0};], [u.l=1;],
500
zsh_cv_c_have_union_init=yes,
501
zsh_cv_c_have_union_init=no)])
502
AH_TEMPLATE([HAVE_UNION_INIT],
503
[Define to 1 if the compiler can initialise a union.])
504
if test x$zsh_cv_c_have_union_init = xyes; then
505
AC_DEFINE(HAVE_UNION_INIT)
508
dnl Checking if compiler correctly cast signed to unsigned.
509
AC_CACHE_CHECK(if signed to unsigned casting is broken,
510
zsh_cv_c_broken_signed_to_unsigned_casting,
511
[AC_TRY_RUN([main(){return((int)(unsigned char)((char) -1) == 255);}],
512
zsh_cv_c_broken_signed_to_unsigned_casting=yes,
513
zsh_cv_c_broken_signed_to_unsigned_casting=no,
514
zsh_cv_c_broken_signed_to_unsigned_casting=no)])
515
AH_TEMPLATE([BROKEN_SIGNED_TO_UNSIGNED_CASTING],
516
[Define to 1 if compiler incorrectly cast signed to unsigned.])
517
if test x$zsh_cv_c_broken_signed_to_unsigned_casting = xyes; then
518
AC_DEFINE(BROKEN_SIGNED_TO_UNSIGNED_CASTING)
521
dnl Checking if the compiler supports variable-length arrays
522
AC_CACHE_CHECK(if the compiler supports variable-length arrays,
523
zsh_cv_c_variable_length_arrays,
524
[AC_TRY_COMPILE([int foo(), n;], [int i[foo()], a[n+1];],
525
zsh_cv_c_variable_length_arrays=yes,
526
zsh_cv_c_variable_length_arrays=no)])
527
AH_TEMPLATE([HAVE_VARIABLE_LENGTH_ARRAYS],
528
[Define to 1 if compiler supports variable-length arrays])
529
if test x$zsh_cv_c_variable_length_arrays = xyes; then
530
AC_DEFINE(HAVE_VARIABLE_LENGTH_ARRAYS)
533
dnl ------------------
534
dnl CHECK FOR PROGRAMS
535
dnl ------------------
536
AC_PROG_MAKE_SET dnl Does make define $MAKE
537
AC_PROG_INSTALL dnl Check for BSD compatible `install'
538
AC_PROG_AWK dnl Check for mawk,gawk,nawk, then awk.
539
AC_PROG_LN dnl Check for working ln, for "make install"
540
AC_PROG_EGREP dnl sets $EGREP to grep -E or egrep
541
AC_CHECK_PROGS([YODL], [yodl], [: yodl])
544
if test "x$ac_cv_prog_YODL" = xyodl; then
545
case `yodl --version` in
546
*"version 3."*) YODL_OPTIONS='-L' ;;
549
AC_SUBST(YODL_OPTIONS)
551
AC_CHECK_PROGS([PDFETEX], [pdfetex], [: pdfetex])
552
AC_CHECK_PROGS([TEXI2PDF], [texi2pdf], [])
553
AC_CHECK_PROGS([TEXI2HTML], [texi2html], [])
554
AC_CHECK_PROGS([ANSI2KNR], [ansi2knr], [: ansi2knr])
556
if test x"$ansi2knr" = xyes && test x"$ANSI2KNR" = x": ansi2knr"; then
558
echo "configure fatal error:"
559
echo "ansi2knr was specified (--enable-ansi2knr) but the program could not be found."
560
echo "Either remove the configure option if it is not required or build the ansi2knr"
561
echo "program before reconfiguring Zsh. The source code for ansi2knr is also"
562
echo "available in the GPL directory on Zsh distribution sites."
566
dnl ------------------
567
dnl CHECK HEADER FILES
568
dnl ------------------
576
if test x$enable_pcre = xyes; then
577
AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config)
578
dnl Typically (meaning on this single RedHat 9 box in front of me)
579
dnl pcre-config --cflags produces a -I output which needs to go into
580
dnl CPPFLAGS else configure's preprocessor tests don't pick it up,
581
dnl producing a warning.
582
if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then
583
CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
587
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
588
termios.h sys/param.h sys/filio.h string.h memory.h \
589
limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
590
locale.h errno.h stdio.h stdarg.h varargs.h stdlib.h \
591
unistd.h sys/capability.h \
592
utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
593
netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \
594
sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \
596
if test x$dynamic = xyes; then
597
AC_CHECK_HEADERS(dlfcn.h)
598
AC_CHECK_HEADERS(dl.h)
601
dnl Some SCO systems cannot include both sys/time.h and sys/select.h
602
AH_TEMPLATE([TIME_H_SELECT_H_CONFLICTS],
603
[Define if sys/time.h and sys/select.h cannot be both included.])
604
if test x$ac_cv_header_sys_time_h = xyes && test x$ac_cv_header_sys_select_h = xyes; then
605
AC_CACHE_CHECK(for conflicts in sys/time.h and sys/select.h,
606
zsh_cv_header_time_h_select_h_conflicts,
607
[AC_TRY_COMPILE([#include <sys/time.h>
608
#include <sys/select.h>], [int i;],
609
zsh_cv_header_time_h_select_h_conflicts=no,
610
zsh_cv_header_time_h_select_h_conflicts=yes)])
611
if test x$zsh_cv_header_time_h_select_h_conflicts = xyes; then
612
AC_DEFINE(TIME_H_SELECT_H_CONFLICTS)
616
AH_TEMPLATE([GWINSZ_IN_SYS_IOCTL],
617
[Define if TIOCGWINSZ is defined in sys/ioctl.h but not in termios.h.])
618
if test x$ac_cv_header_termios_h = xyes; then
619
AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
620
zsh_cv_header_termios_h_tiocgwinsz,
622
#ifdef HAVE_SYS_TYPES_H
623
# include <sys/types.h>
625
#include <termios.h>],
626
[int x = TIOCGWINSZ;],
627
zsh_cv_header_termios_h_tiocgwinsz=yes,
628
zsh_cv_header_termios_h_tiocgwinsz=no)])
630
zsh_cv_header_termios_h_tiocgwinsz=no
632
if test x$zsh_cv_header_termios_h_tiocgwinsz = xno; then
633
AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
634
zsh_cv_header_sys_ioctl_h_tiocgwinsz,
636
#ifdef HAVE_SYS_TYPES_H
637
# include <sys/types.h>
639
#include <sys/ioctl.h>],
640
[int x = TIOCGWINSZ;],
641
zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
642
zsh_cv_header_sys_ioctl_h_tiocgwinsz=no)])
643
if test x$zsh_cv_header_sys_ioctl_h_tiocgwinsz = xyes; then
644
AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
648
AH_TEMPLATE([WINSIZE_IN_PTEM],
649
[Define if your should include sys/stream.h and sys/ptem.h.])
650
AC_CACHE_CHECK(for streams headers including struct winsize,
651
ac_cv_winsize_in_ptem,
652
[AC_TRY_COMPILE([#include <sys/stream.h>
653
#include <sys/ptem.h>],
654
[struct winsize wsz],
655
ac_cv_winsize_in_ptem=yes,
656
ac_cv_winsize_in_ptem=no)])
657
if test x$ac_cv_winsize_in_ptem = xyes; then
658
AC_DEFINE(WINSIZE_IN_PTEM)
661
dnl -------------------
662
dnl CHECK FOR LIBRARIES
663
dnl -------------------
665
dnl On some systems, modules need to be linked against libc explicitly,
666
dnl in case they require objects that exist only in the static version
667
dnl and might not be compiled into the zsh executable.
668
dnl On ReliantUNIX -lc better be the last library, else funny things
670
AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"])
674
dnl Various features of ncurses depend on having the right header
675
dnl (the system's own curses.h may well not be good enough).
676
dnl So don't search for ncurses unless we found the header.
677
if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes || test x$ac_cv_header_ncursesw_ncurses_h = xyes; then
678
ncursesw_test=ncursesw
685
dnl Prefer BSD termcap library to SysV curses library, except on certain
686
dnl SYSV-derived systems. However, if we find terminfo and termcap
687
dnl stuff in the same library we will use that; typically this
688
dnl is ncurses or curses.
689
dnl On pre-11.11 HPUX, Hcurses is reported to work better than curses.
690
dnl Prefer ncurses to curses on all systems. tinfo isn't very common now.
691
AC_ARG_WITH(term-lib,
692
AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
693
[if test "x$withval" != xno && test "x$withval" != x ; then
694
termcap_curses_order="$withval"
695
AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
697
termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses"
701
termcap_curses_order="$ncursesw_test $ncurses_test curses termcap" ;;
703
DL_EXT="${DL_EXT=sl}"
704
termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;;
706
termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;;
709
AH_TEMPLATE([ZSH_NO_XOPEN],
710
[Define if _XOPEN_SOURCE_EXTENDED should not be defined to avoid clashes])
711
AC_CACHE_CHECK(if _XOPEN_SOURCE_EXTENDED should not be defined,
714
*openbsd*|*freebsd5*|*freebsd6.[012]*|*aix*)
721
if test x$zsh_cv_no_xopen = xyes; then
722
AC_DEFINE(ZSH_NO_XOPEN)
725
dnl Check for tigetflag (terminfo) before tgetent (termcap).
726
dnl That's so that on systems where termcap and [n]curses are
727
dnl both available and both contain termcap functions, while
728
dnl only [n]curses contains terminfo functions, we only link against
730
AC_SEARCH_LIBS(tigetflag, [$termcap_curses_order])
731
AC_SEARCH_LIBS(tgetent, [$termcap_curses_order],
733
AC_MSG_FAILURE(["No terminal handling library was found on your system.
734
This is probably a library called 'curses' or 'ncurses'. You may
735
need to install a package called 'curses-devel' or 'ncurses-devel' on your
737
AC_CHECK_HEADERS(curses.h, [],
738
[AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris,
739
AC_TRY_COMPILE([#include <curses.h>], [],
740
[ac_cv_header_curses_h=yes
741
ac_cv_header_curses_solaris=yes],
742
ac_cv_header_curses_h=no
743
ac_cv_header_curses_solaris=no))
744
if test x$ac_cv_header_curses_solaris = xyes; then
745
AC_DEFINE(HAVE_CURSES_H)
748
dnl If our terminal library is not ncurses, don't try including
749
dnl any ncurses headers.
750
AC_CACHE_CHECK(if we need to ignore ncurses, zsh_cv_ignore_ncurses,
753
zsh_cv_ignore_ncurses=no
756
zsh_cv_ignore_ncurses=yes
760
AC_SEARCH_LIBS(getpwnam, nsl)
762
dnl I am told that told that unicos reqire these for nis_list
763
if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
764
LIBS="-lcraylm -lkrb -lnisdb -lnsl -lrpcsvc $LIBS"
767
if test "x$dynamic" = xyes; then
768
AC_CHECK_LIB(dl, dlopen)
771
if test x$enable_cap = xyes; then
772
AC_CHECK_LIB(cap, cap_get_proc)
775
AC_CHECK_LIB(socket, socket)
776
AC_SEARCH_LIBS(gethostbyname2, bind)
780
AC_CHECK_HEADERS(bind/netdb.h)
788
dnl Find iconv. It may be in libiconv and may be iconv() or libiconv()
789
if test "x$ac_cv_header_iconv_h" = "xyes"; then
790
AC_CHECK_FUNC(iconv, ac_found_iconv=yes, ac_found_iconv=no)
791
if test "x$ac_found_iconv" = "xno"; then
792
AC_CHECK_LIB(iconv, iconv, ac_found_iconv=yes)
793
if test "x$ac_found_iconv" = "xno"; then
794
AC_CHECK_LIB(iconv, libiconv, ac_found_iconv=yes)
796
if test "x$ac_found_iconv" != "xno"; then
800
dnl Handle case where there is a native iconv but iconv.h is from libiconv
801
AC_CHECK_DECL(_libiconv_version,
802
[ AC_CHECK_LIB(iconv, libiconv, LIBS="-liconv $LIBS") ],,
803
[ #include <iconv.h> ])
806
AH_TEMPLATE([ICONV_FROM_LIBICONV],
807
[Define to 1 if iconv() is linked from libiconv])
808
if test "x$ac_found_iconv" = xyes; then
809
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
810
AC_TRY_LINK([#include <iconv.h>],
811
[int myversion = _libiconv_version],
812
AC_DEFINE(ICONV_FROM_LIBICONV), )
815
dnl Check if iconv uses const in prototype declaration
816
if test "x$ac_found_iconv" = "xyes"; then
817
AC_CACHE_CHECK(for iconv declaration, ac_cv_iconv_const,
818
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
819
#include <iconv.h>]],
823
#if defined(__STDC__) || defined(__cplusplus)
824
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
828
[ac_cv_iconv_const=],
829
[ac_cv_iconv_const=const])])
830
AC_DEFINE_UNQUOTED([ICONV_CONST], $ac_cv_iconv_const,
831
[Define as const if the declaration of iconv() needs const.])
834
if test x$enable_pcre = xyes; then
835
dnl pcre-config should probably be employed here
836
dnl AC_SEARCH_LIBS(pcre_compile, pcre)
837
LIBS="`pcre-config --libs` $LIBS"
840
dnl ---------------------
841
dnl CHECK TERMCAP LIBRARY
842
dnl ---------------------
843
dnl Checks for external variable ospeed in the termcap library.
844
AC_CACHE_CHECK(if an include file defines ospeed,
845
zsh_cv_decl_ospeed_include_defines,
847
[#include <sys/types.h>
853
#endif], [ospeed = 0;],
854
zsh_cv_decl_ospeed_include_defines=yes,
855
zsh_cv_decl_ospeed_include_defines=no)])
857
if test x$zsh_cv_decl_ospeed_include_defines = xno; then
858
AC_CACHE_CHECK(if you must define ospeed,
859
zsh_cv_decl_ospeed_must_define,
860
[AC_TRY_LINK( ,[extern short ospeed; ospeed = 0;],
861
zsh_cv_decl_ospeed_must_define=yes,
862
zsh_cv_decl_ospeed_must_define=no)])
865
AH_TEMPLATE([HAVE_OSPEED],
866
[Define to 1 if your termcap library has the ospeed variable])
867
AH_TEMPLATE([MUST_DEFINE_OSPEED],
868
[Define to 1 if you have ospeed, but it is not defined in termcap.h])
869
if test x$zsh_cv_decl_ospeed_include_defines = xyes; then
870
AC_DEFINE(HAVE_OSPEED)
871
elif test x$zsh_cv_decl_ospeed_must_define = xyes; then
872
AC_DEFINE(HAVE_OSPEED)
873
AC_DEFINE(MUST_DEFINE_OSPEED)
876
if test x$gdbm != xno; then
877
AC_CHECK_HEADERS(gdbm.h)
878
AC_CHECK_LIB(gdbm, gdbm_open)
881
AC_CHECK_HEADERS(sys/xattr.h)
890
AC_CHECK_TYPE(ino_t, unsigned long)
895
dnl ------------------------------------------------
896
dnl Check size of long and try to find a 64-bit type
897
dnl ------------------------------------------------
898
dnl AC_CHECK_SIZEOF is no good, because we need the result here,
899
dnl and that doesn't seem to define a shell parameter.
900
AC_CACHE_CHECK(if long is 64 bits, zsh_cv_long_is_64_bit,
901
[AC_TRY_RUN([int main() { return sizeof(long) < 8; }],
902
zsh_cv_long_is_64_bit=yes,
903
zsh_cv_long_is_64_bit=no,
904
zsh_cv_long_is_64_bit=no)])
907
[Define to `unsigned long' if <sys/types.h> doesn't define.])
908
AH_TEMPLATE([LONG_IS_64_BIT],
909
[Definitions used when a long is less than eight byte, to try to
910
provide some support for eight byte operations.
912
Note that ZSH_64_BIT_TYPE, OFF_T_IS_64_BIT, INO_T_IS_64_BIT do *not* get
913
defined if long is already 64 bits, since in that case no special handling
916
Define to 1 if long is 64 bits])
917
AH_TEMPLATE([ZSH_64_BIT_TYPE],
918
[Define to a 64 bit integer type if there is one, but long is shorter.])
919
AH_TEMPLATE([ZSH_64_BIT_UTYPE],
920
[Define to an unsigned variant of ZSH_64_BIT_TYPE if that is defined.])
921
AH_TEMPLATE([OFF_T_IS_64_BIT],
922
[Define to 1 if off_t is 64 bit (for large file support)])
923
AH_TEMPLATE([INO_T_IS_64_BIT],
924
[Define to 1 if ino_t is 64 bit (for large file support).])
925
if test x$zsh_cv_long_is_64_bit = xyes; then
926
AC_DEFINE(LONG_IS_64_BIT)
928
AC_CACHE_CHECK(if off_t is 64 bit, zsh_cv_off_t_is_64_bit,
930
#include <sys/types.h>
932
main() { return sizeof(off_t) < 8; }
934
zsh_cv_off_t_is_64_bit=yes,
935
zsh_cv_off_t_is_64_bit=no,
936
zsh_cv_off_t_is_64_bit=no)])
937
if test x$zsh_cv_off_t_is_64_bit = xyes; then
938
AC_DEFINE(OFF_T_IS_64_BIT)
941
AC_CACHE_CHECK(if ino_t is 64 bit, zsh_cv_ino_t_is_64_bit,
943
#include <sys/types.h>
945
main() { return sizeof(ino_t) < 8; }
947
zsh_cv_ino_t_is_64_bit=yes,
948
zsh_cv_ino_t_is_64_bit=no,
949
zsh_cv_ino_t_is_64_bit=no)])
950
if test x$zsh_cv_ino_t_is_64_bit = xyes; then
951
AC_DEFINE(INO_T_IS_64_BIT)
954
if test x$enable_largefile != xno -o x$zsh_cv_off_t_is_64_bit = xyes \
955
-o $zsh_cv_ino_t_is_64_bit = yes; then
956
AC_CACHE_CHECK(if compiler has a 64 bit type, zsh_cv_64_bit_type,
957
[zsh_64_BIT_TYPE(long long, zsh_cv_64_bit_type)
958
if test "$zsh_cv_64_bit_type" = no; then
959
zsh_64_BIT_TYPE(quad_t, zsh_cv_64_bit_type)
961
if test "$zsh_cv_64_bit_type" = no; then
962
zsh_64_BIT_TYPE(__int64_t, zsh_cv_64_bit_type)
964
dnl As a last resort, if we know off_t has 64 bits, use that as
965
dnl the 64-bit integer type. I don't dare try ino_t since there's
966
dnl probably nothing to stop that being unsigned.
967
if test "$zsh_cv_64_bit_type" = no &&
968
test "$zsh_cv_off_t_is_64_bit" = yes; then
969
zsh_64_BIT_TYPE(off_t, zsh_cv_64_bit_type)
971
if test "$zsh_cv_64_bit_type" != no; then
972
AC_DEFINE_UNQUOTED(ZSH_64_BIT_TYPE, $zsh_cv_64_bit_type)
974
dnl Handle cases where unsigned type cannot be simply
975
dnl `unsigned ZSH_64_BIT_TYPE'. More tests may be required.
976
AC_CACHE_CHECK(for a corresponding unsigned 64 bit type,
978
[zsh_64_BIT_TYPE(unsigned $zsh_cv_64_bit_type, zsh_cv_64_bit_utype,
980
if test "$zsh_cv_64_bit_utype" = no; then
981
zsh_64_BIT_TYPE(__uint64_t, zsh_cv_64_bit_utype)
983
if test "$zsh_cv_64_bit_utype" != no; then
984
AC_DEFINE_UNQUOTED(ZSH_64_BIT_UTYPE, $zsh_cv_64_bit_utype)
990
dnl Check for sigset_t. Currently I'm looking in
991
dnl <sys/types.h> and <signal.h>. Others might need
993
AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t,
995
[#include <sys/types.h>
996
#include <signal.h>], [sigset_t tempsigset;],
997
zsh_cv_type_sigset_t=yes, zsh_cv_type_sigset_t=no)])
998
AH_TEMPLATE([sigset_t],
999
[Define to `unsigned int' if <sys/types.h> or <signal.h> doesn't define])
1000
if test x$zsh_cv_type_sigset_t = xno; then
1001
AC_DEFINE(sigset_t, unsigned int)
1004
dnl check structures for high resolution timestamps
1005
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec,
1006
struct stat.st_atimespec.tv_nsec,
1007
struct stat.st_atimensec,
1008
struct stat.st_mtim.tv_nsec,
1009
struct stat.st_mtimespec.tv_nsec,
1010
struct stat.st_mtimensec,
1011
struct stat.st_ctim.tv_nsec,
1012
struct stat.st_ctimespec.tv_nsec,
1013
struct stat.st_ctimensec])
1015
dnl Check for struct timezone since some old SCO versions do not define it
1017
#ifdef HAVE_SYS_TIME_H
1018
# include <sys/time.h>
1022
dnl Check for utmp structures, for watch
1024
#ifdef HAVE_SYS_TYPES_H
1025
# include <sys/types.h>
1032
#ifdef HAVE_SYS_TYPES_H
1033
# include <sys/types.h>
1040
dnl Check contents of utmp structures
1042
#ifdef HAVE_SYS_TYPES_H
1043
# include <sys/types.h>
1048
], struct utmp, ut_host)
1050
#ifdef HAVE_SYS_TYPES_H
1051
# include <sys/types.h>
1056
], struct utmpx, ut_host)
1058
#ifdef HAVE_SYS_TYPES_H
1059
# include <sys/types.h>
1064
], struct utmpx, ut_xtime)
1066
#ifdef HAVE_SYS_TYPES_H
1067
# include <sys/types.h>
1072
], struct utmpx, ut_tv)
1074
dnl Check for inode numbers in directory entry structures
1076
#ifdef HAVE_SYS_TYPES_H
1077
# include <sys/types.h>
1079
#ifdef HAVE_DIRENT_H
1080
# include <dirent.h>
1082
], struct dirent, d_ino)
1084
#ifdef HAVE_SYS_TYPES_H
1085
# include <sys/types.h>
1087
#ifdef HAVE_DIRENT_H
1088
# include <dirent.h>
1090
], struct dirent, d_stat)
1092
#ifdef HAVE_SYS_TYPES_H
1093
# include <sys/types.h>
1095
#ifdef HAVE_SYS_NDIR_H
1096
# include <sys/ndir.h>
1098
#ifdef HAVE_SYS_DIR_H
1099
# include <sys/dir.h>
1104
], struct direct, d_ino)
1106
#ifdef HAVE_SYS_TYPES_H
1107
# include <sys/types.h>
1109
#ifdef HAVE_SYS_NDIR_H
1110
# include <sys/ndir.h>
1112
#ifdef HAVE_SYS_DIR_H
1113
# include <sys/dir.h>
1118
], struct direct, d_stat)
1120
dnl Check IPv6 socket address structure type
1122
#ifdef HAVE_SYS_TYPES_H
1123
# include <sys/types.h>
1125
#include <netinet/in.h>
1126
], struct sockaddr_in6, sin6_scope_id)
1128
dnl Check for h_errno external variable
1129
AH_TEMPLATE([USE_LOCAL_H_ERRNO],
1130
[Define to 1 if h_errno is not defined by the system.])
1131
AC_CACHE_CHECK(if we need our own h_errno,
1132
zsh_cv_decl_h_errno_use_local,
1133
[AC_TRY_LINK( ,[extern int h_errno; h_errno = 0;],
1134
zsh_cv_decl_h_errno_use_local=no,
1135
zsh_cv_decl_h_errno_use_local=yes)])
1137
if test x$zsh_cv_decl_h_errno_use_local = xyes; then
1138
AC_DEFINE(USE_LOCAL_H_ERRNO)
1145
dnl need to integrate this function
1146
dnl AC_FUNC_STRFTIME
1148
AC_CHECK_FUNCS(strftime strptime mktime timelocal \
1149
difftime gettimeofday \
1151
readlink faccessx fchdir ftruncate \
1152
fstat lstat lchown fchown fchmod \
1154
mkfifo _mktemp mkstemp \
1156
sigaction sigblock sighold sigrelse sigsetmask sigprocmask \
1157
killpg setpgid setpgrp tcsetpgrp tcgetattr nice \
1158
gethostname gethostbyname2 getipnodebyname \
1159
inet_aton inet_pton inet_ntop \
1160
getlogin getpwent getpwnam getpwuid getgrgid getgrnam \
1161
initgroups nis_list \
1162
setuid seteuid setreuid setresuid setsid \
1163
memcpy memmove strstr strerror strtoul \
1164
getrlimit getrusage \
1168
putenv getenv setenv unsetenv xw\
1171
tgetent tigetflag tigetnum tigetstr setupterm initscr \
1172
getcchar setcchar waddwstr wget_wch win_wch use_default_colors \
1173
pcre_compile pcre_study pcre_exec \
1175
erand48 open_memstream \
1177
grantpt unlockpt ptsname \
1179
regcomp regexec regerror regfree \
1180
gdbm_open getxattr \
1181
realpath canonicalize_file_name \
1185
if test x$enable_cap = xyes; then
1186
AC_CHECK_FUNCS(cap_get_proc)
1189
dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer)
1190
dnl Some termcaps reportedly accept a zero buffer, but then dump core
1192
dnl Under Cygwin test program crashes but exit code is still 0. So,
1193
dnl we test for a file that porgram should create
1194
AH_TEMPLATE([TGETENT_ACCEPTS_NULL],
1195
[Define to 1 if tgetent() accepts NULL as a buffer.])
1196
AC_CACHE_CHECK(if tgetent accepts NULL,
1197
zsh_cv_func_tgetent_accepts_null,
1202
int r1 = tgetent(buf, "vt100");
1203
int r2 = tgetent((char*)0,"vt100");
1204
if (r1 >= 0 && r1 == r2) {
1205
char tbuf[1024], *u;
1208
creat("conftest.tgetent", 0640);
1210
exit((r1 != r2) || r2 == -1);
1213
if test -f conftest.tgetent; then
1214
zsh_cv_func_tgetent_accepts_null=yes
1216
zsh_cv_func_tgetent_accepts_null=no
1218
zsh_cv_func_tgetent_accepts_null=no,
1219
zsh_cv_func_tgetent_accepts_null=no)])
1220
if test x$zsh_cv_func_tgetent_accepts_null = xyes; then
1221
AC_DEFINE(TGETENT_ACCEPTS_NULL)
1223
AC_CACHE_CHECK(if tgetent returns 0 on success,
1224
zsh_cv_func_tgetent_zero_success,
1229
int r1 = tgetent(buf, "!@#$%^&*");
1230
int r2 = tgetent(buf, "vt100");
1231
if (r1 < 0 && r2 == 0) {
1232
char tbuf[1024], *u;
1235
creat("conftest.tgetent0", 0640);
1240
if test -f conftest.tgetent0; then
1241
zsh_cv_func_tgetent_zero_success=yes
1243
zsh_cv_func_tgetent_zero_success=no
1245
zsh_cv_func_tgetent_zero_success=no,
1246
zsh_cv_func_tgetent_zero_success=no)])
1247
AH_TEMPLATE([TGETENT_SUCCESS],
1248
[Define to what tgetent() returns on success (0 on HP-UX X/Open curses).])
1249
if test x$zsh_cv_func_tgetent_zero_success = xyes; then
1250
AC_DEFINE(TGETENT_SUCCESS, 0)
1252
AC_DEFINE(TGETENT_SUCCESS, 1)
1256
if test x$ac_cv_func_mmap_fixed_mapped = xyes; then
1257
AC_CHECK_FUNCS(munmap msync)
1260
if test x$ac_cv_func_setpgrp = xyes; then
1263
dnl If there is no setpgrp, the test for getpgrp(void) will fail
1264
dnl because the program will not compile. However, in that case
1265
dnl we can be reasonably confident we are not dealing with a
1266
dnl Berkeleyesque system, so assume getpgrp does take void.
1267
ac_cv_func_getpgrp_void=yes
1268
AC_DEFINE(GETPGRP_VOID)
1271
if test x$dynamic = xyes; then
1272
AC_CHECK_FUNCS(dlopen dlerror dlsym dlclose load loadquery loadbind unload \
1273
shl_load shl_unload shl_findsym)
1276
AH_TEMPLATE([XATTR_EXTRA_ARGS],
1277
Define if getxattr() etc. require additional MacOS-style arguments)
1278
if test x$ac_cv_func_getxattr = xyes && test x$ac_cv_header_sys_xattr_h = xyes
1280
AC_CACHE_CHECK(if getxattr etc. are Linux-like,
1281
zsh_cv_getxattr_linux,
1282
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1283
#include <sys/xattr.h>]],
1285
(void)listxattr("", 0, 0);
1286
(void)getxattr("", "", 0, 0);
1287
(void)setxattr("", "", "", 0, 0);
1288
(void)removexattr("", "");
1290
[zsh_cv_getxattr_linux=yes],
1291
[zsh_cv_getxattr_linux=no])])
1293
if test x$zsh_cv_getxattr_linux != xyes; then
1294
AC_CACHE_CHECK(if getxattr etc. are MAC-like,
1295
zsh_cv_getxattr_mac,
1296
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1297
#include <sys/xattr.h>]],
1298
[[(void)listxattr("", 0, 0, 0);
1299
(void)getxattr("", "", 0, 0, 0, 0);
1300
(void)setxattr("", "", "", 0, 0, 0);
1301
(void)removexattr("", "", 0);]])],
1302
[zsh_cv_getxattr_mac=yes],
1303
[zsh_cv_getxattr_mac=no])])
1305
if test x$zsh_cv_getxattr_mac = xyes; then
1306
AC_DEFINE(XATTR_EXTRA_ARGS)
1311
AC_CACHE_CHECK(if getxattr etc. are usable,
1313
[if test x$zsh_cv_getxattr_linux = xyes || test x$zsh_cv_getxattr_mac = xyes
1315
zsh_cv_use_xattr=yes
1323
dnl What style of signal do you have (POSIX, BSD, or SYSV)?
1324
AH_TEMPLATE([POSIX_SIGNALS],
1325
[Define to 1 if you use POSIX style signal handling.])
1326
AH_TEMPLATE([BSD_SIGNALS],
1327
[Define to 1 if you use BSD style signal handling (and can block signals).])
1328
AH_TEMPLATE([SYSV_SIGNALS],
1329
[Define to 1 if you use SYS style signal handling (and can block signals).])
1330
AH_TEMPLATE([NO_SIGNAL_BLOCKING],
1331
[Define to 1 if you have no signal blocking at all (bummer).])
1332
AC_MSG_CHECKING(what style of signals to use)
1333
if test x$ac_cv_func_sigaction = xyes && test x$ac_cv_func_sigprocmask = xyes; then
1334
signals_style=POSIX_SIGNALS
1335
AC_DEFINE(POSIX_SIGNALS)
1336
elif test x$ac_cv_func_sigblock = xyes && test x$ac_cv_func_sigsetmask = xyes; then
1337
signals_style=BSD_SIGNALS
1338
AC_DEFINE(BSD_SIGNALS)
1339
elif test x$ac_cv_func_sighold = xyes && test x$ac_cv_func_sigrelse = xyes; then
1340
signals_style=SYSV_SIGNALS
1341
AC_DEFINE(SYSV_SIGNALS)
1343
signals_style=NO_SIGNAL_BLOCKING
1344
AC_DEFINE(NO_SIGNAL_BLOCKING)
1346
AC_DEFINE_UNQUOTED($signals_style)
1347
AC_MSG_RESULT($signals_style)
1349
dnl Where is <signal.h> located? Needed as input for signals.awk
1350
AC_CACHE_CHECK(where signal.h is located, zsh_cv_path_signal_h,
1351
[dnl Look at the output from the preprocessor.
1352
dnl We should get lines of the form `# 1 "/usr/include/signal.h"'
1353
dnl The following assumes the real definitions are in a file which
1354
dnl contains the name `sig'; we could relax this if necessary,
1355
dnl but then you can get a rather long list of files to test.
1356
dnl The backslash substitution is to persuade cygwin to cough up
1357
dnl slashes rather than doubled backslashes in the path.
1358
echo "#include <signal.h>" > nametmp.c
1359
sigfile_list="`$CPP $CPPFLAGS nametmp.c |
1360
sed -n -e 's/^#line[ ].*\"\(.*\)\"/\1/p' \
1361
-e 's/^#[ ].*\"\(.*\)\"/\1/p' |
1362
sed 's/\\\\\\\\/\//g' |
1363
$AWK '{ if ($1 ~ /sig/) files[[$1]] = $1 }
1364
END { for (var in files) print var }'`"
1366
if test -z "$sigfile_list"; then
1367
dnl In case we don't get the stuff from the preprocesor, use the old
1368
dnl list of standard places.
1369
sigfile_list="/usr/include/sys/iso/signal_iso.h
1370
/usr/include/bsd/sys/signal.h
1371
/usr/include/signum.h
1372
/usr/include/asm/signum.h
1373
/usr/include/asm/signal.h
1374
/usr/include/linux/signal.h
1375
/usr/include/sys/signal.h
1376
/usr/include/bits/signum.h
1379
for SIGNAL_H in $sigfile_list
1381
dnl Try to make sure it doesn't get confused by files that don't
1382
dnl have real signal definitions in, but do #define SIG* by counting
1383
dnl the number of signals. Maybe we could even check for e.g. SIGHUP?
1384
nsigs=`test -f $SIGNAL_H && \
1385
grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_H | \
1386
wc -l | sed 's/[ ]//g'`
1387
test "x$nsigs" != x && test "$nsigs" -ge 7 && break
1389
if test x$SIGNAL_H = x"/dev/null"; then
1390
AC_MSG_ERROR(SIGNAL MACROS NOT FOUND: please report to developers)
1392
zsh_cv_path_signal_h=$SIGNAL_H
1394
SIGNAL_H=$zsh_cv_path_signal_h
1395
AC_SUBST(SIGNAL_H)dnl
1397
dnl Where are error names located? Needed as input for errnames1.awk
1398
AC_CACHE_CHECK(where error names are located, zsh_cv_path_errno_h,
1399
[dnl Look at the output from the preprocessor.
1400
dnl We should get lines of the form `# 1 "/usr/include/errno.h"'
1401
dnl The following assumes the real definitions are in a file which
1402
dnl contains the name `err'; we could relax this if necessary,
1403
dnl but then you can get a rather long list of files to test.
1404
dnl The backslash substitution is to persuade cygwin to cough up
1405
dnl slashes rather than doubled backslashes in the path.
1406
echo "#include <errno.h>" > nametmp.c
1407
errfile_list="`$CPP $CPPFLAGS nametmp.c |
1408
sed -n -e 's/^#line[ ].*\"\(.*\)\"/\1/p' \
1409
-e 's/^#[ 0-9].*\"\(.*\)\"/\1/p' |
1410
sed 's/\\\\\\\\/\//g' |
1411
$AWK '{ if ($1 ~ /err/) files[[$1]] = $1 }
1412
END { for (var in files) print var }'`"
1414
for ERRNO_TRY_H in $errfile_list /dev/null
1416
dnl Try to make sure it doesn't get confused by files that don't
1417
dnl have real error definitions in. Count definitions to make sure.
1418
dnl Definitions of error numbers have become more and more general, so
1419
dnl make a list of files containing any definitions in and keep them all.
1420
dnl Careful with cut and paste in the pattern: the square brackets
1421
dnl must contain a space and a tab.
1422
nerrs=`test -f $ERRNO_TRY_H && \
1423
$EGREP '#[ ]*define[ ][ ]*E[0-9A-Z]*[ ]*(_HURD_ERRNO )?\(?[_A-Z0-9]' $ERRNO_TRY_H | \
1424
wc -l | sed 's/[ ]//g'`
1425
if test "x$nerrs" != x && test "$nerrs" -ge 1
1427
ERRNO_H="$ERRNO_H $ERRNO_TRY_H"
1430
if test x"$ERRNO_H" = x; then
1431
AC_MSG_ERROR(ERROR MACROS NOT FOUND: please report to developers)
1433
zsh_cv_path_errno_h="$ERRNO_H"
1435
ERRNO_H="$zsh_cv_path_errno_h"
1436
AC_SUBST(ERRNO_H)dnl
1438
AC_CACHE_CHECK(location of curses header, zsh_cv_path_curses_header,
1439
[if test x$zsh_cv_ignore_ncurses = xyes; then
1440
if test x$ac_cv_header_curses_h = xyes; then
1441
zsh_cv_path_curses_header=curses.h
1443
zsh_cv_path_curses_header=none
1445
elif test x$ac_cv_header_ncursesw_ncurses_h = xyes; then
1446
zsh_cv_path_curses_header=ncursesw/ncurses.h
1447
elif test x$ac_cv_header_ncurses_ncurses_h = xyes; then
1448
zsh_cv_path_curses_header=ncurses/ncurses.h
1449
elif test x$ac_cv_header_ncurses_h = xyes; then
1450
zsh_cv_path_curses_header=ncurses.h
1451
elif test x$ac_cv_header_curses_h = xyes; then
1452
zsh_cv_path_curses_header=curses.h
1454
zsh_cv_path_curses_header=none
1456
AH_TEMPLATE([ZSH_HAVE_CURSES_H],
1457
[Define to 1 if some variant of a curses header can be included])
1458
if test x$zsh_cv_path_curses_header != xnone; then
1459
AC_DEFINE(ZSH_HAVE_CURSES_H)
1460
ZSH_CURSES_H=$zsh_cv_path_curses_header
1464
AC_SUBST(ZSH_CURSES_H)
1466
dnl Where are curses key definitions located? Need for keypad() mode.
1467
AC_CACHE_CHECK(where curses key definitions are located, zsh_cv_path_curses_keys_h,
1468
[dnl This is an identical trick to errno.h, except we use ncurses.h
1470
if test x$zsh_cv_path_curses_header = xnone; then
1473
echo "#include <$zsh_cv_path_curses_header>" >nametmp.c
1476
curses_list="`$CPP $CPPFLAGS nametmp.c |
1477
sed -n -e 's/^#line[ ].*\"\(.*\)\"/\1/p' \
1478
-e 's/^#[ 0-9].*\"\(.*\)\"/\1/p' |
1479
sed 's/\\\\\\\\/\//g' |
1480
$AWK '{ if ($1 ~ /\.h/) files[[$1]] = $1 }
1481
END { for (var in files) print var }'`"
1483
for CURSES_TRY_H in $curses_list /dev/null
1485
nkeys=`test -f $CURSES_TRY_H && \
1486
$EGREP '#[ ]*define[ ][ ]*KEY_' $CURSES_TRY_H | \
1487
wc -l | sed 's/[ ]//g'`
1488
if test "x$nkeys" != x && test "$nkeys" -ge 10
1490
CURSES_KEYS_H=$CURSES_TRY_H
1494
zsh_cv_path_curses_keys_h="$CURSES_KEYS_H"
1496
CURSES_KEYS_H="$zsh_cv_path_curses_keys_h"
1497
AC_SUBST(CURSES_KEYS_H)dnl
1499
dnl See if there are variants of term.h. For testing each one
1500
dnl we include the most likely variant of the curses header.
1501
AC_CHECK_HEADERS(ncursesw/term.h,
1503
[#include <ncursesw/ncurses.h>])
1504
AC_CHECK_HEADERS(ncurses/term.h,
1506
[#include <ncurses/ncurses.h>])
1507
AC_CHECK_HEADERS(term.h,
1509
[#include <curses.h>])
1511
dnl See if term.h is bundled along with the curses library we
1512
dnl are using. If this isn't the default system curses, compilation
1513
dnl could barf unless we include from the right subdirectory.
1514
AC_CACHE_CHECK(where term.h is located, zsh_cv_path_term_header,
1515
[case x$zsh_cv_path_curses_header in
1517
if test x$ac_cv_header_ncursesw_term_h = xyes; then
1518
zsh_cv_path_term_header=ncursesw/term.h
1522
if test x$ac_cv_header_ncurses_term_h = xyes; then
1523
zsh_cv_path_term_header=ncurses/term.h
1527
if test x$zsh_cv_path_term_header = x; then
1528
if test x$ac_cv_header_term_h = xyes; then
1529
zsh_cv_path_term_header=term.h
1531
zsh_cv_path_term_header=none
1535
AH_TEMPLATE([ZSH_HAVE_TERM_H],
1536
[Define to 1 if some variant of term.h can be included])
1537
AH_TEMPLATE([HAVE_BOOLCODES],
1538
[Define if you have the termcap boolcodes symbol.])
1539
AH_TEMPLATE([HAVE_NUMCODES],
1540
[Define if you have the termcap numcodes symbol.])
1541
AH_TEMPLATE([HAVE_STRCODES],
1542
[Define if you have the termcap strcodes symbol.])
1543
AH_TEMPLATE([HAVE_BOOLNAMES],
1544
[Define if you have the terminfo boolnames symbol.])
1545
AH_TEMPLATE([HAVE_NUMNAMES],
1546
[Define if you have the terminfo numnames symbol.])
1547
AH_TEMPLATE([HAVE_STRNAMES],
1548
[Define if you have the terminfo strnames symbol.])
1550
if test x$zsh_cv_path_term_header != xnone; then
1551
AC_DEFINE(ZSH_HAVE_TERM_H)
1552
ZSH_TERM_H=$zsh_cv_path_term_header
1553
if test x$zsh_cv_path_curses_header != xnone; then
1554
term_includes="#include <$zsh_cv_path_curses_header>
1555
#include <$zsh_cv_path_term_header>"
1557
term_includes="#include <$zsh_cv_path_term_header>"
1560
AC_MSG_CHECKING(if boolcodes is available)
1561
AC_TRY_LINK($term_includes, [char **test = boolcodes; puts(*test);],
1562
AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
1563
AC_MSG_RESULT($boolcodes)
1564
AC_MSG_CHECKING(if numcodes is available)
1565
AC_TRY_LINK($term_includes, [char **test = numcodes; puts(*test);],
1566
AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
1567
AC_MSG_RESULT($numcodes)
1568
AC_MSG_CHECKING(if strcodes is available)
1569
AC_TRY_LINK($term_includes, [char **test = strcodes; puts(*test);],
1570
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
1571
AC_MSG_RESULT($strcodes)
1572
AC_MSG_CHECKING(if boolnames is available)
1573
AC_TRY_LINK($term_includes, [char **test = boolnames; puts(*test);],
1574
AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
1575
AC_MSG_RESULT($boolnames)
1576
AC_MSG_CHECKING(if numnames is available)
1577
AC_TRY_LINK($term_includes, [char **test = numnames; puts(*test);],
1578
AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
1579
AC_MSG_RESULT($numnames)
1580
AC_MSG_CHECKING(if strnames is available)
1581
AC_TRY_LINK($term_includes, [char **test = strnames; puts(*test);],
1582
AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
1583
AC_MSG_RESULT($strnames)
1587
AC_SUBST(ZSH_TERM_H)
1590
dnl -----------------------------------------------------
1591
dnl Look for the file containing the RLIMIT_* definitions
1592
dnl -----------------------------------------------------
1593
dnl CALL FOR MORE (FEWER?) LOCATIONS: I've just copied the signal checking.
1594
AC_CACHE_CHECK(where the RLIMIT macros are located,zsh_cv_path_rlimit_h,
1595
[dnl Look at the output from the preprocessor.
1596
dnl Copied from the search for the signal names above.
1597
echo "#include <sys/resource.h>" >restmp.c
1598
resourcefile_list="`$CPP $CPPFLAGS restmp.c |
1599
sed -n -e 's/^#line[ ].*\"\(.*\)\"/\1/p' \
1600
-e 's/^#[ ].*\"\(.*\)\"/\1/p' |
1601
sed 's/\\\\\\\\/\//g' |
1602
$AWK '{ if ($1 ~ /resource/) files[[$1]] = $1 }
1603
END { for (var in files) print var }'`"
1605
if test -z "$resourcefile_list"; then
1606
dnl No list: look at standard places.
1607
resourcefile_list="/usr/include/bsd/sys/resource.h
1608
/usr/include/asm/resource.h
1609
/usr/include/linux/resource.h
1610
/usr/include/sys/resource.h
1611
/usr/include/bits/resource.h
1612
/usr/include/resourcebits.h"
1614
for RESOURCE_H in $resourcefile_list /dev/null;
1616
test -f $RESOURCE_H && \
1617
grep '#[ ]*define[ ][ ]*RLIMIT_[A-Z]*[ ]*[0-9A-Z][0-9]*' $RESOURCE_H > /dev/null && \
1620
zsh_cv_path_rlimit_h=$RESOURCE_H
1621
if test x$RESOURCE_H = x"/dev/null" && test x$ac_cv_func_getrlimit = xyes; then
1622
AC_MSG_WARN(RLIMIT MACROS NOT FOUND: please report to developers)
1624
RLIMITS_INC_H=$zsh_cv_path_rlimit_h
1625
if test "$RLIMITS_INC_H" = "/dev/null"; then
1628
dnl rlimits.h only appears in dependencies if we are actually using it.
1629
dnl We are using it any time we have getrlimit, though if the macros were
1630
dnl not found we simply awk through /dev/null and fail to find them.
1631
dnl Thus, limit won't work, but at least the shell will compile.
1632
AC_SUBST(RLIMITS_INC_H)dnl
1634
dnl ------------------
1635
dnl rlimit type checks
1636
dnl ------------------
1637
AH_TEMPLATE([RLIM_T_IS_QUAD_T],
1638
[Define to 1 if struct rlimit uses quad_t.])
1639
AH_TEMPLATE([RLIM_T_IS_LONG_LONG],
1640
[Define to 1 if struct rlimit uses long long])
1641
AH_TEMPLATE([RLIM_T_IS_UNSIGNED],
1642
[Define to 1 if struct rlimit uses unsigned.])
1643
AH_TEMPLATE([rlim_t],
1644
[Define to the type used in struct rlimit.])
1646
AC_CACHE_CHECK(if rlim_t is longer than a long,
1647
zsh_cv_rlim_t_is_longer,
1649
#ifdef HAVE_SYS_TIME_H
1650
#include <sys/time.h>
1652
#include <sys/resource.h>
1653
main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}],
1654
zsh_cv_rlim_t_is_longer=yes,
1655
zsh_cv_rlim_t_is_longer=no,
1656
zsh_cv_rlim_t_is_longer=yes)])
1657
if test x$zsh_cv_rlim_t_is_longer = xyes; then
1658
AC_CACHE_CHECK(if rlim_t is a quad,
1659
zsh_cv_rlim_t_is_quad_t,
1661
#ifdef HAVE_SYS_TIME_H
1662
#include <sys/time.h>
1665
#include <sys/resource.h>
1670
sprintf(buf, "%qd", r.rlim_cur);
1671
exit(strcmp(buf, "0"));
1673
zsh_cv_rlim_t_is_quad_t=yes,
1674
zsh_cv_rlim_t_is_quad_t=no,
1675
zsh_cv_rlim_t_is_quad_t=no)])
1676
if test x$zsh_cv_rlim_t_is_quad_t = xyes; then
1677
AC_DEFINE(RLIM_T_IS_QUAD_T)
1678
DEFAULT_RLIM_T=quad_t
1680
AC_DEFINE(RLIM_T_IS_LONG_LONG)
1681
DEFAULT_RLIM_T='long long'
1684
AC_CACHE_CHECK(if the rlim_t is unsigned,
1685
zsh_cv_type_rlim_t_is_unsigned,
1687
#ifdef HAVE_SYS_TIME_H
1688
#include <sys/time.h>
1690
#include <sys/resource.h>
1691
main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}],
1692
zsh_cv_type_rlim_t_is_unsigned=yes,
1693
zsh_cv_type_rlim_t_is_unsigned=no,
1694
zsh_cv_type_rlim_t_is_unsigned=no)])
1695
if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then
1696
AC_DEFINE(RLIM_T_IS_UNSIGNED)
1697
DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T"
1701
AC_CACHE_CHECK(for rlim_t, zsh_cv_type_rlim_t,
1703
#include <sys/types.h>
1704
#ifdef HAVE_SYS_TIME_H
1705
#include <sys/time.h>
1707
#include <sys/resource.h>],
1709
zsh_cv_type_rlim_t=yes,
1710
zsh_cv_type_rlim_t=no)])
1711
if test x$zsh_cv_type_rlim_t = xno; then
1712
AC_DEFINE_UNQUOTED(rlim_t, $DEFAULT_RLIM_T)
1716
dnl On some systems the RLIMIT_* don't evaluate to integers at compile time
1717
dnl (they may be enums). In this case we are not able to do preprocessor
1718
dnl comparisons and need our tests to determine what values exist and
1719
dnl if there are clashing definitions.
1721
zsh_LIMIT_PRESENT(RLIMIT_AIO_MEM)
1722
zsh_LIMIT_PRESENT(RLIMIT_AIO_OPS)
1723
zsh_LIMIT_PRESENT(RLIMIT_AS)
1724
zsh_LIMIT_PRESENT(RLIMIT_LOCKS)
1725
zsh_LIMIT_PRESENT(RLIMIT_MEMLOCK)
1726
zsh_LIMIT_PRESENT(RLIMIT_NPROC)
1727
zsh_LIMIT_PRESENT(RLIMIT_NOFILE)
1728
zsh_LIMIT_PRESENT(RLIMIT_PTHREAD)
1729
zsh_LIMIT_PRESENT(RLIMIT_RSS)
1730
zsh_LIMIT_PRESENT(RLIMIT_SBSIZE)
1731
zsh_LIMIT_PRESENT(RLIMIT_TCACHE)
1732
zsh_LIMIT_PRESENT(RLIMIT_VMEM)
1733
zsh_LIMIT_PRESENT(RLIMIT_SIGPENDING)
1734
zsh_LIMIT_PRESENT(RLIMIT_MSGQUEUE)
1735
zsh_LIMIT_PRESENT(RLIMIT_NICE)
1736
zsh_LIMIT_PRESENT(RLIMIT_RTPRIO)
1738
AH_TEMPLATE([RLIMIT_VMEM_IS_RSS],
1739
[Define to 1 if RLIMIT_VMEM and RLIMIT_RSS both exist and are equal.])
1740
AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_RSS are the same,
1741
zsh_cv_rlimit_vmem_is_rss,
1743
#include <sys/types.h>
1744
#ifdef HAVE_SYS_TIME_H
1745
#include <sys/time.h>
1747
#include <sys/resource.h>
1751
#if defined(HAVE_RLIMIT_VMEM) && defined(HAVE_RLIMIT_RSS)
1752
if (RLIMIT_RSS == RLIMIT_VMEM) ret = 0;
1756
zsh_cv_rlimit_vmem_is_rss=yes,
1757
zsh_cv_rlimit_vmem_is_rss=no,
1758
zsh_cv_rlimit_vmem_is_rss=no)])
1760
if test x$zsh_cv_rlimit_vmem_is_rss = xyes; then
1761
AC_DEFINE(RLIMIT_VMEM_IS_RSS)
1765
AH_TEMPLATE([RLIMIT_VMEM_IS_AS],
1766
[Define to 1 if RLIMIT_VMEM and RLIMIT_AS both exist and are equal.])
1767
AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_AS are the same,
1768
zsh_cv_rlimit_vmem_is_as,
1770
#include <sys/types.h>
1771
#ifdef HAVE_SYS_TIME_H
1772
#include <sys/time.h>
1774
#include <sys/resource.h>
1778
#if defined(HAVE_RLIMIT_VMEM) && defined(HAVE_RLIMIT_AS)
1779
if (RLIMIT_AS == RLIMIT_VMEM) ret = 0;
1783
zsh_cv_rlimit_vmem_is_as=yes,
1784
zsh_cv_rlimit_vmem_is_as=no,
1785
zsh_cv_rlimit_vmem_is_as=no)])
1787
if test x$zsh_cv_rlimit_vmem_is_as = xyes; then
1788
AC_DEFINE(RLIMIT_VMEM_IS_AS)
1792
AH_TEMPLATE([RLIMIT_RSS_IS_AS],
1793
[Define to 1 if RLIMIT_RSS and RLIMIT_AS both exist and are equal.])
1794
AC_CACHE_CHECK(if RLIMIT_RSS and RLIMIT_AS are the same,
1795
zsh_cv_rlimit_rss_is_as,
1797
#include <sys/types.h>
1798
#ifdef HAVE_SYS_TIME_H
1799
#include <sys/time.h>
1801
#include <sys/resource.h>
1805
#if defined(HAVE_RLIMIT_RSS) && defined(HAVE_RLIMIT_AS)
1806
if (RLIMIT_AS == RLIMIT_RSS) ret = 0;
1810
zsh_cv_rlimit_rss_is_as=yes,
1811
zsh_cv_rlimit_rss_is_as=no,
1812
zsh_cv_rlimit_rss_is_as=no)])
1814
if test x$zsh_cv_rlimit_rss_is_as = xyes; then
1815
AC_DEFINE(RLIMIT_RSS_IS_AS)
1819
dnl --------------------------------------------
1820
dnl Check for members of struct rusage
1821
dnl --------------------------------------------
1822
if test x$ac_cv_func_getrusage = xyes; then
1823
AC_CHECK_MEMBERS([struct rusage.ru_maxrss,
1824
struct rusage.ru_ixrss,
1825
struct rusage.ru_idrss,
1826
struct rusage.ru_isrss,
1827
struct rusage.ru_minflt,
1828
struct rusage.ru_majflt,
1829
struct rusage.ru_nswap,
1830
struct rusage.ru_inblock,
1831
struct rusage.ru_oublock,
1832
struct rusage.ru_msgsnd,
1833
struct rusage.ru_msgrcv,
1834
struct rusage.ru_nsignals,
1835
struct rusage.ru_nvcsw,
1836
struct rusage.ru_nivcsw],,,
1837
[#include <sys/types.h>
1838
#ifdef HAVE_SYS_TIME_H
1839
#include <sys/time.h>
1841
#include <sys/resource.h>])
1845
dnl --------------------------------------------
1846
dnl CHECK FOR DEFAULT PATH (used for command -p)
1847
dnl --------------------------------------------
1848
AC_CACHE_VAL(zsh_cv_cs_path,
1849
[if getconf _CS_PATH >/dev/null 2>&1; then
1850
zsh_cv_cs_path=`getconf _CS_PATH`
1851
elif getconf CS_PATH >/dev/null 2>&1; then
1852
zsh_cv_cs_path=`getconf CS_PATH`
1854
zsh_cv_cs_path="/bin:/usr/bin"
1856
AC_DEFINE_UNQUOTED(DEFAULT_PATH, "$zsh_cv_cs_path",
1857
[The default path; used when running commands with command -p])
1860
dnl ----------------------------
1861
dnl CHECK FOR /dev/fd FILESYSTEM
1862
dnl ----------------------------
1863
dnl FreeBSD 5 only supports /dev/fd/0 to /dev/fd/2 without mounting
1864
dnl a special file system. As zsh needs arbitrary /dev/fd (typically
1865
dnl >10) for its own use, we need to make sure higher fd's are available.
1866
dnl Since we're using the shell, we're restricted to 0 to 9 but 3 should
1868
AH_TEMPLATE([PATH_DEV_FD],
1869
[Define to the path of the /dev/fd filesystem.])
1870
AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd,
1871
[if test "$host_os" = cygwin; then
1872
dnl In current (2008/12/01) versions of Cygwin these are present but don't
1873
dnl seem to work smoothly for process substitution; no great surprise
1874
dnl since getting processes to work at all on Cygwin is a big challenge.
1875
dnl We'll rely on FIFOs, since they do what we need.
1876
zsh_cv_sys_path_dev_fd=no
1878
[for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
1879
test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break
1882
if test x$zsh_cv_sys_path_dev_fd != xno; then
1883
AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd")
1886
dnl ---------------------------------
1887
dnl CHECK FOR RFS SUPERROOT DIRECTORY
1888
dnl ---------------------------------
1889
AC_CACHE_CHECK(for RFS superroot directory, zsh_cv_sys_superroot,
1890
[test -d /../.LOCALROOT && zsh_cv_sys_superroot=yes || zsh_cv_sys_superroot=no])
1891
AH_TEMPLATE([HAVE_SUPERROOT],
1892
[Define to 1 if you have RFS superroot directory.])
1893
if test x$zsh_cv_sys_superroot = xyes; then
1894
AC_DEFINE(HAVE_SUPERROOT)
1897
dnl CHECK FOR SYSTEMS REQUIRING GETCWD
1898
AC_CACHE_CHECK(whether we should use the native getcwd,
1900
[case "${host_cpu}-${host_vendor}-${host_os}" in
1901
*QNX*) zsh_cv_use_getcwd=yes ;;
1902
*) zsh_cv_use_getcwd=no ;;
1904
AH_TEMPLATE([USE_GETCWD],
1905
[Define to 1 if you need to use the native getcwd.])
1906
if test x$zsh_cv_use_getcwd = xyes; then
1907
AC_DEFINE(USE_GETCWD)
1910
dnl GNU getcwd() can allocate as much space as necessary for a
1911
dnl directory name, preventing guessing games.
1912
AH_TEMPLATE([GETCWD_CALLS_MALLOC],
1913
[Define to 1 if getcwd() calls malloc to allocate memory.])
1914
if test x$ac_cv_func_getcwd = xyes; then
1915
AC_CACHE_CHECK(whether getcwd calls malloc to allocate memory,
1916
zsh_cv_getcwd_malloc,
1921
char buf[1024], *ptr1, *ptr2;
1922
ptr1 = getcwd(buf, 1024);
1923
ptr2 = getcwd(NULL, 0);
1924
if (ptr1 && ptr2 && !strcmp(ptr1, ptr2)) {
1930
zsh_cv_getcwd_malloc=yes,
1931
zsh_cv_getcwd_malloc=no,
1932
zsh_cv_getcwd_malloc=no)])
1933
if test x$zsh_cv_getcwd_malloc = xyes; then
1934
AC_DEFINE(GETCWD_CALLS_MALLOC)
1938
dnl CHECK FOR setproctitle() FOR jobs -Z / ARGV0
1939
AH_TEMPLATE([HAVE_SETPROCTITLE],
1940
[Define to 1 if the system supports `setproctitle' to change process name])
1941
AC_CHECK_FUNC(setproctitle,AC_DEFINE(HAVE_SETPROCTITLE),
1942
AC_SEARCH_LIBS(setproctitle,util,AC_DEFINE(HAVE_SETPROCTITLE)))
1947
AH_TEMPLATE([HAVE_NIS],
1948
[Define to 1 if you have NIS.])
1949
AC_CACHE_CHECK(for NIS, zsh_cv_sys_nis,
1950
[test -f /usr/bin/ypcat && /usr/bin/ypcat passwd.byname > /dev/null 2>&1 && \
1951
zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no])
1952
if test x$zsh_cv_sys_nis = xyes; then
1954
dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
1955
dnl libnsl (Network Services Library) to find yp_all
1956
AC_SEARCH_LIBS(yp_all, nsl)
1959
dnl -----------------
1960
dnl CHECK FOR NISPLUS
1961
dnl -----------------
1962
AH_TEMPLATE([HAVE_NIS_PLUS],
1963
[Define to 1 if you have NISPLUS.])
1964
AC_CACHE_CHECK(for NIS+, zsh_cv_sys_nis_plus,
1965
[test x$ac_cv_func_nis_list = xyes && test -f /usr/bin/nisls && \
1966
/usr/bin/nisls > /dev/null 2>&1 && \
1967
zsh_cv_sys_nis_plus=yes || zsh_cv_sys_nis_plus=no])
1968
if test x$zsh_cv_sys_nis_plus = xyes; then
1969
AC_DEFINE(HAVE_NIS_PLUS)
1972
dnl ----------------------------------------
1973
dnl CHECK FOR LOCATION OF {U,W}TMP{,X} FILES
1974
dnl ----------------------------------------
1977
zsh_PATH_UTMP(utmpx)
1978
zsh_PATH_UTMP(wtmpx)
1980
dnl -------------------
1981
dnl brk/sbrk PROTOTYPES
1982
dnl -------------------
1983
AC_CACHE_CHECK(for brk() prototype in <unistd.h>,
1984
zsh_cv_header_unistd_h_brk_proto,
1985
[AC_TRY_COMPILE([#include <unistd.h>
1986
double brk();], [int i;],
1987
zsh_cv_header_unistd_h_brk_proto=no, zsh_cv_header_unistd_h_brk_proto=yes)])
1988
AH_TEMPLATE([HAVE_BRK_PROTO],
1989
[Define to 1 if there is a prototype defined for brk() on your system.])
1990
if test x$zsh_cv_header_unistd_h_brk_proto = xyes; then
1991
AC_DEFINE(HAVE_BRK_PROTO)
1994
AC_CACHE_CHECK(for sbrk() prototype in <unistd.h>,
1995
zsh_cv_header_unistd_h_sbrk_proto,
1996
[AC_TRY_COMPILE([#include <unistd.h>
1997
double sbrk();], [int i;],
1998
zsh_cv_header_unistd_h_sbrk_proto=no, zsh_cv_header_unistd_h_sbrk_proto=yes)])
1999
AH_TEMPLATE([HAVE_SBRK_PROTO],
2000
[Define to 1 if there is a prototype defined for sbrk() on your system.])
2001
if test x$zsh_cv_header_unistd_h_sbrk_proto = xyes; then
2002
AC_DEFINE(HAVE_SBRK_PROTO)
2005
dnl -----------------------
2006
dnl mknod prototype for OSF
2007
dnl -----------------------
2008
AH_TEMPLATE([HAVE_MKNOD_PROTO],
2009
[Define to 1 if there is a prototype defined for mknod() on your system.])
2010
if test "$ac_cv_prog_cc_stdc" != no; then
2011
AC_CACHE_CHECK(for mknod prototype in <sys/stat.h>,
2012
zsh_cv_header_sys_stat_h_mknod_proto,
2013
[AC_TRY_COMPILE([#include <sys/stat.h>
2014
int mknod(double x);], [int i;],
2015
zsh_cv_header_sys_stat_h_mknod_proto=no,
2016
zsh_cv_header_sys_stat_h_mknod_proto=yes)])
2017
if test x$zsh_cv_header_sys_stat_h_mknod_proto = xyes; then
2018
AC_DEFINE(HAVE_MKNOD_PROTO)
2022
dnl ----------------------------------------
2023
dnl presence and location of ioctl prototype
2024
dnl ----------------------------------------
2025
AC_CACHE_CHECK(for ioctl prototype in <unistd.h> or <termios.h>,
2026
zsh_cv_header_unistd_h_termios_h_ioctl_proto,
2028
#ifdef HAVE_UNISTD_H
2029
# include <unistd.h>
2031
#ifdef HAVE_TERMIOS_H
2032
# include <termios.h>
2034
double ioctl();], [int i;],
2035
zsh_cv_header_unistd_h_termios_h_ioctl_proto=no,
2036
zsh_cv_header_unistd_h_termios_h_ioctl_proto=yes)])
2038
if test x$zsh_cv_header_unistd_h_termios_h_ioctl_proto = xno; then
2039
AC_CACHE_CHECK(for ioctl prototype in <sys/ioctl.h>,
2040
zsh_cv_header_sys_ioctl_h_ioctl_proto,
2041
[AC_TRY_COMPILE([#include <sys/ioctl.h>
2042
double ioctl();], [int i;],
2043
zsh_cv_header_sys_ioctl_h_ioctl_proto=no,
2044
zsh_cv_header_sys_ioctl_h_ioctl_proto=yes)])
2046
zsh_cv_header_sys_ioctl_h_ioctl_proto=no
2049
AH_TEMPLATE([HAVE_IOCTL_PROTO],
2050
[Define to 1 if there is a prototype defined for ioctl() on your system.])
2051
if test x$zsh_cv_header_unistd_h_termios_h_ioctl_proto = xyes || \
2052
test x$zsh_cv_header_sys_ioctl_h_ioctl_proto = xyes; then
2053
AC_DEFINE(HAVE_IOCTL_PROTO)
2055
AH_TEMPLATE([IOCTL_IN_SYS_IOCTL],
2056
[Define to 1 if we must include <sys/ioctl.h> to get a prototype for ioctl().])
2057
if test x$zsh_cv_header_sys_ioctl_h_ioctl_proto = xyes; then
2058
AC_DEFINE(IOCTL_IN_SYS_IOCTL)
2061
dnl -------------------
2062
dnl select() defined in <sys/socket.h>, ie BeOS R4.51
2063
dnl -------------------
2064
AH_TEMPLATE([SELECT_IN_SYS_SOCKET_H],
2065
[Define to 1 if select() is defined in <sys/socket.h>, ie BeOS R4.51])
2066
if test x$ac_cv_header_sys_select_h != xyes; then
2067
AC_CACHE_CHECK(for select() in <sys/socket.h>,
2068
zsh_cv_header_socket_h_select_proto,
2069
[AC_TRY_COMPILE([#include <sys/socket.h>], [fd_set fd;],
2070
zsh_cv_header_socket_h_select_proto=yes,
2071
zsh_cv_header_socket_h_select_proto=no)])
2072
if test x$zsh_cv_header_socket_h_select_proto = xyes; then
2073
AC_DEFINE(SELECT_IN_SYS_SOCKET_H)
2081
dnl Named FIFOs work well enough on recent versions of Cygwin
2082
dnl to provide what we want. Simply enable them.
2083
AC_CACHE_CHECK(if named FIFOs work,
2085
[if test "$host_os" = cygwin; then
2096
unlink("/tmp/fifo$$");
2098
if(mkfifo("/tmp/fifo$$", 0600) < 0)
2100
if(mknod("/tmp/fifo$$", 0010600, 0) < 0)
2107
fd = open("/tmp/fifo$$", O_RDONLY);
2108
exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
2110
fd = open("/tmp/fifo$$", O_WRONLY);
2111
ret = (fd < 0 || write(fd, "x", 1) < 1);
2112
unlink("/tmp/fifo$$");
2116
zsh_cv_sys_fifo=yes,
2118
zsh_cv_sys_fifo=yes)
2120
AH_TEMPLATE([HAVE_FIFOS],
2121
[Define to 1 if system has working FIFOs.])
2122
if test x$zsh_cv_sys_fifo = xyes; then
2123
AC_DEFINE(HAVE_FIFOS)
2125
dnl ---------------------
2126
dnl echo style of /bin/sh
2127
dnl ---------------------
2128
AC_CACHE_CHECK(if echo in /bin/sh interprets escape sequences,
2129
zsh_cv_prog_sh_echo_escape,
2130
[if test "`/bin/sh -c \"echo '\\n'\"`" = "\\n"; then
2131
zsh_cv_prog_sh_echo_escape=no
2133
zsh_cv_prog_sh_echo_escape=yes
2135
AH_TEMPLATE([SH_USE_BSD_ECHO],
2136
[Define to 1 if /bin/sh does not interpret \ escape sequences.])
2137
if test x$zsh_cv_prog_sh_echo_escape = xno; then
2138
AC_DEFINE(SH_USE_BSD_ECHO)
2142
dnl test for whether link() works
2143
dnl for instance, BeOS R4.51 doesn't support hard links yet
2145
AC_CACHE_CHECK(if link() works,
2153
char *tmpfile, *newfile;
2154
tmpfile="/tmp/zsh.linktest$$";
2155
newfile="/tmp/zsh.linktest2$$";
2158
if(creat(tmpfile, 0644) < 0)
2160
ret = link(tmpfile, newfile);
2166
zsh_cv_sys_link=yes,
2168
zsh_cv_sys_link=yes)])
2169
AH_TEMPLATE([HAVE_LINK],
2170
[Define to 1 if system has working link().])
2171
if test x$zsh_cv_sys_link = xyes; then
2172
AC_DEFINE(HAVE_LINK)
2176
dnl test for whether kill(pid, 0) where pid doesn't exit
2177
dnl should set errno to ESRCH, but some like BeOS R4.51 set to EINVAL
2179
AC_CACHE_CHECK(if kill(pid, 0) returns ESRCH correctly,
2180
zsh_cv_sys_killesrch,
2187
int pid = (getpid() + 10000) & 0xffffff;
2188
while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1;
2192
zsh_cv_sys_killesrch=yes,
2193
zsh_cv_sys_killesrch=no,
2194
zsh_cv_sys_killesrch=yes)])
2195
AH_TEMPLATE([BROKEN_KILL_ESRCH],
2196
[Define to 1 if kill(pid, 0) doesn't return ESRCH, ie BeOS R4.51.])
2197
if test x$zsh_cv_sys_killesrch = xno; then
2198
AC_DEFINE(BROKEN_KILL_ESRCH)
2202
dnl if POSIX, test for working sigsuspend().
2203
dnl for instance, BeOS R4.51 is broken.
2205
AH_TEMPLATE([BROKEN_POSIX_SIGSUSPEND],
2206
Define to 1 if sigsuspend() is broken, ie BeOS R4.51.])
2207
if test x$signals_style = xPOSIX_SIGNALS; then
2208
AC_CACHE_CHECK(if POSIX sigsuspend() works,
2209
zsh_cv_sys_sigsuspend,
2216
{if(sig==SIGCHLD) child=1;}
2218
struct sigaction act;
2221
act.sa_handler = &handler;
2222
sigfillset(&act.sa_mask);
2224
sigaction(SIGCHLD, &act, 0);
2226
sigprocmask(SIG_SETMASK, &set, 0);
2228
if(pid==0) return 0;
2231
ret=sigsuspend(&set);
2236
zsh_cv_sys_sigsuspend=yes,
2237
zsh_cv_sys_sigsuspend=no,
2238
zsh_cv_sys_sigsuspend=yes)])
2239
if test x$zsh_cv_sys_sigsuspend = xno; then
2240
AC_DEFINE(BROKEN_POSIX_SIGSUSPEND)
2245
dnl if found tcsetpgrp, test to see if it actually works
2246
dnl for instance, BeOS R4.51 does not support it yet
2248
AH_TEMPLATE([BROKEN_TCSETPGRP],
2249
[Define to 1 if tcsetpgrp() doesn't work, ie BeOS R4.51.])
2250
AC_ARG_WITH(tcsetpgrp,
2251
AC_HELP_STRING([--with-tcsetpgrp], [assumes that tcsetpgrp() exists and works correctly]),[
2253
xyes) zsh_working_tcsetpgrp=yes;;
2254
xno) zsh_working_tcsetpgrp=no;;
2255
*) AC_ERROR([please use --with-tcsetpgrp=yes or --with-tcsetpgrp=no]);;
2256
esac],[zsh_working_tcsetpgrp=check])
2257
if test "x$ac_cv_func_tcsetpgrp" = xyes; then
2258
case "x$zsh_working_tcsetpgrp" in
2260
trap "" TTOU > /dev/null 2>&1 || :
2261
AC_CACHE_CHECK(if tcsetpgrp() actually works,
2262
zsh_cv_sys_tcsetpgrp,
2264
#include <sys/types.h>
2270
fd=open("/dev/tty", O_RDWR);
2271
if (fd < 0) exit(2);
2272
ret=tcsetpgrp(fd, tcgetpgrp(fd));
2273
if (ret < 0) exit(1);
2277
zsh_cv_sys_tcsetpgrp=yes, [
2279
1) zsh_cv_sys_tcsetpgrp=no;;
2280
2) zsh_cv_sys_tcsetpgrp=notty;;
2281
*) zsh_cv_sys_tcsetpgrp=error;;
2283
], zsh_cv_sys_tcsetpgrp=yes)])
2284
case "x$zsh_cv_sys_tcsetpgrp" in
2285
xno) AC_DEFINE(BROKEN_TCSETPGRP);;
2287
xnotty) AC_MSG_ERROR([no controlling tty
2288
Try running configure with --with-tcsetpgrp or --without-tcsetpgrp]);;
2289
*) AC_MSG_ERROR([unexpected return status]);;
2291
trap - TTOU > /dev/null 2>&1 || :
2294
xno) AC_DEFINE(BROKEN_TCSETPGRP);;
2295
*) AC_MSG_ERROR([unexpected value zsh_working_tcsetpgrp=$zsh_working_tcsetpgrp]);;
2300
dnl test for faked getpwnam() entry, ie a single entry returned for any username
2301
dnl for instance, BeOS R4.51 is not multiuser yet, and fakes getpwnam()
2302
dnl test by looking up two usernames that shouldn't succeed, and compare entry
2304
AH_TEMPLATE([GETPWNAM_FAKED],
2305
[Define to 1 if getpwnam() is faked, ie BeOS R4.51.])
2306
if test x$ac_cv_func_getpwnam = xyes; then
2307
AC_CACHE_CHECK(if getpwnam() is faked,
2308
zsh_cv_sys_getpwnam_faked,
2312
struct passwd *pw1, *pw2;
2313
char buf[1024], name[1024];
2314
sprintf(buf, "%d:%d", getpid(), rand());
2316
if (pw1) strcpy(name, pw1->pw_name);
2317
sprintf(buf, "%d:%d", rand(), getpid());
2319
exit(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
2322
zsh_cv_sys_getpwnam_faked=no,
2323
zsh_cv_sys_getpwnam_faked=yes,
2324
zsh_cv_sys_getpwnam_faked=no)])
2325
if test x$zsh_cv_sys_getpwnam_faked = xyes; then
2326
AC_DEFINE(GETPWNAM_FAKED)
2332
dnl check for the type of third argument of accept
2338
dnl Check for pty multiplexer for use in pty module.
2339
dnl We need to open it read/write, so make sure it is writeable.
2340
dnl Yet another test which won't work when cross-compiling.
2342
AC_CACHE_CHECK(if your system has /dev/ptmx,
2343
ac_cv_have_dev_ptmx,
2344
[if test -w /dev/ptmx; then
2345
ac_cv_have_dev_ptmx=yes
2347
ac_cv_have_dev_ptmx=no
2351
dnl Check if the ptmx functions are usable.
2352
dnl We need to be able to find the prototypes, which may
2353
dnl require non-POSIX source definitions. So test to see
2354
dnl if ptsname is correctly recognised as returning a char *.
2355
dnl We do this by making sure a program where ptsname() is declared
2356
dnl as returning int does *not* compile.
2357
dnl On Linux we need the XOPEN extensions. The easiest way to get
2358
dnl these is by defining _GNU_SOURCE.
2360
AH_TEMPLATE([USE_DEV_PTMX],
2361
[Define to 1 if all the kit for using /dev/ptmx for ptys is available.])
2362
if test x$ac_cv_have_dev_ptmx = xyes && \
2363
test x$ac_cv_func_grantpt = xyes && \
2364
test x$ac_cv_func_unlockpt = xyes && \
2365
test x$ac_cv_func_ptsname = xyes; then
2366
AC_CACHE_CHECK([if /dev/ptmx is usable],
2368
[AC_TRY_COMPILE([#ifdef __linux
2369
#define _GNU_SOURCE 1
2373
ac_cv_use_dev_ptmx=no,
2374
ac_cv_use_dev_ptmx=yes)])
2375
if test x$ac_cv_use_dev_ptmx = xyes; then
2376
AC_DEFINE(USE_DEV_PTMX)
2380
dnl -----------------
2381
dnl multibyte support
2382
dnl -----------------
2383
AC_ARG_ENABLE(multibyte,
2384
AC_HELP_STRING([--enable-multibyte], [support multibyte characters]),
2385
[zsh_cv_c_unicode_support=$enableval],
2386
[AC_CACHE_VAL(zsh_cv_c_unicode_support,
2387
AC_MSG_NOTICE([checking for functions supporting multibyte characters])
2389
for zfunc in iswalnum iswcntrl iswdigit iswgraph iswlower iswprint \
2390
iswpunct iswspace iswupper iswxdigit mbrlen mbrtowc towupper towlower \
2391
wcschr wcscpy wcslen wcsncmp wcsncpy wcrtomb wcwidth wmemchr wmemcmp \
2392
wmemcpy wmemmove wmemset; do
2393
AC_CHECK_FUNC($zfunc,
2394
[:], [zfuncs_absent="$zfuncs_absent $zfunc"])
2396
if test x"$zfuncs_absent" = x; then
2397
AC_MSG_NOTICE([all functions found, multibyte support enabled])
2398
zsh_cv_c_unicode_support=yes
2400
AC_MSG_NOTICE([missing functions, multibyte support disabled])
2401
zsh_cv_c_unicode_support=no
2405
AH_TEMPLATE([MULTIBYTE_SUPPORT],
2406
[Define to 1 if you want support for multibyte character sets.])
2407
AH_TEMPLATE([BROKEN_WCWIDTH],
2408
[Define to 1 if the wcwidth() function is present but broken.])
2409
if test x$zsh_cv_c_unicode_support = xyes; then
2410
AC_DEFINE(MULTIBYTE_SUPPORT)
2412
dnl Test for a wcwidth() implementation that gives the wrong width for
2413
dnl zero-width combining characters.
2414
dnl For the test we use a combining acute accent (\u0301).
2415
dnl We input it as UTF-8 since that is the standard we can rely
2416
dnl upon most: we can't rely on a wchar_t being stored as a
2417
dnl Unicode code point on all systems.
2418
dnl The programme returns 0 only if all the conditions for brokenness
2420
dnl - the programme compiled, linked and ran
2421
dnl - we successfully set a UTF-8 locale
2422
dnl - the locale we set plausibly converted the UTF-8 string
2423
dnl for a zero-width combining character (the only way to be
2424
dnl 100% sure would be to output it and ask if it looked right)
2425
dnl - the converted wide character gave a non-zero width.
2426
dnl locale -a is a fallback; on most systems we should find en_US.UTF-8.
2427
[locale_prog='char *my_locales[] = {
2428
"en_US.UTF-8", "en_GB.UTF-8", "en.UTF-8", '
2429
locale_prog="$locale_prog"`locale -a 2>/dev/null | \
2430
sed -e 's/utf8/UTF-8/' | grep UTF-8 | \
2431
while read line; do echo " \"$line\","; done;`
2432
locale_prog="$locale_prog 0 };
2433
#define _XOPEN_SOURCE
2440
char comb_acute_mb[] = { (char)0xcc, (char)0x81 };
2443
for (localep = my_locales; *localep; localep++)
2444
if (setlocale(LC_ALL, *localep) &&
2445
mbtowc(&wc, comb_acute_mb, 2) == 2)
2449
if (wcwidth(wc) == 0)
2455
AC_CACHE_CHECK(if the wcwidth() function is broken,
2456
zsh_cv_c_broken_wcwidth,
2457
[AC_TRY_RUN([$locale_prog],
2458
zsh_cv_c_broken_wcwidth=yes,
2459
zsh_cv_c_broken_wcwidth=no,
2460
zsh_cv_c_broken_wcwidth=no)])
2461
if test x$zsh_cv_c_broken_wcwidth = xyes; then
2462
AC_DEFINE(BROKEN_WCWIDTH)
2467
dnl static user lookup
2469
AC_ARG_ENABLE(dynamic-nss,
2470
AC_HELP_STRING([--disable-dynamic-nss], [do not call
2471
functions that will require dynamic NSS
2473
[zsh_cv_c_dynamic_nss=$enableval],
2476
AH_TEMPLATE([DISABLE_DYNAMIC_NSS],
2477
[Define to 1 if you want to avoid calling functions that will require
2478
dynamic NSS modules.])
2479
if test x$zsh_cv_c_dynamic_nss = xno; then
2480
AC_DEFINE(DISABLE_DYNAMIC_NSS)
2486
AH_TEMPLATE([HPUX10DYNAMIC],
2487
[Define to 1 if you want to use dynamically loaded modules on HPUX 10.])
2489
INSTLIB="install.bin-\$(L)"
2490
UNINSTLIB="uninstall.bin-\$(L)"
2493
MOD_IMPORT_VARIABLE=
2494
MOD_IMPORT_FUNCTION=
2497
if test "$ac_cv_func_load" = yes &&
2498
test "$ac_cv_func_unload" = yes &&
2499
test "$ac_cv_func_loadbind" = yes &&
2500
test "$ac_cv_func_loadquery" = yes; then
2501
dnl Force AIXDYNAMIC even on newer versions that have dl family
2502
if test "x$dynamic" = xyes; then
2505
elif test "$ac_cv_func_dlopen" != yes ||
2506
test "$ac_cv_func_dlsym" != yes ||
2507
test "$ac_cv_func_dlerror" != yes; then
2508
if test "$ac_cv_func_shl_load" != yes ||
2509
test "$ac_cv_func_shl_unload" != yes ||
2510
test "$ac_cv_func_shl_findsym" != yes; then
2512
elif test "x$dynamic" = xyes; then
2514
DL_EXT="${DL_EXT=sl}"
2515
dnl autoheader won't allow us to define anything which isn't
2516
dnl going into a header, and we can't undefine anything, so
2517
dnl just define this anyway and rely on the later tests to
2518
dnl define DYNAMIC or not.
2519
AC_DEFINE(HPUX10DYNAMIC)dnl
2523
test -n "$GCC" && LDARG=-Wl,
2525
AH_TEMPLATE([DLSYM_NEEDS_UNDERSCORE],
2526
[Define to 1 if an underscore has to be prepended to dlsym() argument.])
2527
AH_TEMPLATE([DYNAMIC_NAME_CLASH_OK],
2528
[Define to 1 if multiple modules defining the same symbol are OK.])
2529
if test "x$aixdynamic" = xyes; then
2530
DL_EXT="${DL_EXT=so}"
2532
zsh_cv_func_dlsym_needs_underscore=no
2533
if test -n "$GCC"; then
2534
DLLDFLAGS=${DLLDFLAGS=-shared}
2536
DLLDFLAGS=${DLLDFLAGS=-bM:SRE}
2538
DLLDFLAGS=${DLLDFLAGS=}
2539
EXTRA_LDFLAGS=${EXTRA_LDFLAGS=}
2542
zsh_cv_sys_dynamic_clash_ok="${zsh_cv_sys_dynamic_clash_ok=yes}"
2543
zsh_cv_sys_dynamic_rtld_global="${zsh_cv_sys_dynamic_rtld_global=yes}"
2544
zsh_cv_sys_dynamic_execsyms="${zsh_cv_sys_dynamic_execsyms=yes}"
2545
zsh_cv_sys_dynamic_strip_exe="${zsh_cv_sys_dynamic_strip_exe=yes}"
2546
zsh_cv_sys_dynamic_strip_lib="${zsh_cv_sys_dynamic_strip_lib=yes}"
2547
zsh_cv_shared_environ="${zsh_cv_shared_environ=yes}"
2548
elif test "$host_os" = cygwin; then
2549
DL_EXT="${DL_EXT=dll}"
2550
##DLLD="${DLLD=dllwrap}"
2552
##DLLDFLAGS="${DLLDFLAGS=--export-all-symbols}"
2553
DLLDFLAGS=${DLLDFLAGS=-shared -Wl,--export-all-symbols}
2554
zsh_cv_func_dlsym_needs_underscore=no
2555
DLLDFLAGS=${DLLDFLAGS=}
2556
EXTRA_LDFLAGS=${EXTRA_LDFLAGS=}
2557
zsh_cv_sys_dynamic_clash_ok="${zsh_cv_sys_dynamic_clash_ok=no}"
2558
zsh_cv_sys_dynamic_rtld_global="${zsh_cv_sys_dynamic_rtld_global=yes}"
2559
zsh_cv_sys_dynamic_execsyms="${zsh_cv_sys_dynamic_execsyms=no}"
2560
zsh_cv_sys_dynamic_strip_exe="${zsh_cv_sys_dynamic_strip_exe=yes}"
2561
zsh_cv_sys_dynamic_strip_lib="${zsh_cv_sys_dynamic_strip_lib=yes}"
2563
# THAT SUCKS! and must be changed
2565
zsh_cv_shared_environ="${zsh_cv_shared_environ=yes}"
2567
MOD_EXPORT="__attribute__((__dllexport__))"
2568
MOD_IMPORT_VARIABLE="__attribute__((__dllimport__))"
2569
MOD_IMPORT_FUNCTION=
2570
elif test "x$dynamic" = xyes; then
2571
AC_CACHE_CHECK(if your system uses ELF binaries,
2573
[AC_TRY_RUN([/* Test for whether ELF binaries are produced */
2581
int i = open(argv[0],O_RDONLY);
2584
if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
2585
exit(0); /* succeed (yes, it's ELF) */
2591
zsh_cv_sys_elf=yes)])
2593
# We use [0-9]* in case statements, so need to change quoting
2596
DL_EXT="${DL_EXT=so}"
2597
if test x$zsh_cv_sys_elf = xyes; then
2600
# Forcibly set ld to native compiler to avoid obscure GCC problems
2601
DLLD="${DLLD=/usr/ccs/bin/cc}"
2613
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
2632
if test -n "$GCC"; then
2634
hpux*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;;
2635
darwin*) DLCFLAGS="${DLCFLAGS=-fno-common}" ;;
2636
*) DLCFLAGS="${DLCFLAGS=-fPIC}" ;;
2641
DLCFLAGS="${DLCFLAGS=+z}"
2642
DLLDFLAGS="${DLLDFLAGS=-b}"
2644
sunos*) DLCFLAGS="${DLCFLAGS=-pic}" ;;
2645
solaris*|sysv4*|esix*) DLCFLAGS="${DLCFLAGS=-KPIC}" ;;
2649
osf*) DLLDFLAGS="${DLLDFLAGS=-shared -expect_unresolved '*'}" ;;
2650
*freebsd*|linux*|irix*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;;
2651
sunos*) DLLDFLAGS="${DLLDFLAGS=-assert nodefinitions}" ;;
2652
sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;;
2653
netbsd*) DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;;
2654
aix*) DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;;
2655
solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;;
2656
darwin*) DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;;
2657
beos*|haiku*) DLLDFLAGS="${DLLDFLAGS=-nostart}" ;;
2659
if test x$zsh_cv_sys_elf = xyes; then
2660
DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}"
2663
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
2664
DLLDFLAGS="${DLLDFLAGS=-Bshareable}"
2667
DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}"
2674
*-hpux*) EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}" ;;
2676
if test x$zsh_cv_sys_elf = xyes; then
2677
EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}"
2682
# unfortunately, we have different compilers
2683
# that need different flags
2685
if test -n "$GCC"; then
2688
sni_cc_version=`$CC -V 2>&1 | head -1`
2690
case "$sni_cc_version" in
2692
EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-Blargedynsym}"
2695
EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-LD-Blargedynsym}"
2700
# gcc on BeOS doesn't like -rdynamic...
2701
EXTRA_LDFLAGS="${EXTRA_LDFLAGS= }"
2702
# also, dlopen() at least in Zeta respects $LIBRARY_PATH, so needs %A added to it.
2703
export LIBRARY_PATH="$LIBRARY_PATH:%A/"
2710
# Done with our shell code, so restore autotools quoting
2713
AC_CACHE_CHECK(if we can use -rdynamic, zsh_cv_rdynamic_available,
2714
old_LDFLAGS="$LDFLAGS"
2715
LDFLAGS="$LDFLAGS -rdynamic"
2716
AC_TRY_LINK([], [], [zsh_cv_rdynamic_available=yes
2717
EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}"],
2718
[zsh_cvs_rdynamic_available=no])
2719
LDFLAGS="$old_LDFLAGS")
2720
AC_CACHE_CHECK(if your dlsym() needs a leading underscore,
2721
zsh_cv_func_dlsym_needs_underscore,
2722
[echo failed >conftestval && cat >conftest.c <<EOM
2725
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AC_FD_CC) &&
2726
AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) &&
2729
#ifdef HPUX10DYNAMIC
2731
#define RTLD_LAZY BIND_DEFERRED
2732
#define RTLD_GLOBAL DYNAMIC_PATH
2734
char *zsh_gl_sym_addr ;
2736
#define dlopen(file,mode) (void *)shl_load((file), (mode), (long) 0)
2737
#define dlclose(handle) shl_unload((shl_t)(handle))
2738
#define dlsym(handle,name) (zsh_gl_sym_addr=0,shl_findsym((shl_t *)&(handle),name,TYPE_UNDEFINED,&zsh_gl_sym_addr), (void *)zsh_gl_sym_addr)
2744
#include <sys/types.h>
2759
FILE *f=fopen("conftestval", "w");
2761
handle = dlopen("./conftest.$DL_EXT", RTLD_LAZY) ;
2762
if (handle == NULL) {
2763
fprintf (f, "dlopen failed") ;
2766
symbol = dlsym(handle, "fred") ;
2767
if (symbol == NULL) {
2768
/* try putting a leading underscore */
2769
symbol = dlsym(handle, "_fred") ;
2770
if (symbol == NULL) {
2771
fprintf (f, "dlsym failed") ;
2774
fprintf (f, "yes") ;
2779
}], zsh_cv_func_dlsym_needs_underscore=`cat conftestval`,
2780
zsh_cv_func_dlsym_needs_underscore=failed
2782
zsh_cv_func_dlsym_needs_underscore=no)])
2783
if test "x$zsh_cv_func_dlsym_needs_underscore" = xyes; then
2784
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
2785
elif test "x$zsh_cv_func_dlsym_needs_underscore" != xno; then
2786
dnl Do not cache failed value
2787
unset zsh_cv_func_dlsym_needs_underscore
2791
if test "x$dynamic" = xyes; then
2792
zsh_SHARED_VARIABLE([environ], [char **])
2793
test "$zsh_cv_shared_environ" = yes || dynamic=no
2794
if test "$ac_cv_func_tgetent" = yes; then
2795
zsh_SHARED_FUNCTION([tgetent])
2797
if test "$ac_cv_func_tigetstr" = yes; then
2798
zsh_SHARED_FUNCTION([tigetstr])
2802
if test "x$dynamic" = xyes; then
2803
zsh_SYS_DYNAMIC_CLASH
2804
zsh_SYS_DYNAMIC_GLOBAL
2805
RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
2806
zsh_SYS_DYNAMIC_EXECSYMS
2807
if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
2810
zsh_SYS_DYNAMIC_STRIP_EXE
2811
zsh_SYS_DYNAMIC_STRIP_LIB
2812
if $strip_exeldflags && test "$zsh_cv_sys_dynamic_strip_exe" = yes; then
2813
EXELDFLAGS="$EXELDFLAGS -s"
2815
if $strip_libldflags && test "$zsh_cv_sys_dynamic_strip_lib" = yes; then
2816
LIBLDFLAGS="$LIBLDFLAGS -s"
2818
if test "$host_os" = cygwin; then
2819
INSTLIB="install.cygwin-lib"
2820
UNINSTLIB="uninstall.cygwin-lib"
2823
$strip_exeldflags && EXELDFLAGS="$EXELDFLAGS -s"
2824
$strip_libldflags && LIBLDFLAGS="$LIBLDFLAGS -s"
2828
AH_TEMPLATE([DYNAMIC],
2829
[Define to 1 if you want to use dynamically loaded modules.])
2830
if test "x$dynamic" = xyes; then
2832
AC_DEFINE(DYNAMIC)dnl
2837
AH_TEMPLATE([AIXDYNAMIC],
2838
[Define to 1 if you want to use dynamically loaded modules on AIX.])
2839
if test "x$aixdynamic" = xyes; then
2841
AC_DEFINE(AIXDYNAMIC)dnl
2846
if test "x$zsh_cv_sys_dynamic_clash_ok" = xyes; then
2851
AC_SUBST(SHORTBOOTNAMES)
2853
AC_SUBST(INSTLIB)dnl
2854
AC_SUBST(UNINSTLIB)dnl
2856
if test "$host_os" = cygwin; then
2857
EXTRAZSHOBJS="$EXTRAZSHOBJS zsh.res.o"
2860
AC_DEFINE_UNQUOTED(DL_EXT, "$DL_EXT",
2861
[The extension used for dynamically loaded modules.])dnl
2865
AC_SUBST(DLCFLAGS)dnl
2866
AC_SUBST(DLLDFLAGS)dnl
2868
AC_SUBST(EXTRA_LDFLAGS)dnl
2872
AC_SUBST(LINKMODS)dnl
2873
AC_SUBST(MOD_EXPORT)dnl
2874
AC_SUBST(MOD_IMPORT_VARIABLE)dnl
2875
AC_SUBST(MOD_IMPORT_FUNCTION)dnl
2876
AC_SUBST(EXTRAZSHOBJS)dnl
2878
# Generate config.modules. We look for *.mdd files in first and second
2879
# level subdirectories. Any existing line not containing 'auto=y' will be
2880
# retained, provided the .mdd file itself was found.
2881
CONFIG_MODULES=./config.modules
2882
cat <<EOM > ${CONFIG_MODULES}.sh
2885
CONFIG_MODULES="${CONFIG_MODULES}"
2887
cat <<\EOM >> ${CONFIG_MODULES}.sh
2888
echo "creating ${CONFIG_MODULES}"
2890
if test -f ${CONFIG_MODULES}; then
2891
userlist="`sed -e '/^#/d' -e '/auto=y/d' -e 's/ .*/ /' -e 's/^name=/ /' \
2893
mv ${CONFIG_MODULES} ${CONFIG_MODULES}.old
2895
# Save testing for existence each time.
2896
echo > ${CONFIG_MODULES}.old
2898
(echo "# Edit this file to change the way modules are loaded."
2899
echo "# The format is strict; do not break lines or add extra spaces."
2900
echo "# Run \`make prep' if you change anything here after compiling"
2901
echo "# (there is no need if you change this just after the first time"
2902
echo "# you run \`configure')."
2904
echo "# Values of \`link' are \`static', \`dynamic' or \`no' to compile the"
2905
echo "# module into the shell, link it in at run time, or not use it at all."
2906
echo "# In the final case, no attempt will be made to compile it."
2907
echo "# Use \`static' or \`no' if you do not have dynamic loading."
2909
echo "# Values of \`load' are \`yes' or \`no'; if yes, any builtins etc."
2910
echo "# provided by the module will be autoloaded by the main shell"
2911
echo "# (so long as \`link' is not set to \`no')."
2913
echo "# Values of \`auto' are \`yes' or \`no'. configure sets the value to"
2914
echo "# \`yes'. If you set it by hand to \`no', the line will be retained"
2915
echo "# when the file is regenerated in future."
2917
echo "# Note that the \`functions' entry extends to the end of the line."
2918
echo "# It should not be quoted; it is used verbatim to find files to install."
2920
echo "# You will need to run \`config.status --recheck' if you add a new"
2923
echo "# You should not change the values for the pseudo-module zsh/main,"
2924
echo "# which is the main shell (apart from the functions entry)."
2926
dnl The autoconf macros are only available in configure, not
2927
dnl config.status, and only change when configure is rerun.
2928
dnl So we need to run the autoconf tests here and store the results.
2929
dnl We then generate config.modules, preserving any user-generated
2930
dnl information, from config.status.
2931
for modfile in `cd ${srcdir}; echo */*.mdd */*/*.mdd`; do
2937
. ${srcdir}/$modfile
2938
if test x$name != x && test x"$link" != x; then
2940
*\ *) eval "link=\`$link\`"
2944
y*) load=" load=yes"
2949
if test "x$functions" != x; then
2950
# N.B. no additional quotes
2951
f=" functions=$functions"
2956
static) result="name=$name modfile=$modfile link=static auto=yes${load}$f"
2958
dynamic) if test x$dynamic != xno; then
2959
result="name=$name modfile=$modfile link=dynamic\
2962
result="name=$name modfile=$modfile link=no\
2966
either) if test x$dynamic != xno; then
2967
result="name=$name modfile=$modfile link=dynamic\
2970
result="name=$name modfile=$modfile link=static\
2974
*) result="name=$name modfile=$modfile link=no auto=yes load=no$f"
2977
dnl $result is the default output for config.modules. We generate
2978
dnl code to check if we should use this.
2979
cat <<EOM >> ${CONFIG_MODULES}.sh
2980
case "\$userlist" in
2981
*" $name "*) grep "^name=$name " \${CONFIG_MODULES}.old;;
2987
cat <<\EOM >> ${CONFIG_MODULES}.sh
2988
) >${CONFIG_MODULES}
2989
rm -f ${CONFIG_MODULES}.old
2992
dnl AH_TOP replaces the code which used to appear at the top
2994
AH_TOP([/***** begin user configuration section *****/
2996
/* Define this to be the location of your password file */
2997
#define PASSWD_FILE "/etc/passwd"
2999
/* Define this to be the name of your NIS/YP password *
3000
* map (if applicable) */
3001
#define PASSWD_MAP "passwd.byname"
3003
/* Define to 1 if you want user names to be cached */
3004
#define CACHE_USERNAMES 1
3006
/* Define to 1 if system supports job control */
3007
#define JOB_CONTROL 1
3009
/* Define this if you use "suspended" instead of "stopped" */
3010
#define USE_SUSPENDED 1
3012
/* The default history buffer size in lines */
3013
#define DEFAULT_HISTSIZE 30
3015
/* The default editor for the fc builtin */
3016
#define DEFAULT_FCEDIT "vi"
3018
/* The default prefix for temporary files */
3019
#define DEFAULT_TMPPREFIX "/tmp/zsh"
3021
/***** end of user configuration section *****/
3022
/***** shouldn't have to change anything below here *****/
3026
CLEAN_MK="${srcdir}/Config/clean.mk"
3027
CONFIG_MK="${srcdir}/Config/config.mk"
3028
dnl defs.mk is in the build tree, not the source tree
3029
DEFS_MK="Config/defs.mk"
3030
VERSION_MK="${srcdir}/Config/version.mk"
3032
AC_SUBST_FILE(CLEAN_MK)dnl
3033
AC_SUBST_FILE(CONFIG_MK)dnl
3034
AC_SUBST_FILE(DEFS_MK)dnl
3035
AC_SUBST_FILE(VERSION_MK)dnl
3037
AC_CONFIG_FILES(Config/defs.mk Makefile Doc/Makefile Etc/Makefile \
3038
Src/Makefile Test/Makefile)
3039
AC_CONFIG_COMMANDS([config.modules], [. ./config.modules.sh])
3040
AC_CONFIG_COMMANDS([stamp-h], [echo >stamp-h])
3044
eval "zshbin1=${bindir}"
3045
eval "zshbin2=${zshbin1}"
3046
eval "zshman=${mandir}"
3047
eval "zshinfo=${infodir}"
3048
eval "zshfndir=${fndir}"
3053
zsh version : ${VERSION}
3054
host operating system : ${host_cpu}-${host_vendor}-${host_os}
3055
source code location : ${srcdir}
3057
preprocessor flags : ${CPPFLAGS}
3058
executable compiler flags : ${CFLAGS}"
3059
if test "x$dynamic" = xyes; then
3061
module compiler flags : ${CFLAGS} ${DLCFLAGS}"
3064
executable linker flags : ${LDFLAGS} ${EXELDFLAGS} ${EXTRA_LDFLAGS}"
3065
if test "x$dynamic" = xyes; then
3067
module linker flags : ${LDFLAGS} ${LIBLDFLAGS} ${DLLDFLAGS}"
3070
library flags : ${LIBS}
3071
installation basename : ${tzsh_name}
3072
binary install path : ${zshbin2}
3073
man page install path : ${zshman}
3074
info install path : ${zshinfo}"
3075
if test "$zshfndir" != no; then
3076
echo "functions install path : ${zshfndir}"
3078
echo "See config.modules for installed modules and functions.
3083
echo "WARNING: zsh will be linked against libgdbm.
3084
This means the binary is covered by the GNU General Public License.
3085
This does not affect the source code.
3086
Run configure with --disable-gdbm if required."