1#! /bin/sh
2# Generated automatically by configure.
3# Run this file to recreate the current configuration.
4# Compiler output produced by configure, useful for debugging
5# configure, is in config.log if it exists.
6
7debug=false
8SHELL=${CONFIG_SHELL-/bin/sh}
9ac_cs_invocation="$0 $@"
10
11# Be Bourne compatible
12if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13  emulate sh
14  NULLCMD=:
15elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16  set -o posix
17fi
18
19# Name of the executable.
20as_me=`echo "$0" |sed 's,.*[\\/],,'`
21
22if expr a : '\(a\)' >/dev/null 2>&1; then
23  as_expr=expr
24else
25  as_expr=false
26fi
27
28rm -f conf$$ conf$$.exe conf$$.file
29echo >conf$$.file
30if ln -s conf$$.file conf$$ 2>/dev/null; then
31  # We could just check for DJGPP; but this test a) works b) is more generic
32  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
33  if test -f conf$$.exe; then
34    # Don't use ln at all; we don't have any links
35    as_ln_s='cp -p'
36  else
37    as_ln_s='ln -s'
38  fi
39elif ln conf$$.file conf$$ 2>/dev/null; then
40  as_ln_s=ln
41else
42  as_ln_s='cp -p'
43fi
44rm -f conf$$ conf$$.exe conf$$.file
45
46as_executable_p="test -f"
47
48# Support unset when possible.
49if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
50  as_unset=unset
51else
52  as_unset=false
53fi
54
55# NLS nuisances.
56$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
57$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
58$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
59$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
60$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
61$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
62$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
63$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
64
65# IFS
66# We need space, tab and new line, in precisely that order.
67as_nl='
68'
69IFS=" 	$as_nl"
70
71# CDPATH.
72$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
73
74exec 6>&1
75
76config_files=" include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h  man/Makefile include/Makefile ncurses/Makefile progs/Makefile tack/Makefile panel/Makefile menu/Makefile form/Makefile test/Makefile misc/Makefile c++/Makefile misc/run_tic.sh:misc/run_tic.in Makefile"
77config_headers=" include/ncurses_cfg.h:include/ncurses_cfg.hin"
78config_commands=" default"
79
80ac_cs_usage="\
81\`$as_me' instantiates files from templates according to the
82current configuration.
83
84Usage: $0 [OPTIONS] [FILE]...
85
86  -h, --help       print this help, then exit
87  -V, --version    print version number, then exit
88  -d, --debug      don't remove temporary files
89      --recheck    update $as_me by reconfiguring in the same conditions
90  --file=FILE[:TEMPLATE]
91                   instantiate the configuration file FILE
92  --header=FILE[:TEMPLATE]
93                   instantiate the configuration header FILE
94
95Configuration files:
96$config_files
97
98Configuration headers:
99$config_headers
100
101Configuration commands:
102$config_commands
103
104Report bugs to <bug-autoconf@gnu.org>."
105ac_cs_version="\
106config.status
107configured by ./configure, generated by GNU Autoconf 2.52.20030208,
108  with options \"\"
109
110Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
111Free Software Foundation, Inc.
112This config.status script is free software; the Free Software Foundation
113gives unlimited permission to copy, distribute and modify it."
114srcdir=.
115INSTALL="/bin/install -c"
116# If no file are specified by the user, then we need to provide default
117# value.  By we need to know if files were specified by the user.
118ac_need_defaults=:
119while test $# != 0
120do
121  case $1 in
122  --*=*)
123    ac_option=`expr "x$1" : 'x\([^=]*\)='`
124    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
125    shift
126    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
127    shift
128    ;;
129  -*);;
130  *) # This is not an option, so the user has probably given explicit
131     # arguments.
132     ac_need_defaults=false;;
133  esac
134
135  case $1 in
136  # Handling of the options.
137  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
138    echo "running /bin/sh ./configure "  " --no-create --no-recursion"
139    exec /bin/sh ./configure  --no-create --no-recursion ;;
140  --version | --vers* | -V )
141    echo "$ac_cs_version"; exit 0 ;;
142  --he | --h)
143    # Conflict between --help and --header
144    { { echo "$as_me:14237: error: ambiguous option: $1
145Try \`$0 --help' for more information." >&5
146echo "$as_me: error: ambiguous option: $1
147Try \`$0 --help' for more information." >&2;}
148   { (exit 1); exit 1; }; };;
149  --help | --hel | -h )
150    echo "$ac_cs_usage"; exit 0 ;;
151  --debug | --d* | -d )
152    debug=: ;;
153  --file | --fil | --fi | --f )
154    shift
155    CONFIG_FILES="$CONFIG_FILES $1"
156    ac_need_defaults=false;;
157  --header | --heade | --head | --hea )
158    shift
159    CONFIG_HEADERS="$CONFIG_HEADERS $1"
160    ac_need_defaults=false;;
161
162  # This is an error.
163  -*) { { echo "$as_me:14256: error: unrecognized option: $1
164Try \`$0 --help' for more information." >&5
165echo "$as_me: error: unrecognized option: $1
166Try \`$0 --help' for more information." >&2;}
167   { (exit 1); exit 1; }; } ;;
168
169  *) ac_config_targets="$ac_config_targets $1" ;;
170
171  esac
172  shift
173done
174
175exec 5>>config.log
176cat >&5 << _ACEOF
177
178## ----------------------- ##
179## Running config.status.  ##
180## ----------------------- ##
181
182This file was extended by $as_me 2.52.20030208, executed with
183  CONFIG_FILES    = $CONFIG_FILES
184  CONFIG_HEADERS  = $CONFIG_HEADERS
185  CONFIG_LINKS    = $CONFIG_LINKS
186  CONFIG_COMMANDS = $CONFIG_COMMANDS
187  > $ac_cs_invocation
188on `(hostname || uname -n) 2>/dev/null | sed 1q`
189
190_ACEOF
191#
192# INIT-COMMANDS section.
193#
194
195### Special initialization commands, used to pass information from the
196### configuration-run into config.status
197
198AWK="gawk"
199CF_LIST_MODELS=" normal debug"
200DFT_ARG_SUFFIX=""
201DFT_LWR_MODEL="normal"
202LDCONFIG=""
203LIB_NAME="ncurses"
204LIB_SUBSETS="termlib+ext_tinfo+base+ext_funcs"
205LIB_SUFFIX=""
206LIB_TRACING="DEBUG"
207MAKE_TERMINFO=""
208NCURSES_OSPEED="short"
209SRC_SUBDIRS="man include ncurses progs tack panel menu form test misc c++"
210TERMINFO="/usr/local/share/terminfo"
211TINFO_ARG_SUFFIX=""
212TINFO_LIB_SUFFIX=""
213TINFO_NAME="tinfo"
214WITH_CURSES_H="yes"
215WITH_ECHO="yes"
216WITH_OVERWRITE="no"
217cf_cv_abi_version="5"
218cf_cv_do_symlinks="no"
219cf_cv_enable_lp64="0"
220cf_cv_prog_CC_c_o=yes
221cf_cv_prog_CXX_c_o=yes
222cf_cv_rel_version="5.5"
223cf_cv_rm_so_locs="no"
224cf_cv_shlib_version="auto"
225cf_cv_shlib_version_infix="no"
226cf_cv_system_name="beos"
227cf_with_cxx_binding="yes"
228host="i586-pc-beos"
229target="i586-pc-beos"
230
231for ac_config_target in $ac_config_targets
232do
233  case "$ac_config_target" in
234  # Handling of arguments.
235  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
236  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
237  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
238  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
239  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
240  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
241  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
242  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
243  *) { { echo "$as_me:14342: error: invalid argument: $ac_config_target" >&5
244echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
245   { (exit 1); exit 1; }; };;
246  esac
247done
248
249# If the user did not use the arguments to specify the items to instantiate,
250# then the envvar interface is used.  Set only those that are not.
251# We use the long form for the default assignment because of an extremely
252# bizarre bug on SunOS 4.1.3.
253if $ac_need_defaults; then
254  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
255  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
256  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
257fi
258
259# Create a temporary directory, and hook for its removal unless debugging.
260$debug ||
261{
262  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
263  trap '{ (exit 1); exit 1; }' 1 2 13 15
264}
265
266# Create a (secure) tmp directory for tmp files.
267: ${TMPDIR=/tmp}
268{
269  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
270  test -n "$tmp" && test -d "$tmp"
271}  ||
272{
273  tmp=$TMPDIR/cs$$-$RANDOM
274  (umask 077 && mkdir $tmp)
275} ||
276{
277   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
278   { (exit 1); exit 1; }
279}
280
281
282#
283# CONFIG_FILES section.
284#
285
286# No need to generate the scripts if there are no CONFIG_FILES.
287# This happens for instance when ./config.status config.h
288if test -n "$CONFIG_FILES"; then
289  # Protect against being on the right side of a sed subst in config.status.
290  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
291   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
292s,@SHELL@,/bin/sh,;t t
293s,@exec_prefix@,${prefix},;t t
294s,@prefix@,/usr/local,;t t
295s,@program_transform_name@,s,x,x,,;t t
296s,@bindir@,${exec_prefix}/bin,;t t
297s,@sbindir@,${exec_prefix}/sbin,;t t
298s,@libexecdir@,${exec_prefix}/libexec,;t t
299s,@datadir@,${prefix}/share,;t t
300s,@sysconfdir@,${prefix}/etc,;t t
301s,@sharedstatedir@,${prefix}/com,;t t
302s,@localstatedir@,${prefix}/var,;t t
303s,@libdir@,${exec_prefix}/lib,;t t
304s,@includedir@,$(prefix)/include/ncurses,;t t
305s,@oldincludedir@,/usr/include,;t t
306s,@infodir@,${prefix}/info,;t t
307s,@mandir@,${prefix}/man,;t t
308s,@PACKAGE_NAME@,,;t t
309s,@PACKAGE_TARNAME@,,;t t
310s,@PACKAGE_VERSION@,,;t t
311s,@PACKAGE_STRING@,,;t t
312s,@PACKAGE_BUGREPORT@,,;t t
313s,@build_alias@,,;t t
314s,@host_alias@,,;t t
315s,@target_alias@,,;t t
316s,@ECHO_C@,,;t t
317s,@ECHO_N@,-n,;t t
318s,@ECHO_T@,,;t t
319s,@PATH_SEPARATOR@,:,;t t
320s,@DEFS@,-DHAVE_CONFIG_H,;t t
321s,@LIBS@,,;t t
322s,@NCURSES_MAJOR@,5,;t t
323s,@NCURSES_MINOR@,5,;t t
324s,@NCURSES_PATCH@,20051010,;t t
325s,@cf_cv_rel_version@,5.5,;t t
326s,@cf_cv_abi_version@,5,;t t
327s,@cf_cv_builtin_bool@,1,;t t
328s,@cf_cv_header_stdbool_h@,0,;t t
329s,@cf_cv_type_of_bool@,unsigned char,;t t
330s,@build@,i586-pc-beos,;t t
331s,@build_cpu@,i586,;t t
332s,@build_vendor@,pc,;t t
333s,@build_os@,beos,;t t
334s,@host@,i586-pc-beos,;t t
335s,@host_cpu@,i586,;t t
336s,@host_vendor@,pc,;t t
337s,@host_os@,beos,;t t
338s,@target@,i586-pc-beos,;t t
339s,@target_cpu@,i586,;t t
340s,@target_vendor@,pc,;t t
341s,@target_os@,beos,;t t
342s,@CC@,gcc,;t t
343s,@CFLAGS@,-O2,;t t
344s,@LDFLAGS@,,;t t
345s,@CPPFLAGS@,-I. -I../include  -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506L -DNDEBUG -I$(includedir),;t t
346s,@ac_ct_CC@,gcc,;t t
347s,@EXEEXT@,,;t t
348s,@OBJEXT@,o,;t t
349s,@CPP@,gcc -E,;t t
350s,@EXTRA_CPPFLAGS@,,;t t
351s,@PROG_EXT@,,;t t
352s,@LDCONFIG@,,;t t
353s,@CXX@,/boot/develop/bin/g++,;t t
354s,@CXXFLAGS@,-O2,;t t
355s,@ac_ct_CXX@,g++,;t t
356s,@AWK@,gawk,;t t
357s,@SET_MAKE@,,;t t
358s,@INSTALL_PROGRAM@,${INSTALL},;t t
359s,@INSTALL_SCRIPT@,${INSTALL},;t t
360s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
361s,@LN_S@,ln -s,;t t
362s,@MAKE_LOWER_TAGS@,,;t t
363s,@MAKE_UPPER_TAGS@,,;t t
364s,@LINT@,,;t t
365s,@MAN@,,;t t
366s,@LINT_OPTS@,,;t t
367s,@RANLIB@,ranlib,;t t
368s,@ac_ct_RANLIB@,ranlib,;t t
369s,@LD@,ld,;t t
370s,@ac_ct_LD@,ld,;t t
371s,@AR@,ar,;t t
372s,@ac_ct_AR@,ar,;t t
373s,@AR_OPTS@,rv,;t t
374s,@cf_cv_makeflags@,,;t t
375s,@DESTDIR@,,;t t
376s,@BUILD_CC@,$(CC),;t t
377s,@BUILD_CPP@,$(CPP),;t t
378s,@BUILD_CFLAGS@,$(CFLAGS),;t t
379s,@BUILD_CPPFLAGS@,$(CPPFLAGS),;t t
380s,@BUILD_LDFLAGS@,$(LDFLAGS),;t t
381s,@BUILD_LIBS@,$(LIBS),;t t
382s,@BUILD_EXEEXT@,$x,;t t
383s,@BUILD_OBJEXT@,o,;t t
384s,@cf_list_models@, normal debug,;t t
385s,@LIBTOOL@,,;t t
386s,@LIBTOOL_CXX@,,;t t
387s,@LIB_CREATE@,$(AR) -cr,;t t
388s,@LIB_OBJECT@,$(OBJECTS),;t t
389s,@LIB_SUFFIX@,,;t t
390s,@LIB_PREP@,ranlib,;t t
391s,@LIB_CLEAN@,,;t t
392s,@LIB_COMPILE@,,;t t
393s,@LIB_LINK@,,;t t
394s,@LIB_INSTALL@,,;t t
395s,@LIB_UNINSTALL@,,;t t
396s,@DFT_LWR_MODEL@,normal,;t t
397s,@DFT_UPR_MODEL@,NORMAL,;t t
398s,@TINFO_NAME@,tinfo,;t t
399s,@LIB_NAME@,ncurses,;t t
400s,@LIB_PREFIX@,lib,;t t
401s,@CC_G_OPT@,-g,;t t
402s,@CXX_G_OPT@,-g,;t t
403s,@LD_MODEL@,,;t t
404s,@CC_SHARED_OPTS@,-fPIC,;t t
405s,@LD_SHARED_OPTS@,,;t t
406s,@MK_SHARED_LIB@,$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0,;t t
407s,@LINK_PROGS@,,;t t
408s,@LINK_TESTS@,,;t t
409s,@EXTRA_LDFLAGS@,,;t t
410s,@LOCAL_LDFLAGS@,,;t t
411s,@LOCAL_LDFLAGS2@,,;t t
412s,@INSTALL_LIB@,-m 644,;t t
413s,@TERMINFO_SRC@,${top_srcdir}/misc/terminfo.src,;t t
414s,@PATHSEP@,:,;t t
415s,@FALLBACK_LIST@,,;t t
416s,@WHICH_XTERM@,xterm-new,;t t
417s,@TERMINFO_DIRS@,/usr/local/share/terminfo,;t t
418s,@TERMINFO@,/usr/local/share/terminfo,;t t
419s,@MAKE_TERMINFO@,,;t t
420s,@TERMPATH@,,;t t
421s,@BROKEN_LINKER@,0,;t t
422s,@NCURSES_CH_T@,chtype,;t t
423s,@NCURSES_LIBUTF8@,0,;t t
424s,@NEED_WCHAR_H@,0,;t t
425s,@NCURSES_MBSTATE_T@,0,;t t
426s,@NCURSES_WCHAR_T@,0,;t t
427s,@NCURSES_WINT_T@,0,;t t
428s,@NCURSES_OK_WCHAR_T@,,;t t
429s,@NCURSES_OK_WINT_T@,,;t t
430s,@cf_cv_enable_lp64@,0,;t t
431s,@NCURSES_BOOL@,auto,;t t
432s,@TERMINFO_CAPS@,Caps,;t t
433s,@NCURSES_OSPEED@,short,;t t
434s,@MANPAGE_RENAMES@,no,;t t
435s,@NCURSES_EXT_FUNCS@,1,;t t
436s,@NCURSES_CONST@,/*nothing*/,;t t
437s,@NCURSES_XNAMES@,1,;t t
438s,@NCURSES_EXT_COLORS@,0,;t t
439s,@NCURSES_MOUSE_VERSION@,1,;t t
440s,@ECHO_LINK@,,;t t
441s,@EXTRA_CFLAGS@,,;t t
442s,@EXTRA_CXXFLAGS@,,;t t
443s,@ADA_TRACE@,FALSE,;t t
444s,@MATH_LIB@,,;t t
445s,@cf_cv_typeof_chtype@,long,;t t
446s,@cf_cv_1UL@,1UL,;t t
447s,@cf_cv_typeof_mmask_t@,long,;t t
448s,@HAVE_VSSCANF@,1,;t t
449s,@CXXCPP@,/boot/develop/bin/g++ -E,;t t
450s,@CXXLDFLAGS@,,;t t
451s,@CXX_AR@,$(AR),;t t
452s,@CXX_AR_OPTS@,$(AR_OPTS),;t t
453s,@CXXLIBS@, -lstdc++,;t t
454s,@USE_CXX_BOOL@,defined(__cplusplus),;t t
455s,@gnat_exists@,no,;t t
456s,@M4_exists@,,;t t
457s,@cf_ada_make@,,;t t
458s,@cf_ada_compiler@,,;t t
459s,@cf_ada_package@,,;t t
460s,@ADAFLAGS@,,;t t
461s,@cf_compile_generics@,,;t t
462s,@cf_generic_objects@,,;t t
463s,@PRAGMA_UNREF@,,;t t
464s,@ADA_INCLUDE@,,;t t
465s,@ADA_OBJECTS@,,;t t
466s,@ACPPFLAGS@,-I. -I../../include  -I$(includedir),;t t
467s,@DFT_ARG_SUFFIX@,,;t t
468s,@DFT_DEP_SUFFIX@,.a,;t t
469s,@DFT_OBJ_SUBDIR@,objects,;t t
470s,@CXX_LIB_SUFFIX@,.a,;t t
471s,@TINFO_ARG_SUFFIX@,,;t t
472s,@TINFO_DEP_SUFFIX@,,;t t
473s,@TINFO_LIB_SUFFIX@,,;t t
474s,@TINFO_ARGS@,-L../lib -lncurses,;t t
475s,@TINFO_ARGS2@,-L../../lib -lncurses,;t t
476s,@TINFO_LIST@,,;t t
477s,@SHLIB_LIST@,,;t t
478s,@TEST_ARGS@,-L../lib -lform -lmenu -lpanel -lncurses ,;t t
479s,@TEST_DEPS@,../lib/libform.a ../lib/libmenu.a ../lib/libpanel.a ../lib/libncurses.a ,;t t
480s,@TEST_ARG2@,-L../../lib -lform -lmenu -lpanel -lncurses ,;t t
481s,@TEST_DEP2@,../../lib/libform.a ../../lib/libmenu.a ../../lib/libpanel.a ../../lib/libncurses.a ,;t t
482s,@ADA_SUBDIRS@,,;t t
483s,@DIRS_TO_MAKE@,lib objects obj_g,;t t
484CEOF
485
486  # Split the substitutions into bite-sized pieces for seds with
487  # small command number limits, like on Digital OSF/1 and HP-UX.
488  ac_max_sed_lines=48
489  ac_sed_frag=1 # Number of current file.
490  ac_beg=1 # First line for current file.
491  ac_end=$ac_max_sed_lines # Line after last line for current file.
492  ac_more_lines=:
493  ac_sed_cmds=
494  while $ac_more_lines; do
495    if test $ac_beg -gt 1; then
496      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
497    else
498      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
499    fi
500    if test ! -s $tmp/subs.frag; then
501      ac_more_lines=false
502    else
503      # The purpose of the label and of the branching condition is to
504      # speed up the sed processing (if there are no `@' at all, there
505      # is no need to browse any of the substitutions).
506      # These are the two extra sed commands mentioned above.
507      (echo ':t
508  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
509      if test -z "$ac_sed_cmds"; then
510  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
511      else
512  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
513      fi
514      ac_sed_frag=`expr $ac_sed_frag + 1`
515      ac_beg=$ac_end
516      ac_end=`expr $ac_end + $ac_max_sed_lines`
517    fi
518  done
519  if test -z "$ac_sed_cmds"; then
520    ac_sed_cmds=cat
521  fi
522fi # test -n "$CONFIG_FILES"
523
524for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
525  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
526  case $ac_file in
527  - | *:- | *:-:* ) # input from stdin
528        cat >$tmp/stdin
529        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
530        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
531  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
532        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
533  * )   ac_file_in=$ac_file.in ;;
534  esac
535
536  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
537  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
538         X"$ac_file" : 'X\(//\)[^/]' \| \
539         X"$ac_file" : 'X\(//\)$' \| \
540         X"$ac_file" : 'X\(/\)' \| \
541         .     : '\(.\)' 2>/dev/null ||
542echo X"$ac_file" |
543    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
544  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
545  	  /^X\(\/\/\)$/{ s//\1/; q; }
546  	  /^X\(\/\).*/{ s//\1/; q; }
547  	  s/.*/./; q'`
548  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
549    { case "$ac_dir" in
550  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
551  *)                      as_incr_dir=.;;
552esac
553as_dummy="$ac_dir"
554for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
555  case $as_mkdir_dir in
556    # Skip DOS drivespec
557    ?:) as_incr_dir=$as_mkdir_dir ;;
558    *)
559      as_incr_dir=$as_incr_dir/$as_mkdir_dir
560      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
561    ;;
562  esac
563done; }
564
565    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
566    # A "../" for each directory in $ac_dir_suffix.
567    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
568  else
569    ac_dir_suffix= ac_dots=
570  fi
571
572  case $srcdir in
573  .)  ac_srcdir=.
574      if test -z "$ac_dots"; then
575         ac_top_srcdir=.
576      else
577         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
578      fi ;;
579  [\\/]* | ?:[\\/]* )
580      ac_srcdir=$srcdir$ac_dir_suffix;
581      ac_top_srcdir=$srcdir ;;
582  *) # Relative path.
583    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
584    ac_top_srcdir=$ac_dots$srcdir ;;
585  esac
586
587  case $INSTALL in
588  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
589  *) ac_INSTALL=$ac_dots$INSTALL ;;
590  esac
591
592  if test x"$ac_file" != x-; then
593    { echo "$as_me:14700: creating $ac_file" >&5
594echo "$as_me: creating $ac_file" >&6;}
595    rm -f "$ac_file"
596  fi
597  # Let's still pretend it is `configure' which instantiates (i.e., don't
598  # use $as_me), people would be surprised to read:
599  #    /* config.h.  Generated automatically by config.status.  */
600  configure_input="Generated automatically from `echo $ac_file_in |
601                                                 sed 's,.*/,,'` by configure."
602
603  # First look for the input files in the build tree, otherwise in the
604  # src tree.
605  ac_file_inputs=`IFS=:
606    for f in $ac_file_in; do
607      case $f in
608      -) echo $tmp/stdin ;;
609      [\\/$]*)
610         # Absolute (can't be DOS-style, as IFS=:)
611         test -f "$f" || { { echo "$as_me:14718: error: cannot find input file: $f" >&5
612echo "$as_me: error: cannot find input file: $f" >&2;}
613   { (exit 1); exit 1; }; }
614         echo $f;;
615      *) # Relative
616         if test -f "$f"; then
617           # Build tree
618           echo $f
619         elif test -f "$srcdir/$f"; then
620           # Source tree
621           echo $srcdir/$f
622         else
623           # /dev/null tree
624           { { echo "$as_me:14731: error: cannot find input file: $f" >&5
625echo "$as_me: error: cannot find input file: $f" >&2;}
626   { (exit 1); exit 1; }; }
627         fi;;
628      esac
629    done` || { (exit 1); exit 1; }
630  sed "/^[ 	]*VPATH[ 	]*=/{
631s/:*\$(srcdir):*/:/;
632s/:*\${srcdir}:*/:/;
633s/:*@srcdir@:*/:/;
634s/^\([^=]*=[ 	]*\):*/\1/;
635s/:*$//;
636s/^[^=]*=[ 	]*$//;
637}
638
639:t
640/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
641s,@configure_input@,$configure_input,;t t
642s,@srcdir@,$ac_srcdir,;t t
643s,@top_srcdir@,$ac_top_srcdir,;t t
644s,@INSTALL@,$ac_INSTALL,;t t
645" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
646  rm -f $tmp/stdin
647  if test x"$ac_file" != x-; then
648    mv $tmp/out $ac_file
649  else
650    cat $tmp/out
651    rm -f $tmp/out
652  fi
653
654done
655
656#
657# CONFIG_HEADER section.
658#
659
660# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
661# NAME is the cpp macro being defined and VALUE is the value it is being given.
662#
663# ac_d sets the value in "#define NAME VALUE" lines.
664ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
665ac_dB='[ 	].*$,\1#\2'
666ac_dC=' '
667ac_dD=',;t'
668# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
669ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
670ac_iB='\([ 	]\),\1#\2define\3'
671ac_iC=' '
672ac_iD='\4,;t'
673# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
674ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
675ac_uB='$,\1#\2define\3'
676ac_uC=' '
677ac_uD=',;t'
678
679for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
680  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
681  case $ac_file in
682  - | *:- | *:-:* ) # input from stdin
683        cat >$tmp/stdin
684        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
685        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
686  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
687        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
688  * )   ac_file_in=$ac_file.in ;;
689  esac
690
691  test x"$ac_file" != x- && { echo "$as_me:14797: creating $ac_file" >&5
692echo "$as_me: creating $ac_file" >&6;}
693
694  # First look for the input files in the build tree, otherwise in the
695  # src tree.
696  ac_file_inputs=`IFS=:
697    for f in $ac_file_in; do
698      case $f in
699      -) echo $tmp/stdin ;;
700      [\\/$]*)
701         # Absolute (can't be DOS-style, as IFS=:)
702         test -f "$f" || { { echo "$as_me:14808: error: cannot find input file: $f" >&5
703echo "$as_me: error: cannot find input file: $f" >&2;}
704   { (exit 1); exit 1; }; }
705         echo $f;;
706      *) # Relative
707         if test -f "$f"; then
708           # Build tree
709           echo $f
710         elif test -f "$srcdir/$f"; then
711           # Source tree
712           echo $srcdir/$f
713         else
714           # /dev/null tree
715           { { echo "$as_me:14821: error: cannot find input file: $f" >&5
716echo "$as_me: error: cannot find input file: $f" >&2;}
717   { (exit 1); exit 1; }; }
718         fi;;
719      esac
720    done` || { (exit 1); exit 1; }
721  # Remove the trailing spaces.
722  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
723
724  rm -f conftest.frag
725  cat >> conftest.frag <<CEOF
726
727#define SYSTEM_NAME "beos"
728#define CC_HAS_PROTOS 1
729#define HAVE_LONG_FILE_NAMES 1
730#define MIXEDCASE_FILENAMES 1
731#define USE_DATABASE 1
732#define TERMINFO_DIRS "/usr/local/share/terminfo"
733#define TERMINFO "/usr/local/share/terminfo"
734#define HAVE_BIG_CORE 1
735#define PURE_TERMINFO 1
736#define USE_HOME_TERMINFO 1
737#define USE_ROOT_ENVIRON 1
738#define HAVE_REMOVE 1
739#define HAVE_UNLINK 1
740#define HAVE_SYMLINK 1
741#define USE_SYMLINKS 1
742#define HAVE_CURSES_VERSION 1
743#define HAVE_HAS_KEY 1
744#define HAVE_RESIZETERM 1
745#define HAVE_RESIZE_TERM 1
746#define HAVE_USE_DEFAULT_COLORS 1
747#define HAVE_WRESIZE 1
748#define NCURSES_EXT_FUNCS 1
749#define NCURSES_NO_PADDING 1
750#define USE_SIGWINCH 1
751#define USE_ASSUMED_COLOR 1
752#define USE_HASHMAP 1
753#define GCC_SCANF 1
754#define GCC_PRINTF 1
755#define GCC_UNUSED __attribute__((unused))
756#define GCC_NORETURN __attribute__((noreturn))
757#define NDEBUG 1
758#define HAVE_NC_ALLOC_H 1
759#define HAVE_GETTIMEOFDAY 1
760#define STDC_HEADERS 1
761#define HAVE_DIRENT_H 1
762#define TIME_WITH_SYS_TIME 1
763#define HAVE_REGEX_H_FUNCS 1
764CEOF
765  cat >> conftest.frag <<CEOF
766#define HAVE_FCNTL_H 1
767#define HAVE_GETOPT_H 1
768#define HAVE_LIMITS_H 1
769#define HAVE_LOCALE_H 1
770#define HAVE_SYS_IOCTL_H 1
771#define HAVE_SYS_PARAM_H 1
772#define HAVE_SYS_SELECT_H 1
773#define HAVE_SYS_TIME_H 1
774#define HAVE_SYS_TIMES_H 1
775#define HAVE_UNISTD_H 1
776#define HAVE_SYS_TIME_SELECT 1
777#define CC_HAS_INLINE_FUNCS 1
778#define TYPEOF_CHTYPE long
779#define HAVE_ERRNO 1
780#define HAVE_GETCWD 1
781#define HAVE_GETEGID 1
782#define HAVE_GETEUID 1
783#define HAVE_REMOVE 1
784#define HAVE_SELECT 1
785#define HAVE_SETBUF 1
786#define HAVE_SETBUFFER 1
787#define HAVE_SETVBUF 1
788#define HAVE_SIGACTION 1
789#define HAVE_STRDUP 1
790#define HAVE_STRSTR 1
791#define HAVE_TCGETPGRP 1
792#define HAVE_TIMES 1
793#define HAVE_VSNPRINTF 1
794#define HAVE_ISASCII 1
795#define HAVE_TERMIOS_H 1
796#define HAVE_UNISTD_H 1
797#define HAVE_TCGETATTR 1
798#define HAVE_VSSCANF 1
799#define HAVE_MKSTEMP 1
800#define RETSIGTYPE void
801#define HAVE_SIZECHANGE 1
802#define HAVE_TYPEINFO 1
803#define CPP_HAS_PARAM_INIT 1
804CEOF
805  cat >> conftest.frag <<CEOF
806#define HAVE_STRSTREAM_H 1
807#define CPP_HAS_VSCAN_FUNC 1
808#define USE_STRSTREAM_VSCAN 1
809#define HAVE_SLK_COLOR 1
810#define HAVE_PANEL_H 1
811#define HAVE_LIBPANEL 1
812#define HAVE_MENU_H 1
813#define HAVE_LIBMENU 1
814#define HAVE_FORM_H 1
815#define HAVE_LIBFORM 1
816#define NCURSES_PATHSEP ':'
817#define NCURSES_VERSION_STRING "5.5.20051010"
818CEOF
819  cat >> conftest.edit <<CEOF
820/@DEFS@/r conftest.frag
821/@DEFS@/d
822CEOF
823sed -f conftest.edit $tmp/in > $tmp/out
824rm -f $tmp/in
825mv $tmp/out $tmp/in
826rm -f conftest.edit conftest.frag
827
828  # Let's still pretend it is `configure' which instantiates (i.e., don't
829  # use $as_me), people would be surprised to read:
830  #    /* config.h.  Generated automatically by config.status.  */
831  if test x"$ac_file" = x-; then
832    echo "/* Generated automatically by configure.  */" >$tmp/config.h
833  else
834    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
835  fi
836  cat $tmp/in >>$tmp/config.h
837  rm -f $tmp/in
838  if test x"$ac_file" != x-; then
839    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
840      { echo "$as_me:14879: $ac_file is unchanged" >&5
841echo "$as_me: $ac_file is unchanged" >&6;}
842    else
843      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
844         X"$ac_file" : 'X\(//\)[^/]' \| \
845         X"$ac_file" : 'X\(//\)$' \| \
846         X"$ac_file" : 'X\(/\)' \| \
847         .     : '\(.\)' 2>/dev/null ||
848echo X"$ac_file" |
849    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
850  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
851  	  /^X\(\/\/\)$/{ s//\1/; q; }
852  	  /^X\(\/\).*/{ s//\1/; q; }
853  	  s/.*/./; q'`
854      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
855        { case "$ac_dir" in
856  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
857  *)                      as_incr_dir=.;;
858esac
859as_dummy="$ac_dir"
860for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
861  case $as_mkdir_dir in
862    # Skip DOS drivespec
863    ?:) as_incr_dir=$as_mkdir_dir ;;
864    *)
865      as_incr_dir=$as_incr_dir/$as_mkdir_dir
866      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
867    ;;
868  esac
869done; }
870
871      fi
872      rm -f $ac_file
873      mv $tmp/config.h $ac_file
874    fi
875  else
876    cat $tmp/config.h
877    rm -f $tmp/config.h
878  fi
879done
880
881#
882# CONFIG_COMMANDS section.
883#
884for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
885  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
886  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
887
888  case $ac_dest in
889    default )
890
891	case $cf_cv_system_name in
892	OS/2*)	LIB_PREFIX=''     ;;
893	os2*)	LIB_PREFIX=''     ;;
894	*)	LIB_PREFIX='lib'  ;;
895	esac
896cf_prefix=$LIB_PREFIX
897
898for cf_dir in $SRC_SUBDIRS
899do
900	if test -f $srcdir/$cf_dir/modules; then
901
902		IMPORT_LIB=
903		SHARED_LIB=
904		LIBS_TO_MAKE=
905		for cf_item in $CF_LIST_MODELS
906		do
907
908	case $cf_item in
909	libtool) cf_suffix='.la'  ;;
910	normal)  cf_suffix='.a'   ;;
911	debug)   cf_suffix='_g.a' ;;
912	profile) cf_suffix='_p.a' ;;
913	shared)
914		case $cf_cv_system_name in
915		cygwin*) cf_suffix='.dll' ;;
916		darwin*) cf_suffix='.dylib' ;;
917		hpux*)
918			case $target in
919			ia64*)	cf_suffix='.so' ;;
920			*)	cf_suffix='.sl' ;;
921			esac
922			;;
923		*)	cf_suffix='.so'  ;;
924		esac
925	esac
926	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
927
928			if test $cf_item = shared ; then
929			if test "$cf_cv_do_symlinks" = yes ; then
930				case "$cf_cv_shlib_version" in #(vi
931				rel) #(vi
932					case "$cf_cv_system_name" in #(vi
933					darwin*)
934					case .${LIB_SUFFIX} in
935					.w*)
936						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
937						cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
938						;;
939					*)
940						cf_suffix='.$(REL_VERSION)'"$cf_suffix"
941						;;
942					esac
943					;; #(vi
944					*) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
945					esac
946					;;
947				abi)
948					case "$cf_cv_system_name" in #(vi
949					darwin*)
950					case .${LIB_SUFFIX} in
951					.w*)
952						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
953						cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
954						;;
955					*)
956						cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
957						;;
958					esac
959					;; #(vi
960					*) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
961					esac
962					;;
963				esac
964			fi
965			# cygwin needs import library, and has unique naming convention
966			# use autodetected ${cf_prefix} for import lib and static lib, but
967			# use 'cyg' prefix for shared lib.
968			if test $cf_cv_shlib_version = cygdll ; then
969				SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
970				IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
971				LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
972				continue
973			fi
974			fi
975			LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
976		done
977
978		if test $cf_dir = ncurses ; then
979			cf_subsets="$LIB_SUBSETS"
980			cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
981			if test "$cf_termlib" != "$cf_subsets" ; then
982				cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
983				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
984			fi
985		else
986			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
987		fi
988
989		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
990		    -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
991		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
992			$cf_dir/Makefile >$cf_dir/Makefile.out
993		mv $cf_dir/Makefile.out $cf_dir/Makefile
994
995		$AWK -f $srcdir/mk-0th.awk \
996			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
997			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
998
999		for cf_subset in $cf_subsets
1000		do
1001			cf_subdirs=
1002			for cf_item in $CF_LIST_MODELS
1003			do
1004			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
1005
1006cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1007
1008	case $cf_item in
1009	libtool) cf_suffix='.la'  ;;
1010	normal)  cf_suffix='.a'   ;;
1011	debug)   cf_suffix='_g.a' ;;
1012	profile) cf_suffix='_p.a' ;;
1013	shared)
1014		case $cf_cv_system_name in
1015		cygwin*) cf_suffix='.dll' ;;
1016		darwin*) cf_suffix='.dylib' ;;
1017		hpux*)
1018			case $target in
1019			ia64*)	cf_suffix='.so' ;;
1020			*)	cf_suffix='.sl' ;;
1021			esac
1022			;;
1023		*)	cf_suffix='.so'  ;;
1024		esac
1025	esac
1026	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
1027
1028	case $cf_item in
1029	libtool) cf_subdir='obj_lo'  ;;
1030	normal)  cf_subdir='objects' ;;
1031	debug)   cf_subdir='obj_g' ;;
1032	profile) cf_subdir='obj_p' ;;
1033	shared)
1034		case $cf_cv_system_name in #(vi
1035		cygwin) #(vi
1036			cf_subdir='objects' ;;
1037		*)
1038			cf_subdir='obj_s' ;;
1039		esac
1040	esac
1041
1042			# Test for case where we build libtinfo with a different name.
1043			cf_libname=$cf_dir
1044			if test $cf_dir = ncurses ; then
1045				case $cf_subset in
1046				*base*)
1047					;;
1048				termlib*)
1049					cf_libname=$TINFO_LIB_SUFFIX
1050					if test -n "${DFT_ARG_SUFFIX}" ; then
1051						# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
1052						cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
1053					fi
1054				;;
1055				esac
1056			fi
1057
1058			# These dependencies really are for development, not
1059			# builds, but they are useful in porting, too.
1060			cf_depend="../include/ncurses_cfg.h"
1061			if test "$srcdir" = "."; then
1062				cf_reldir="."
1063			else
1064				cf_reldir="\$(srcdir)"
1065			fi
1066
1067			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
1068				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
1069			elif test -f $srcdir/$cf_dir/curses.priv.h; then
1070				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
1071			fi
1072
1073 			cf_dir_suffix=
1074 			old_cf_suffix="$cf_suffix"
1075 			if test "$cf_cv_shlib_version_infix" = yes ; then
1076			if test -n "$LIB_SUFFIX" ; then
1077				case $LIB_SUFFIX in
1078				w*)
1079					cf_libname=`echo $cf_libname | sed 's/w$//'`
1080					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
1081					cf_dir_suffix=w
1082					;;
1083				esac
1084			fi
1085 			fi
1086
1087			$AWK -f $srcdir/mk-1st.awk \
1088				name=${cf_libname}${cf_dir_suffix} \
1089				traces=$LIB_TRACING \
1090				MODEL=$cf_ITEM \
1091				model=$cf_subdir \
1092				prefix=$cf_prefix \
1093				suffix=$cf_suffix \
1094				subset=$cf_subset \
1095				ShlibVer=$cf_cv_shlib_version \
1096				ShlibVerInfix=$cf_cv_shlib_version_infix \
1097				DoLinks=$cf_cv_do_symlinks \
1098				rmSoLocs=$cf_cv_rm_so_locs \
1099				ldconfig="$LDCONFIG" \
1100				overwrite=$WITH_OVERWRITE \
1101				depend="$cf_depend" \
1102				host="$host" \
1103				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
1104
1105			cf_suffix="$old_cf_suffix"
1106
1107			for cf_subdir2 in $cf_subdirs lib
1108			do
1109				test $cf_subdir = $cf_subdir2 && break
1110			done
1111			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
1112			$AWK -f $srcdir/mk-2nd.awk \
1113				name=$cf_dir \
1114				traces=$LIB_TRACING \
1115				MODEL=$cf_ITEM \
1116				model=$cf_subdir \
1117				subset=$cf_subset \
1118				srcdir=$srcdir \
1119				echo=$WITH_ECHO \
1120				crenames=$cf_cv_prog_CC_c_o \
1121				cxxrenames=$cf_cv_prog_CXX_c_o \
1122				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
1123			cf_subdirs="$cf_subdirs $cf_subdir"
1124			done
1125		done
1126	fi
1127
1128	echo '	cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
1129done
1130
1131for cf_dir in $SRC_SUBDIRS
1132do
1133	if test -f $cf_dir/Makefile ; then
1134		case "$cf_dir" in
1135		Ada95) #(vi
1136			echo 'libs \' >> Makefile
1137			echo 'install.libs \' >> Makefile
1138			echo 'uninstall.libs ::' >> Makefile
1139			echo '	cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
1140			;;
1141		esac
1142	fi
1143
1144	if test -f $srcdir/$cf_dir/modules; then
1145		echo >> Makefile
1146		if test -f $srcdir/$cf_dir/headers; then
1147cat >> Makefile <<CF_EOF
1148install.includes \\
1149uninstall.includes \\
1150CF_EOF
1151		fi
1152if test "$cf_dir" != "c++" ; then
1153echo 'lint \' >> Makefile
1154fi
1155cat >> Makefile <<CF_EOF
1156libs \\
1157lintlib \\
1158install.libs \\
1159uninstall.libs \\
1160install.$cf_dir \\
1161uninstall.$cf_dir ::
1162	cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
1163CF_EOF
1164	elif test -f $srcdir/$cf_dir/headers; then
1165cat >> Makefile <<CF_EOF
1166
1167libs \\
1168install.libs \\
1169uninstall.libs \\
1170install.includes \\
1171uninstall.includes ::
1172	cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
1173CF_EOF
1174fi
1175done
1176
1177cat >> Makefile <<CF_EOF
1178
1179install.data \\
1180uninstall.data ::
1181$MAKE_TERMINFO	cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
1182
1183install.man \\
1184uninstall.man ::
1185	cd man && \$(MAKE) \$(CF_MFLAGS) \$@
1186
1187distclean ::
1188	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
1189	rm -f headers.sh headers.sed
1190	rm -rf \$(DIRS_TO_MAKE)
1191CF_EOF
1192
1193# Special case: tack's manpage lives in its own directory.
1194if test -d tack ; then
1195if test -f $srcdir/$tack.h; then
1196cat >> Makefile <<CF_EOF
1197
1198install.man \\
1199uninstall.man ::
1200	cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
1201CF_EOF
1202fi
1203fi
1204
1205rm -f headers.sed headers.sh
1206
1207echo creating headers.sh
1208cat >headers.sh <<CF_EOF
1209#! /bin/sh
1210# This shell script is generated by the 'configure' script.  It is invoked in a
1211# subdirectory of the build tree.  It generates a sed-script in the parent
1212# directory that is used to adjust includes for header files that reside in a
1213# subdirectory of /usr/include, etc.
1214PRG=""
1215while test \$# != 3
1216do
1217PRG="\$PRG \$1"; shift
1218done
1219DST=\$1
1220REF=\$2
1221SRC=\$3
1222TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
1223TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
1224echo installing \$SRC in \$DST
1225CF_EOF
1226if test $WITH_CURSES_H = yes; then
1227	cat >>headers.sh <<CF_EOF
1228case \$DST in
1229/*/include/*)
1230	END=\`basename \$DST\`
1231	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
1232	do
1233		NAME=\`basename \$i\`
1234		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
1235	done
1236	;;
1237*)
1238	echo "" >> \$TMPSED
1239	;;
1240esac
1241CF_EOF
1242else
1243	cat >>headers.sh <<CF_EOF
1244case \$DST in
1245/*/include/*)
1246	END=\`basename \$DST\`
1247	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
1248	do
1249		NAME=\`basename \$i\`
1250		if test "\$NAME" = "curses.h"
1251		then
1252			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
1253			NAME=ncurses.h
1254		fi
1255		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
1256	done
1257	;;
1258*)
1259	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
1260	;;
1261esac
1262CF_EOF
1263fi
1264cat >>headers.sh <<CF_EOF
1265rm -f \$TMPSRC
1266sed -f \$TMPSED \$SRC > \$TMPSRC
1267NAME=\`basename \$SRC\`
1268CF_EOF
1269if test $WITH_CURSES_H != yes; then
1270	cat >>headers.sh <<CF_EOF
1271test "\$NAME" = "curses.h" && NAME=ncurses.h
1272CF_EOF
1273fi
1274cat >>headers.sh <<CF_EOF
1275# Just in case someone gzip'd manpages, remove the conflicting copy.
1276test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
1277
1278eval \$PRG \$TMPSRC \$DST/\$NAME
1279rm -f \$TMPSRC \$TMPSED
1280CF_EOF
1281
1282chmod 0755 headers.sh
1283
1284for cf_dir in $SRC_SUBDIRS
1285do
1286	if test -f $srcdir/$cf_dir/headers; then
1287	cat >>$cf_dir/Makefile <<CF_EOF
1288\$(DESTDIR)\$(includedir) :
1289	sh \$(srcdir)/../mkinstalldirs \$@
1290
1291install \\
1292install.libs \\
1293install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
1294CF_EOF
1295		j=""
1296		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
1297		do
1298			test -n "$j" && echo "		$j \\" >>$cf_dir/Makefile
1299			j=$i
1300		done
1301		echo "		$j" >>$cf_dir/Makefile
1302		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
1303		do
1304			echo "	@ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
1305			test $i = curses.h && test $WITH_CURSES_H = yes && echo "	@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
1306		done
1307
1308	cat >>$cf_dir/Makefile <<CF_EOF
1309
1310uninstall \\
1311uninstall.libs \\
1312uninstall.includes ::
1313CF_EOF
1314		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
1315		do
1316			i=`basename $i`
1317			echo "	-@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
1318			test $i = curses.h && echo "	-@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
1319		done
1320	fi
1321
1322	if test -f $srcdir/$cf_dir/modules; then
1323		if test "$cf_dir" != "c++" ; then
1324			cat >>$cf_dir/Makefile <<"CF_EOF"
1325depend : $(AUTO_SRC)
1326	makedepend -- $(CPPFLAGS) -- $(C_SRC)
1327
1328# DO NOT DELETE THIS LINE -- make depend depends on it.
1329CF_EOF
1330		fi
1331	fi
1332done
1333
1334 ;;
1335  esac
1336done
1337
1338{ (exit 0); exit 0; }
1339