diff options
Diffstat (limited to 'contrib/nvi/build')
-rw-r--r-- | contrib/nvi/build/ExtUtils/Embed.pm | 473 | ||||
-rw-r--r-- | contrib/nvi/build/Makefile.in | 630 | ||||
-rw-r--r-- | contrib/nvi/build/README | 369 | ||||
-rw-r--r-- | contrib/nvi/build/README.LynxOS | 320 | ||||
-rw-r--r-- | contrib/nvi/build/acconfig.h | 82 | ||||
-rw-r--r-- | contrib/nvi/build/aclocal.m4 | 17 | ||||
-rwxr-xr-x | contrib/nvi/build/config.guess | 571 | ||||
-rw-r--r-- | contrib/nvi/build/config.h.in | 179 | ||||
-rwxr-xr-x | contrib/nvi/build/config.sub | 872 | ||||
-rwxr-xr-x | contrib/nvi/build/configure | 4446 | ||||
-rw-r--r-- | contrib/nvi/build/configure.in | 725 | ||||
-rw-r--r-- | contrib/nvi/build/distrib | 84 | ||||
-rwxr-xr-x | contrib/nvi/build/install-sh | 238 | ||||
-rw-r--r-- | contrib/nvi/build/pathnames.h.in | 45 | ||||
-rw-r--r-- | contrib/nvi/build/port.h.in | 185 | ||||
-rw-r--r-- | contrib/nvi/build/recover.in | 49 | ||||
-rw-r--r-- | contrib/nvi/build/spell.ok | 58 |
17 files changed, 9343 insertions, 0 deletions
diff --git a/contrib/nvi/build/ExtUtils/Embed.pm b/contrib/nvi/build/ExtUtils/Embed.pm new file mode 100644 index 0000000..04525c1 --- /dev/null +++ b/contrib/nvi/build/ExtUtils/Embed.pm @@ -0,0 +1,473 @@ +# $Id: Embed.pm,v 1.17 1996/07/02 13:48:17 dougm Exp $ +require 5.002; + +package ExtUtils::Embed; +require Exporter; +require FileHandle; +use Config; +use Getopt::Std; + +#Only when we need them +#require ExtUtils::MakeMaker; +#require ExtUtils::Liblist; + +use vars qw(@ISA @EXPORT $VERSION + @Extensions $Verbose $lib_ext + $opt_o $opt_s + ); +use strict; + +$VERSION = sprintf("%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/); +#for the namespace change +$Devel::embed::VERSION = "99.99"; + +sub Version { $VERSION; } + +@ISA = qw(Exporter); +@EXPORT = qw(&xsinit &ldopts + &ccopts &ccflags &ccdlflags &perl_inc + &xsi_header &xsi_protos &xsi_body); + +#let's have Miniperl borrow from us instead +#require ExtUtils::Miniperl; +#*canon = \&ExtUtils::Miniperl::canon; + +$Verbose = 0; +$lib_ext = $Config{lib_ext} || '.a'; + +sub xsinit { + my($file, $std, $mods) = @_; + my($fh,@mods,%seen); + $file ||= "perlxsi.c"; + + if (@_) { + @mods = @$mods if $mods; + } + else { + getopts('o:s:'); + $file = $opt_o if defined $opt_o; + $std = $opt_s if defined $opt_s; + @mods = @ARGV; + } + $std = 1 unless scalar @mods; + + if ($file eq "STDOUT") { + $fh = \*STDOUT; + } + else { + $fh = new FileHandle "> $file"; + } + + push(@mods, static_ext()) if defined $std; + @mods = grep(!$seen{$_}++, @mods); + + print $fh &xsi_header(); + print $fh "EXTERN_C void xs_init _((void));\n\n"; + print $fh &xsi_protos(@mods); + + print $fh "\nEXTERN_C void\nxs_init()\n{\n"; + print $fh &xsi_body(@mods); + print $fh "}\n"; + +} + +sub xsi_header { + return <<EOF; +#ifdef __cplusplus +extern "C" { +#endif + +#include <EXTERN.h> +#include <perl.h> + +#ifdef __cplusplus +} +# ifndef EXTERN_C +# define EXTERN_C extern "C" +# endif +#else +# ifndef EXTERN_C +# define EXTERN_C extern +# endif +#endif + +EOF +} + +sub xsi_protos { + my(@exts) = @_; + my(@retval,%seen); + + foreach $_ (@exts){ + my($pname) = canon('/', $_); + my($mname, $cname); + ($mname = $pname) =~ s!/!::!g; + ($cname = $pname) =~ s!/!__!g; + my($ccode) = "EXTERN_C void boot_${cname} _((CV* cv));\n"; + next if $seen{$ccode}++; + push(@retval, $ccode); + } + return join '', @retval; +} + +sub xsi_body { + my(@exts) = @_; + my($pname,@retval,%seen); + my($dl) = canon('/','DynaLoader'); + push(@retval, "\tdXSUB_SYS;\n") if $] > 5.002; + push(@retval, "\tchar *file = __FILE__;\n\n"); + + foreach $_ (@exts){ + my($pname) = canon('/', $_); + my($mname, $cname, $ccode); + ($mname = $pname) =~ s!/!::!g; + ($cname = $pname) =~ s!/!__!g; + if ($pname eq $dl){ + # Must NOT install 'DynaLoader::boot_DynaLoader' as 'bootstrap'! + # boot_DynaLoader is called directly in DynaLoader.pm + $ccode = "\t/* DynaLoader is a special case */\n\tnewXS(\"${mname}::boot_${cname}\", boot_${cname}, file);\n"; + push(@retval, $ccode) unless $seen{$ccode}++; + } else { + $ccode = "\tnewXS(\"${mname}::bootstrap\", boot_${cname}, file);\n"; + push(@retval, $ccode) unless $seen{$ccode}++; + } + } + return join '', @retval; +} + +sub static_ext { + unless (scalar @Extensions) { + @Extensions = sort split /\s+/, $Config{static_ext}; + unshift @Extensions, qw(DynaLoader); + } + @Extensions; +} + +sub ldopts { + require ExtUtils::MakeMaker; + require ExtUtils::Liblist; + my($std,$mods,$link_args,$path) = @_; + my(@mods,@link_args,@argv); + my($dllib,$config_libs,@potential_libs,@path); + local($") = ' ' unless $" eq ' '; + my $MM = bless {} => 'MY'; + if (scalar @_) { + @link_args = @$link_args if $link_args; + @mods = @$mods if $mods; + } + else { + @argv = @ARGV; + #hmm + while($_ = shift @argv) { + /^-std$/ && do { $std = 1; next; }; + /^--$/ && do { @link_args = @argv; last; }; + /^-I(.*)/ && do { $path = $1 || shift @argv; next; }; + push(@mods, $_); + } + } + $std = 1 unless scalar @link_args; + @path = $path ? split(/:/, $path) : @INC; + + push(@potential_libs, @link_args) if scalar @link_args; + push(@potential_libs, $Config{libs}) if defined $std; + + push(@mods, static_ext()) if $std; + + my($mod,@ns,$root,$sub,$extra,$archive,@archives); + print STDERR "Searching (@path) for archives\n" if $Verbose; + foreach $mod (@mods) { + @ns = split('::', $mod); + $sub = $ns[-1]; + $root = $MM->catdir(@ns); + + print STDERR "searching for '$sub${lib_ext}'\n" if $Verbose; + foreach (@path) { + next unless -e ($archive = $MM->catdir($_,"auto",$root,"$sub$lib_ext")); + push @archives, $archive; + if(-e ($extra = $MM->catdir($_,"auto",$root,"extralibs.ld"))) { + local(*FH); + if(open(FH, $extra)) { + my($libs) = <FH>; chomp $libs; + push @potential_libs, split /\s+/, $libs; + } + else { + warn "Couldn't open '$extra'"; + } + } + last; + } + } + #print STDERR "\@potential_libs = @potential_libs\n"; + + my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) = + $MM->ext(join ' ', + $MM->catdir("-L$Config{archlib}", "CORE"), " -lperl", + @potential_libs); + + my $ld_or_bs = $bsloadlibs || $ldloadlibs; + print STDERR "bs: $bsloadlibs ** ld: $ldloadlibs" if $Verbose; + my $linkage = "$Config{ldflags} @archives $ld_or_bs"; + print STDERR "ldopts: '$linkage'\n" if $Verbose; + + return $linkage if scalar @_; + print "$linkage\n"; +} + +sub ccflags { + print " $Config{ccflags} "; +} + +sub ccdlflags { + print " $Config{ccdlflags} "; +} + +sub perl_inc { + print " -I$Config{archlib}/CORE "; +} + +sub ccopts { + ccflags; + ccdlflags; + perl_inc; +} + +sub canon { + my($as, @ext) = @_; + foreach(@ext) { + # might be X::Y or lib/auto/X/Y/Y.a + next if s!::!/!g; + s:^(lib|ext)/(auto/)?::; + s:/\w+\.\w+$::; + } + grep(s:/:$as:, @ext) if ($as ne '/'); + @ext; +} + +__END__ + +=head1 NAME + +ExtUtils::Embed - Utilities for embedding Perl in C/C++ applications + +=head1 SYNOPSIS + + + perl -MExtUtils::Embed -e xsinit + perl -MExtUtils::Embed -e ldopts + +=head1 DESCRIPTION + +ExtUtils::Embed provides utility functions for embedding a Perl interpreter +and extensions in your C/C++ applications. +Typically, an application B<Makefile> will invoke ExtUtils::Embed +functions while building your application. + +=head1 @EXPORT + +ExtUtils::Embed exports the following functions: + +L<xsinit()>, L<ldopts()>, L<ccopts()>, L<perl_inc()>, L<ccflags()>, +L<ccdlflags()>, L<xsi_header()>, L<xsi_protos()>, L<xsi_body()> + +=head1 FUNCTIONS + +=item xsinit() + +Generate C/C++ code for the XS intializer function. + +When invoked as C<`perl -MExtUtils::Embed -e xsinit --`> +the following options are recognized: + +B<-o> <output filename> (Defaults to B<perlxsi.c>) + +B<-o STDOUT> will print to STDOUT. + +B<-std> (Write code for extensions that are linked with the current Perl.) + +Any additional arguments are expected to be names of modules +to generate code for. + +When invoked with parameters the following are accepted and optional: + +C<xsinit($filename,$std,[@modules])> + +Where, + +B<$filename> is equivalent to the B<-o> option. + +B<$std> is boolean, equivalent to the B<-std> option. + +B<[@modules]> is an array ref, same as additional arguments mentioned above. + +=item Examples + + + perl -MExtUtils::Embed -e xsinit -- -o xsinit.c Socket + + +This will generate code with an B<xs_init> function that glues the perl B<Socket::bootstrap> function +to the C B<boot_Socket> function and writes it to a file named "xsinit.c". + +Note that B<DynaLoader> is a special case where it must call B<boot_DynaLoader> directly. + + perl -MExtUtils::Embed -e xsinit + + +This will generate code for linking with B<DynaLoader> and +each static extension found in B<$Config{static_ext}>. +The code is written to the default file name B<perlxsi.c>. + + + perl -MExtUtils::Embed -e xsinit -- -o xsinit.c -std DBI DBD::Oracle + + +Here, code is written for all the currently linked extensions along with code +for B<DBI> and B<DBD::Oracle>. + +If you have a working B<DynaLoader> then there is rarely any need to statically link in any +other extensions. + +=item ldopts() + +Output arguments for linking the Perl library and extensions to your +application. + +When invoked as C<`perl -MExtUtils::Embed -e ldopts --`> +the following options are recognized: + +B<-std> + +Output arguments for linking the Perl library and any extensions linked +with the current Perl. + +B<-I> <path1:path2> + +Search path for ModuleName.a archives. +Default path is B<@INC>. +Library archives are expected to be found as +B</some/path/auto/ModuleName/ModuleName.a> +For example, when looking for B<Socket.a> relative to a search path, +we should find B<auto/Socket/Socket.a> + +When looking for B<DBD::Oracle> relative to a search path, +we should find B<auto/DBD/Oracle/Oracle.a> + +Keep in mind, you can always supply B</my/own/path/ModuleName.a> +as an additional linker argument. + +B<--> <list of linker args> + +Additional linker arguments to be considered. + +Any additional arguments found before the B<--> token +are expected to be names of modules to generate code for. + +When invoked with parameters the following are accepted and optional: + +C<ldopts($std,[@modules],[@link_args],$path)> + +Where, + +B<$std> is boolean, equivalent to the B<-std> option. + +B<[@modules]> is equivalent to additional arguments found before the B<--> token. + +B<[@link_args]> is equivalent to arguments found after the B<--> token. + +B<$path> is equivalent to the B<-I> option. + +In addition, when ldopts is called with parameters, it will return the argument string +rather than print it to STDOUT. + +=item Examples + + + perl -MExtUtils::Embed -e ldopts + + +This will print arguments for linking with B<libperl.a>, B<DynaLoader> and +extensions found in B<$Config{static_ext}>. This includes libraries +found in B<$Config{libs}> and the first ModuleName.a library +for each extension that is found by searching B<@INC> or the path +specifed by the B<-I> option. +In addition, when ModuleName.a is found, additional linker arguments +are picked up from the B<extralibs.ld> file in the same directory. + + + perl -MExtUtils::Embed -e ldopts -- -std Socket + + +This will do the same as the above example, along with printing additional arguments for linking with the B<Socket> extension. + + + perl -MExtUtils::Embed -e ldopts -- DynaLoader + + +This will print arguments for linking with just the B<DynaLoader> extension +and B<libperl.a>. + + + perl -MExtUtils::Embed -e ldopts -- -std Msql -- -L/usr/msql/lib -lmsql + + +Any arguments after the second '--' token are additional linker +arguments that will be examined for potential conflict. If there is no +conflict, the additional arguments will be part of the output. + + +=item perl_inc() + +For including perl header files this function simply prints: + + -I $Config{archlib}/CORE + +So, rather than having to say: + + perl -MConfig -e 'print "-I $Config{archlib}/CORE"' + +Just say: + + perl -MExtUtils::Embed -e perl_inc + +=item ccflags(), ccdlflags() + +These functions simply print $Config{ccflags} and $Config{ccdlflags} + +=item ccopts() + +This function combines perl_inc(), ccflags() and ccdlflags() into one. + +=item xsi_header() + +This function simply returns a string defining the same B<EXTERN_C> macro as +B<perlmain.c> along with #including B<perl.h> and B<EXTERN.h>. + +=item xsi_protos(@modules) + +This function returns a string of B<boot_$ModuleName> prototypes for each @modules. + +=item xsi_body(@modules) + +This function returns a string of calls to B<newXS()> that glue the module B<bootstrap> +function to B<boot_ModuleName> for each @modules. + +B<xsinit()> uses the xsi_* functions to generate most of it's code. + +=head1 EXAMPLES + +For examples on how to use B<ExtUtils::Embed> for building C/C++ applications +with embedded perl, see the eg/ directory and the I<perlembed> man page. + +=head1 SEE ALSO + +the I<perlembed> man page + +=head1 AUTHOR + +Doug MacEachern <dougm@osf.org> + +Based on ideas from Tim Bunce <Tim.Bunce@ig.co.uk> and +B<minimod.pl> by Andreas Koenig <k@anna.in-berlin.de> and Tim Bunce. + +=cut + diff --git a/contrib/nvi/build/Makefile.in b/contrib/nvi/build/Makefile.in new file mode 100644 index 0000000..54025e7 --- /dev/null +++ b/contrib/nvi/build/Makefile.in @@ -0,0 +1,630 @@ +# @(#)Makefile.in 8.75 (Berkeley) 10/23/96 + +srcdir= @srcdir@/.. +CC= @CC@ +OPTFLAG=@OPTFLAG@ +CFLAGS= -c $(OPTFLAG) @CFLAGS@ -I. -I$(srcdir)/include @CPPFLAGS@ +LDFLAGS=@LDFLAGS@ +PERL= @vi_cv_path_perl@ +PERLLIB=@vi_cv_perllib@ +SHRPENV=@shrpenv@ + +# Objects +COBJS= addbytes.o addch.o box.o clear.o clrtobot.o clrtoeol.o \ + cr_put.o ctrace.o cur_hash.o curses.o delch.o deleteln.o delwin.o \ + erase.o fullname.o getch.o getstr.o id_subwins.o idlok.o initscr.o \ + insch.o insertln.o longname.o move.o mvwin.o newwin.o overlay.o \ + overwrite.o putchar.o refresh.o scroll.o setterm.o standout.o \ + toucholap.o touchwin.o tscroll.o tstp.o tty.o unctrl.o waddnstr.o +CLOBJS= cl_bsd.o cl_funcs.o cl_main.o cl_read.o cl_screen.o cl_term.o +DBOBJS= db.o mpool.o \ + bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \ + bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o \ + bt_split.o bt_utils.o \ + rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o \ + rec_search.o rec_seq.o rec_utils.o +REOBJS= regcomp.o regerror.o regexec.o regfree.o +TKOBJS= tk_funcs.o tk_main.o tk_read.o tk_screen.o tk_term.o tk_util.o +VIOBJS= cut.o delete.o ex.o ex_abbrev.o ex_append.o ex_args.o ex_argv.o \ + ex_at.o ex_bang.o ex_cd.o ex_cmd.o ex_cscope.o ex_delete.o \ + ex_display.o ex_edit.o ex_equal.o ex_file.o ex_filter.o \ + ex_global.o ex_init.o ex_join.o ex_map.o ex_mark.o ex_mkexrc.o \ + ex_move.o ex_open.o ex_perl.o ex_preserve.o ex_print.o ex_put.o \ + ex_quit.o ex_read.o ex_screen.o ex_script.o ex_set.o ex_shell.o \ + ex_shift.o ex_source.o ex_stop.o ex_subst.o ex_tag.o ex_tcl.o \ + ex_txt.o ex_undo.o ex_usage.o ex_util.o ex_version.o ex_visual.o \ + ex_write.o ex_yank.o ex_z.o exf.o getc.o key.o line.o log.o main.o \ + mark.o msg.o options.o options_f.o put.o recover.o screen.o \ + search.o seq.o util.o v_at.o v_ch.o v_cmd.o v_delete.o v_ex.o \ + v_increment.o v_init.o v_itxt.o v_left.o v_mark.o v_match.o \ + v_paragraph.o v_put.o v_redraw.o v_replace.o v_right.o v_screen.o \ + v_scroll.o v_search.o v_section.o v_sentence.o v_status.o v_txt.o \ + v_ulcase.o v_undo.o v_util.o v_word.o v_xchar.o v_yank.o v_z.o \ + v_zexit.o vi.o vs_line.o vs_msg.o vs_refresh.o vs_relative.o \ + vs_smap.o vs_split.o + +all: nvi @tknvi@ + +NVIALL= $(CLOBJS) $(VIOBJS) @cobjs@ @LIBOBJS@ +nvi nex: $(NVIALL) + $(SHRPENV) $(CC) $(LDFLAGS) -o $@ $(NVIALL) @LIBS@ + -rm -f nex + ln $@ nex + +TKALL= $(TKOBJS) $(VIOBJS) @LIBOBJS@ +tknvi: $(TKALL) + $(SHRPENV) $(CC) $(LDFLAGS) -o $@ $(TKALL) @TKLIBS@ + +chmod= @vi_cv_path_chmod@ +cp= @vi_cv_path_cp@ +ln= @vi_cv_path_ln@ +mkdir= @vi_cv_path_mkdir@ +rm= @vi_cv_path_rm@ +strip= @vi_cv_path_strip@ + +prefix= @prefix@ +bindir= @bindir@ +datadir=@datadir@ +mandir= @mandir@ +exec_prefix=@exec_prefix@ + +dmode= 755 +emode= 555 +fmode= 444 + +transform=@program_transform_name@ + +install: all install_common + @echo "Installing vi, ex, view: $(bindir) ..." + [ -d $(bindir) ] || \ + ($(mkdir) $(bindir) && $(chmod) $(dmode) $(bindir)) + cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'` + $(cp) nvi $(bindir)/`echo vi | sed '$(transform)'` + cd $(bindir) && [ -f $(strip) ] && \ + $(strip) `echo vi | sed '$(transform)'` + cd $(bindir) && $(chmod) $(emode) `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` + cd $(bindir) && $(ln) \ + `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'` + cd $(bindir) && $(ln) \ + `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'` + [ -d $(mandir) ] || \ + ($(mkdir) $(mandir) && $(chmod) $(dmode) $(mandir)) + [ -d $(mandir)/cat1 ] || \ + ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1) + @echo "Installing man pages: $(mandir) ..." + cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` + $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \ + $(mandir)/cat1/`echo vi.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(ln) \ + `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(ln) \ + `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'` + [ -d $(mandir)/man1 ] || \ + ($(mkdir) $(mandir)/man1 && $(chmod) $(dmode) $(mandir)/man1) + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` + $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.1 \ + $(mandir)/man1/`echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(ln) \ + `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(ln) \ + `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'` + +cat= dutch english french german ru_SU.KOI8-R spanish swedish +install_common: + [ -f $(chmod) ] + [ -f $(cp) ] + [ -f $(ln) ] + [ -f $(mkdir) ] + [ -f $(rm) ] + [ -d $(prefix) ] || \ + ($(mkdir) $(prefix) && $(chmod) $(dmode) $(prefix)) + [ -d $(exec_prefix) ] || \ + ($(mkdir) $(exec_prefix) && $(chmod) $(dmode) $(exec_prefix)) + [ -d $(datadir) ] || \ + ($(mkdir) $(datadir) && $(chmod) $(dmode) $(datadir)) + $(rm) -rf $(datadir)/vi + $(mkdir) $(datadir)/vi && $(chmod) $(dmode) $(datadir)/vi + @echo "Installing message catalogs: $(datadir)/vi/catalog ..." + $(mkdir) $(datadir)/vi/catalog && \ + $(chmod) $(dmode) $(datadir)/vi/catalog + (cd $(srcdir)/catalog && $(cp) $(cat) $(datadir)/vi/catalog && \ + cd $(datadir)/vi/catalog && $(chmod) $(fmode) *) + @echo "Installing Perl scripts: $(datadir)/vi/perl ..." + $(mkdir) $(datadir)/vi/perl && $(chmod) $(dmode) $(datadir)/vi/perl + [ -f VI.pm ] && $(cp) VI.pm $(datadir)/vi/perl && \ + cd $(datadir)/vi/perl && $(chmod) $(fmode) VI.pm) + (cd $(srcdir)/perl_scripts && $(cp) *.pl $(datadir)/vi/perl && \ + cd $(datadir)/vi/perl && $(chmod) $(fmode) *.pl) + @echo "Installing Tcl scripts: $(datadir)/vi/tcl ..." + $(mkdir) $(datadir)/vi/tcl && $(chmod) $(dmode) $(datadir)/vi/tcl + (cd $(srcdir)/tcl_scripts && $(cp) *.tcl $(datadir)/vi/tcl && \ + cd $(datadir)/vi/tcl && $(chmod) $(fmode) *.tcl) + @echo "Installing recover script: $(datadir)/vi/recover ..." + ($(cp) recover $(datadir)/vi/recover && \ + $(chmod) $(emode) $(datadir)/vi/recover) + +uninstall: + $(rm) -rf $(datadir)/vi + cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` + +docs: + cd $(srcdir)/docs/USD.doc/vi.ref && $(MAKE) + cd $(srcdir)/docs/USD.doc/vi.man && $(MAKE) + cd $(srcdir)/docs/USD.doc/edit && $(MAKE) + cd $(srcdir)/docs/USD.doc/exref && $(MAKE) + cd $(srcdir)/docs/USD.doc/vitut && $(MAKE) + +clean: + -rm -f *.core *.o memcpy.c perl.c + -rm -f nex nvi tknvi core + -rm -f $(COBJS) $(CLOBJS) $(DBOBJS) $(REOBJS) + -rm -f $(TKOBJS) $(VIOBJS) + +cleandocs: + cd $(srcdir)/docs/USD.doc/vi.ref && $(MAKE) clean + cd $(srcdir)/docs/USD.doc/vi.man && $(MAKE) clean + cd $(srcdir)/docs/USD.doc/edit && $(MAKE) clean + cd $(srcdir)/docs/USD.doc/exref && $(MAKE) clean + cd $(srcdir)/docs/USD.doc/vitut && $(MAKE) clean + +distclean maintainer-clean realclean: clean cleandocs + -rm -f Makefile config.cache config.h config.log config.status + -rm -f pathnames.h port.h + +# Vi curses sources. +cl_bsd.o: $(srcdir)/cl/cl_bsd.c + $(CC) $(CFLAGS) $? +cl_funcs.o: $(srcdir)/cl/cl_funcs.c + $(CC) $(CFLAGS) $? +cl_main.o: $(srcdir)/cl/cl_main.c + $(CC) $(CFLAGS) $? +cl_read.o: $(srcdir)/cl/cl_read.c + $(CC) $(CFLAGS) $? +cl_screen.o: $(srcdir)/cl/cl_screen.c + $(CC) $(CFLAGS) $? +cl_term.o: $(srcdir)/cl/cl_term.c + $(CC) $(CFLAGS) $? + +# Vi Tk sources. +tk_funcs.o: $(srcdir)/tk/tk_funcs.c + $(CC) $(CFLAGS) @XINCS@ $? +tk_main.o: $(srcdir)/tk/tk_main.c + $(CC) $(CFLAGS) @XINCS@ $? +tk_read.o: $(srcdir)/tk/tk_read.c + $(CC) $(CFLAGS) @XINCS@ $? +tk_screen.o: $(srcdir)/tk/tk_screen.c + $(CC) $(CFLAGS) @XINCS@ $? +tk_term.o: $(srcdir)/tk/tk_term.c + $(CC) $(CFLAGS) @XINCS@ $? +tk_util.o: $(srcdir)/tk/tk_util.c + $(CC) $(CFLAGS) @XINCS@ $? + +# Vi Tcl/Perl interpreter sources. +api.o: $(srcdir)/common/api.c + $(CC) $(CFLAGS) $? +perl.c: $(srcdir)/perl_api/perl.xs $(srcdir)/perl_api/typemap + echo "#define _PATH_PERLSCRIPTS \"$(datadir)/vi/perl\"" > $@ + $(PERL) $(PERLLIB)/ExtUtils/xsubpp -typemap \ + $(PERLLIB)/ExtUtils/typemap $(srcdir)/perl_api/perl.xs >> $@ + ($(PERL) -ne 'print "sub $$1 {\$$curscr->$$1(\@_)}\n" \ + if /newXS\("VI::([^":]*)"/;' $@ ; echo "1;") > VI.pm +perl.o: perl.c + $(CC) $(CFLAGS) $? +perlsfio.o: $(srcdir)/perl_api/perlsfio.c + $(CC) $(CFLAGS) $? +tcl.o: $(srcdir)/tcl_api/tcl.c + $(CC) $(CFLAGS) $? + +# Vi sources. +cut.o: $(srcdir)/common/cut.c + $(CC) $(CFLAGS) $? +delete.o: $(srcdir)/common/delete.c + $(CC) $(CFLAGS) $? +exf.o: $(srcdir)/common/exf.c + $(CC) $(CFLAGS) $? +key.o: $(srcdir)/common/key.c + $(CC) $(CFLAGS) $? +line.o: $(srcdir)/common/line.c + $(CC) $(CFLAGS) $? +log.o: $(srcdir)/common/log.c + $(CC) $(CFLAGS) $? +main.o: $(srcdir)/common/main.c + $(CC) $(CFLAGS) $? +mark.o: $(srcdir)/common/mark.c + $(CC) $(CFLAGS) $? +msg.o: $(srcdir)/common/msg.c + $(CC) $(CFLAGS) $? +options.o: $(srcdir)/common/options.c + $(CC) $(CFLAGS) $? +options_f.o: $(srcdir)/common/options_f.c + $(CC) $(CFLAGS) $? +put.o: $(srcdir)/common/put.c + $(CC) $(CFLAGS) $? +screen.o: $(srcdir)/common/screen.c + $(CC) $(CFLAGS) $? +search.o: $(srcdir)/common/search.c + $(CC) $(CFLAGS) $? +seq.o: $(srcdir)/common/seq.c + $(CC) $(CFLAGS) $? +recover.o: $(srcdir)/common/recover.c + $(CC) $(CFLAGS) $? +util.o: $(srcdir)/common/util.c + $(CC) $(CFLAGS) $? +ex.o: $(srcdir)/ex/ex.c + $(CC) $(CFLAGS) $? +ex_abbrev.o: $(srcdir)/ex/ex_abbrev.c + $(CC) $(CFLAGS) $? +ex_append.o: $(srcdir)/ex/ex_append.c + $(CC) $(CFLAGS) $? +ex_args.o: $(srcdir)/ex/ex_args.c + $(CC) $(CFLAGS) $? +ex_argv.o: $(srcdir)/ex/ex_argv.c + $(CC) $(CFLAGS) $? +ex_at.o: $(srcdir)/ex/ex_at.c + $(CC) $(CFLAGS) $? +ex_bang.o: $(srcdir)/ex/ex_bang.c + $(CC) $(CFLAGS) $? +ex_cd.o: $(srcdir)/ex/ex_cd.c + $(CC) $(CFLAGS) $? +ex_cmd.o: $(srcdir)/ex/ex_cmd.c + $(CC) $(CFLAGS) $? +ex_cscope.o: $(srcdir)/ex/ex_cscope.c + $(CC) $(CFLAGS) $? +ex_delete.o: $(srcdir)/ex/ex_delete.c + $(CC) $(CFLAGS) $? +ex_digraph.o: $(srcdir)/ex/ex_digraph.c + $(CC) $(CFLAGS) $? +ex_display.o: $(srcdir)/ex/ex_display.c + $(CC) $(CFLAGS) $? +ex_edit.o: $(srcdir)/ex/ex_edit.c + $(CC) $(CFLAGS) $? +ex_equal.o: $(srcdir)/ex/ex_equal.c + $(CC) $(CFLAGS) $? +ex_file.o: $(srcdir)/ex/ex_file.c + $(CC) $(CFLAGS) $? +ex_filter.o: $(srcdir)/ex/ex_filter.c + $(CC) $(CFLAGS) $? +ex_global.o: $(srcdir)/ex/ex_global.c + $(CC) $(CFLAGS) $? +ex_init.o: $(srcdir)/ex/ex_init.c + $(CC) $(CFLAGS) $? +ex_join.o: $(srcdir)/ex/ex_join.c + $(CC) $(CFLAGS) $? +ex_map.o: $(srcdir)/ex/ex_map.c + $(CC) $(CFLAGS) $? +ex_mark.o: $(srcdir)/ex/ex_mark.c + $(CC) $(CFLAGS) $? +ex_mkexrc.o: $(srcdir)/ex/ex_mkexrc.c + $(CC) $(CFLAGS) $? +ex_move.o: $(srcdir)/ex/ex_move.c + $(CC) $(CFLAGS) $? +ex_open.o: $(srcdir)/ex/ex_open.c + $(CC) $(CFLAGS) $? +ex_perl.o: $(srcdir)/ex/ex_perl.c + $(CC) $(CFLAGS) $? +ex_preserve.o: $(srcdir)/ex/ex_preserve.c + $(CC) $(CFLAGS) $? +ex_print.o: $(srcdir)/ex/ex_print.c + $(CC) $(CFLAGS) $? +ex_put.o: $(srcdir)/ex/ex_put.c + $(CC) $(CFLAGS) $? +ex_quit.o: $(srcdir)/ex/ex_quit.c + $(CC) $(CFLAGS) $? +ex_read.o: $(srcdir)/ex/ex_read.c + $(CC) $(CFLAGS) $? +ex_screen.o: $(srcdir)/ex/ex_screen.c + $(CC) $(CFLAGS) $? +ex_script.o: $(srcdir)/ex/ex_script.c + $(CC) $(CFLAGS) $? +ex_set.o: $(srcdir)/ex/ex_set.c + $(CC) $(CFLAGS) $? +ex_shell.o: $(srcdir)/ex/ex_shell.c + $(CC) $(CFLAGS) $? +ex_shift.o: $(srcdir)/ex/ex_shift.c + $(CC) $(CFLAGS) $? +ex_source.o: $(srcdir)/ex/ex_source.c + $(CC) $(CFLAGS) $? +ex_stop.o: $(srcdir)/ex/ex_stop.c + $(CC) $(CFLAGS) $? +ex_subst.o: $(srcdir)/ex/ex_subst.c + $(CC) $(CFLAGS) $? +ex_tag.o: $(srcdir)/ex/ex_tag.c + $(CC) $(CFLAGS) $? +ex_tcl.o: $(srcdir)/ex/ex_tcl.c + $(CC) $(CFLAGS) $? +ex_txt.o: $(srcdir)/ex/ex_txt.c + $(CC) $(CFLAGS) $? +ex_undo.o: $(srcdir)/ex/ex_undo.c + $(CC) $(CFLAGS) $? +ex_usage.o: $(srcdir)/ex/ex_usage.c + $(CC) $(CFLAGS) $? +ex_util.o: $(srcdir)/ex/ex_util.c + $(CC) $(CFLAGS) $? +ex_version.o: $(srcdir)/ex/ex_version.c + $(CC) $(CFLAGS) $? +ex_visual.o: $(srcdir)/ex/ex_visual.c + $(CC) $(CFLAGS) $? +ex_write.o: $(srcdir)/ex/ex_write.c + $(CC) $(CFLAGS) $? +ex_yank.o: $(srcdir)/ex/ex_yank.c + $(CC) $(CFLAGS) $? +ex_z.o: $(srcdir)/ex/ex_z.c + $(CC) $(CFLAGS) $? +getc.o: $(srcdir)/vi/getc.c + $(CC) $(CFLAGS) $? +v_at.o: $(srcdir)/vi/v_at.c + $(CC) $(CFLAGS) $? +v_ch.o: $(srcdir)/vi/v_ch.c + $(CC) $(CFLAGS) $? +v_cmd.o: $(srcdir)/vi/v_cmd.c + $(CC) $(CFLAGS) $? +v_delete.o: $(srcdir)/vi/v_delete.c + $(CC) $(CFLAGS) $? +v_ex.o: $(srcdir)/vi/v_ex.c + $(CC) $(CFLAGS) $? +v_increment.o: $(srcdir)/vi/v_increment.c + $(CC) $(CFLAGS) $? +v_init.o: $(srcdir)/vi/v_init.c + $(CC) $(CFLAGS) $? +v_itxt.o: $(srcdir)/vi/v_itxt.c + $(CC) $(CFLAGS) $? +v_left.o: $(srcdir)/vi/v_left.c + $(CC) $(CFLAGS) $? +v_mark.o: $(srcdir)/vi/v_mark.c + $(CC) $(CFLAGS) $? +v_match.o: $(srcdir)/vi/v_match.c + $(CC) $(CFLAGS) $? +v_paragraph.o: $(srcdir)/vi/v_paragraph.c + $(CC) $(CFLAGS) $? +v_put.o: $(srcdir)/vi/v_put.c + $(CC) $(CFLAGS) $? +v_redraw.o: $(srcdir)/vi/v_redraw.c + $(CC) $(CFLAGS) $? +v_replace.o: $(srcdir)/vi/v_replace.c + $(CC) $(CFLAGS) $? +v_right.o: $(srcdir)/vi/v_right.c + $(CC) $(CFLAGS) $? +v_screen.o: $(srcdir)/vi/v_screen.c + $(CC) $(CFLAGS) $? +v_scroll.o: $(srcdir)/vi/v_scroll.c + $(CC) $(CFLAGS) $? +v_search.o: $(srcdir)/vi/v_search.c + $(CC) $(CFLAGS) $? +v_section.o: $(srcdir)/vi/v_section.c + $(CC) $(CFLAGS) $? +v_sentence.o: $(srcdir)/vi/v_sentence.c + $(CC) $(CFLAGS) $? +v_status.o: $(srcdir)/vi/v_status.c + $(CC) $(CFLAGS) $? +v_txt.o: $(srcdir)/vi/v_txt.c + $(CC) -c @no_op_OPTFLAG@ @CFLAGS@ -I. -I$(srcdir)/include @CPPFLAGS@ $? +v_ulcase.o: $(srcdir)/vi/v_ulcase.c + $(CC) $(CFLAGS) $? +v_undo.o: $(srcdir)/vi/v_undo.c + $(CC) $(CFLAGS) $? +v_util.o: $(srcdir)/vi/v_util.c + $(CC) $(CFLAGS) $? +v_word.o: $(srcdir)/vi/v_word.c + $(CC) $(CFLAGS) $? +v_xchar.o: $(srcdir)/vi/v_xchar.c + $(CC) $(CFLAGS) $? +v_yank.o: $(srcdir)/vi/v_yank.c + $(CC) $(CFLAGS) $? +v_z.o: $(srcdir)/vi/v_z.c + $(CC) $(CFLAGS) $? +v_zexit.o: $(srcdir)/vi/v_zexit.c + $(CC) $(CFLAGS) $? +vi.o: $(srcdir)/vi/vi.c + $(CC) $(CFLAGS) $? +vs_line.o: $(srcdir)/vi/vs_line.c + $(CC) $(CFLAGS) $? +vs_msg.o: $(srcdir)/vi/vs_msg.c + $(CC) $(CFLAGS) $? +vs_refresh.o: $(srcdir)/vi/vs_refresh.c + $(CC) $(CFLAGS) $? +vs_relative.o: $(srcdir)/vi/vs_relative.c + $(CC) $(CFLAGS) $? +vs_smap.o: $(srcdir)/vi/vs_smap.c + $(CC) $(CFLAGS) $? +vs_split.o: $(srcdir)/vi/vs_split.c + $(CC) $(CFLAGS) $? + +addbytes.o: $(srcdir)/curses/addbytes.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +addch.o: $(srcdir)/curses/addch.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +box.o: $(srcdir)/curses/box.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +clear.o: $(srcdir)/curses/clear.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +clrtobot.o: $(srcdir)/curses/clrtobot.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +clrtoeol.o: $(srcdir)/curses/clrtoeol.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +cr_put.o: $(srcdir)/curses/cr_put.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +ctrace.o: $(srcdir)/curses/ctrace.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +cur_hash.o: $(srcdir)/curses/cur_hash.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +curses.o: $(srcdir)/curses/curses.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +delch.o: $(srcdir)/curses/delch.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +deleteln.o: $(srcdir)/curses/deleteln.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +delwin.o: $(srcdir)/curses/delwin.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +erase.o: $(srcdir)/curses/erase.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +fullname.o: $(srcdir)/curses/fullname.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +getch.o: $(srcdir)/curses/getch.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +getstr.o: $(srcdir)/curses/getstr.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +id_subwins.o: $(srcdir)/curses/id_subwins.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +idlok.o: $(srcdir)/curses/idlok.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +initscr.o: $(srcdir)/curses/initscr.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +insch.o: $(srcdir)/curses/insch.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +insertln.o: $(srcdir)/curses/insertln.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +longname.o: $(srcdir)/curses/longname.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +move.o: $(srcdir)/curses/move.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +mvwin.o: $(srcdir)/curses/mvwin.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +newwin.o: $(srcdir)/curses/newwin.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +overlay.o: $(srcdir)/curses/overlay.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +overwrite.o: $(srcdir)/curses/overwrite.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +putchar.o: $(srcdir)/curses/putchar.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +refresh.o: $(srcdir)/curses/refresh.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +scroll.o: $(srcdir)/curses/scroll.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +setterm.o: $(srcdir)/curses/setterm.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +standout.o: $(srcdir)/curses/standout.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +toucholap.o: $(srcdir)/curses/toucholap.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +touchwin.o: $(srcdir)/curses/touchwin.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +tscroll.o: $(srcdir)/curses/tscroll.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +tstp.o: $(srcdir)/curses/tstp.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +tty.o: $(srcdir)/curses/tty.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +unctrl.o: $(srcdir)/curses/unctrl.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? +waddnstr.o: $(srcdir)/curses/waddnstr.c + $(CC) -D_CURSES_PRIVATE $(CFLAGS) $? + +# DB sources. +db.o: $(srcdir)/db/db/db.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) $? +mpool.o: $(srcdir)/db/mpool/mpool.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/mpool $? +bt_close.o: $(srcdir)/db/btree/bt_close.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_conv.o: $(srcdir)/db/btree/bt_conv.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_debug.o: $(srcdir)/db/btree/bt_debug.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_delete.o: $(srcdir)/db/btree/bt_delete.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_get.o: $(srcdir)/db/btree/bt_get.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_open.o: $(srcdir)/db/btree/bt_open.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_overflow.o: $(srcdir)/db/btree/bt_overflow.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_page.o: $(srcdir)/db/btree/bt_page.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_put.o: $(srcdir)/db/btree/bt_put.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_search.o: $(srcdir)/db/btree/bt_search.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_seq.o: $(srcdir)/db/btree/bt_seq.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_split.o: $(srcdir)/db/btree/bt_split.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +bt_utils.o: $(srcdir)/db/btree/bt_utils.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/btree $? +rec_close.o: $(srcdir)/db/recno/rec_close.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_delete.o: $(srcdir)/db/recno/rec_delete.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_get.o: $(srcdir)/db/recno/rec_get.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_open.o: $(srcdir)/db/recno/rec_open.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_put.o: $(srcdir)/db/recno/rec_put.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_search.o: $(srcdir)/db/recno/rec_search.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_seq.o: $(srcdir)/db/recno/rec_seq.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? +rec_utils.o: $(srcdir)/db/recno/rec_utils.c + $(CC) -D__DBINTERFACE_PRIVATE $(CFLAGS) -I$(srcdir)/db/recno $? + +# Regular Expressions sources. +regcomp.o: $(srcdir)/regex/regcomp.c + $(CC) -D__REGEX_PRIVATE $(CFLAGS) $? +regerror.o: $(srcdir)/regex/regerror.c + $(CC) -D__REGEX_PRIVATE $(CFLAGS) $? +regexec.o: $(srcdir)/regex/regexec.c + $(CC) -D__REGEX_PRIVATE $(CFLAGS) $? +regfree.o: $(srcdir)/regex/regfree.c + $(CC) -D__REGEX_PRIVATE $(CFLAGS) $? + +# Random replacement and workaround sources. +addnstr.o: $(srcdir)/clib/addnstr.c + $(CC) $(CFLAGS) $? +bsearch.o: $(srcdir)/clib/bsearch.c + $(CC) $(CFLAGS) $? +env.o: $(srcdir)/clib/env.c + $(CC) $(CFLAGS) $? +fchmod.o: $(srcdir)/clib/fchmod.c + $(CC) $(CFLAGS) $(INC) $? +gethostname.o: $(srcdir)/clib/gethostname.c + $(CC) $(CFLAGS) $(INC) $? +getopt.o: $(srcdir)/clib/getopt.c + $(CC) $(CFLAGS) $(INC) $? +memchr.o: $(srcdir)/clib/memchr.c + $(CC) $(CFLAGS) $? +memcpy.o: $(srcdir)/clib/memmove.c + $(cp) $? memcpy.c + $(CC) $(CFLAGS) -DMEMCOPY memcpy.c +memmove.o: $(srcdir)/clib/memmove.c + $(CC) $(CFLAGS) -DMEMMOVE $? +memset.o: $(srcdir)/clib/memset.c + $(CC) $(CFLAGS) $? +mkstemp.o: $(srcdir)/clib/mkstemp.c + $(CC) $(CFLAGS) $? +mmap.o: $(srcdir)/clib/mmap.c + $(CC) $(CFLAGS) $? +realloc.o: $(srcdir)/clib/realloc.c + $(CC) $(CFLAGS) $? +snprintf.o: $(srcdir)/clib/snprintf.c + $(CC) $(CFLAGS) $? +strdup.o: $(srcdir)/clib/strdup.c + $(CC) $(CFLAGS) $? +strerror.o: $(srcdir)/clib/strerror.c + $(CC) $(CFLAGS) $? +strpbrk.o: $(srcdir)/clib/strpbrk.c + $(CC) $(CFLAGS) $? +strsep.o: $(srcdir)/clib/strsep.c + $(CC) $(CFLAGS) $? +strtol.o: $(srcdir)/clib/strtol.c + $(CC) $(CFLAGS) $? +strtoul.o: $(srcdir)/clib/strtoul.c + $(CC) $(CFLAGS) $? +vsnprintf.o: $(srcdir)/clib/vsnprintf.c + $(CC) $(CFLAGS) $? diff --git a/contrib/nvi/build/README b/contrib/nvi/build/README new file mode 100644 index 0000000..efbce2b --- /dev/null +++ b/contrib/nvi/build/README @@ -0,0 +1,369 @@ +# @(#)README 8.26 (Berkeley) 10/19/96 + +Nvi uses the GNU autoconf program for configuration and compilation. You +should enter: + + configure + make + +and nvi will configure the system and build one or two binaries: nvi and +tknvi. You can use any path to the configure script, e.g., to build for +an x86 architecture, I suggest that you do: + + mkdir build.x86 + cd build.x86 + ../build/configure + make + +There are options that you can specify to the configure command. See +the next section for a description of these options. + +If you want to rebuild or reconfigure nvi, for example, because you change +your mind as to the curses library that you want to use, create a new +directory and reconfigure it using "configure" and whatever options you +choose, don't try to selectively edit the files. + +By default, nvi is installed as "vi", with hard links to "ex" and "view". +To install them using different names, use the configure program options. +For example, to install them as "nvi", "nex" and "nview", use: + + configure --program-prefix=n + +See the section below on installation for details. + +Note, if you're building nvi on a LynxOS system, you should read the +README.LynxOS file in this directory for additional build instructions +that are specific to that operating system. + +If you have trouble with this procedure, send email to the addresses +listed in ../README. In that email, please provide a complete script +of the output for all of the above commands that you entered. + +=-=-=-=-=-=-= +NVI'S OPTIONS TO THE CONFIGURE PROGRAM +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +There are many options that you can enter to the configuration program. +To see a complete list of the options, enter "configure --help". Only +a few of them are nvi specific. These options are as follows: + + --disable-curses DON'T use the nvi-provided curses routines. + --disable-db DON'T use the nvi-provided DB routines. + --disable-re DON'T use the nvi-provided RE routines. + --enable-debug Build a debugging version. + --enable-perlinterp Include a Perl interpreter in vi. + --enable-tclinterp Include a Tk/Tcl interpreter in vi. + --enable-tknvi Build a Tk/Tcl front-end for vi. + +disable-curses: + By default, nvi loads its own implementation of the curses + routines (which are a stripped-down version of the 4.4BSD curses + library). If you have your own curses library implementation and + you want to use it instead, enter: + + --disable-curses + + as an argument to configure, and the curses routines will be taken + from whatever libraries you load. Note: System V based curses + implementations are usually broken. See the last section of this + README for further information about nvi and the curses library. + +disable-db: + By default, nvi loads its own versions of the Berkeley DB routines + (which are a stripped-down version of DB 1.85). If you have your + own version of the Berkeley DB routines and you want to use them + instead, enter: + + --disable-db + + as an argument to configure, and the DB routines will be taken + from whatever libraries you load. Make sure that the DB routines + you use are at least version 1.85 or later. + +disable-re: + By default, nvi loads its own versions of the POSIX 1003.2 Regular + Expression routines (which are Henry Spencer's implementation). + If your C library contains an implementation of the POSIX 1003.2 + RE routines (note, this is NOT the same as the historic UNIX RE + routines), and you want to use them instead, enter: + + --disable-re + + as an argument to configure, and the RE routines will be taken + from whatever libraries you load. Please ensure that your RE + routines implement Henry Spencer's extensions for doing vi-style + "word" searches. + +enable-debug: + If you want to build nvi with no optimization (i.e. without -O + as a compiler flag), with -g as a compiler flag, and with DEBUG + defined during compilation, enter: + + --enable-debug + + as an argument to configure. + +enable-perlinterp: + If you have the Perl 5 libraries and you want to compile in the + Perl interpreter, enter: + + --enable-perlinterp + + as an argument to configure. (Note: this is NOT possible with + Perl 4, or even with Perl 5 versions earlier than 5.002.) + +enable-tclinterp: + If you have the Tk/Tcl libraries and you want to compile in the + Tcl/Tk interpreter, enter: + + --enable-tclinterp + + as an argument to configure. If your Tk/Tcl include files and + libraries aren't in the standard library and include locations, + see the next section of this README file for more information. + +enable-tknvi: + If you have the Tk/Tcl libraries and you want to build the Tcl/Tk + nvi front-end, enter: + + --enable-tknvi + + as an argument to configure. If your Tk/Tcl include files and + libraries aren't in the standard library and include locations, + see the next section of this README file for more information. + +=-=-=-=-=-=-= +ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +If you want to use a specific compiler, specify the CC environment +variable before running configure. For example: + + env CC=gcc configure + +Using anything other than the native compiler will almost certainly +mean that you'll want to check the compile and load line flags, too. + +If you want to specify additional load line flags, specify the ADDLDFLAGS +environment variable before running configure. For example: + + env ADDLDFLAGS="-Q" configure + +would specify the -Q flag in the load line when the nvi programs are +loaded. + +If you don't want configure to use the default load line flags for the +system, specify the LDFLAGS environment variable before running configure. +For example: + + env LDFLAGS="-32" configure + +will cause configure to set the load line flags to "-32", and not set +them based on the current system. + +If you want to specify additional compile line flags, specify the +ADDCPPFLAGS environment variable before running configure. For example: + + env ADDCPPFLAGS="-I../foo" configure + +would cause the compiler to be passed the -I../foo flag when compiling +test programs during configuration as well as when building nvi object +files. + +If you don't want configure to use the default compile line flags for the +system, specify the CPPFLAGS environment variable before running configure. +For example: + + env CPPFLAGS="-I.." configure + +will cause configure to use "-I.." as the compile line flags instead of +the default values. + +=-=-=-=-=-=-= +ADDING LIBRARIES AND INCLUDE FILES +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +If the Tk/Tcl or any other include files or libraries are in non-standard +places on your system, you will need to specify the directory path where +they can be found. + +If you want to specify additional library paths, set the ADDLIBS environment +variable before running configure. For example: + + env ADDLIBS="-L/a/b -L/e/f -ldb" configure + +would specify two additional directories to search for libraries, /a/b +and /e/f, and one additional library to load, "db". + +If you want to specify additional include paths, specify the ADDCPPFLAGS +environment variable before running configure. For example: + + env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure + +would search /usr/local/include for include files, as well as load the db +library as described above. + +As a final example, let's say that you've downloaded ncurses from the net +and you've built it in a directory named ncurses which is at the same +level in the filesystem hierarchy as nvi. You would enter something like: + + env ADDCPPFLAGS="-I../../ncurses/include" \ + ADDLIBS="-L../../ncurses/libraries" configure + +to cause nvi to look for the curses include files and the curses library +in the ncurses environment. + +Notes: + Make sure that you prepend -L to any library directory names, and + that you prepend -I to any include file directory names! Also, + make sure that you quote the paths as shown above, i.e. with + single or double quotes around the values you're specifying for + ADDCPPFLAGS and ADDLIBS. + + =-=-=-=-=-= + You should NOT need to add any libraries or include files to load + the Perl5 interpreter. The configure script will obtain that + information directly from the Perl5 program. This means that the + configure script must be able to find perl in its path. It looks + for "perl5" first, and then "perl". If you're building a Perl + interpreter and neither is found, it's a fatal error. + + =-=-=-=-=-= + You do not need to specify additional libraries to load Tk/Tcl, + Perl or curses, as the nvi configuration script adds the + appropriate libraries to the load line whenever you specify + --enable-tknvi or other Perl or Tk/Tcl related option, or build + the Tk/Tcl or curses version of nvi. The library names that are + automatically loaded are as follows: + + for Perl: -lperl + for Tk/Tcl: -ltk -ltcl -lm + for curses: -lcurses + + In addition, the configure script loads: + + ... the X libraries when loading the Tk/Tcl libraries, + if they exist. + + ... the -ltermcap or -ltermlib libraries when loading + any curses library, if they exist. + + =-=-=-=-=-= + The env command is available on most systems, and simply sets one + or more environment variables before running a command. If the + env command is not available to you, you can set the environment + variables in your shell before running configure. For example, + in sh or ksh, you could do: + + ADDLIBS="-L/a/b -L/e/f -ldb" configure + + and in csh or tcsh, you could do: + + setenv ADDLIBS "-L/a/b -L/e/f -ldb" + configure + + See your shell manual page for further information. + +=-=-=-=-=-=-= +INSTALLING NVI +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +Nvi installs the following files into the following locations, with +the following default values: + +Variables: Default value: +prefix /usr/local +exec_prefix $(prefix) +bindir $(prefix)/bin +datadir $(prefix)/share +mandir $(prefix)/man + +File(s): Default location +---------------------------------------- +vi $(bindir)/vi +vi.1 $(mandir)/man1/vi.1 +vi.0 $(mandir)/cat1/vi.0 +Perl scripts $(datadir)/vi/perl/ +Tcl scripts $(datadir)/vi/tcl/ +Message Catalogs $(datadir)/vi/catalog/ + +Notes: + There are two hard links to the vi program, named ex and view. + Similarly, there are two hard links to the unformatted vi manual + page, named ex.1 and view.1, and two hard links to the formatted + manual page, named ex.0 and view.0. These links are created when + the program and man pages are installed. + + If you want to install vi, ex, view and the man pages as nvi, nex, + nview, use the configure option --program-prefix=n. Other, more + complex transformations are possible -- use configure --help to + see more options. + + To move the entire installation tree somewhere besides /usr/local, + change the value of both "exec_prefix" and "prefix". To move the + binaries to a different place, change the value of "bindir". + Similarly, to put the datafiles (the message catalogs, Perl and + Tcl scripts) or the man pages in a different place, change the + value of "datadir" or "mandir". These values can be changed as + part of configuration: + + configure --exec_prefix=/usr/contrib --prefix=/usr/share + + or when doing the install itself: + + make exec_prefix=/usr/contrib prefix=/usr/contrib install + + The datafile directory (e.g., /usr/local/share/vi by default) is + completely removed and then recreated as part of the installation + process. + +=-=-=-=-=-=-= +NVI AND THE CURSES LIBRARY +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +The major portability problem for nvi is selecting a curses library. +Unfortunately, it is common to find broken versions of curses -- the +original System V curses was broken, resulting in all vendors whose +implementations are derived from System V having broken implementations +in turn. + +For this reason, BY DEFAULT, nvi uses the stripped-down curses library +that's included in its distribution. Of course, it would be preferable +to use the vendor's curses library, or one of the newer implementations +of curses, e.g., ncurses. + +To use the vendor's curses library, specify the: + + --disable-curses + +argument to the configure command. If you use the vendor's or other +curses library, and you see any of the following symptoms: + + + Core dumps in curses routines. + + Missing routines when compiling. + + Repainting the wrong characters on the screen. + + Displaying inverse video in the wrong places. + + Failure to reset your terminal to the correct modes on exit. + +you have a broken curses implementation, and you should reconfigure nvi +to use another curses library or the curses library provided with nvi. + +There are two alternative sources for curses libraries: + +#1: Compile the 4BSD curses library from any of the recent BSD + releases: FreeBSD, NetBSD or 4.4BSD-Lite release 2. These + libraries should be able to support nvi. + +#2: Retrieve and build the ncurses library. This library is not + recommended unreservedly, at least for now, for two reasons. + First, it can't be built on any system where the compiler + doesn't support function prototypes. Second, it currently has + a few bugs in its support for nvi. It mostly works, but it's + still not quite right. + +One final note. If you see the following symptoms: + + + Line-by-line screen repainting instead of scrolling. + +it usually means that your termcap or terminfo information is insufficient +for the terminal. diff --git a/contrib/nvi/build/README.LynxOS b/contrib/nvi/build/README.LynxOS new file mode 100644 index 0000000..2cc68da --- /dev/null +++ b/contrib/nvi/build/README.LynxOS @@ -0,0 +1,320 @@ +README.LynxOS +============= + +Written by Ronald F. Guilmette <rfg@monkeys.com> + +Last modified Wed Aug 14 23:10:07 PDT 1996 +------------------------------------------ + +0. Introduction +--------------- + +This file describes how to build and install the Berkeley nvi editor for +the LynxOS 2.4.0 operating system. + +LynxOS 2.4.0 is available for a variety of different hardware platforms, in +particular, x86, m680x0, Sparc, and PowerPC. I have successfully built nvi +on all four of these flavors of LynxOS by following the procedures given in +this file. + +Note that these procedures may not work on versions of LynxOS prior to 2.4.0. +(As I understand it, a good deal of work went into making the 2.4.0 release +more POSIX-compliant, and I have no idea what build glitches, if any, you +might encounter if you try to build nvi on a pre-2.4.0 version of LynxOS.) + +There are basically four steps to configuring, building, and installing nvi +on LynxOS, namely: + + 1. Get setup to use the proper C compiler. + 2. Replace your installed `tr' program. + 3. Fix your system include files. + 4. Do a normal configure, build, and install of nvi. + +These steps are described in separate sections below. + +1. Get Setup to Use the Proper C Compiler +------------------------------------------ + +The first step when building nvi on LynxOS is to set your $PATH environment +variable properly so that the gcc 2.x compiler appears first on your path, +prior to the older (and less robust) gcc 1.xx compiler (typically installed +as /bin/gcc) and/or the old Lynx proprietary C compiler (typically installed +as /bin/cc), both of which may also be present on your system. + +Note that for most operating systems, the configure script for nvi tries +to use whatever compiler you have installed (and in your $PATH) as "cc", +however in the special case of LynxOS, the configure script will auto- +matically try to find a "gcc" program on your $PATH in preference to a +compiler called "cc". If the nvi configure script only find a compiler +called "cc", that's OK. It will still try to see if that is really just +the GNU C compiler installed under the name "cc". + +Regardless of the name however (be it "gcc" or "cc") the first C compiler +in your $PATH should be some _recent_ (i.e. 2.0 or later) version of the +GNU C compiler... and the nvi configure script now checks that this is the +case, and fails if it isn't. + +Oddly enough, LynxOS 2.4.0 (and some prior versions) shipped with as many +as three different C compilers installed, so it is important to set your +$PATH environment variable carfully in order to get the proper C compiler +to appear first in your $PATH. You want to avoid having either the /bin/gcc +compiler or the /bin/cc compiler be the first C compiler in your $PATH. + +To make sure that the GNU C version 2.x compiler which was shipped with your +LynxOS system appears first on your path, you will need to either set your +$PATH variable (for sh/bash/ksh users) or your $path variable (for csh/tcsh +users). You can, of course, just do this at the shell command prompt, but +it is probably better to actually edit this change into your .profile file +(for sh/bash/ksh users) or into your .cshrc file (for csh/tcsh users). + +The pathname of the directory that contains the GNU C version 2.x compiler +is (unfortunately) dependent upon the exact type of LynxOS system you have. + +For LynxOS 2.4.0 on x86 systems, gcc 2.x is located in: + + /cygnus/94q4-lynxos-x86/bin + +For LynxOS 2.4.0 on m680x0 systems, gcc 2.x is located in: + + /cygnus/94q4-lynxos-68k/bin + +For LynxOS 2.4.0 on Sparc systems, gcc 2.x is located in: + + /cygnus/94q4-lynxos-usparc/bin + +For LynxOS 2.4.0 on PowerPC systems, gcc 2.x is located in: + + /cygnus/95q2-lynxos-ppc/bin + +(Note also that these locations may change in LynxOS 2.5.x and beyond.) + +Anyway, it is imperative that you setup your $PATH environment variable +(*before* you do the configure step for nvi) so that the GNU C version 2.x +compiler appears in your $PATH before either the /bin/cc or /bin/gcc +compilers (if present). If you fail to do this, the configure step for +nvi will fail, because the compiler script actually checks (now) that the +compiler you are using (if your are on a LynxOS system) is gcc 2.0 or +later. + +To make absolutely sure that you will be configuring and building nvi with +the proper C compiler (i.e. the GNU C version 2.x compiler on your system) +you should add the directory name listed above for your specific system type +to your $PATH setting in your $HOME/.profile file. (For csh/tcsh users, you +will instead want to add the relevant directory name to the setting of your +$path variable in your ~/.cshrc file.) Once you have added the proper direc- +tory name (from the list given above) to your $HOME/.profile file (or to your +~/.cshrc file, if you are using csh or tcsh) you should log out completely +and then log back into the system just to make sure your new $PATH/$path +setting takes effect properly. + +When you finish making this adjustment to your $PATH (or $path), the most +up-to-date version of gcc on your system should be available to you as the +first `gcc' program on your $PATH. You should verify that this is indeed the +case simply by typing `gcc -v' and then checking the version number reported +by the compiler. It should say either "2.6-94q4" or (on PowerPC systems) it +should say "2.6-95q2". If you don't get these results, try again to set your +$PATH (or $path) until you do. You won't be able to build nvi until you are +properly setup to use gcc version 2.0 or later. + +Performing the steps shown above will insure that your subsequent configura- +tion and build steps for nvi will make use of the most up-to-date version of +gcc that was shipped with your Lynx operating system. (Note that the versions +of gcc which are currently shipping with LynxOS 2.4.0 are also somewhat out- +of-date themselves, but they are still quite a bit newer and more bug-free +and ANSI conformant that those other two C compilers, /bin/cc and /bin/gcc, +which also ship with LynxOS 2.4.0.) + +(Note: At present, LynxOS version 2.4.0 is the latest officially released +version of LynxOS, and all of the above information is accurate and correct +for LynxOS 2.4.0 as of the time of this writing. However it is rumored that +future releases of LynxOS may provide a still newer version of gcc, and that +it may be located in the /usr/bin directory. Thus, if you are building nvi +for some LynxOS version later than 2.4.0, you may wish to check and see if +your system has a program called /usr/bin/gcc, and use that version of gcc, +if available, rather than the one suggested above.) + +2. Replace Your Installed `tr' Program +--------------------------------------- + +The `tr' program which comes bundled with LynxOS 2.4.0 (as /bin/tr) has a +somewhat obscure bug which just happens to be tickled by almost all GNU +`autoconf' generated `configure' scripts (including the one that nowadays +comes bundled with nvi). Using the stock /bin/tr program on LynxOS when +executing such `configure' scripts _will_ cause these scripts to malfunction +in various ways. It is therefore imperative that you replace your LynxOS +/bin/tr program with a properly working version of the `tr' command _before_ +you even try to configure nvi. (You can tell if your `tr' program has the +bug by executng the command "echo ab- | tr ab- ABC". If this yields the +string "Ab-" then you have the bug. If it yields "ABC" then you don't.) + +You can obtain sources for a working version of the `tr' command as part of +the GNU `textutils' package (the latest version of which, at the time of this +writing, is 1.19). The GNU textutils package is available for downloading +from prep.ai.mit.edu in the pub/gnu directory. Look for the file named +textutils-1.19.tar.gz, or an even more recent version of textutils, if one +is available. Fetch it, gunzip it, untar it, and follow the directions in +the INSTALL file included in the tar file to build and install the entire +textutils set of utility programs (which includes a working `tr' program). +Then just make sure that the GNU version of `tr' appears on your $PATH +_before_ the LynxOS version of `tr' (i.e. /bin/tr). Be sure to do this +step _before_ you start to configure nvi. + +When building the textutils set of programs, I suggest that you use the most +up-to-date C compiler available on your system (as described above). Also, +note that it will be important for you to AVOID using the -O (optimize) +compiler option when building the GNU textutils package, even if you are +using the most up-to-date version of gcc which shipped with your system. +If you try to use -O when building the textutils package on an x86 with +the Cygnus 94q4 C compiler, you will end up with a `tr' program which will +malfunction even worse than the one you are trying to replace! If you use +-O when building the textutils package on LynxOS on the PowerPC (using the +Cygnus 95q2 C compiler) you will just get yourself a compiler crash. So +just don't use -O when building textutils. You can avoid using -O by in- +voking make in the textutils directory as follows: + + make CFLAGS="-g" + +(Note: At present, LynxOS version 2.4.0 is the latest officially released +version of LynxOS, and all of the above information is accurate and correct +for LynxOS 2.4.0 as of the time of this writing. However it is rumored that +the bug in the /bin/tr program will be fixed in future releases of LynxOS, +so if you have a version of LynxOS later than 2.4.0, you may wish to check +and see if your /bin/tr program even has the problematic bug before bothering +with all of this.) + + +3. Fix Your System Include Files +--------------------------------- + +If you are building nvi on a PowerPC system, it is also important that you +apply the patches given at the end of this file to your /usr/include files. +(Note that you will have to be root in order to do this.) Two of the patches +included below fix a pair of serious bugs in the /usr/include/stdarg.h file +on the PowerPC, and you really _do_ want to have these bugs fixed anyway, +because without these fixes, anything that you compile which uses <stdarg.h> +will very likely malfunction at run-time. + +Regardless of which LynxOS platform you are using (i.e. x86, PowerPC, Sparc, +or m680x0) you may want to apply all of the system include files patches that +are included below anyway. Doing so will clean up a few minor problems with +the relevant system include files (i.e. <stdarg.h>, <ioctl.h>, and <wait.h>) +and this step will also prevent a few warnings which you would otherwise get +during the build of nvi. + +You can apply all of the patches given at the end of this file simply by +doing the following: + + su root + cd /usr/include + /bin/patch < this-file + +Where `this-file' is the actual full pathname of the file you are now reading, +wherever it may reside on your own system. + +(Note: At present, LynxOS version 2.4.0 is the latest officially released +version of LynxOS, and all of the above information is accurate and correct +for LynxOS 2.4.0 as of the time of this writing. However it is rumored that +future releases of LynxOS may incorporate some or all of the important system +include file fixes provided below. Thus, if you are building nvi for some +LynxOS version later than 2.4.0, you should probably go ahead and try to +apply the patches given below to your system include files, and then just +don't worry about it if these patches seem to have already been applied.) + + +4. A Brief Note about Sendmail +------------------------------- + +I should mention also that LynxOS does not normally ship with the `sendmail' +mail transfer program installed, either under /usr/lib/ or anywhere else for +that matter. This isn't really a big problem, but nvi normally wants and +expects to have a sendmail program available so that it can send users notifi- +cations (by mail) whenever a partially edited file is preserved by the editor +in response to a sudden system crash, a sudden system shutdown, or an unexpect- +ed serial-line hangup. You can configure and build nvi without any sendmail +program installed on your system, but you will get warnings about its absence +when you are doing the initial configure step prior to actually building nvi. +If you want to have a fully-functional nvi which does send out notification +messages (by mail) whenever partially edited files are preserved during a +serial line hangup or system crash, then you should get the BSD sendmail +sources (via ftp from ftp.cs.berkeley.edu), build and install sendmail, and +then reconfigure, rebuild, and reinstall nvi. + +Please contact me at the E-mail address below if you experience any problems in +building or using nvi on LynxOS. I make no guarrantees, but I may be willing +to try to help. + +Ron Guilmette +Roseville, California +<rfg@monkeys.com> +August 14, 1996 + + +cut here for LynxOS 2.4.0 system include files patches +----------------------------------------------------------------------------- +*** wait.h Fri Apr 26 10:02:45 1996 +--- wait.h Sun May 19 05:36:50 1996 +*************** +*** 94,104 **** + /* Function prototypes */ + #ifndef __LYNXOS +- #ifdef _POSIX_SOURCE + extern pid_t wait _AP((int *)); + extern pid_t waitpid _AP((pid_t, int *, int)); +! #else +! extern int wait _AP((union wait *)); +! extern int waitpid _AP((int, union wait *, int)); +! extern int wait3 _AP((union wait *, int, struct rusage *)); + #endif + #endif /* !__LYNXOS */ +--- 94,101 ---- + /* Function prototypes */ + #ifndef __LYNXOS + extern pid_t wait _AP((int *)); + extern pid_t waitpid _AP((pid_t, int *, int)); +! #ifndef _POSIX_SOURCE +! extern int wait3 _AP((int *, int, struct rusage *)); + #endif + #endif /* !__LYNXOS */ +*** ioctl.h Fri Apr 26 16:50:51 1996 +--- ioctl.h Sat May 18 17:55:16 1996 +*************** +*** 572,576 **** + + #ifndef __LYNXOS +! extern int ioctl _AP((int, int, char *)); + #endif + +--- 572,576 ---- + + #ifndef __LYNXOS +! extern int ioctl _AP((int, int, ...)); + #endif + +*** stdarg.h Fri Apr 26 16:51:02 1996 +--- stdarg.h Sat May 18 19:34:13 1996 +*************** +*** 88,92 **** + (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) + +! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg ())) + + void va_end(va_list); /* Defined in libgcc.a */ +--- 88,92 ---- + (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) + +! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg (LASTARG))) + + void va_end(va_list); /* Defined in libgcc.a */ +*************** +*** 162,166 **** + (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) + +! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg ())) + + void va_end(va_list); /* Defined in libgcc.a */ +--- 162,166 ---- + (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) + +! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg (LASTARG))) + + void va_end(va_list); /* Defined in libgcc.a */ diff --git a/contrib/nvi/build/acconfig.h b/contrib/nvi/build/acconfig.h new file mode 100644 index 0000000..567f9ee --- /dev/null +++ b/contrib/nvi/build/acconfig.h @@ -0,0 +1,82 @@ +/* @(#)acconfig.h 8.18 (Berkeley) 7/2/96 */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef ssize_t + +/* Define if you want a debugging version. */ +#undef DEBUG + +/* Define if you have a System V-style (broken) gettimeofday. */ +#undef HAVE_BROKEN_GETTIMEOFDAY + +/* Define if you have a Ultrix-style (broken) vdisable. */ +#undef HAVE_BROKEN_VDISABLE + +/* Define if you have a BSD version of curses. */ +#undef HAVE_BSD_CURSES + +/* Define if you have the curses(3) addnstr function. */ +#undef HAVE_CURSES_ADDNSTR + +/* Define if you have the curses(3) beep function. */ +#undef HAVE_CURSES_BEEP + +/* Define if you have the curses(3) flash function. */ +#undef HAVE_CURSES_FLASH + +/* Define if you have the curses(3) idlok function. */ +#undef HAVE_CURSES_IDLOK + +/* Define if you have the curses(3) keypad function. */ +#undef HAVE_CURSES_KEYPAD + +/* Define if you have the curses(3) newterm function. */ +#undef HAVE_CURSES_NEWTERM + +/* Define if you have the curses(3) setupterm function. */ +#undef HAVE_CURSES_SETUPTERM + +/* Define if you have the curses(3) tigetstr/tigetnum functions. */ +#undef HAVE_CURSES_TIGETSTR + +/* Define if you have the DB __hash_open call in the C library. */ +#undef HAVE_DB_HASH_OPEN + +/* Define if you have the chsize(2) system call. */ +#undef HAVE_FTRUNCATE_CHSIZE + +/* Define if you have the ftruncate(2) system call. */ +#undef HAVE_FTRUNCATE_FTRUNCATE + +/* Define if you have fcntl(2) style locking. */ +#undef HAVE_LOCK_FCNTL + +/* Define if you have flock(2) style locking. */ +#undef HAVE_LOCK_FLOCK + +/* Define if you want to compile in the Perl interpreter. */ +#undef HAVE_PERL_INTERP + +/* Define if your Perl is at least 5.003_01. */ +#undef HAVE_PERL_5_003_01 + +/* Define if you have the Berkeley style revoke(2) system call. */ +#undef HAVE_REVOKE + +/* Define if you have the Berkeley style strsep(3) function. */ +#undef HAVE_STRSEP + +/* Define if you have <sys/mman.h> */ +#undef HAVE_SYS_MMAN_H + +/* Define if you have <sys/select.h> */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the System V style pty calls. */ +#undef HAVE_SYS5_PTY + +/* Define if you want to compile in the Tcl interpreter. */ +#undef HAVE_TCL_INTERP + +/* Define if your sprintf returns a pointer, not a length. */ +#undef SPRINTF_RET_CHARPNT diff --git a/contrib/nvi/build/aclocal.m4 b/contrib/nvi/build/aclocal.m4 new file mode 100644 index 0000000..de7e57e --- /dev/null +++ b/contrib/nvi/build/aclocal.m4 @@ -0,0 +1,17 @@ +AC_DEFUN(AM_SANITY_CHECK_CC, +[dnl Derived from macros from Bruno Haible and from Cygnus. +AC_MSG_CHECKING([whether the compiler ($CC $CFLAGS $LDFLAGS) actually works]) +AC_LANG_SAVE + AC_LANG_C + AC_TRY_RUN([main() { exit(0); }], + am_cv_prog_cc_works=yes, am_cv_prog_cc_works=no, + dnl When crosscompiling, just try linking. + AC_TRY_LINK([], [], am_cv_prog_cc_works=yes, + am_cv_prog_cc_works=no)) +AC_LANG_RESTORE +case "$am_cv_prog_cc_works" in + *no) AC_MSG_ERROR([Installation or configuration problem: C compiler cannot create executables.]) ;; + *yes) ;; +esac +AC_MSG_RESULT(yes) +])dnl diff --git a/contrib/nvi/build/config.guess b/contrib/nvi/build/config.guess new file mode 100755 index 0000000..4c314d9 --- /dev/null +++ b/contrib/nvi/build/config.guess @@ -0,0 +1,571 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner <bothner@cygnus.com>. +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:V*:*) + # After 1.2, OSF1 uses "V1.3" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` + exit 0 ;; + alpha:OSF1:*:*) + # 1.2 uses "1.2" for uname -r. + echo alpha-dec-osf${UNAME_RELEASE} + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + Pyramid*:OSx*:*:*) + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + sun4*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + mips:*:4*:UMIPS) + echo mips-mips-riscos4sysv + exit 0 ;; + mips:*:5*:RISCos) + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*C90:*:*:*) + echo c90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i?86"; then + echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 + elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i?86linux"; then + echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 + elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i?86coff"; then + echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 + elif test "${UNAME_MACHINE}" = "alpha" ; then + echo alpha-unknown-linux ; exit 0 + else + # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us + # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. + test ! -d /usr/lib/ldscripts/. \ + && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 + # Determine whether the default compiler is a.out or elf + cat >dummy.c <<EOF +main(argc, argv) +int argc; +char *argv[]; +{ +#ifdef __ELF__ + printf ("%s-unknown-linux\n", argv[1]); +#else + printf ("%s-unknown-linuxaout\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-unknown-sysv32 + fi + exit 0 ;; + Intel:Mach:3*:*) + echo i386-unknown-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M680?0:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) + uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3 && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68*:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:* | uSPARC2:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *FTX*) + echo i860-stratus-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-unknown-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff --git a/contrib/nvi/build/config.h.in b/contrib/nvi/build/config.h.in new file mode 100644 index 0000000..c87fcdd --- /dev/null +++ b/contrib/nvi/build/config.h.in @@ -0,0 +1,179 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + +/* Define if you have <vfork.h>. */ +#undef HAVE_VFORK_H + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef mode_t + +/* Define to `long' if <sys/types.h> doesn't define. */ +#undef off_t + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef pid_t + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if your <sys/time.h> declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define vfork as fork if vfork does not work. */ +#undef vfork + +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef ssize_t + +/* Define if you want a debugging version. */ +#undef DEBUG + +/* Define if you have a System V-style (broken) gettimeofday. */ +#undef HAVE_BROKEN_GETTIMEOFDAY + +/* Define if you have a Ultrix-style (broken) vdisable. */ +#undef HAVE_BROKEN_VDISABLE + +/* Define if you have a BSD version of curses. */ +#undef HAVE_BSD_CURSES + +/* Define if you have the curses(3) addnstr function. */ +#undef HAVE_CURSES_ADDNSTR + +/* Define if you have the curses(3) beep function. */ +#undef HAVE_CURSES_BEEP + +/* Define if you have the curses(3) flash function. */ +#undef HAVE_CURSES_FLASH + +/* Define if you have the curses(3) idlok function. */ +#undef HAVE_CURSES_IDLOK + +/* Define if you have the curses(3) keypad function. */ +#undef HAVE_CURSES_KEYPAD + +/* Define if you have the curses(3) newterm function. */ +#undef HAVE_CURSES_NEWTERM + +/* Define if you have the curses(3) setupterm function. */ +#undef HAVE_CURSES_SETUPTERM + +/* Define if you have the curses(3) tigetstr/tigetnum functions. */ +#undef HAVE_CURSES_TIGETSTR + +/* Define if you have the chsize(2) system call. */ +#undef HAVE_FTRUNCATE_CHSIZE + +/* Define if you have the ftruncate(2) system call. */ +#undef HAVE_FTRUNCATE_FTRUNCATE + +/* Define if you have fcntl(2) style locking. */ +#undef HAVE_LOCK_FCNTL + +/* Define if you have flock(2) style locking. */ +#undef HAVE_LOCK_FLOCK + +/* Define if you want to compile in the Perl interpreter. */ +#undef HAVE_PERL_INTERP + +/* Define if your Perl is at least 5.003_01. */ +#undef HAVE_PERL_5_003_01 + +/* Define if you have the Berkeley style revoke(2) system call. */ +#undef HAVE_REVOKE + +/* Define if you have <sys/mman.h> */ +#undef HAVE_SYS_MMAN_H + +/* Define if you have <sys/select.h> */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the System V style pty calls. */ +#undef HAVE_SYS5_PTY + +/* Define if you want to compile in the Tcl interpreter. */ +#undef HAVE_TCL_INTERP + +/* Define if your sprintf returns a pointer, not a length. */ +#undef SPRINTF_RET_CHARPNT + +/* Define if you have the bsearch function. */ +#undef HAVE_BSEARCH + +/* Define if you have the gethostname function. */ +#undef HAVE_GETHOSTNAME + +/* Define if you have the getopt function. */ +#undef HAVE_GETOPT + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the memchr function. */ +#undef HAVE_MEMCHR + +/* Define if you have the memcpy function. */ +#undef HAVE_MEMCPY + +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the memset function. */ +#undef HAVE_MEMSET + +/* Define if you have the mkstemp function. */ +#undef HAVE_MKSTEMP + +/* Define if you have the mmap function. */ +#undef HAVE_MMAP + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the snprintf function. */ +#undef HAVE_SNPRINTF + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strpbrk function. */ +#undef HAVE_STRPBRK + +/* Define if you have the strsep function. */ +#undef HAVE_STRSEP + +/* Define if you have the strtol function. */ +#undef HAVE_STRTOL + +/* Define if you have the strtoul function. */ +#undef HAVE_STRTOUL + +/* Define if you have the unsetenv function. */ +#undef HAVE_UNSETENV + +/* Define if you have the valloc function. */ +#undef HAVE_VALLOC + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF diff --git a/contrib/nvi/build/config.sub b/contrib/nvi/build/config.sub new file mode 100755 index 0000000..43f0867 --- /dev/null +++ b/contrib/nvi/build/config.sub @@ -0,0 +1,872 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS (if any). +basic_machine=`echo $1 | sed 's/-[^-]*$//'` +if [ $basic_machine != $1 ] +then os=`echo $1 | sed 's/.*-/-/'` +else os=; fi + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ + | arme[lb] | pyramid \ + | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ + | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ + | pdp11 | mips64el | mips64orion | mips64orionel \ + | sparc) + basic_machine=$basic_machine-unknown + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ + | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ + | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ + | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ + | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigados) + basic_machine=m68k-cbm + os=-amigados + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[345]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv32 + ;; + i[345]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv4 + ;; + i[345]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv + ;; + i[345]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + mac | macintosh) + basic_machine=m68k-apple + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | p6) + # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + basic_machine=i586-intel + ;; + pentium-* | p5-* | p6-*) + # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + k5) + # We don't have specific support for AMD's K5 yet, so just call it a Pentium + basic_machine=i586-amd + ;; + nexen) + # We don't have specific support for Nexgen yet, so just call it a Pentium + basic_machine=i586-nexgen + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + basic_machine=mips-mips + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware* | svr4*) + os=-sysv4 + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ + | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ + | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* ) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -aux*) + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigados + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/contrib/nvi/build/configure b/contrib/nvi/build/configure new file mode 100755 index 0000000..e2055d1 --- /dev/null +++ b/contrib/nvi/build/configure @@ -0,0 +1,4446 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.7 +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-debug Build a debugging version." +ac_help="$ac_help + --with-x use the X Window System" +ac_help="$ac_help + --enable-perlinterp Include a Perl interpreter in vi." +ac_help="$ac_help + --enable-tknvi Build a Tk/Tcl front-end for vi." +ac_help="$ac_help + --enable-tclinterp Include a Tk/Tcl interpreter in vi." +ac_help="$ac_help + --disable-curses DON'T use the nvi-provided curses routines." +ac_help="$ac_help + --disable-db DON'T use the nvi-provided DB routines." +ac_help="$ac_help + --disable-re DON'T use the nvi-provided RE routines." + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.7" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=../common/main.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='echo $CPP $CPPFLAGS 1>&5; +$CPP $CPPFLAGS' +ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; +${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; +${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_ifs" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + + +echo $ac_n "checking if --enable-debug option specified""... $ac_c" 1>&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + vi_cv_debug="yes" +else + vi_cv_debug="no" +fi + +if test "$vi_cv_debug" = yes; then + cat >> confdefs.h <<\EOF +#define DEBUG 1 +EOF + + OPTFLAG=${OPTFLAG-"-g"} + no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} +fi +echo "$ac_t""$vi_cv_debug" 1>&6 + + + +case "$host_os" in +aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; +aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} + OPTFLAG=${OPTFLAG-"-O3"};; +aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} + LDFLAGS=${LDFLAGS-"-ZP"} + OPTFLAG=${OPTFLAG-"-O"};; +bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; +bsdi*) CC=${CC-"shlicc"} + OPTFLAG=${OPTFLAG-"-O2"};; +irix6*) OPTFLAG=${OPTFLAG-"-O2"};; +irix*) OPTFLAG=${OPTFLAG-"-O2"};; +lynxos*) # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +if test $ac_cv_prog_gcc = yes; then + GCC=yes + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_gcc_g=yes +else + ac_cv_prog_gcc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + echo $ac_n "checking for GNU C (gcc) version 2.x""... $ac_c" 1>&6 + ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ + grep "gcc version " | sed 's/.*version //'` + ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` + if test "$ac_cv_gcc_major" = "2" ; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + echo "Fatal error: Nvi requires gcc 2.x to build on LynxOS." + echo "See build/README.LynxOS for more information." + exit 1 + fi;; +nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} + LDFLAGS=${LDFLAGS-"-posix"} + OPTFLAG=${OPTFLAG-"-O9"};; +osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; +solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; +sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; +esac + + +CC=${CC-cc} + + +OPTFLAG=${OPTFLAG-"-O"} + + +no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} + +case "$host_os" in +bsdi2.1) LIBS=${LIBS-"-lipc"};; +dgux*) LIBS=${LIBS-"-ldgc"};; +irix6*) LIBS=${LIBS-"-lbsd"};; +irix*) LIBS=${LIBS-"-lc_s -lbsd"};; +isc*) LIBS=${LIBS-"-lcposix -linet"};; +netbsd1*) LIBS=${LIBS-"-lcrypt"};; +ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; +sco3.2*) LIBS=${LIBS-"-lsocket"};; +sinix*) LIBS=${LIBS-"-lelf -lc"};; +solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"} + RLIBS=yes;; +wgs*) LIBS=${LIBS-"-lnsl"};; +esac + +case "$host_os" in +aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; +esac + +case "$host_os" in +ultrix*) cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_VDISABLE 1 +EOF +;; +esac + +CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" + +LDFLAGS="$ADDLDFLAGS $LDFLAGS" + +LIBS="$ADDLIBS $LIBS" + +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes +else +cat > conftest.$ac_ext <<EOF +#line 839 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_cross=no +else + ac_cv_c_cross=yes +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross + +echo $ac_n "checking whether the compiler ($CC $CFLAGS $LDFLAGS) actually works""... $ac_c" 1>&6 + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='echo $CPP $CPPFLAGS 1>&5; +$CPP $CPPFLAGS' +ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; +${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; +${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext <<EOF +#line 869 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + am_cv_prog_cc_works=yes +else + rm -rf conftest* + am_cv_prog_cc_works=no +fi +rm -f conftest* + +else +cat > conftest.$ac_ext <<EOF +#line 888 "configure" +#include "confdefs.h" +main() { exit(0); } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + am_cv_prog_cc_works=yes +else + am_cv_prog_cc_works=no +fi +fi +rm -fr conftest* + +case "$am_cv_prog_cc_works" in + *no) { echo "configure: error: Installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } ;; + *yes) ;; +esac +echo "$ac_t""yes" 1>&6 + + +PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib:" + +# Extract the first word of "sh", so it can be a program name with args. +set dummy sh; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_shell'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_shell" in + /*) + ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_shell="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no" + ;; +esac +fi +vi_cv_path_shell="$ac_cv_path_vi_cv_path_shell" +if test -n "$vi_cv_path_shell"; then + echo "$ac_t""$vi_cv_path_shell" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test "$vi_cv_path_shell" = no; then + echo "Fatal error: the shell utility not found." + exit 1 +fi + +# Extract the first word of "sendmail", so it can be a program name with args. +set dummy sendmail; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_sendmail'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_sendmail" in + /*) + ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_sendmail="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no" + ;; +esac +fi +vi_cv_path_sendmail="$ac_cv_path_vi_cv_path_sendmail" +if test -n "$vi_cv_path_sendmail"; then + echo "$ac_t""$vi_cv_path_sendmail" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test "$vi_cv_path_sendmail" = no; then + echo "WARNING: The sendmail utility was not found!" + echo "WARNING: Users will not be told of saved files." +fi + + +for ac_prog in perl5 perl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_perl" in + /*) + ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl" +if test -n "$vi_cv_path_perl"; then + echo "$ac_t""$vi_cv_path_perl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$vi_cv_path_perl" && break +done +test -n "$vi_cv_path_perl" || vi_cv_path_perl="no" + + + +echo $ac_n "checking for preserve directory""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_path_preserve'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + dirlist="/var/preserve /var/tmp /usr/tmp" + vi_cv_path_preserve=no + for i in $dirlist; do + if test -d $i/vi.recover; then + vi_cv_path_preserve=$i/vi.recover + break; + fi + done + if test "$vi_cv_path_preserve" = no; then + for i in $dirlist; do + if test -d $i -a -w $i; then + vi_cv_path_preserve=$i/vi.recover + break; + fi + done + + fi +fi + +if test "$vi_cv_path_preserve" = no; then + echo "Fatal error: no writeable preserve directory found." + exit 1 +fi +echo "$ac_t""$vi_cv_path_preserve" 1>&6 + +# Extract the first word of "chmod", so it can be a program name with args. +set dummy chmod; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_chmod'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_chmod" in + /*) + ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_chmod="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod" + ;; +esac +fi +vi_cv_path_chmod="$ac_cv_path_vi_cv_path_chmod" +if test -n "$vi_cv_path_chmod"; then + echo "$ac_t""$vi_cv_path_chmod" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "cp", so it can be a program name with args. +set dummy cp; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_cp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_cp" in + /*) + ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_cp="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp" + ;; +esac +fi +vi_cv_path_cp="$ac_cv_path_vi_cv_path_cp" +if test -n "$vi_cv_path_cp"; then + echo "$ac_t""$vi_cv_path_cp" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "ln", so it can be a program name with args. +set dummy ln; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ln'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_ln" in + /*) + ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_ln="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="missing_ln" + ;; +esac +fi +vi_cv_path_ln="$ac_cv_path_vi_cv_path_ln" +if test -n "$vi_cv_path_ln"; then + echo "$ac_t""$vi_cv_path_ln" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "mkdir", so it can be a program name with args. +set dummy mkdir; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mkdir'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_mkdir" in + /*) + ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_mkdir="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir" + ;; +esac +fi +vi_cv_path_mkdir="$ac_cv_path_vi_cv_path_mkdir" +if test -n "$vi_cv_path_mkdir"; then + echo "$ac_t""$vi_cv_path_mkdir" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_rm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_rm" in + /*) + ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_rm="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm" + ;; +esac +fi +vi_cv_path_rm="$ac_cv_path_vi_cv_path_rm" +if test -n "$vi_cv_path_rm"; then + echo "$ac_t""$vi_cv_path_rm" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_strip'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$vi_cv_path_strip" in + /*) + ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_vi_cv_path_strip="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip" + ;; +esac +fi +vi_cv_path_strip="$ac_cv_path_vi_cv_path_strip" +if test -n "$vi_cv_path_strip"; then + echo "$ac_t""$vi_cv_path_strip" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 1252 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1266 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# Uses ac_ vars as temps to allow command line to override cache and checks. +# --without-x overrides everything else, but does not touch the cache. +echo $ac_n "checking for X""... $ac_c" 1>&6 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +if test "x$with_x" = xno; then + no_x=yes +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + no_x= + else +if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +no_x=yes +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + no_x= + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$no_x" = yes; then +test -z "$x_direct_test_library" && x_direct_test_library=Xt +test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc +test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h +cat > conftest.$ac_ext <<EOF +#line 1352 "configure" +#include "confdefs.h" +#include <$x_direct_test_include> +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + no_x= ac_x_includes= +else + echo "$ac_err" >&5 + rm -rf conftest* + for ac_dir in \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + no_x= ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* + +# Check for the libraries. +# See if we find them without any special options. +# Don't add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1415 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +${x_direct_test_function}() +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + LIBS="$ac_save_LIBS" no_x= ac_x_libraries= +else + rm -rf conftest* + LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + /usr/local/lib/X11 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + no_x= ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* + +fi +if test "$no_x" = yes; then + ac_cv_path_x="no_x=yes" +else + ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + fi + eval "$ac_cv_path_x" +fi # $with_x != no + +if test "$no_x" = yes; then + echo "$ac_t""no" 1>&6 +else + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + + +if test "$no_x" != yes; then + if test "X$x_libraries" != "X"; then + if test "X$RLIBS" = "Xyes"; then + XLIBS="-R$x_libraries -L$x_libraries $XLIBS" + else + XLIBS="-L$x_libraries $XLIBS" + fi + fi + XLIBS="$XLIBS -lX11" + if test "X$x_includes" != "X"; then + XINCS="-I$x_includes" + fi +fi + + + +echo $ac_n "checking if --enable-perlinterp option specified""... $ac_c" 1>&6 +# Check whether --enable-perlinterp or --disable-perlinterp was given. +if test "${enable_perlinterp+set}" = set; then + enableval="$enable_perlinterp" + vi_cv_perlinterp="yes" +else + vi_cv_perlinterp="no" +fi + +echo "$ac_t""$vi_cv_perlinterp" 1>&6 +if test "$vi_cv_perlinterp" = "yes"; then + if test "$vi_cv_path_perl" = no; then + echo "Fatal error: no perl5 utility found." + exit 1 + fi + $vi_cv_path_perl -e 'require 5.002' || { + echo "Fatal error: perl5 must be version 5.002 or later." + exit 1 + } + $vi_cv_path_perl -e 'close(STDERR);require 5.003_01' && + cat >> confdefs.h <<\EOF +#define HAVE_PERL_5_003_01 1 +EOF + + + eval `$vi_cv_path_perl -V:shrpenv` + if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 + shrpenv="" + fi + vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` + perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ + -e 'ccflags;perl_inc'` + if test "X$perlcppflags" != "X"; then + CPPFLAGS="$perlcppflags $CPPFLAGS" + fi + perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ + -e 'ldopts'` + if test "X$perllibs" != "X"; then + LIBS="$perllibs $LIBS" + fi + perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ + -e 'ccdlflags'` + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + LIBOBJS="perl.o perlsfio.o $LIBOBJS" + cat >> confdefs.h <<\EOF +#define HAVE_PERL_INTERP 1 +EOF + +fi + + + +echo $ac_n "checking if --enable-tknvi option specified""... $ac_c" 1>&6 +# Check whether --enable-tknvi or --disable-tknvi was given. +if test "${enable_tknvi+set}" = set; then + enableval="$enable_tknvi" + vi_cv_tknvi="yes" +else + vi_cv_tknvi="no" +fi + +echo "$ac_t""$vi_cv_tknvi" 1>&6 +if test "$vi_cv_tknvi" = "yes"; then + tknvi=tknvi + TKLIBS="-ltk -ltcl -lm $XLIBS $LIBS" +fi + +echo $ac_n "checking if --enable-tclinterp option specified""... $ac_c" 1>&6 +# Check whether --enable-tclinterp or --disable-tclinterp was given. +if test "${enable_tclinterp+set}" = set; then + enableval="$enable_tclinterp" + vi_cv_tclinterp="yes" +else + vi_cv_tclinterp="no" +fi + +echo "$ac_t""$vi_cv_tclinterp" 1>&6 +if test "$vi_cv_tclinterp" = "yes"; then + LIBOBJS="tcl.o $LIBOBJS" + LIBS="-ltk -ltcl -lm $XLIBS $LIBS" + cat >> confdefs.h <<\EOF +#define HAVE_TCL_INTERP 1 +EOF + +fi + +if test "$vi_cv_tknvi" = "yes" || test "$vi_cv_tclinterp" = "yes"; then + echo $ac_n "checking for -ltcl""... $ac_c" 1>&6 +ac_lib_var=`echo tcl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltcl -ltk -lm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1611 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +main() +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + vi_cv_tkfatal="no" +else + echo "$ac_t""no" 1>&6 +vi_cv_tkfatal="yes" +fi + + if test "$vi_cv_tkfatal" = "yes"; then + echo "Fatal error: no Tk/Tcl library; see the section" + echo "ADDING LIBRARIES AND INCLUDE FILES in the README file." + exit 1 + fi +fi + +if test "$vi_cv_tclinterp" = yes || test "$vi_cv_perlinterp" = yes; then + LIBOBJS="api.o $LIBOBJS" +fi + +echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6 +ac_lib_var=`echo termlib | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermlib $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1657 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +tgetent() +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + vi_cv_termlib=-ltermlib +else + echo "$ac_t""no" 1>&6 +vi_cv_termlib=no +fi + +if test "$vi_cv_termlib" = no; then + echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6 +ac_lib_var=`echo termcap | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1693 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +tgetent() +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + vi_cv_termlib=-ltermcap +else + echo "$ac_t""no" 1>&6 +vi_cv_termlib=no +fi + +fi +if test "$vi_cv_termlib" != no; then + LIBS="$vi_cv_termlib $LIBS" +fi + +echo $ac_n "checking if --disable-curses option specified""... $ac_c" 1>&6 +# Check whether --enable-curses or --disable-curses was given. +if test "${enable_curses+set}" = set; then + enableval="$enable_curses" + vi_cv_curses="other curses" +else + vi_cv_curses="bundled curses" +fi + +echo "$ac_t""$vi_cv_curses" 1>&6 +case "$vi_cv_curses" in +"bundled curses") + CPPFLAGS="-I\$(srcdir)/curses $CPPFLAGS" + cobjs="\$(COBJS)";; +"other curses") + LIBS="-lcurses $LIBS";; +esac + +echo $ac_n "checking for sys/mman.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_include_sys_mman'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1748 "configure" +#include "confdefs.h" +#include <sys/mman.h> +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + vi_cv_include_sys_mman=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + vi_cv_include_sys_mman=no +fi +rm -f conftest* +fi + +if test "$vi_cv_include_sys_mman" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_MMAN_H 1 +EOF + +fi +echo "$ac_t""$vi_cv_include_sys_mman" 1>&6 + +echo $ac_n "checking for sys/select.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_include_sys_select'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1778 "configure" +#include "confdefs.h" +#include <sys/select.h> +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + vi_cv_include_sys_select=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + vi_cv_include_sys_select=no +fi +rm -f conftest* +fi + +if test "$vi_cv_include_sys_select" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_SELECT_H 1 +EOF + +fi +echo "$ac_t""$vi_cv_include_sys_select" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1808 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1830 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1848 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else +cat > conftest.$ac_ext <<EOF +#line 1869 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + : +else + ac_cv_header_stdc=no +fi +fi +rm -fr conftest* +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1904 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ssize_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF + +fi + +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext <<EOF +#line 1937 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { return 0; } +int t() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext <<EOF +#line 1953 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { return 0; } +int t() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* + +fi +rm -f conftest* + +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 1982 "configure" +#include "confdefs.h" +main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +fi +rm -fr conftest* +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2019 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_c_const=yes +else + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2093 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/stat.h> +int main() { return 0; } +int t() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2126 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2157 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2188 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2219 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2250 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <time.h> +int main() { return 0; } +int t() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + + + for ac_func in bsearch gethostname getopt memchr memcpy memmove memset +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2286 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in bsearch gethostname getopt memchr memcpy memmove memset +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2337 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi + +done + + for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2386 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2437 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi + +done + + for ac_func in strtoul vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2486 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in strtoul vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2537 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi + +done + + +for ac_func in select +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2587 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in setenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2638 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + need_env=no +else + echo "$ac_t""no" 1>&6 +need_env=yes +fi +done + +for ac_func in strsep +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2690 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + need_strsep=no +else + echo "$ac_t""no" 1>&6 +need_strsep=yes +fi +done + +for ac_func in unsetenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2742 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +need_env=yes +fi +done + + +for ac_func in valloc getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2795 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap=no +else +cat > conftest.$ac_ext <<EOF +#line 2847 "configure" +#include "confdefs.h" + +/* Thanks to Mike Haertel and Jim Avera for this test. */ +#include <sys/types.h> +#include <fcntl.h> +#include <sys/mman.h> + +#ifndef HAVE_GETPAGESIZE +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# else +# ifdef NBPC +# define getpagesize() NBPC +# else +# define getpagesize() PAGESIZE /* SVR4 */ +# endif +# endif +# endif +#endif + +#ifndef HAVE_VALLOC +# define valloc malloc +#endif + +#ifdef __cplusplus +extern "C" { void *valloc(unsigned), *malloc(unsigned); } +#else +char *valloc(), *malloc(); +#endif + +int +main() +{ + char *buf1, *buf2, *buf3; + int i = getpagesize(), j; + int i2 = i * 2; + int fd; + + buf1 = (char *)valloc(i2); + buf2 = (char *)valloc(i); + buf3 = (char *)malloc(i2); + for (j = 0; j < i2; ++j) + *(buf1 + j) = rand(); + fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); + write(fd, buf1, i2); + mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); + for (j = 0; j < i; ++j) + if (*(buf1 + j) != *(buf2 + j)) + exit(1); + lseek(fd, (long)i, 0); + read(fd, buf2, i); /* read into mapped memory -- file should not change */ + /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ + lseek(fd, (long)0, 0); + read(fd, buf3, i2); + for (j = 0; j < i2; ++j) + if (*(buf1 + j) != *(buf3 + j)) + exit(1); + exit(0); +} + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_func_mmap=yes +else + ac_cv_func_mmap=no +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_func_mmap" 1>&6 +if test $ac_cv_func_mmap = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + +ac_safe=`echo "vfork.h" | tr './\055' '___'` +echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2940 "configure" +#include "confdefs.h" +#include <vfork.h> +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VFORK_H 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for working vfork""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + echo $ac_n "checking for vfork""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2976 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char vfork(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +char vfork(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vfork) || defined (__stub___vfork) +choke me +#else +vfork(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_vfork=yes" +else + rm -rf conftest* + eval "ac_cv_func_vfork=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + +else +cat > conftest.$ac_ext <<EOF +#line 3017 "configure" +#include "confdefs.h" +/* Thanks to Paul Eggert for this test. */ +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_VFORK_H +#include <vfork.h> +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. + The compiler is told about this with #include <vfork.h>, + but some compilers (e.g. gcc -O) don't grok <vfork.h>. + Test for this by using a static variable whose address + is put into a register that is clobbered by the vfork. */ +static +#ifdef __cplusplus +sparc_address_test (int arg) +#else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) + perror ("vfork"); + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} +main() { + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. + This test uses lots of local variables, at least + as many local variables as main has allocated so far + including compiler temporaries. 4 locals are enough for + gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. + A buggy compiler should reuse the register of parent + for one of the local variables, since it will think that + parent can't possibly be used any more in this routine. + Assigning to the local variable will thus munge parent + in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), + vfork doesn't separate parent from child file descriptors. + If the child closes a descriptor before it execs or exits, + this munges the parent's descriptor as well. + Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + exit( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_func_vfork=yes +else + ac_cv_func_vfork=no +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_func_vfork" 1>&6 +if test $ac_cv_func_vfork = no; then + cat >> confdefs.h <<\EOF +#define vfork fork +EOF + +fi + + +if test "$need_env" = yes; then + LIBOBJS="env.o $LIBOBJS" +fi + +if test "$need_strsep" = yes; then + LIBOBJS="strsep.o $LIBOBJS" +fi + +echo $ac_n "checking for fcntl/flock""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_lock'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + vi_cv_lock=none + case "$host_os" in + dgux*);; + irix*);; + *) + cat > conftest.$ac_ext <<EOF +#line 3147 "configure" +#include "confdefs.h" +#include <fcntl.h> +int main() { return 0; } +int t() { +flock(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_lock=flock +fi +rm -f conftest* +;; + esac + if test "$vi_cv_lock" = none; then + cat > conftest.$ac_ext <<EOF +#line 3164 "configure" +#include "confdefs.h" +#include <fcntl.h> +int main() { return 0; } +int t() { +fcntl(0, F_SETLK, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_lock=fcntl +fi +rm -f conftest* + + fi +fi + + +if test "$vi_cv_lock" = flock; then + cat >> confdefs.h <<\EOF +#define HAVE_LOCK_FLOCK 1 +EOF + +fi +if test "$vi_cv_lock" = fcntl; then + cat >> confdefs.h <<\EOF +#define HAVE_LOCK_FCNTL 1 +EOF + +fi +echo "$ac_t""$vi_cv_lock" 1>&6 + +echo $ac_n "checking for ftruncate/chsize""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_ftruncate'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3201 "configure" +#include "confdefs.h" +#include <unistd.h> +int main() { return 0; } +int t() { +ftruncate(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_ftruncate=ftruncate +else + rm -rf conftest* + cat > conftest.$ac_ext <<EOF +#line 3215 "configure" +#include "confdefs.h" +#include <unistd.h> +int main() { return 0; } +int t() { +chsize(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_ftruncate=chsize +else + rm -rf conftest* + vi_cv_ftruncate=no +fi +rm -f conftest* + +fi +rm -f conftest* + +fi + +if test "$vi_cv_ftruncate" = ftruncate; then + cat >> confdefs.h <<\EOF +#define HAVE_FTRUNCATE_FTRUNCATE 1 +EOF + +fi +if test "$vi_cv_ftruncate" = chsize; then + cat >> confdefs.h <<\EOF +#define HAVE_FTRUNCATE_CHSIZE 1 +EOF + +fi +if test "$vi_cv_ftruncate" = no; then + echo + echo "Fatal error: no file truncation system call." + exit 1 +fi +echo "$ac_t""$vi_cv_ftruncate" 1>&6 + +echo $ac_n "checking for tigetstr/tigetnum""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_have_curses_tigetstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3261 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +tigetstr(0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_tigetstr=yes +else + rm -rf conftest* + vi_cv_have_curses_tigetstr=no +fi +rm -f conftest* + +fi + +if test "$vi_cv_have_curses_tigetstr" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_TIGETSTR 1 +EOF + +fi +echo "$ac_t""$vi_cv_have_curses_tigetstr" 1>&6 + +if test "$vi_cv_curses" = "bundled curses"; then + cat >> confdefs.h <<\EOF +#define HAVE_BSD_CURSES 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_ADDNSTR 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_IDLOK 1 +EOF + +else + echo $ac_n "checking for addnstr""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_addnstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3307 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +addnstr(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_addnstr=yes +else + rm -rf conftest* + vi_cv_have_curses_addnstr=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_addnstr" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_ADDNSTR 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_addnstr" 1>&6 + + echo $ac_n "checking for beep""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_beep'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3339 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +beep(); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_beep=yes +else + rm -rf conftest* + vi_cv_have_curses_beep=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_beep" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_BEEP 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_beep" 1>&6 + + echo $ac_n "checking for flash""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_flash'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3371 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +flash(); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_flash=yes +else + rm -rf conftest* + vi_cv_have_curses_flash=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_flash" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_FLASH 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_flash" 1>&6 + + echo $ac_n "checking for idlok""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_idlok'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3403 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +idlok(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_idlok=yes +else + rm -rf conftest* + vi_cv_have_curses_idlok=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_idlok" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_IDLOK 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_idlok" 1>&6 + + echo $ac_n "checking for keypad""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_keypad'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3435 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +keypad(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_keypad=yes +else + rm -rf conftest* + vi_cv_have_curses_keypad=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_keypad" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_KEYPAD 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_keypad" 1>&6 + + echo $ac_n "checking for newterm""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'vi_cv_have_curses_newterm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3467 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +newterm(0, 0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_newterm=yes +else + rm -rf conftest* + vi_cv_have_curses_newterm=no +fi +rm -f conftest* + +fi + + if test "$vi_cv_have_curses_newterm" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_NEWTERM 1 +EOF + + fi + echo "$ac_t""$vi_cv_have_curses_newterm" 1>&6 + + if test "$vi_cv_have_curses_newterm" = no; then + cat >> confdefs.h <<\EOF +#define HAVE_BSD_CURSES 1 +EOF + + fi +fi + +echo $ac_n "checking for setupterm""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_have_curses_setupterm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3507 "configure" +#include "confdefs.h" +#include <curses.h> +int main() { return 0; } +int t() { +setupterm(0, 0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_have_curses_setupterm=yes +else + rm -rf conftest* + vi_cv_have_curses_setupterm=no +fi +rm -f conftest* + +fi + +if test "$vi_cv_have_curses_setupterm" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_CURSES_SETUPTERM 1 +EOF + +fi +echo "$ac_t""$vi_cv_have_curses_setupterm" 1>&6 + +echo $ac_n "checking for broken gettimeofday system call""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_gettimeofday'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3539 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/time.h> +int main() { return 0; } +int t() { +gettimeofday(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_gettimeofday=okay +else + rm -rf conftest* + vi_cv_gettimeofday=broken +fi +rm -f conftest* + +fi + +if test "$vi_cv_gettimeofday" = broken; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_GETTIMEOFDAY 1 +EOF + +fi +echo "$ac_t""$vi_cv_gettimeofday" 1>&6 + +echo $ac_n "checking for System V pty calls""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_sys5_pty'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3572 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +grantpt(0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_sys5_pty=yes +else + rm -rf conftest* + vi_cv_sys5_pty=no +fi +rm -f conftest* + +fi + +if test "$vi_cv_sys5_pty" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS5_PTY 1 +EOF + +fi +echo "$ac_t""$vi_cv_sys5_pty" 1>&6 + +echo $ac_n "checking for revoke system call""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_revoke'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3604 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { +revoke("a"); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + vi_cv_revoke=yes +else + rm -rf conftest* + vi_cv_revoke=no +fi +rm -f conftest* + +fi + +if test "$vi_cv_revoke" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_REVOKE 1 +EOF + +fi +echo "$ac_t""$vi_cv_revoke" 1>&6 + +echo $ac_n "checking for int type sprintf return value""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_sprintf_count'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3639 "configure" +#include "confdefs.h" +main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_sprintf_count=yes +else + vi_cv_sprintf_count=no +fi +fi +rm -fr conftest* +fi + +if test "$vi_cv_sprintf_count" = no; then + cat >> confdefs.h <<\EOF +#define SPRINTF_RET_CHARPNT 1 +EOF + +fi +echo "$ac_t""$vi_cv_sprintf_count" 1>&6 + +echo $ac_n "checking if --disable-db option specified""... $ac_c" 1>&6 +# Check whether --enable-db or --disable-db was given. +if test "${enable_db+set}" = set; then + enableval="$enable_db" + vi_cv_db_lib="other DB" +else + vi_cv_db_lib="bundled DB" +fi + +echo "$ac_t""$vi_cv_db_lib" 1>&6 +case "$vi_cv_db_lib" in +"bundled DB") + CPPFLAGS="-I\$(srcdir)/db/include $CPPFLAGS" + LIBOBJS="\$(DBOBJS) $LIBOBJS";; +"other DB") + ;; +esac + +echo $ac_n "checking if --disable-re option specified""... $ac_c" 1>&6 +# Check whether --enable-re or --disable-re was given. +if test "${enable_re+set}" = set; then + enableval="$enable_re" + vi_cv_re_lib="other RE" +else + vi_cv_re_lib="bundled RE" +fi + +echo "$ac_t""$vi_cv_re_lib" 1>&6 +case "$vi_cv_re_lib" in +"bundled RE") + CPPFLAGS="-I\$(srcdir)/regex $CPPFLAGS" + LIBOBJS="\$(REOBJS) $LIBOBJS";; +"other RE") + ;; +esac + + +echo $ac_n "checking for u_char""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_uchar'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3703 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_char foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_uchar=yes +else + rm -rf conftest* + vi_cv_uchar=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_uchar" 1>&6 +if test "$vi_cv_uchar" = no; then + u_char_decl="typedef unsigned char u_char;" +fi + + +echo $ac_n "checking for u_short""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_ushort'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3733 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_short foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_ushort=yes +else + rm -rf conftest* + vi_cv_ushort=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_ushort" 1>&6 +if test "$vi_cv_ushort" = no; then + u_short_decl="typedef unsigned short u_short;" +fi + + +echo $ac_n "checking for u_int""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_uint'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3763 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_int foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_uint=yes +else + rm -rf conftest* + vi_cv_uint=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_uint" 1>&6 +if test "$vi_cv_uint" = no; then + u_int_decl="typedef unsigned int u_int;" +fi + + +echo $ac_n "checking for u_long""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_ulong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3793 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_long foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_ulong=yes +else + rm -rf conftest* + vi_cv_ulong=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_ulong" 1>&6 +if test "$vi_cv_ulong" = no; then + u_long_decl="typedef unsigned long u_long;" +fi + + +echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_uint8'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3823 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_int8_t foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_uint8=yes +else + rm -rf conftest* + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3840 "configure" +#include "confdefs.h" +main(){exit(sizeof(unsigned char) != 1);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_uint8="unsigned char" +else + vi_cv_uint8=no +fi +fi +rm -fr conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_uint8" 1>&6 +if test "$vi_cv_uint8" = no; then + echo + echo "Fatal error: no unsigned, 8-bit integral type." + exit 1 +fi +if test "$vi_cv_uint8" != yes; then + u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" +fi + + +echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_uint16'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3873 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_int16_t foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_uint16=yes +else + rm -rf conftest* + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3890 "configure" +#include "confdefs.h" +main(){exit(sizeof(unsigned short) != 2);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_uint16="unsigned short" +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3902 "configure" +#include "confdefs.h" +main(){exit(sizeof(unsigned int) != 2);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_uint16="unsigned int" +else + vi_cv_uint16=no +fi +fi +rm -fr conftest* +fi +fi +rm -fr conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_uint16" 1>&6 +if test "$vi_cv_uint16" = no; then + echo + echo "Fatal error: no unsigned, 16-bit integral type." + exit 1 +fi +if test "$vi_cv_uint16" != yes; then + u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" +fi + + +echo $ac_n "checking for int16_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_int16'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3938 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +int16_t foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_int16=yes +else + rm -rf conftest* + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3955 "configure" +#include "confdefs.h" +main(){exit(sizeof(short) != 2);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_int16="short" +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 3967 "configure" +#include "confdefs.h" +main(){exit(sizeof(int) != 2);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_int16="int" +else + vi_cv_int16=no +fi +fi +rm -fr conftest* +fi +fi +rm -fr conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_int16" 1>&6 +if test "$vi_cv_int16" = no; then + echo + echo "Fatal error: no signed, 16-bit integral type." + exit 1 +fi +if test "$vi_cv_int16" != yes; then + int16_decl="typedef $vi_cv_int16 int16_t;" +fi + + +echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_uint32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4003 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +u_int32_t foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_uint32=yes +else + rm -rf conftest* + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 4020 "configure" +#include "confdefs.h" +main(){exit(sizeof(unsigned int) != 4);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_uint32="unsigned int" +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 4032 "configure" +#include "confdefs.h" +main(){exit(sizeof(unsigned long) != 4);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_uint32="unsigned long" +else + vi_cv_uint32=no +fi +fi +rm -fr conftest* +fi +fi +rm -fr conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_uint32" 1>&6 +if test "$vi_cv_uint32" = no; then + echo + echo "Fatal error: no unsigned, 32-bit integral type." + exit 1 +fi +if test "$vi_cv_uint32" != yes; then + u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" +fi + + +echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'vi_cv_int32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4068 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { return 0; } +int t() { +int32_t foo; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + vi_cv_int32=yes +else + rm -rf conftest* + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 4085 "configure" +#include "confdefs.h" +main(){exit(sizeof(int) != 4);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_int32="int" +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else +cat > conftest.$ac_ext <<EOF +#line 4097 "configure" +#include "confdefs.h" +main(){exit(sizeof(long) != 4);} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + vi_cv_int32="long" +else + vi_cv_int32=no +fi +fi +rm -fr conftest* +fi +fi +rm -fr conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$vi_cv_int32" 1>&6 +if test "$vi_cv_int32" = no; then + echo + echo "Fatal error: no signed, 32-bit integral type." + exit 1 +fi +if test "$vi_cv_int32" != yes; then + int32_decl="typedef $vi_cv_int32 int32_t;" +fi + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.7" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile port.h:port.h.in + pathnames.h:pathnames.h.in recover:recover.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@CC@%$CC%g +s%@OPTFLAG@%$OPTFLAG%g +s%@no_op_OPTFLAG@%$no_op_OPTFLAG%g +s%@vi_cv_path_shell@%$vi_cv_path_shell%g +s%@vi_cv_path_sendmail@%$vi_cv_path_sendmail%g +s%@vi_cv_path_perl@%$vi_cv_path_perl%g +s%@vi_cv_path_preserve@%$vi_cv_path_preserve%g +s%@vi_cv_path_chmod@%$vi_cv_path_chmod%g +s%@vi_cv_path_cp@%$vi_cv_path_cp%g +s%@vi_cv_path_ln@%$vi_cv_path_ln%g +s%@vi_cv_path_mkdir@%$vi_cv_path_mkdir%g +s%@vi_cv_path_rm@%$vi_cv_path_rm%g +s%@vi_cv_path_strip@%$vi_cv_path_strip%g +s%@CPP@%$CPP%g +s%@XINCS@%$XINCS%g +s%@shrpenv@%$shrpenv%g +s%@vi_cv_perllib@%$vi_cv_perllib%g +s%@tknvi@%$tknvi%g +s%@TKLIBS@%$TKLIBS%g +s%@cobjs@%$cobjs%g +s%@LIBOBJS@%$LIBOBJS%g +s%@u_char_decl@%$u_char_decl%g +s%@u_short_decl@%$u_short_decl%g +s%@u_int_decl@%$u_int_decl%g +s%@u_long_decl@%$u_long_decl%g +s%@u_int8_decl@%$u_int8_decl%g +s%@u_int16_decl@%$u_int16_decl%g +s%@int16_decl@%$int16_decl%g +s%@u_int32_decl@%$u_int32_decl%g +s%@int32_decl@%$int32_decl%g + +CEOF +EOF +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"Makefile port.h:port.h.in + pathnames.h:pathnames.h.in recover:recover.in"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +fi; done +rm -f conftest.subs + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + cp $ac_given_srcdir/$ac_file_in conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. +# Maximum number of lines to put in a single here document. +ac_max_here_lines=12 + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + + + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/contrib/nvi/build/configure.in b/contrib/nvi/build/configure.in new file mode 100644 index 0000000..cb8e463 --- /dev/null +++ b/contrib/nvi/build/configure.in @@ -0,0 +1,725 @@ +dnl @(#)configure.in 8.134 (Berkeley) 10/15/96 + +dnl Process this file with autoconf to produce a configure script. +AC_INIT(../common/main.c) +AC_CONFIG_HEADER(config.h) + +dnl Configure setup. +AC_PROG_INSTALL() +AC_CANONICAL_HOST +AC_ARG_PROGRAM() + +dnl If the user wants a debugging environment, set OPTFLAG now. (Some +dnl compilers won't mix optimizing and debug flags.) +AC_MSG_CHECKING(if --enable-debug option specified) +AC_ARG_ENABLE(debug, + [ --enable-debug Build a debugging version.], + [vi_cv_debug="yes"], [vi_cv_debug="no"]) +if test "$vi_cv_debug" = yes; then + AC_DEFINE(DEBUG) + OPTFLAG=${OPTFLAG-"-g"} + no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} +fi +AC_MSG_RESULT($vi_cv_debug) + +dnl This is where we handle stuff that autoconf can't handle. +dnl XXX +dnl Don't override anything if it's already set from the environment. + +dnl Compiler, preprocessor and load flags. +dnl AUX: -ZP disables _BSD_SOURCE et al, but enables POSIX at link time. +dnl LynxOS: We check for gcc 2.x or better, the gcc 1 that was shipped with +dnl LynxOS historically wasn't good enough. +AC_SUBST(CPPFLAGS) +case "$host_os" in +aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; +aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} + OPTFLAG=${OPTFLAG-"-O3"};; +aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} + LDFLAGS=${LDFLAGS-"-ZP"} + OPTFLAG=${OPTFLAG-"-O"};; +bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; +bsdi*) CC=${CC-"shlicc"} + OPTFLAG=${OPTFLAG-"-O2"};; +irix6*) OPTFLAG=${OPTFLAG-"-O2"};; +irix*) OPTFLAG=${OPTFLAG-"-O2"};; +lynxos*) AC_PROG_CC() + AC_MSG_CHECKING([for GNU C (gcc) version 2.x]) + ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ + grep "gcc version " | sed 's/.*version //'` + ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` + if test "$ac_cv_gcc_major" = "2" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + echo "Fatal error: Nvi requires gcc 2.x to build on LynxOS." + echo "See build/README.LynxOS for more information." + exit 1 + fi;; +nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} + LDFLAGS=${LDFLAGS-"-posix"} + OPTFLAG=${OPTFLAG-"-O9"};; +osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; +solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; +sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; +esac + +dnl The default compiler is cc. +AC_SUBST(CC) +CC=${CC-cc} + +dnl The default OPTFLAG is -O +AC_SUBST(OPTFLAG) +OPTFLAG=${OPTFLAG-"-O"} + +dnl The SunOS/Solaris compiler can't optimize vi/v_txt.c; the symptom is +dnl that the command 35i==<esc> turns into an infinite loop. +AC_SUBST(no_op_OPTFLAG) +no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} + +dnl Libraries. +case "$host_os" in +bsdi2.1) LIBS=${LIBS-"-lipc"};; +dgux*) LIBS=${LIBS-"-ldgc"};; +irix6*) LIBS=${LIBS-"-lbsd"};; +irix*) LIBS=${LIBS-"-lc_s -lbsd"};; +isc*) LIBS=${LIBS-"-lcposix -linet"};; +netbsd1*) LIBS=${LIBS-"-lcrypt"};; +ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; +sco3.2*) LIBS=${LIBS-"-lsocket"};; +sinix*) LIBS=${LIBS-"-lelf -lc"};; +solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"} + RLIBS=yes;; +wgs*) LIBS=${LIBS-"-lnsl"};; +esac + +dnl A/UX has a broken getopt(3), strpbrk(3). +case "$host_os" in +aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; +esac + +dnl Ultrix has a broken POSIX.1 VDISABLE value. +case "$host_os" in +ultrix*) AC_DEFINE(HAVE_BROKEN_VDISABLE);; +esac + +dnl The user may have additional CPP information. +CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" + +dnl The user may have additional load line information. +LDFLAGS="$ADDLDFLAGS $LDFLAGS" + +dnl The user may have additional library information. +LIBS="$ADDLIBS $LIBS" + +dnl Check to see if it's going to work. +AM_SANITY_CHECK_CC + +dnl Checks for programs. +PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib:" + +dnl Check for the shell path. +AC_PATH_PROG(vi_cv_path_shell, sh, no) +if test "$vi_cv_path_shell" = no; then + echo "Fatal error: the shell utility not found." + exit 1 +fi + +dnl Check for the sendmail path. +AC_PATH_PROG(vi_cv_path_sendmail, sendmail, no) +if test "$vi_cv_path_sendmail" = no; then + echo "WARNING: The sendmail utility was not found!" + echo "WARNING: Users will not be told of saved files." +fi + +dnl Check for the perl5/perl path. +AC_SUBST(vi_cv_path_perl) +AC_PATH_PROGS(vi_cv_path_perl, perl5 perl, no) + +dnl Check for the "preserve" path. +dnl Historically, nvi has used /var/tmp/vi.recover. The Linux filesystem +dnl standard (FSSTND) uses /var/preserve; we add the vi.recover directory +dnl beneath it so that we don't have name collisions with other editors. +dnl Other systems have /var/preserve as well, so we test first for an already +dnl existing name, and then use the first one that's writeable. +AC_SUBST(vi_cv_path_preserve) +AC_MSG_CHECKING(for preserve directory) +AC_CACHE_VAL(vi_cv_path_preserve, [dnl + dirlist="/var/preserve /var/tmp /usr/tmp" + vi_cv_path_preserve=no + for i in $dirlist; do + if test -d $i/vi.recover; then + vi_cv_path_preserve=$i/vi.recover + break; + fi + done + if test "$vi_cv_path_preserve" = no; then + for i in $dirlist; do + if test -d $i -a -w $i; then + vi_cv_path_preserve=$i/vi.recover + break; + fi + done + + fi]) +if test "$vi_cv_path_preserve" = no; then + echo "Fatal error: no writeable preserve directory found." + exit 1 +fi +AC_MSG_RESULT($vi_cv_path_preserve) + +dnl Check for programs used for installation +AC_PATH_PROG(vi_cv_path_chmod, chmod, missing_chmod) +AC_PATH_PROG(vi_cv_path_cp, cp, missing_cp) +AC_PATH_PROG(vi_cv_path_ln, ln, missing_ln) +AC_PATH_PROG(vi_cv_path_mkdir, mkdir, missing_mkdir) +AC_PATH_PROG(vi_cv_path_rm, rm, missing_rm) +AC_PATH_PROG(vi_cv_path_strip, strip, missing_strip) + +dnl Checks for libraries. +dnl Find the X libraries and includes. +AC_PATH_X +AC_SUBST(XINCS) +if test "$no_x" != yes; then + if test "X$x_libraries" != "X"; then + if test "X$RLIBS" = "Xyes"; then + XLIBS="-R$x_libraries -L$x_libraries $XLIBS" + else + XLIBS="-L$x_libraries $XLIBS" + fi + fi + XLIBS="$XLIBS -lX11" + if test "X$x_includes" != "X"; then + XINCS="-I$x_includes" + fi +fi + +dnl If the user wants a Perl interpreter in nvi, load it. +AC_SUBST(shrpenv) +AC_SUBST(vi_cv_perllib) +AC_MSG_CHECKING(if --enable-perlinterp option specified) +AC_ARG_ENABLE(perlinterp, + [ --enable-perlinterp Include a Perl interpreter in vi.], + [vi_cv_perlinterp="yes"], [vi_cv_perlinterp="no"]) +AC_MSG_RESULT($vi_cv_perlinterp) +if test "$vi_cv_perlinterp" = "yes"; then + if test "$vi_cv_path_perl" = no; then + echo "Fatal error: no perl5 utility found." + exit 1 + fi + $vi_cv_path_perl -e 'require 5.002' || { + echo "Fatal error: perl5 must be version 5.002 or later." + exit 1 + } + $vi_cv_path_perl -e 'close(STDERR);require 5.003_01' && + AC_DEFINE(HAVE_PERL_5_003_01) + + eval `$vi_cv_path_perl -V:shrpenv` + if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 + shrpenv="" + fi + vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` + perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ + -e 'ccflags;perl_inc'` + if test "X$perlcppflags" != "X"; then + CPPFLAGS="$perlcppflags $CPPFLAGS" + fi + perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ + -e 'ldopts'` + if test "X$perllibs" != "X"; then + LIBS="$perllibs $LIBS" + fi + perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ + -e 'ccdlflags'` + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + LIBOBJS="perl.o perlsfio.o $LIBOBJS" + AC_DEFINE(HAVE_PERL_INTERP) +fi + +dnl If the user wants a Tk/Tcl front-end for nvi, build it. +AC_SUBST(tknvi) +AC_SUBST(TKLIBS) +AC_MSG_CHECKING(if --enable-tknvi option specified) +AC_ARG_ENABLE(tknvi, + [ --enable-tknvi Build a Tk/Tcl front-end for vi.], + [vi_cv_tknvi="yes"], [vi_cv_tknvi="no"]) +AC_MSG_RESULT($vi_cv_tknvi) +if test "$vi_cv_tknvi" = "yes"; then + tknvi=tknvi + TKLIBS="-ltk -ltcl -lm $XLIBS $LIBS" +fi + +dnl If the user wants a Tk/Tcl interpreter in nvi, load it. +AC_MSG_CHECKING(if --enable-tclinterp option specified) +AC_ARG_ENABLE(tclinterp, + [ --enable-tclinterp Include a Tk/Tcl interpreter in vi.], + [vi_cv_tclinterp="yes"], [vi_cv_tclinterp="no"]) +AC_MSG_RESULT($vi_cv_tclinterp) +if test "$vi_cv_tclinterp" = "yes"; then + LIBOBJS="tcl.o $LIBOBJS" + LIBS="-ltk -ltcl -lm $XLIBS $LIBS" + AC_DEFINE(HAVE_TCL_INTERP) +fi + +dnl Make sure that we can find a Tk/Tcl library. +if test "$vi_cv_tknvi" = "yes" || test "$vi_cv_tclinterp" = "yes"; then + AC_CHECK_LIB(tcl, main, + [vi_cv_tkfatal="no"], [vi_cv_tkfatal="yes"], -ltk -lm) + if test "$vi_cv_tkfatal" = "yes"; then + echo "Fatal error: no Tk/Tcl library; see the section" + echo "ADDING LIBRARIES AND INCLUDE FILES in the README file." + exit 1 + fi +fi + +dnl Both Tcl/Tk and Perl interpreters need the vi api code. +if test "$vi_cv_tclinterp" = yes || test "$vi_cv_perlinterp" = yes; then + LIBOBJS="api.o $LIBOBJS" +fi + +dnl Check for the termcap/termlib library. Compile in nvi's curses routines +dnl unless the user specifies otherwise. These two checks must occur in the +dnl current order, and -lcurses must be loaded before -ltermcap/-ltermlib. +AC_CHECK_LIB(termlib, tgetent, + [vi_cv_termlib=-ltermlib], [vi_cv_termlib=no]) +if test "$vi_cv_termlib" = no; then + AC_CHECK_LIB(termcap, tgetent, + [vi_cv_termlib=-ltermcap], [vi_cv_termlib=no]) +fi +if test "$vi_cv_termlib" != no; then + LIBS="$vi_cv_termlib $LIBS" +fi +AC_SUBST(cobjs) +AC_MSG_CHECKING(if --disable-curses option specified) +AC_ARG_ENABLE(curses, + [ --disable-curses DON'T use the nvi-provided curses routines.], + [vi_cv_curses="other curses"], [vi_cv_curses="bundled curses"]) +AC_MSG_RESULT($vi_cv_curses) +case "$vi_cv_curses" in +"bundled curses") + CPPFLAGS="-I\$(srcdir)/curses $CPPFLAGS" + cobjs="\$(COBJS)";; +"other curses") + LIBS="-lcurses $LIBS";; +esac + +dnl Checks for header files. +AC_MSG_CHECKING(for sys/mman.h) +AC_CACHE_VAL(vi_cv_include_sys_mman, [dnl +AC_TRY_CPP([#include <sys/mman.h>], + [vi_cv_include_sys_mman=yes], [vi_cv_include_sys_mman=no])]) +if test "$vi_cv_include_sys_mman" = yes; then + AC_DEFINE(HAVE_SYS_MMAN_H) +fi +AC_MSG_RESULT($vi_cv_include_sys_mman) + +AC_MSG_CHECKING(for sys/select.h) +AC_CACHE_VAL(vi_cv_include_sys_select, [dnl +AC_TRY_CPP([#include <sys/select.h>], + [vi_cv_include_sys_select=yes], [vi_cv_include_sys_select=no])]) +if test "$vi_cv_include_sys_select" = yes; then + AC_DEFINE(HAVE_SYS_SELECT_H) +fi +AC_MSG_RESULT($vi_cv_include_sys_select) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_TYPE(ssize_t, int) +AC_C_BIGENDIAN +AC_C_CONST +AC_STRUCT_ST_BLKSIZE +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_STRUCT_TM + +dnl Checks for library functions. + AC_CHECK_FUNCS(bsearch gethostname getopt memchr memcpy memmove memset) +AC_REPLACE_FUNCS(bsearch gethostname getopt memchr memcpy memmove memset) + AC_CHECK_FUNCS(mkstemp mmap snprintf strdup strerror strpbrk strtol) +AC_REPLACE_FUNCS(mkstemp mmap snprintf strdup strerror strpbrk strtol) + AC_CHECK_FUNCS(strtoul vsnprintf) +AC_REPLACE_FUNCS(strtoul vsnprintf) + +AC_CHECK_FUNCS(select) +AC_CHECK_FUNCS(setenv, [need_env=no], [need_env=yes]) +AC_CHECK_FUNCS(strsep, [need_strsep=no], [need_strsep=yes]) +AC_CHECK_FUNCS(unsetenv,, [need_env=yes]) + +AC_FUNC_MMAP +AC_FUNC_VFORK + +dnl If we needed setenv or unsetenv, add in the clib/env.c replacement file. +if test "$need_env" = yes; then + LIBOBJS="env.o $LIBOBJS" +fi + +dnl If we need strsep, add it and define it so we get a prototype. +if test "$need_strsep" = yes; then + LIBOBJS="strsep.o $LIBOBJS" +fi + +dnl Check for fcntl/flock +dnl Use flock preferentially, since it has cleaner semantics and won't +dnl hang up the editor. +dnl XXX +dnl Ultrix has a broken fcntl, but a working flock. +dnl IRIX and DGUX have a broken flock, but working fcntl. +AC_MSG_CHECKING(for fcntl/flock) +AC_CACHE_VAL(vi_cv_lock, [dnl + vi_cv_lock=none + case "$host_os" in + dgux*);; + irix*);; + *) + AC_TRY_LINK([#include <fcntl.h>], [flock(0, 0);], + [vi_cv_lock=flock]);; + esac + if test "$vi_cv_lock" = none; then + AC_TRY_LINK([#include <fcntl.h>], [fcntl(0, F_SETLK, 0);], + [vi_cv_lock=fcntl]) + fi]) + +if test "$vi_cv_lock" = flock; then + AC_DEFINE(HAVE_LOCK_FLOCK) +fi +if test "$vi_cv_lock" = fcntl; then + AC_DEFINE(HAVE_LOCK_FCNTL) +fi +AC_MSG_RESULT($vi_cv_lock) + +dnl Check for ftruncate/chsize +AC_MSG_CHECKING(for ftruncate/chsize) +AC_CACHE_VAL(vi_cv_ftruncate, [dnl +AC_TRY_LINK([#include <unistd.h>], [ftruncate(0, 0);], + [vi_cv_ftruncate=ftruncate], +AC_TRY_LINK([#include <unistd.h>], [chsize(0, 0);], + [vi_cv_ftruncate=chsize], [vi_cv_ftruncate=no]))]) +if test "$vi_cv_ftruncate" = ftruncate; then + AC_DEFINE(HAVE_FTRUNCATE_FTRUNCATE) +fi +if test "$vi_cv_ftruncate" = chsize; then + AC_DEFINE(HAVE_FTRUNCATE_CHSIZE) +fi +if test "$vi_cv_ftruncate" = no; then + echo + echo "Fatal error: no file truncation system call." + exit 1 +fi +AC_MSG_RESULT($vi_cv_ftruncate) + +dnl Check for the tigetstr/tigetnum functions. +AC_MSG_CHECKING(for tigetstr/tigetnum) +AC_CACHE_VAL(vi_cv_have_curses_tigetstr, [dnl +AC_TRY_LINK([#include <curses.h>], [tigetstr(0);], + [vi_cv_have_curses_tigetstr=yes], + [vi_cv_have_curses_tigetstr=no])]) +if test "$vi_cv_have_curses_tigetstr" = yes; then + AC_DEFINE(HAVE_CURSES_TIGETSTR) +fi +AC_MSG_RESULT($vi_cv_have_curses_tigetstr) + +dnl Check for potentially missing curses functions in system or user-specified +dnl libraries. We also have to guess at whether the specified library is a +dnl BSD or System V style curses. Use the newterm function, all System V +dnl curses implementations have it, none, as far as I know, of the BSD ones do. +if test "$vi_cv_curses" = "bundled curses"; then + AC_DEFINE(HAVE_BSD_CURSES) + AC_DEFINE(HAVE_CURSES_ADDNSTR) + AC_DEFINE(HAVE_CURSES_IDLOK) +else + dnl Check for the addnstr function. + AC_MSG_CHECKING(for addnstr) + AC_CACHE_VAL(vi_cv_have_curses_addnstr, [dnl + AC_TRY_LINK([#include <curses.h>], [addnstr(0, 0);], + [vi_cv_have_curses_addnstr=yes], + [vi_cv_have_curses_addnstr=no])]) + if test "$vi_cv_have_curses_addnstr" = yes; then + AC_DEFINE(HAVE_CURSES_ADDNSTR) + fi + AC_MSG_RESULT($vi_cv_have_curses_addnstr) + + dnl Check for the beep function. + AC_MSG_CHECKING(for beep) + AC_CACHE_VAL(vi_cv_have_curses_beep, [dnl + AC_TRY_LINK([#include <curses.h>], [beep();], + [vi_cv_have_curses_beep=yes], + [vi_cv_have_curses_beep=no])]) + if test "$vi_cv_have_curses_beep" = yes; then + AC_DEFINE(HAVE_CURSES_BEEP) + fi + AC_MSG_RESULT($vi_cv_have_curses_beep) + + dnl Check for the flash function. + AC_MSG_CHECKING(for flash) + AC_CACHE_VAL(vi_cv_have_curses_flash, [dnl + AC_TRY_LINK([#include <curses.h>], [flash();], + [vi_cv_have_curses_flash=yes], + [vi_cv_have_curses_flash=no])]) + if test "$vi_cv_have_curses_flash" = yes; then + AC_DEFINE(HAVE_CURSES_FLASH) + fi + AC_MSG_RESULT($vi_cv_have_curses_flash) + + dnl Check for the idlok function. + AC_MSG_CHECKING(for idlok) + AC_CACHE_VAL(vi_cv_have_curses_idlok, [dnl + AC_TRY_LINK([#include <curses.h>], [idlok(0, 0);], + [vi_cv_have_curses_idlok=yes], + [vi_cv_have_curses_idlok=no])]) + if test "$vi_cv_have_curses_idlok" = yes; then + AC_DEFINE(HAVE_CURSES_IDLOK) + fi + AC_MSG_RESULT($vi_cv_have_curses_idlok) + + dnl Check for the keypad function. + AC_MSG_CHECKING(for keypad) + AC_CACHE_VAL(vi_cv_have_curses_keypad, [dnl + AC_TRY_LINK([#include <curses.h>], [keypad(0, 0);], + [vi_cv_have_curses_keypad=yes], + [vi_cv_have_curses_keypad=no])]) + if test "$vi_cv_have_curses_keypad" = yes; then + AC_DEFINE(HAVE_CURSES_KEYPAD) + fi + AC_MSG_RESULT($vi_cv_have_curses_keypad) + + dnl Check for the newterm function. + AC_MSG_CHECKING(for newterm) + AC_CACHE_VAL(vi_cv_have_curses_newterm, [dnl + AC_TRY_LINK([#include <curses.h>], [newterm(0, 0, 0);], + [vi_cv_have_curses_newterm=yes], + [vi_cv_have_curses_newterm=no])]) + if test "$vi_cv_have_curses_newterm" = yes; then + AC_DEFINE(HAVE_CURSES_NEWTERM) + fi + AC_MSG_RESULT($vi_cv_have_curses_newterm) + + if test "$vi_cv_have_curses_newterm" = no; then + AC_DEFINE(HAVE_BSD_CURSES) + fi +fi + +dnl Check for the setupterm function. We make this check regardless of +dnl using the system library, because it may be part of the underlying +dnl termcap/termlib support, and we want to use the local one. +AC_MSG_CHECKING(for setupterm) +AC_CACHE_VAL(vi_cv_have_curses_setupterm, [dnl +AC_TRY_LINK([#include <curses.h>], [setupterm(0, 0, 0);], + [vi_cv_have_curses_setupterm=yes], + [vi_cv_have_curses_setupterm=no])]) +if test "$vi_cv_have_curses_setupterm" = yes; then + AC_DEFINE(HAVE_CURSES_SETUPTERM) +fi +AC_MSG_RESULT($vi_cv_have_curses_setupterm) + +dnl Some moron decided to drop off an argument from the gettimeofday call, +dnl without changing the name. +AC_MSG_CHECKING(for broken gettimeofday system call) +AC_CACHE_VAL(vi_cv_gettimeofday, [dnl +AC_TRY_LINK([#include <sys/types.h> +#include <sys/time.h>], [gettimeofday(0, 0);], + [vi_cv_gettimeofday=okay], [vi_cv_gettimeofday=broken])]) +if test "$vi_cv_gettimeofday" = broken; then + AC_DEFINE(HAVE_BROKEN_GETTIMEOFDAY) +fi +AC_MSG_RESULT($vi_cv_gettimeofday) + +dnl Check for which version of openpty to use, System V or Berkeley. +AC_MSG_CHECKING(for System V pty calls) +AC_CACHE_VAL(vi_cv_sys5_pty, [dnl +AC_TRY_LINK(, [grantpt(0);], + [vi_cv_sys5_pty=yes], [vi_cv_sys5_pty=no])]) +if test "$vi_cv_sys5_pty" = yes; then + AC_DEFINE(HAVE_SYS5_PTY) +fi +AC_MSG_RESULT($vi_cv_sys5_pty) + +dnl Check for the revoke system call. +AC_MSG_CHECKING(for revoke system call) +AC_CACHE_VAL(vi_cv_revoke, [dnl +AC_TRY_LINK(, [revoke("a");], + [vi_cv_revoke=yes], [vi_cv_revoke=no])]) +if test "$vi_cv_revoke" = yes; then + AC_DEFINE(HAVE_REVOKE) +fi +AC_MSG_RESULT($vi_cv_revoke) + +dnl Some versions of sprintf return a pointer to the first argument instead +dnl of a character count. We assume that the return value of snprintf and +dnl vsprintf etc. will be the same as sprintf, and check the easy one. +AC_MSG_CHECKING(for int type sprintf return value) +AC_CACHE_VAL(vi_cv_sprintf_count, [dnl +AC_TRY_RUN([main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}], + [vi_cv_sprintf_count=yes], [vi_cv_sprintf_count=no])]) +if test "$vi_cv_sprintf_count" = no; then + AC_DEFINE(SPRINTF_RET_CHARPNT) +fi +AC_MSG_RESULT($vi_cv_sprintf_count) + +dnl We compile in nvi's DB routines unless the user specifies otherwise. +AC_MSG_CHECKING(if --disable-db option specified) +AC_ARG_ENABLE(db, + [ --disable-db DON'T use the nvi-provided DB routines.], + [vi_cv_db_lib="other DB"], [vi_cv_db_lib="bundled DB"]) +AC_MSG_RESULT($vi_cv_db_lib) +case "$vi_cv_db_lib" in +"bundled DB") + CPPFLAGS="-I\$(srcdir)/db/include $CPPFLAGS" + LIBOBJS="\$(DBOBJS) $LIBOBJS";; +"other DB") + ;; +esac + +dnl We compile in nvi's RE routines unless the user specifies otherwise. +AC_MSG_CHECKING(if --disable-re option specified) +AC_ARG_ENABLE(re, + [ --disable-re DON'T use the nvi-provided RE routines.], + [vi_cv_re_lib="other RE"], [vi_cv_re_lib="bundled RE"]) +AC_MSG_RESULT($vi_cv_re_lib) +case "$vi_cv_re_lib" in +"bundled RE") + CPPFLAGS="-I\$(srcdir)/regex $CPPFLAGS" + LIBOBJS="\$(REOBJS) $LIBOBJS";; +"other RE") + ;; +esac + +dnl Check for the standard shorthand types. +AC_SUBST(u_char_decl) +AC_MSG_CHECKING(for u_char) +AC_CACHE_VAL(vi_cv_uchar, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_char foo;, + [vi_cv_uchar=yes], [vi_cv_uchar=no])]) +AC_MSG_RESULT($vi_cv_uchar) +if test "$vi_cv_uchar" = no; then + u_char_decl="typedef unsigned char u_char;" +fi + +AC_SUBST(u_short_decl) +AC_MSG_CHECKING(for u_short) +AC_CACHE_VAL(vi_cv_ushort, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_short foo;, + [vi_cv_ushort=yes], [vi_cv_ushort=no])]) +AC_MSG_RESULT($vi_cv_ushort) +if test "$vi_cv_ushort" = no; then + u_short_decl="typedef unsigned short u_short;" +fi + +AC_SUBST(u_int_decl) +AC_MSG_CHECKING(for u_int) +AC_CACHE_VAL(vi_cv_uint, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_int foo;, + [vi_cv_uint=yes], [vi_cv_uint=no])]) +AC_MSG_RESULT($vi_cv_uint) +if test "$vi_cv_uint" = no; then + u_int_decl="typedef unsigned int u_int;" +fi + +AC_SUBST(u_long_decl) +AC_MSG_CHECKING(for u_long) +AC_CACHE_VAL(vi_cv_ulong, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_long foo;, + [vi_cv_ulong=yes], [vi_cv_ulong=no])]) +AC_MSG_RESULT($vi_cv_ulong) +if test "$vi_cv_ulong" = no; then + u_long_decl="typedef unsigned long u_long;" +fi + +dnl DB/Vi use specific integer sizes. +AC_SUBST(u_int8_decl) +AC_MSG_CHECKING(for u_int8_t) +AC_CACHE_VAL(vi_cv_uint8, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_int8_t foo;, + [vi_cv_uint8=yes], +AC_TRY_RUN([main(){exit(sizeof(unsigned char) != 1);}], + [vi_cv_uint8="unsigned char"], [vi_cv_uint8=no]))]) +AC_MSG_RESULT($vi_cv_uint8) +if test "$vi_cv_uint8" = no; then + echo + echo "Fatal error: no unsigned, 8-bit integral type." + exit 1 +fi +if test "$vi_cv_uint8" != yes; then + u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" +fi + +AC_SUBST(u_int16_decl) +AC_MSG_CHECKING(for u_int16_t) +AC_CACHE_VAL(vi_cv_uint16, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_int16_t foo;, + [vi_cv_uint16=yes], +AC_TRY_RUN([main(){exit(sizeof(unsigned short) != 2);}], + [vi_cv_uint16="unsigned short"], +AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 2);}], + [vi_cv_uint16="unsigned int"], [vi_cv_uint16=no])))]) +AC_MSG_RESULT($vi_cv_uint16) +if test "$vi_cv_uint16" = no; then + echo + echo "Fatal error: no unsigned, 16-bit integral type." + exit 1 +fi +if test "$vi_cv_uint16" != yes; then + u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" +fi + +AC_SUBST(int16_decl) +AC_MSG_CHECKING(for int16_t) +AC_CACHE_VAL(vi_cv_int16, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], int16_t foo;, + [vi_cv_int16=yes], +AC_TRY_RUN([main(){exit(sizeof(short) != 2);}], + [vi_cv_int16="short"], +AC_TRY_RUN([main(){exit(sizeof(int) != 2);}], + [vi_cv_int16="int"], [vi_cv_int16=no])))]) +AC_MSG_RESULT($vi_cv_int16) +if test "$vi_cv_int16" = no; then + echo + echo "Fatal error: no signed, 16-bit integral type." + exit 1 +fi +if test "$vi_cv_int16" != yes; then + int16_decl="typedef $vi_cv_int16 int16_t;" +fi + +AC_SUBST(u_int32_decl) +AC_MSG_CHECKING(for u_int32_t) +AC_CACHE_VAL(vi_cv_uint32, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], u_int32_t foo;, + [vi_cv_uint32=yes], +AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 4);}], + [vi_cv_uint32="unsigned int"], +AC_TRY_RUN([main(){exit(sizeof(unsigned long) != 4);}], + [vi_cv_uint32="unsigned long"], [vi_cv_uint32=no])))]) +AC_MSG_RESULT($vi_cv_uint32) +if test "$vi_cv_uint32" = no; then + echo + echo "Fatal error: no unsigned, 32-bit integral type." + exit 1 +fi +if test "$vi_cv_uint32" != yes; then + u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" +fi + +AC_SUBST(int32_decl) +AC_MSG_CHECKING(for int32_t) +AC_CACHE_VAL(vi_cv_int32, [dnl +AC_TRY_COMPILE([#include <sys/types.h>], int32_t foo;, + [vi_cv_int32=yes], +AC_TRY_RUN([main(){exit(sizeof(int) != 4);}], + [vi_cv_int32="int"], +AC_TRY_RUN([main(){exit(sizeof(long) != 4);}], + [vi_cv_int32="long"], [vi_cv_int32=no])))]) +AC_MSG_RESULT($vi_cv_int32) +if test "$vi_cv_int32" = no; then + echo + echo "Fatal error: no signed, 32-bit integral type." + exit 1 +fi +if test "$vi_cv_int32" != yes; then + int32_decl="typedef $vi_cv_int32 int32_t;" +fi + +AC_OUTPUT(Makefile port.h:port.h.in + pathnames.h:pathnames.h.in recover:recover.in) diff --git a/contrib/nvi/build/distrib b/contrib/nvi/build/distrib new file mode 100644 index 0000000..45dbe52 --- /dev/null +++ b/contrib/nvi/build/distrib @@ -0,0 +1,84 @@ +#! /bin/sh +# @(#)distrib 8.11 (Berkeley) 10/23/96 + +# Clean +#make -f Makefile.in clean +#rm -f configure config.h.in + +# Build autoconf structure. +echo "Running autoheader" +autoheader 2>&1 | sed '/warning: AC_TRY_RUN called without default/d' +chmod 444 config.h.in +echo "Running autoconf" +autoconf 2>&1 | sed '/warning: AC_TRY_RUN called without default/d' +chmod 555 configure config.guess config.sub install-sh + +# Build include files. +f=../include/cl_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../cl/*.c > $f +chmod 444 $f + +f=../include/com_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../clib/*.c ../common/*.c > $f +chmod 444 $f + +f=../include/ex_def.h +echo "Building $f" +rm -f $f +awk -f ../ex/ex.awk ../ex/ex_cmd.c > $f +chmod 444 $f + +f=../include/ex_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../ex/*.c > $f +chmod 444 $f + +if [ -d ../ip ]; then + f=../include/ip_extern.h + echo "Building $f" + rm -f $f + sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../ip/*.c > $f + chmod 444 $f +fi + +f=../include/options_def.h +echo "Building $f" +rm -f $f +awk -f ../common/options.awk ../common/options.c > $f +chmod 444 $f + +f=../include/perl_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../perl_api/*.xs ../perl_api/*.c > $f +chmod 444 $f + +f=../include/tcl_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../tcl_api/*.c > $f +chmod 444 $f + +f=../include/tk_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../tk/*.c > $f +chmod 444 $f + +f=../include/vi_extern.h +echo "Building $f" +rm -f $f +sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../vi/*.c > $f +chmod 444 $f + +# Build tags files. +echo "Building tags files" +rm -f tags +ctags -w -d ../cl/*.[ch] ../common/*.[ch] ../ex/*.[ch] ../perl_api/*.[ch] \ + ../tcl_api/*.[ch] ../tk/*.[ch] ../vi/*.[ch] +chmod 444 tags diff --git a/contrib/nvi/build/install-sh b/contrib/nvi/build/install-sh new file mode 100755 index 0000000..ab74c88 --- /dev/null +++ b/contrib/nvi/build/install-sh @@ -0,0 +1,238 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/contrib/nvi/build/pathnames.h.in b/contrib/nvi/build/pathnames.h.in new file mode 100644 index 0000000..09cf974 --- /dev/null +++ b/contrib/nvi/build/pathnames.h.in @@ -0,0 +1,45 @@ +/* @(#)pathnames.h.in 8.4 (Berkeley) 6/26/96 */ + +#ifndef _PATH_BSHELL +#define _PATH_BSHELL "@vi_cv_path_shell@" +#endif + +#ifndef _PATH_EXRC +#define _PATH_EXRC ".exrc" +#endif + +#ifndef _PATH_MSGCAT +#define _PATH_MSGCAT "./" +#endif + +#ifndef _PATH_NEXRC +#define _PATH_NEXRC ".nexrc" +#endif + +#ifndef _PATH_PRESERVE +#define _PATH_PRESERVE "@vi_cv_path_preserve@" +#endif + +#ifndef _PATH_SYSV_PTY +#define _PATH_SYSV_PTY "/dev/ptmx" +#endif + +#ifndef _PATH_SENDMAIL +#define _PATH_SENDMAIL "@vi_cv_path_sendmail@" +#endif + +#ifndef _PATH_SYSEXRC +#define _PATH_SYSEXRC "/etc/vi.exrc" +#endif + +#ifndef _PATH_TAGS +#define _PATH_TAGS "tags" +#endif + +#ifndef _PATH_TMP +#define _PATH_TMP "/tmp" +#endif + +#ifndef _PATH_TTY +#define _PATH_TTY "/dev/tty" +#endif diff --git a/contrib/nvi/build/port.h.in b/contrib/nvi/build/port.h.in new file mode 100644 index 0000000..6696848 --- /dev/null +++ b/contrib/nvi/build/port.h.in @@ -0,0 +1,185 @@ +/* @(#)port.h.in 8.13 (Berkeley) 6/12/96 */ + +/* + * Declare the basic types, if they aren't already declared. Named and + * some system's db.h files protect them with __BIT_TYPES_DEFINED__. + */ +#ifndef __BIT_TYPES_DEFINED__ +#define __BIT_TYPES_DEFINED__ +@u_int8_decl@ +@int16_decl@ +@u_int16_decl@ +@int32_decl@ +@u_int32_decl@ +#endif + +@u_char_decl@ +@u_short_decl@ +@u_int_decl@ +@u_long_decl@ + +/* + * XXX + * Handle function prototypes. This steps on name space that vi doesn't + * control, but all of the other solutions are worse. + */ +#undef __P +#if defined(__STDC__) || defined(__cplusplus) +#define __P(protos) protos /* ANSI C prototypes */ +#else +#define __P(protos) () /* K&R C preprocessor */ +#endif + +/* + * XXX + * Some versions of System V changed the number of arguments to gettimeofday + * without changing the name. + */ +#ifdef HAVE_BROKEN_GETTIMEOFDAY +#define gettimeofday(tv, tz) gettimeofday(tv) +#endif + +/* + * XXX + * If we don't have mmap, we fake it with read and write, but we'll + * still need the header information. + */ +#ifndef HAVE_SYS_MMAN_H +#define MAP_SHARED 1 /* share changes */ +#define MAP_PRIVATE 2 /* changes are private */ +#define PROT_READ 0x1 /* pages can be read */ +#define PROT_WRITE 0x2 /* pages can be written */ +#define PROT_EXEC 0x4 /* pages can be executed */ +#endif + +/* + * XXX + * POSIX 1003.1 names for file descriptors. + */ +#ifndef STDERR_FILENO +#define STDIN_FILENO 0 /* ANSI C #defines */ +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif + +/* + * XXX + * POSIX 1003.1 names for seek settings. + */ +#ifndef SEEK_END +#define SEEK_SET 0 /* POSIX 1003.1 seek values */ +#define SEEK_CUR 1 +#define SEEK_END 2 +#endif + +/* + * Hack _POSIX_VDISABLE to \377 since Ultrix doesn't honor _POSIX_VDISABLE + * (treats it as ^@). The symptom is that the ^@ keystroke immediately + * drops core. + */ +#ifdef HAVE_BROKEN_VDISABLE +#undef _POSIX_VDISABLE +#define _POSIX_VDISABLE ((unsigned char)'\377') +#endif + +/* + * XXX + * POSIX 1003.1 tty disabling character. + */ +#ifndef _POSIX_VDISABLE +#define _POSIX_VDISABLE 0 /* Some systems used 0. */ +#endif + +/* + * XXX + * 4.4BSD extension to only set the software termios bits. + */ +#ifndef TCSASOFT /* 4.4BSD extension. */ +#define TCSASOFT 0 +#endif + +/* + * XXX + * POSIX 1003.1 maximum path length. + */ +#ifndef MAXPATHLEN +#ifdef PATH_MAX +#define MAXPATHLEN PATH_MAX +#else +#define MAXPATHLEN 1024 +#endif +#endif + +/* + * XXX + * MIN, MAX, historically in <sys/param.h> + */ +#ifndef MAX +#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a)) +#endif +#ifndef MIN +#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) +#endif + +/* + * XXX + * "DB" isn't always portable, and we want the private information. + */ +#define DB L__DB +#undef pgno_t /* IRIX has its own version. */ +#define pgno_t L__db_pgno_t + +/* + * XXX + * 4.4BSD extension to provide lock values in the open(2) call. + */ +#ifndef O_EXLOCK +#define O_EXLOCK 0 +#endif + +#ifndef O_SHLOCK +#define O_SHLOCK 0 +#endif + +/* + * XXX + * POSIX 1003.1 bad file format errno. + */ +#ifndef EFTYPE +#define EFTYPE EINVAL +#endif + +/* + * XXX + * POSIX 1003.2 RE length limit. + */ +#ifndef _POSIX2_RE_DUP_MAX +#define _POSIX2_RE_DUP_MAX 255 +#endif + +/* + * XXX + * 4.4BSD extension to determine if a program dropped core from the exit + * status. + */ +#ifndef WCOREDUMP +#define WCOREDUMP(a) 0 +#endif + +/* + * XXX + * Endian-ness of the machine. + */ +#if !defined(LITTLE_ENDIAN) +#define LITTLE_ENDIAN 1234 +#endif +#if !defined(BIG_ENDIAN) +#define BIG_ENDIAN 4321 +#endif +#if !defined(BYTE_ORDER) +#if WORDS_BIGENDIAN == 1 +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#endif diff --git a/contrib/nvi/build/recover.in b/contrib/nvi/build/recover.in new file mode 100644 index 0000000..cfaf75f --- /dev/null +++ b/contrib/nvi/build/recover.in @@ -0,0 +1,49 @@ +#!/bin/sh - +# +# @(#)recover.in 8.8 (Berkeley) 10/10/96 +# +# Script to recover nvi edit sessions. + +RECDIR="@vi_cv_path_preserve@" +SENDMAIL="@vi_cv_path_sendmail@" + +echo 'Recovering nvi editor sessions.' + +# Check editor backup files. +vibackup=`echo $RECDIR/vi.*` +if [ "$vibackup" != "$RECDIR/vi.*" ]; then + for i in $vibackup; do + # Only test files that are readable. + if test ! -r $i; then + continue + fi + + # Unmodified nvi editor backup files either have the + # execute bit set or are zero length. Delete them. + if test -x $i -o ! -s $i; then + rm $i + fi + done +fi + +# It is possible to get incomplete recovery files, if the editor crashes +# at the right time. +virecovery=`echo $RECDIR/recover.*` +if [ "$virecovery" != "$RECDIR/recover.*" ]; then + for i in $virecovery; do + # Only test files that are readable. + if test ! -r $i; then + continue + fi + + # Delete any recovery files that are zero length, corrupted, + # or that have no corresponding backup file. Else send mail + # to the user. + recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i` + if test -n "$recfile" -a -s "$recfile"; then + $SENDMAIL -t < $i + else + rm $i + fi + done +fi diff --git a/contrib/nvi/build/spell.ok b/contrib/nvi/build/spell.ok new file mode 100644 index 0000000..fc103f4 --- /dev/null +++ b/contrib/nvi/build/spell.ok @@ -0,0 +1,58 @@ +ADDCPPFLAGS +ADDLDFLAGS +ADDLIBS +CPPFLAGS +FreeBSD +LDFLAGS +LIBS +Lite +NVI +NVI'S +NetBSD +Nvi +POSIX +Perl +README +Tcl +Tk +asnvi +asvi +autoconf +bindir +cd +contrib +csh +datadir +datafiles +db +distclean +env +filesystem +foo +gcc +ksh +lcurses +ldb +lm +lperl +ltcl +ltermcap +ltermlib +ltk +mandir +mkdir +ncurses +nex +nvi +nview +perl +perlinterp +setenv +sh +tcl +tclinterp +tcsh +terminfo +tknvi +usr +vi |