"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "less-424/configure.ac" of archive less-424.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 # Process this file with autoconf to produce a configure script.
    2 
    3 # Copyright (C) 1984-2008  Mark Nudelman
    4 #
    5 # You may distribute under the terms of either the GNU General Public
    6 # License or the Less License, as specified in the README file.
    7 #
    8 # For more information about less, or for information on how to 
    9 # contact the author, see the README file.
   10 
   11 # Autoconf initialization.
   12 AC_INIT(less, 1)
   13 AC_CONFIG_SRCDIR([forwback.c])
   14 AC_CONFIG_HEADER([defines.h])
   15 
   16 # Checks for programs.
   17 AC_PROG_CC
   18 AC_ISC_POSIX
   19 AC_PROG_GCC_TRADITIONAL
   20 AC_PROG_INSTALL
   21 
   22 # Checks for compilation model.
   23 AC_SYS_LARGEFILE
   24 
   25 # Checks for general libraries.
   26 AC_CHECK_LIB(tinfo, tgoto, [have_tinfo=yes], [have_tinfo=no])
   27 AC_CHECK_LIB(xcurses, initscr, [have_xcurses=yes], [have_xcurses=no])
   28 AC_CHECK_LIB(ncursesw, initscr, [have_ncursesw=yes], [have_ncursesw=no])
   29 AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
   30 AC_CHECK_LIB(curses, initscr, [have_curses=yes], [have_curses=no])
   31 AC_CHECK_LIB(termcap, tgetent, [have_termcap=yes], [have_termcap=no])
   32 AC_CHECK_LIB(termlib, tgetent, [have_termlib=yes], [have_termlib=no])
   33 # Regular expressions (regcmp) are in -lgen on Solaris 2,
   34 # and in -lintl on SCO Unix.
   35 AC_CHECK_LIB(gen, regcmp)
   36 AC_CHECK_LIB(intl, regcmp)
   37 AC_CHECK_LIB(PW, regcmp)
   38 
   39 # Checks for terminal libraries
   40 AC_MSG_CHECKING([for working terminal libraries])
   41 TERMLIBS=
   42 
   43 # Check for systems where curses is broken.
   44 curses_broken=0
   45 if test x`uname -s` = "xHP-UX" >/dev/null 2>&1; then
   46 if test x`uname -r` = "xB.11.00" >/dev/null 2>&1; then
   47    curses_broken=1
   48 fi
   49 if test x`uname -r` = "xB.11.11" >/dev/null 2>&1; then
   50    curses_broken=1
   51 fi
   52 fi
   53 
   54 if test $curses_broken = 0; then
   55 
   56 # -- Try tinfo.
   57 if test "x$TERMLIBS" = x; then
   58   if test $have_tinfo = yes; then
   59     TERMLIBS="-ltinfo"
   60     SAVE_LIBS=$LIBS
   61     LIBS="$LIBS $TERMLIBS"
   62     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
   63       [termok=yes], [termok=no])
   64     LIBS=$SAVE_LIBS
   65     if test $termok = no; then TERMLIBS=""; fi
   66   fi
   67 fi
   68 
   69 # -- Try xcurses.
   70 if test "x$TERMLIBS" = x; then
   71   if test $have_xcurses = yes; then
   72     TERMLIBS="-lxcurses"
   73     SAVE_LIBS=$LIBS
   74     LIBS="$LIBS $TERMLIBS"
   75     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
   76       [termok=yes], [termok=no])
   77     LIBS=$SAVE_LIBS
   78     if test $termok = no; then TERMLIBS=""; fi
   79   fi
   80 fi
   81 
   82 # -- Try ncursesw.
   83 if test "x$TERMLIBS" = x; then
   84   if test $have_ncursesw = yes; then
   85     TERMLIBS="-lncursesw"
   86     SAVE_LIBS=$LIBS
   87     LIBS="$LIBS $TERMLIBS"
   88     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
   89       [termok=yes], [termok=no])
   90     LIBS=$SAVE_LIBS
   91     if test $termok = no; then TERMLIBS=""; fi
   92   fi
   93 fi
   94 
   95 # -- Try ncurses.
   96 if test "x$TERMLIBS" = x; then
   97   if test $have_ncurses = yes; then
   98     TERMLIBS="-lncurses"
   99     SAVE_LIBS=$LIBS
  100     LIBS="$LIBS $TERMLIBS"
  101     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
  102       [termok=yes], [termok=no])
  103     LIBS=$SAVE_LIBS
  104     if test $termok = no; then TERMLIBS=""; fi
  105   fi
  106 fi
  107 
  108 # -- Try curses.
  109 if test "x$TERMLIBS" = x; then
  110   if test $have_curses = yes; then
  111     TERMLIBS="-lcurses"
  112     SAVE_LIBS=$LIBS
  113     LIBS="$LIBS $TERMLIBS"
  114     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
  115       [termok=yes], [termok=no])
  116     LIBS=$SAVE_LIBS
  117     if test $termok = no; then TERMLIBS=""; fi
  118   fi
  119 fi
  120 
  121 # -- Try curses & termcap.
  122 if test "x$TERMLIBS" = x; then
  123   if test $have_curses = yes; then
  124   if test $have_termcap = yes; then
  125     TERMLIBS="-lcurses -ltermcap"
  126     SAVE_LIBS=$LIBS
  127     LIBS="$LIBS $TERMLIBS"
  128     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
  129       [termok=yes], [termok=no])
  130     LIBS=$SAVE_LIBS
  131     if test $termok = no; then TERMLIBS=""; fi
  132   fi
  133   fi
  134 fi
  135 fi
  136 
  137 # -- Try termcap.
  138 if test "x$TERMLIBS" = x; then
  139   if test $have_termcap = yes; then
  140     TERMLIBS="-ltermcap"
  141     SAVE_LIBS=$LIBS
  142     LIBS="$LIBS $TERMLIBS"
  143     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
  144       [termok=yes], [termok=no])
  145     LIBS=$SAVE_LIBS
  146     if test $termok = no; then TERMLIBS=""; fi
  147   fi
  148 fi
  149 
  150 # -- Try termlib.
  151 if test "x$TERMLIBS" = x; then
  152   if test $have_termlib = yes; then
  153     TERMLIBS="-lcurses -ltermlib"
  154     SAVE_LIBS=$LIBS
  155     LIBS="$LIBS $TERMLIBS"
  156     AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
  157       [termok=yes], [termok=no])
  158     LIBS=$SAVE_LIBS
  159     if test $termok = no; then TERMLIBS=""; fi
  160   fi
  161 fi
  162 
  163 if test "x$TERMLIBS" = x; then
  164   AC_MSG_RESULT(Cannot find terminal libraries - configure failed)
  165   exit 1
  166 fi
  167 AC_MSG_RESULT(using $TERMLIBS)
  168 LIBS="$LIBS $TERMLIBS"
  169 
  170 # Checks for header files.
  171 AC_HEADER_STDC
  172 AC_CHECK_HEADERS([ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h wctype.h])
  173 
  174 # Checks for typedefs, structures, and compiler characteristics.
  175 AC_HEADER_STAT
  176 AC_C_CONST
  177 AC_TYPE_OFF_T
  178 AC_TYPE_SIZE_T
  179 AC_HEADER_TIME
  180 
  181 # Autoheader templates for symbols defined later by AC_DEFINE.
  182 AH_TEMPLATE([HAVE_POSIX_REGCOMP],
  183 	[POSIX regcomp() and regex.h])
  184 AH_TEMPLATE([HAVE_PCRE],
  185 	[PCRE (Perl-compatible regular expression) library])
  186 AH_TEMPLATE([HAVE_RE_COMP],
  187 	[BSD re_comp()])
  188 AH_TEMPLATE([HAVE_REGCMP],
  189 	[System V regcmp()])
  190 AH_TEMPLATE([HAVE_V8_REGCOMP],
  191 	[Henry Spencer V8 regcomp() and regexp.h])
  192 AH_TEMPLATE([NO_REGEX],
  193 	[pattern matching is supported, but without metacharacters.])
  194 AH_TEMPLATE([HAVE_REGEXEC2],
  195 	[])
  196 AH_TEMPLATE([HAVE_VOID],
  197 	[Define HAVE_VOID if your compiler supports the "void" type.])
  198 AH_TEMPLATE([HAVE_CONST],
  199 	[Define HAVE_CONST if your compiler supports the "const" modifier.])
  200 AH_TEMPLATE([HAVE_STAT_INO],
  201 	[Define HAVE_STAT_INO if your struct stat has st_ino and st_dev.])
  202 AH_TEMPLATE([HAVE_TIME_T],
  203 	[Define HAVE_TIME_T if your system supports the "time_t" type.])
  204 AH_TEMPLATE([HAVE_STRERROR],
  205 	[Define HAVE_STRERROR if you have the strerror() function.])
  206 AH_TEMPLATE([HAVE_FILENO],
  207 	[Define HAVE_FILENO if you have the fileno() macro.])
  208 AH_TEMPLATE([HAVE_ERRNO],
  209 	[Define HAVE_ERRNO if you have the errno variable.])
  210 AH_TEMPLATE([MUST_DEFINE_ERRNO],
  211 	[Define MUST_DEFINE_ERRNO if you have errno but it is not define in errno.h.])
  212 AH_TEMPLATE([HAVE_SYS_ERRLIST],
  213 	[Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable.])
  214 AH_TEMPLATE([HAVE_OSPEED],
  215 	[Define HAVE_OSPEED if your termcap library has the ospeed variable.])
  216 AH_TEMPLATE([MUST_DEFINE_OSPEED],
  217 	[Define MUST_DEFINE_OSPEED if you have ospeed but it is not defined in termcap.h.])
  218 AH_TEMPLATE([HAVE_LOCALE],
  219 	[Define HAVE_LOCALE if you have locale.h and setlocale.])
  220 AH_TEMPLATE([HAVE_TERMIOS_FUNCS],
  221 	[Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr.])
  222 AH_TEMPLATE([HAVE_UPPER_LOWER],
  223 	[Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower.])
  224 AH_TEMPLATE([HAVE_WCTYPE],
  225 	[Define HAVE_WCTYPE if you have iswupper, iswlower, towupper, towlower.])
  226 AH_TEMPLATE([HAVE_SIGSET_T],
  227 	[Define HAVE_SIGSET_T you have the sigset_t type.])
  228 AH_TEMPLATE([HAVE_SIGEMPTYSET],
  229 	[Define HAVE_SIGEMPTYSET if you have the sigemptyset macro.])
  230 AH_TEMPLATE([EDIT_PGM],
  231 	[Define EDIT_PGM to your editor.])
  232 AH_TEMPLATE([SECURE_COMPILE],
  233 	[Define SECURE_COMPILE=1 to build a secure version of less.])
  234 
  235 # Checks for identifiers.
  236 AC_TYPE_OFF_T
  237 AC_MSG_CHECKING(for void)
  238 AC_TRY_COMPILE(, [void *foo = 0;], 
  239   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
  240 AC_MSG_CHECKING(for const)
  241 AC_TRY_COMPILE(, [const int foo = 0;], 
  242   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
  243 AC_MSG_CHECKING(for time_t)
  244 AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
  245   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
  246 AC_MSG_CHECKING(for st_ino in struct stat)
  247 AC_TRY_COMPILE([#include <sys/types.h>
  248 #include <sys/stat.h>],
  249   [struct stat s; dev_t dev = s.st_dev; ino_t ino = s.st_ino;],
  250   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STAT_INO)], [AC_MSG_RESULT(no)])
  251 
  252 # Checks for library functions.
  253 AC_TYPE_SIGNAL
  254 AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod])
  255 
  256 # AC_CHECK_FUNCS may not work for inline functions, so test these separately.
  257 AC_MSG_CHECKING(for memcpy)
  258 AC_TRY_LINK([
  259 #if HAVE_STRING_H
  260 #include <string.h>
  261 #endif], [memcpy(0,0,0);],
  262   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MEMCPY)], [AC_MSG_RESULT(no)])
  263 
  264 AC_MSG_CHECKING(for strchr)
  265 AC_TRY_LINK([
  266 #if HAVE_STRING_H
  267 #include <string.h>
  268 #endif], [strchr("x",'x');],
  269   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRCHR)], [AC_MSG_RESULT(no)])
  270 
  271 AC_MSG_CHECKING(for strstr)
  272 AC_TRY_LINK([
  273 #if HAVE_STRING_H
  274 #include <string.h>
  275 #endif], [strstr("x","x");],
  276   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRSTR)], [AC_MSG_RESULT(no)])
  277 
  278 # Some systems have termios.h but not the corresponding functions.
  279 AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
  280 
  281 AC_MSG_CHECKING(for fileno)
  282 AC_TRY_LINK([
  283 #if HAVE_STDIO_H
  284 #include <stdio.h>
  285 #endif], [static int x; x = fileno(stdin);],
  286   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)], [AC_MSG_RESULT(no)])
  287 
  288 AC_MSG_CHECKING(for strerror)
  289 AC_TRY_LINK([
  290 #if HAVE_STDIO_H
  291 #include <stdio.h>
  292 #endif
  293 #if HAVE_STRING_H
  294 #include <string.h>
  295 #endif
  296 #if HAVE_ERRNO_H
  297 #include <errno.h>
  298 #endif], [static char *x; x = strerror(0);],
  299   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)])
  300 
  301 AC_MSG_CHECKING(for sys_errlist)
  302 AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], 
  303   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])
  304 
  305 AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
  306 
  307 AC_MSG_CHECKING(for sigemptyset)
  308 AC_TRY_LINK([
  309 #include <signal.h>
  310 ], [sigset_t s; sigemptyset(&s);],
  311   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)], [AC_MSG_RESULT(no)])
  312 
  313 have_errno=no
  314 AC_MSG_CHECKING(for errno)
  315 AC_TRY_LINK([
  316 #if HAVE_ERRNO_H
  317 #include <errno.h>
  318 #endif], [static int x; x = errno;], 
  319   [AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes])
  320 if test $have_errno = no; then
  321 AC_TRY_LINK([
  322 #if HAVE_ERRNO_H
  323 #include <errno.h>
  324 #endif], [extern int errno; static int x; x = errno;], 
  325   [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],
  326   [AC_MSG_RESULT(no)])
  327 fi
  328 
  329 AC_MSG_CHECKING(for locale)
  330 AC_TRY_LINK([#include <locale.h>
  331 #include <ctype.h>
  332 #include <langinfo.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
  333   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
  334 
  335 AC_MSG_CHECKING(for ctype functions)
  336 AC_TRY_LINK([
  337 #if HAVE_CTYPE_H
  338 #include <ctype.h>
  339 #endif], [static int x; x = isupper(x); x = tolower(x); x = toupper(x);],
  340   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)], [AC_MSG_RESULT(no)])
  341 
  342 AC_MSG_CHECKING(for wctype functions)
  343 AC_TRY_LINK([#include <wctype.h>], [iswlower(0); iswupper(0); towlower(0); towupper(0);],
  344   [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_WCTYPE)], [AC_MSG_RESULT(no)])
  345 
  346 # Checks for external variable ospeed in the termcap library.
  347 have_ospeed=no
  348 AC_MSG_CHECKING(termcap for ospeed)
  349 AC_TRY_LINK([
  350 #include <sys/types.h>
  351 #if HAVE_TERMIOS_H
  352 #include <termios.h>
  353 #endif
  354 #if HAVE_TERMCAP_H
  355 #include <termcap.h>
  356 #endif], [ospeed = 0;],
  357 [AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
  358 if test $have_ospeed = no; then
  359 AC_TRY_LINK(, [extern short ospeed; ospeed = 0;], 
  360   [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
  361   [AC_MSG_RESULT(no)])
  362 fi
  363 
  364 # Compile in secure mode?
  365 AC_ARG_WITH(secure,
  366   [  --with-secure  Compile in secure mode],
  367   AC_DEFINE(SECURE_COMPILE, 1), AC_DEFINE(SECURE_COMPILE, 0))
  368 
  369 # Checks for regular expression functions.
  370 have_regex=no
  371 have_posix_regex=unknown
  372 AC_MSG_CHECKING(for regcomp)
  373 
  374 # Select a regular expression library.
  375 WANT_REGEX=auto
  376 AC_ARG_WITH(regex,
  377   [  --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local}  Select a regular expression library  [auto]],
  378   WANT_REGEX="$withval")
  379 
  380 if test $have_regex = no; then
  381 if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
  382 # Some versions of Solaris have a regcomp() function, but it doesn't work!
  383 # So we run a test program.  If we're cross-compiling, do it the old way.
  384 AC_TRY_RUN([
  385 #include <sys/types.h>
  386 #include <regex.h>
  387 main() { regex_t r; regmatch_t rm; char *text = "xabcy";
  388 if (regcomp(&r, "abc", 0)) exit(1);
  389 if (regexec(&r, text, 1, &rm, 0)) exit(1);
  390 #ifndef __WATCOMC__
  391 if (rm.rm_so != 1) exit(1); /* check for correct offset */
  392 #else
  393 if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
  394 #endif
  395 exit(0); }],
  396   have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
  397 if test $have_posix_regex = yes; then
  398   AC_MSG_RESULT(using POSIX regcomp)
  399   AC_DEFINE(HAVE_POSIX_REGCOMP)
  400   have_regex=yes
  401 elif test $have_posix_regex = unknown; then
  402   AC_TRY_LINK([
  403 #include <sys/types.h>
  404 #include <regex.h>],
  405   [regex_t *r; regfree(r);],
  406   AC_MSG_RESULT(using POSIX regcomp)
  407   AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
  408 else
  409   AC_MSG_RESULT(no)
  410 fi
  411 fi
  412 fi
  413 
  414 if test $have_regex = no; then
  415 if test $WANT_REGEX = auto -o $WANT_REGEX = pcre; then
  416 AC_CHECK_LIB(pcre, pcre_compile, 
  417 [AC_MSG_RESULT(using pcre); AC_DEFINE(HAVE_PCRE) LIBS="$LIBS -lpcre" have_regex=yes], [])
  418 fi
  419 fi
  420 
  421 if test $have_regex = no; then
  422 if test $WANT_REGEX = auto -o $WANT_REGEX = regcmp; then
  423 AC_CHECK_FUNC(regcmp, 
  424 AC_MSG_RESULT(using regcmp); AC_DEFINE(HAVE_REGCMP) have_regex=yes)
  425 fi
  426 fi
  427 
  428 if test $have_regex = no; then
  429 if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
  430 AC_TRY_LINK([
  431 #include "regexp.h"], [regcomp("");],
  432 AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
  433 fi
  434 fi
  435 
  436 if test $have_regex = no && test -f ${srcdir}/regexp.c; then
  437 if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp-local; then
  438 AC_MSG_RESULT(using V8 regcomp -- local source); AC_DEFINE(HAVE_V8_REGCOMP) AC_DEFINE(HAVE_REGEXEC2) REGEX_O='regexp.$(O)' AC_SUBST(REGEX_O) have_regex=yes
  439 fi
  440 fi
  441 
  442 if test $have_regex = no; then
  443 if test $WANT_REGEX = auto -o $WANT_REGEX = re_comp; then
  444 AC_MSG_RESULT(using re_comp); AC_CHECK_FUNC(re_comp, AC_DEFINE(HAVE_RE_COMP) have_regex=yes)
  445 fi
  446 fi
  447 
  448 if test $have_regex = no; then
  449 AC_MSG_RESULT(cannot find regular expression library); AC_DEFINE(NO_REGEX)
  450 fi
  451 
  452 AC_ARG_WITH(editor,
  453   [  --with-editor=PROGRAM   use PROGRAM as the default editor [vi]],
  454   AC_DEFINE_UNQUOTED(EDIT_PGM, "$withval"), AC_DEFINE(EDIT_PGM, "vi"))
  455 
  456 AH_TOP([
  457 /* Unix definition file for less.  -*- C -*-
  458  *
  459  * This file has 3 sections:
  460  * User preferences.
  461  * Settings always true on Unix.
  462  * Settings automatically determined by configure.
  463  *
  464  * * * * * *  WARNING  * * * * * *
  465  * If you edit defines.h by hand, do "touch stamp-h" before you run make
  466  * so config.status doesn't overwrite your changes.
  467  */
  468 
  469 /* User preferences.  */
  470 
  471 /*
  472  * SECURE is 1 if you wish to disable a bunch of features in order to
  473  * be safe to run by unprivileged users.
  474  * SECURE_COMPILE is set by the --with-secure configure option.
  475  */
  476 #define	SECURE		SECURE_COMPILE
  477 
  478 /*
  479  * SHELL_ESCAPE is 1 if you wish to allow shell escapes.
  480  * (This is possible only if your system supplies the system() function.)
  481  */
  482 #define	SHELL_ESCAPE	(!SECURE)
  483 
  484 /*
  485  * EXAMINE is 1 if you wish to allow examining files by name from within less.
  486  */
  487 #define	EXAMINE		(!SECURE)
  488 
  489 /*
  490  * TAB_COMPLETE_FILENAME is 1 if you wish to allow the TAB key
  491  * to complete filenames at prompts.
  492  */
  493 #define	TAB_COMPLETE_FILENAME	(!SECURE)
  494 
  495 /*
  496  * CMD_HISTORY is 1 if you wish to allow keys to cycle through
  497  * previous commands at prompts.
  498  */
  499 #define	CMD_HISTORY	1
  500 
  501 /*
  502  * HILITE_SEARCH is 1 if you wish to have search targets to be 
  503  * displayed in standout mode.
  504  */
  505 #define	HILITE_SEARCH	1
  506 
  507 /*
  508  * EDITOR is 1 if you wish to allow editor invocation (the "v" command).
  509  * (This is possible only if your system supplies the system() function.)
  510  * EDIT_PGM is the name of the (default) editor to be invoked.
  511  */
  512 #define	EDITOR		(!SECURE)
  513 
  514 /*
  515  * TAGS is 1 if you wish to support tag files.
  516  */
  517 #define	TAGS		(!SECURE)
  518 
  519 /*
  520  * USERFILE is 1 if you wish to allow a .less file to specify 
  521  * user-defined key bindings.
  522  */
  523 #define	USERFILE	(!SECURE)
  524 
  525 /*
  526  * GLOB is 1 if you wish to have shell metacharacters expanded in filenames.
  527  * This will generally work if your system provides the "popen" function
  528  * and the "echo" shell command.
  529  */
  530 #define	GLOB		(!SECURE)
  531 
  532 /*
  533  * PIPEC is 1 if you wish to have the "|" command
  534  * which allows the user to pipe data into a shell command.
  535  */
  536 #define	PIPEC		(!SECURE)
  537 
  538 /*
  539  * LOGFILE is 1 if you wish to allow the -l option (to create log files).
  540  */
  541 #define	LOGFILE		(!SECURE)
  542 
  543 /*
  544  * GNU_OPTIONS is 1 if you wish to support the GNU-style command
  545  * line options --help and --version.
  546  */
  547 #define	GNU_OPTIONS	1
  548 
  549 /*
  550  * ONLY_RETURN is 1 if you want RETURN to be the only input which
  551  * will continue past an error message.
  552  * Otherwise, any key will continue past an error message.
  553  */
  554 #define	ONLY_RETURN	0
  555 
  556 /*
  557  * LESSKEYFILE is the filename of the default lesskey output file 
  558  * (in the HOME directory).
  559  * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file.
  560  * DEF_LESSKEYINFILE is the filename of the default lesskey input 
  561  * (in the HOME directory).
  562  * LESSHISTFILE is the filename of the history file
  563  * (in the HOME directory).
  564  */
  565 #define	LESSKEYFILE		".less"
  566 #define	LESSKEYFILE_SYS		SYSDIR "/sysless"
  567 #define	DEF_LESSKEYINFILE	".lesskey"
  568 #define LESSHISTFILE		".lesshst"
  569 
  570 
  571 /* Settings always true on Unix.  */
  572 
  573 /*
  574  * Define MSDOS_COMPILER if compiling under Microsoft C.
  575  */
  576 #define	MSDOS_COMPILER	0
  577 
  578 /*
  579  * Pathname separator character.
  580  */
  581 #define	PATHNAME_SEP	"/"
  582 
  583 /*
  584  * The value returned from tgetent on success.
  585  * Some HP-UX systems return 0 on success.
  586  */
  587 #define TGETENT_OK  1
  588 
  589 /*
  590  * HAVE_SYS_TYPES_H is 1 if your system has <sys/types.h>.
  591  */
  592 #define HAVE_SYS_TYPES_H	1
  593 
  594 /*
  595  * Define if you have the <sgstat.h> header file.
  596  */
  597 #undef HAVE_SGSTAT_H
  598 
  599 /*
  600  * HAVE_PERROR is 1 if your system has the perror() call.
  601  * (Actually, if it has sys_errlist, sys_nerr and errno.)
  602  */
  603 #define	HAVE_PERROR	1
  604 
  605 /*
  606  * HAVE_TIME is 1 if your system has the time() call.
  607  */
  608 #define	HAVE_TIME	1
  609 
  610 /*
  611  * HAVE_SHELL is 1 if your system supports a SHELL command interpreter.
  612  */
  613 #define	HAVE_SHELL	1
  614 
  615 /*
  616  * Default shell metacharacters and meta-escape character.
  617  */
  618 #define	DEF_METACHARS	"; *?\t\n'\"()<>[]|&^`#\\$%=~"
  619 #define	DEF_METAESCAPE	"\\"
  620 
  621 /* 
  622  * HAVE_DUP is 1 if your system has the dup() call.
  623  */
  624 #define	HAVE_DUP	1
  625 
  626 /* Define to 1 if you have the memcpy() function. */
  627 #define HAVE_MEMCPY 1
  628 
  629 /* Define to 1 if you have the strchr() function. */
  630 #define HAVE_STRCHR 1
  631 
  632 /* Define to 1 if you have the strstr() function. */
  633 #define HAVE_STRSTR 1
  634 
  635 /*
  636  * Sizes of various buffers.
  637  */
  638 #define	CMDBUF_SIZE	512	/* Buffer for multichar commands */
  639 #define	UNGOT_SIZE	100	/* Max chars to unget() */
  640 #define	LINEBUF_SIZE	1024	/* Max size of line in input file */
  641 #define	OUTBUF_SIZE	1024	/* Output buffer */
  642 #define	PROMPT_SIZE	200	/* Max size of prompt string */
  643 #define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
  644 #define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
  645 #define	TAGLINE_SIZE	512	/* Max size of line in tags file */
  646 #define	TABSTOP_MAX	32	/* Max number of custom tab stops */
  647 
  648 /* Settings automatically determined by configure.  */
  649 ])
  650 
  651 AC_CONFIG_FILES([Makefile])
  652 AC_OUTPUT