+### Enable compiling-in rcs id's
+echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
+echo "configure:3381: checking if RCS identifiers should be compiled-in" >&5
+
+# Check whether --with-rcs-ids or --without-rcs-ids was given.
+if test "${with_rcs_ids+set}" = set; then
+ withval="$with_rcs_ids"
+ with_rcs_ids=$withval
+else
+ with_rcs_ids=no
+fi
+
+echo "$ac_t""$with_rcs_ids" 1>&6
+test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF
+#define USE_RCS_IDS 1
+EOF
+
+
+###############################################################################
+
+
+ echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
+echo "configure:3401: checking format of man-pages" >&5
+
+
+# Check whether --with-manpage-format or --without-manpage-format was given.
+if test "${with_manpage_format+set}" = set; then
+ withval="$with_manpage_format"
+ cf_manpage_form=$withval
+else
+ cf_manpage_form=unknown
+fi
+
+
+case ".$cf_manpage_form" in
+.gzip|.compress|.BSDI|.normal|.formatted) # (vi
+ ;;
+.unknown|.) # (vi
+ if test -z "$MANPATH" ; then
+ MANPATH="/usr/man:/usr/share/man"
+ fi
+ # look for the 'date' man-page (it's most likely to be installed!)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ cf_manpage_form=unknown
+ for cf_dir in $MANPATH; do
+ test -z "$cf_dir" && cf_dir=/usr/man
+ for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
+ do
+ cf_test=`echo $cf_name | sed -e 's/*//'`
+ if test "x$cf_test" = "x$cf_name" ; then
+ case "$cf_name" in
+ *.gz) cf_manpage_form=gzip;;
+ *.Z) cf_manpage_form=compress;;
+ *.0) cf_manpage_form=BSDI,formatted;;
+ *) cf_manpage_form=normal;;
+ esac
+ break
+ fi
+ done
+ if test "$cf_manpage_form" != "unknown" ; then
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+.*) # (vi
+ echo "configure: warning: Unexpected manpage-format" 1>&2
+ ;;
+esac
+
+echo "$ac_t""$cf_manpage_form" 1>&6
+
+
+echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
+echo "configure:3453: checking for manpage renaming" >&5
+
+
+# Check whether --with-manpage-renames or --without-manpage-renames was given.
+if test "${with_manpage_renames+set}" = set; then
+ withval="$with_manpage_renames"
+ cf_manpage_renames=$withval
+else
+ cf_manpage_renames=yes
+fi
+
+
+case ".$cf_manpage_renames" in #(vi
+.no) #(vi
+ ;;
+.|.yes)
+ # Debian 'man' program?
+ if test -f /etc/debian_version ; then
+ cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames
+ else
+ cf_manpage_renames=no
+ fi
+ ;;
+esac
+
+if test "$cf_manpage_renames" != no ; then
+ if test ! -f $cf_manpage_renames ; then
+ { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; }
+ fi
+
+ test ! -d man && mkdir man
+
+ # Construct a sed-script to perform renaming within man-pages
+ if test -n "$cf_manpage_renames" ; then
+ test ! -d man && mkdir man
+ $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed
+ fi
+fi
+
+echo "$ac_t""$cf_manpage_renames" 1>&6
+
+
+echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
+echo "configure:3496: checking for manpage symlinks" >&5
+
+
+# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
+if test "${with_manpage_symlinks+set}" = set; then
+ withval="$with_manpage_symlinks"
+ cf_manpage_symlinks=$withval
+else
+ cf_manpage_symlinks=yes
+fi
+
+
+echo "$ac_t""$cf_manpage_symlinks" 1>&6
+
+
+echo $ac_n "checking for manpage tbl""... $ac_c" 1>&6
+echo "configure:3512: checking for manpage tbl" >&5
+
+
+# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
+if test "${with_manpage_tbl+set}" = set; then
+ withval="$with_manpage_tbl"
+ cf_manpage_tbl=$withval
+else
+ cf_manpage_tbl=no
+fi
+
+
+echo "$ac_t""$cf_manpage_tbl" 1>&6
+
+
+ if test "$prefix" = "NONE" ; then
+ cf_prefix="$ac_default_prefix"
+ else
+ cf_prefix="$prefix"
+ fi
+
+ case "$cf_manpage_form" in # (vi
+ *formatted*) # (vi
+ cf_subdir='$mandir/cat'
+ cf_format=yes
+ ;;
+ *)
+ cf_subdir='$mandir/man'
+ cf_format=no
+ ;;
+ esac
+
+test ! -d man && mkdir man
+cat >man/edit_man.sh <<CF_EOF
+#! /bin/sh
+# this script is generated by the configure-script
+prefix="$cf_prefix"
+datadir="$datadir"
+TERMINFO="$TERMINFO"
+MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
+INSTALL="$INSTALL"
+INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
+
+TMP=\${TMPDIR-/tmp}/man\$\$
+trap "rm -f \$TMP" 0 1 2 5 15
+
+verb=\$1
+shift
+
+mandir=\$1
+shift
+
+srcdir=\$1
+shift
+
+for i in \$* ; do
+case \$i in #(vi
+*.orig|*.rej) ;; #(vi
+*.[0-9]*)
+ section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
+ if test \$verb = installing ; then
+ if test ! -d $cf_subdir\${section} ; then
+ \$MKDIRS $cf_subdir\$section
+ fi
+ fi
+ aliases=
+ source=\`basename \$i\`
+ inalias=\$source
+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+ if test ! -f \$inalias ; then
+ echo .. skipped \$source
+ continue
+ fi
+CF_EOF
+if test "$cf_manpage_symlinks" = yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
+CF_EOF
+fi
+if test "$cf_manpage_renames" = no ; then
+cat >>man/edit_man.sh <<CF_EOF
+ # perform program transformations for section 1 man pages
+ if test \$section = 1 ; then
+ target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+ else
+ target=$cf_subdir\${section}/\$source
+ fi
+
+ # replace variables in man page
+CF_EOF
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+cat >>man/edit_man.sh <<CF_EOF
+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+ done
+
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "s,@DATADIR@,\$datadir," \\
+ -e "s,@TERMINFO@,\$TERMINFO," \\
+CF_EOF
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>man/edit_man.sh <<CF_EOF
+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+ done
+
+cat >>man/edit_man.sh <<CF_EOF
+ < \$i >\$TMP
+CF_EOF
+else
+cat >>man/edit_man.sh <<CF_EOF
+ target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="$cf_subdir\$section/\$target"
+ test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
+CF_EOF
+fi
+if test $cf_manpage_tbl = yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ tbl \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+if test $with_curses_h != yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+if test $cf_format = yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ nroff -man \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+case "$cf_manpage_form" in #(vi
+*compress*) #(vi
+cat >>man/edit_man.sh <<CF_EOF
+ if test \$verb = installing ; then
+ if ( compress -f \$TMP )
+ then
+ mv \$TMP.Z \$TMP
+ fi
+ fi
+ target="\$target.Z"
+CF_EOF
+ ;;
+*gzip*) #(vi
+cat >>man/edit_man.sh <<CF_EOF
+ if test \$verb = installing ; then
+ if ( gzip -f \$TMP )
+ then
+ mv \$TMP.gz \$TMP
+ fi
+ fi
+ target="\$target.gz"
+CF_EOF
+ ;;
+*BSDI*)
+cat >>man/edit_man.sh <<CF_EOF
+ # BSDI installs only .0 suffixes in the cat directories
+ target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
+CF_EOF
+ ;;
+esac
+cat >>man/edit_man.sh <<CF_EOF
+ suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
+ if test \$verb = installing ; then
+ echo \$verb \$target
+ \$INSTALL_DATA \$TMP \$target
+ test -n "\$aliases" && (
+ cd $cf_subdir\${section} && (
+ target=\`basename \$target\`
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ if test -f \$cf_alias\${suffix} ; then
+ if ( cmp -s \$target \$cf_alias\${suffix} )
+ then
+ :
+ else
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ fi
+ else
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ fi
+ done
+ )
+ )
+ elif test \$verb = removing ; then
+ echo \$verb \$target
+ rm -f \$target
+ test -n "\$aliases" && (
+ cd $cf_subdir\${section} && (
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ done
+ )
+ )
+ else
+# echo ".hy 0"
+ cat \$TMP
+ fi
+ ;;
+esac
+done
+exit 0
+CF_EOF
+chmod 755 man/edit_man.sh
+
+
+
+###############################################################################
+
+
+### Note that some functions (such as const) are normally disabled anyway.
+echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
+echo "configure:3751: checking if you want to build with function extensions" >&5
+
+# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
+if test "${enable_ext_funcs+set}" = set; then
+ enableval="$enable_ext_funcs"
+ with_ext_funcs=$enableval
+else
+ with_ext_funcs=yes
+fi
+
+echo "$ac_t""$with_ext_funcs" 1>&6
+if test "$with_ext_funcs" = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_CURSES_VERSION 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_HAS_KEY 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_RESIZETERM 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_USE_DEFAULT_COLORS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_WRESIZE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NCURSES_EXT_FUNCS 1
+EOF
+
+fi
+