head 1.2; access; symbols perseant-exfatfs-base-20250801:1.2 perseant-exfatfs-base-20240630:1.2 perseant-exfatfs:1.2.0.46 perseant-exfatfs-base:1.2 cjep_sun2x:1.2.0.44 cjep_sun2x-base:1.2 cjep_staticlib_x-base1:1.2 cjep_staticlib_x:1.2.0.42 cjep_staticlib_x-base:1.2 phil-wifi-20200421:1.2 phil-wifi-20200411:1.2 phil-wifi-20200406:1.2 pgoyette-compat-merge-20190127:1.2 pgoyette-compat-20190127:1.2 pgoyette-compat-20190118:1.2 pgoyette-compat-1226:1.2 pgoyette-compat-1126:1.2 pgoyette-compat-1020:1.2 pgoyette-compat-0930:1.2 pgoyette-compat-0906:1.2 pgoyette-compat-0728:1.2 pgoyette-compat-0625:1.2 pgoyette-compat-0521:1.2 pgoyette-compat-0502:1.2 pgoyette-compat-0422:1.2 pgoyette-compat-0415:1.2 pgoyette-compat-0407:1.2 pgoyette-compat-0330:1.2 pgoyette-compat-0322:1.2 pgoyette-compat-0315:1.2 pgoyette-compat:1.2.0.40 pgoyette-compat-base:1.2 perseant-stdc-iso10646:1.2.0.38 perseant-stdc-iso10646-base:1.2 prg-localcount2-base3:1.2 prg-localcount2-base2:1.2 prg-localcount2-base1:1.2 prg-localcount2:1.2.0.36 prg-localcount2-base:1.2 pgoyette-localcount-20170426:1.2 bouyer-socketcan-base1:1.2 pgoyette-localcount-20170320:1.2 bouyer-socketcan:1.2.0.34 bouyer-socketcan-base:1.2 pgoyette-localcount-20170107:1.2 pgoyette-localcount-20161104:1.2 localcount-20160914:1.2 pgoyette-localcount-20160806:1.2 pgoyette-localcount-20160726:1.2 pgoyette-localcount:1.2.0.32 pgoyette-localcount-base:1.2 netbsd-5-2-3-RELEASE:1.2 netbsd-5-1-5-RELEASE:1.2 yamt-pagecache-base9:1.2 yamt-pagecache-tag8:1.2 tls-earlyentropy:1.2.0.28 tls-earlyentropy-base:1.2 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2 riastradh-drm2-base3:1.2 netbsd-5-2-2-RELEASE:1.2 netbsd-5-1-4-RELEASE:1.2 netbsd-5-2-1-RELEASE:1.2 netbsd-5-1-3-RELEASE:1.2 agc-symver:1.2.0.30 agc-symver-base:1.2 tls-maxphys-base:1.2 yamt-pagecache-base8:1.2 netbsd-5-2:1.2.0.26 yamt-pagecache-base7:1.2 netbsd-5-2-RELEASE:1.2 netbsd-5-2-RC1:1.2 yamt-pagecache-base6:1.2 yamt-pagecache-base5:1.2 yamt-pagecache-base4:1.2 netbsd-5-1-2-RELEASE:1.2 netbsd-5-1-1-RELEASE:1.2 yamt-pagecache-base3:1.2 yamt-pagecache-base2:1.2 yamt-pagecache:1.2.0.24 yamt-pagecache-base:1.2 bouyer-quota2-nbase:1.2 bouyer-quota2:1.2.0.22 bouyer-quota2-base:1.2 matt-nb5-pq3:1.2.0.20 matt-nb5-pq3-base:1.2 netbsd-5-1:1.2.0.18 netbsd-5-1-RELEASE:1.2 netbsd-5-1-RC4:1.2 netbsd-5-1-RC3:1.2 netbsd-5-1-RC2:1.2 netbsd-5-1-RC1:1.2 netbsd-5-0-2-RELEASE:1.2 netbsd-5-0-1-RELEASE:1.2 jym-xensuspend-nbase:1.2 netbsd-5-0:1.2.0.16 netbsd-5-0-RELEASE:1.2 netbsd-5-0-RC4:1.2 netbsd-5-0-RC3:1.2 netbsd-5-0-RC2:1.2 jym-xensuspend:1.2.0.14 jym-xensuspend-base:1.2 netbsd-5-0-RC1:1.2 netbsd-5:1.2.0.12 netbsd-5-base:1.2 mjf-devfs2:1.2.0.10 mjf-devfs2-base:1.2 yamt-pf42-base4:1.2 yamt-pf42-base3:1.2 hpcarm-cleanup-nbase:1.2 yamt-pf42-base2:1.2 yamt-pf42:1.2.0.8 yamt-pf42-base:1.2 keiichi-mipv6-nbase:1.2 keiichi-mipv6:1.2.0.6 keiichi-mipv6-base:1.2 cube-autoconf:1.2.0.4 cube-autoconf-base:1.2 hpcarm-cleanup:1.2.0.2 hpcarm-cleanup-base:1.2 nvi_1_79:1.1.1.2 nvi_1_66:1.1.1.1 BOSTIC:1.1.1; locks; strict; comment @# @; 1.2 date 96.05.20.09.03.15; author mrg; state dead; branches; next 1.1; 1.1 date 96.05.20.02.06.18; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.05.20.02.06.18; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2001.03.31.11.30.05; author aymeric; state Exp; branches; next ; desc @@ 1.2 log @these files are either deleted (in nvi) or not necessary @ text @dnl @@(#)configure.in 8.106 (Berkeley) 5/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_C_CROSS() AC_PROG_CPP() 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(for debugging) AC_CACHE_VAL(vi_cv_debug, [dnl 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 Compilers, compiler flags and libraries per architecture. This is where dnl we handle stuff that autoconf can't handle. dnl XXX dnl Don't override anything if it's already set from the environment. dnl XXX dnl A/UX has broken getopt(3), strpbrk(3). dnl -ZP disables _BSD_SOURCE et al, but enables POSIX at link time. AC_SUBST(CPPFLAGS) case "$host_os" in aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; aix4.1*) OPTFLAG=${OPTFLAG-"-O3"} CFLAGS=${CFLAGS-"-qstrict"};; aux*) OPTFLAG=${OPTFLAG-"-O"} CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} LDFLAGS=${LDFLAGS-"-ZP"} LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; bsdi2.1) CC=${CC-"shlicc"} LIBS=${LIBS-"-lipc"} OPTFLAG=${OPTFLAG-"-O2"};; bsdi*) OPTFLAG=${OPTFLAG-"-O2"};; dgux*) LIBS=${LIBS-"-ldgc"};; irix6*) OPTFLAG=${OPTFLAG-"-O2"} LIBS=${LIBS-"-lbsd"};; irix*) OPTFLAG=${OPTFLAG-"-O2"} LIBS=${LIBS-"-lc_s -lbsd"};; isc*) LIBS=${LIBS-"-lcposix -linet"};; netbsd1*) LIBS=${LIBS-"-lcrypt"};; nextstep3) OPTFLAG=${OPTFLAG-"-O9"} CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} LDFLAGS=${LDFLAGS-"-posix"};; osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; sco3.2*) LIBS=${LIBS-"-lsocket"};; sinix*) LIBS=${LIBS-"-lelf -lc"};; solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""} LIBS=${LIBS-"-lsocket -lnsl -ldl"} RLIBS=yes;; sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; ultrix*) AC_DEFINE(HAVE_BROKEN_VDISABLE);; wgs*) LIBS=${LIBS-"-lnsl"};; 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 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 The SunOS/Solaris compiler can't optimize vi/v_txt.c; the symptom is dnl that the command 35i== turns into an infinite loop. AC_SUBST(no_op_OPTFLAG) no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} 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." exit 1 fi dnl Check for the perl5/perl path. AC_PATH_PROGS(vi_cv_path_perl, perl5 perl, no) dnl Check for the "preserve" path. AC_SUBST(vi_cv_path_preserve) AC_MSG_CHECKING(for preserve directory) AC_CACHE_VAL(vi_cv_path_preserve, [dnl if test -d /var/tmp; then vi_cv_path_preserve=/var/tmp else if test -d /usr/tmp; then vi_cv_path_preserve=/usr/tmp else vi_cv_path_preserve=no fi fi]) if test "$vi_cv_path_preserve" = no; then echo "Fatal error: no 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_MSG_CHECKING(for Perl interpreter) AC_CACHE_VAL(vi_cv_perlinterp, [dnl 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.002_01' && AC_DEFINE(HAVE_PERL_5_002_01) perlcppflags=`$vi_cv_path_perl -e 'use Config;print $Config{ccflags}'` if test "X$perlcppflags" != "X"; then CPPFLAGS="$perlcppflags $CPPFLAGS" fi perlarchlib=`$vi_cv_path_perl -e \ 'use Config;print $Config{installarchlib}."/CORE"'` if test "X$perlarchlib" != "X"; then CPPFLAGS="-I$perlarchlib $CPPFLAGS" fi perllib=`$vi_cv_path_perl -e \ 'use Config;print (($Config{d_shrplib} eq "define") ? \ $Config{shrpdir} : ($Config{installarchlib}."/CORE"))'` if test "X$perllib" != "X"; then if test "X$RLIBS" = "Xyes"; then LIBS="$LIBS -R$perllib -L$perllib" else LIBS="$LIBS -L$perllib" fi else echo "Fatal error: no perl5 library; see the section" echo "ADDING LIBRARIES AND INCLUDE FILES in the README file." exit 1 fi LIBOBJS="perl.o $LIBOBJS" LIBS="$LIBS -lperl" perllibs=`$vi_cv_path_perl -e \ 'use Config;print "$Config{libs} " . "$Config{installarchlib}/auto/DynaLoader/DynaLoader$Config{lib_ext}"'` LIBS="$LIBS $perllibs" 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(for Tk/Tcl front-end) AC_CACHE_VAL(vi_cv_tknvi, [dnl 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="$LIBS -ltk -ltcl -lm $XLIBS" fi dnl If the user wants a Tk/Tcl interpreter in nvi, load it. AC_MSG_CHECKING(for Tk/Tcl interpreter) AC_CACHE_VAL(vi_cv_tclinterp, [dnl 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="$LIBS -ltk -ltcl -lm $XLIBS" AC_DEFINE(HAVE_TCL_INTERP) fi dnl Make sure that we found a Tk/Tcl library. if test "$vi_cv_tknvi" = "yes" || test "$vi_cv_tclinterp" = "yes"; then if test "$vi_cv_tclinterp" != yes; then SAVE_LIBS="$LIBS" LIBS=$TKLIBS fi AC_TRY_LINK([#include ], [Tcl_Eval(0, 0);], [vi_cv_tkfatal="no"], [vi_cv_tkfatal="yes"]) 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 if test "$vi_cv_tclinterp" != yes; then LIBS="$SAVE_LIBS" 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(for curses library) AC_CACHE_VAL(vi_cv_curses, [dnl 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 ], [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 ], [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_REPLACE_FUNCS(bsearch) AC_REPLACE_FUNCS(gethostname) AC_REPLACE_FUNCS(getopt) AC_REPLACE_FUNCS(memchr) AC_REPLACE_FUNCS(memmove) AC_REPLACE_FUNCS(memset) AC_REPLACE_FUNCS(mkstemp) AC_FUNC_MMAP AC_REPLACE_FUNCS(mmap) AC_REPLACE_FUNCS(realloc) AC_CHECK_FUNCS(select) AC_CHECK_FUNCS(setenv, [need_env=no], [need_env=yes]) AC_REPLACE_FUNCS(snprintf) AC_REPLACE_FUNCS(strdup) AC_REPLACE_FUNCS(strerror) AC_REPLACE_FUNCS(strpbrk) AC_CHECK_FUNCS(strsep, [need_strsep=no], [need_strsep=yes]) AC_REPLACE_FUNCS(strtol) AC_REPLACE_FUNCS(strtoul) AC_CHECK_FUNCS(unsetenv,, [need_env=yes]) AC_FUNC_VFORK AC_FUNC_VPRINTF 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 ], [flock(0, 0);], [vi_cv_lock=flock]);; esac if test "$vi_cv_lock" = none; then AC_TRY_LINK([#include ], [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 ], [ftruncate(0, 0);], [vi_cv_ftruncate=ftruncate], AC_TRY_LINK([#include ], [chsize(0, 0);], [vi_cv_ftruncate=chsize]), [vi_cv_ftruncate=none])]) 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 ], [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 ], [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 ], [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 ], [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 ], [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 ], [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 ], [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 ], [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 #include ], [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 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(for Berkeley DB package) AC_CACHE_VAL(vi_cv_db_lib, [dnl 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(for POSIX 1003.2 RE routines) AC_CACHE_VAL(vi_cv_re_lib, [dnl 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 DB/Vi uses 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 ], 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 ], 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 ], 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 ], 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 ], 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) @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @import of nvi 1.66 @ text @@ 1.1.1.2 log @import of nvi 1.79 @ text @d1 1 a1 1 dnl @@(#)configure.in 8.134 (Berkeley) 10/15/96 d8 2 d16 2 a17 1 AC_MSG_CHECKING(if --enable-debug option specified) d20 1 a20 1 [vi_cv_debug="yes"], [vi_cv_debug="no"]) d28 2 a29 1 dnl This is where we handle stuff that autoconf can't handle. d32 3 a34 5 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. d38 4 a41 3 aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} OPTFLAG=${OPTFLAG-"-O3"};; aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} d43 1 a43 1 OPTFLAG=${OPTFLAG-"-O"};; d45 2 a46 1 bsdi*) CC=${CC-"shlicc"} d48 11 a58 18 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"};; d60 6 a65 1 solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; d67 2 a78 31 dnl The SunOS/Solaris compiler can't optimize vi/v_txt.c; the symptom is dnl that the command 35i== 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 d88 4 a91 2 dnl Check to see if it's going to work. AM_SANITY_CHECK_CC d108 1 a111 1 AC_SUBST(vi_cv_path_perl) a114 5 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. d118 8 a125 16 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 d128 1 a128 1 echo "Fatal error: no writeable preserve directory found." d160 2 a161 3 AC_SUBST(shrpenv) AC_SUBST(vi_cv_perllib) AC_MSG_CHECKING(if --enable-perlinterp option specified) d164 1 a164 1 [vi_cv_perlinterp="yes"], [vi_cv_perlinterp="no"]) d175 2 a176 2 $vi_cv_path_perl -e 'close(STDERR);require 5.003_01' && AC_DEFINE(HAVE_PERL_5_003_01) d178 1 a178 7 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'` d182 18 a199 9 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" d201 5 a205 1 LIBOBJS="perl.o perlsfio.o $LIBOBJS" d212 2 a213 1 AC_MSG_CHECKING(if --enable-tknvi option specified) d216 1 a216 1 [vi_cv_tknvi="yes"], [vi_cv_tknvi="no"]) d220 1 a220 1 TKLIBS="-ltk -ltcl -lm $XLIBS $LIBS" d224 2 a225 1 AC_MSG_CHECKING(if --enable-tclinterp option specified) d228 1 a228 1 [vi_cv_tclinterp="yes"], [vi_cv_tclinterp="no"]) d232 1 a232 1 LIBS="-ltk -ltcl -lm $XLIBS $LIBS" d236 1 a236 1 dnl Make sure that we can find a Tk/Tcl library. d238 6 a243 2 AC_CHECK_LIB(tcl, main, [vi_cv_tkfatal="no"], [vi_cv_tkfatal="yes"], -ltk -lm) d249 3 d272 2 a273 1 AC_MSG_CHECKING(if --disable-curses option specified) d276 1 a276 1 [vi_cv_curses="other curses"], [vi_cv_curses="bundled curses"]) d317 10 a326 7 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) d329 4 d334 2 a336 2 AC_FUNC_MMAP d338 1 d385 1 a385 1 [vi_cv_ftruncate=chsize], [vi_cv_ftruncate=no]))]) d538 1 a538 1 AC_MSG_CHECKING(for int type sprintf return value) d548 2 a549 1 AC_MSG_CHECKING(if --disable-db option specified) d552 1 a552 1 [vi_cv_db_lib="other DB"], [vi_cv_db_lib="bundled DB"]) d563 2 a564 1 AC_MSG_CHECKING(if --disable-re option specified) d567 1 a567 1 [vi_cv_re_lib="other RE"], [vi_cv_re_lib="bundled RE"]) d577 1 a577 42 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 ], 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 ], 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 ], 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 ], 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. d671 1 a671 2 AC_OUTPUT(Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in) @