Deleted Added
full compact
configure.ac (128345) configure.ac (161475)
1# Process this file with autoconf to produce a configure script.
2
1# Process this file with autoconf to produce a configure script.
2
3# Copyright (C) 1984-2002 Mark Nudelman
3# Copyright (C) 1984-2004 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.

--- 7 unchanged lines hidden (view full) ---

19AC_PROG_GCC_TRADITIONAL
20AC_PROG_INSTALL
21
22# Checks for compilation model.
23AC_SYS_LARGEFILE
24
25# Checks for general libraries.
26AC_CHECK_LIB(xcurses, initscr, [have_xcurses=yes], [have_xcurses=no])
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.

--- 7 unchanged lines hidden (view full) ---

19AC_PROG_GCC_TRADITIONAL
20AC_PROG_INSTALL
21
22# Checks for compilation model.
23AC_SYS_LARGEFILE
24
25# Checks for general libraries.
26AC_CHECK_LIB(xcurses, initscr, [have_xcurses=yes], [have_xcurses=no])
27AC_CHECK_LIB(ncursesw, initscr, [have_ncursesw=yes], [have_ncursesw=no])
27AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
28AC_CHECK_LIB(curses, initscr, [have_curses=yes], [have_curses=no])
29AC_CHECK_LIB(termcap, tgetent, [have_termcap=yes], [have_termcap=no])
30AC_CHECK_LIB(termlib, tgetent, [have_termlib=yes], [have_termlib=no])
31# Regular expressions (regcmp) are in -lgen on Solaris 2,
32# and in -lintl on SCO Unix.
33AC_CHECK_LIB(gen, regcmp)
34AC_CHECK_LIB(intl, regcmp)

--- 23 unchanged lines hidden (view full) ---

58 LIBS="$LIBS $TERMLIBS"
59 AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
60 [termok=yes], [termok=no])
61 LIBS=$SAVE_LIBS
62 if test $termok = no; then TERMLIBS=""; fi
63 fi
64fi
65
28AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
29AC_CHECK_LIB(curses, initscr, [have_curses=yes], [have_curses=no])
30AC_CHECK_LIB(termcap, tgetent, [have_termcap=yes], [have_termcap=no])
31AC_CHECK_LIB(termlib, tgetent, [have_termlib=yes], [have_termlib=no])
32# Regular expressions (regcmp) are in -lgen on Solaris 2,
33# and in -lintl on SCO Unix.
34AC_CHECK_LIB(gen, regcmp)
35AC_CHECK_LIB(intl, regcmp)

--- 23 unchanged lines hidden (view full) ---

59 LIBS="$LIBS $TERMLIBS"
60 AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
61 [termok=yes], [termok=no])
62 LIBS=$SAVE_LIBS
63 if test $termok = no; then TERMLIBS=""; fi
64 fi
65fi
66
67dnl -- Try ncursesw.
68if test "x$TERMLIBS" = x; then
69 if test $have_ncursesw = yes; then
70 TERMLIBS="-lncursesw"
71 SAVE_LIBS=$LIBS
72 LIBS="$LIBS $TERMLIBS"
73 AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
74 [termok=yes], [termok=no])
75 LIBS=$SAVE_LIBS
76 if test $termok = no; then TERMLIBS=""; fi
77 fi
78fi
79
66# -- Try ncurses.
67if test "x$TERMLIBS" = x; then
68 if test $have_ncurses = yes; then
69 TERMLIBS="-lncurses"
70 SAVE_LIBS=$LIBS
71 LIBS="$LIBS $TERMLIBS"
72 AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
73 [termok=yes], [termok=no])

--- 117 unchanged lines hidden (view full) ---

191AH_TEMPLATE([HAVE_UPPER_LOWER],
192 [Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower.])
193AH_TEMPLATE([HAVE_SIGSET_T],
194 [Define HAVE_SIGSET_T you have the sigset_t type.])
195AH_TEMPLATE([HAVE_SIGEMPTYSET],
196 [Define HAVE_SIGEMPTYSET if you have the sigemptyset macro.])
197AH_TEMPLATE([EDIT_PGM],
198 [Define EDIT_PGM to your editor.])
80# -- Try ncurses.
81if test "x$TERMLIBS" = x; then
82 if test $have_ncurses = yes; then
83 TERMLIBS="-lncurses"
84 SAVE_LIBS=$LIBS
85 LIBS="$LIBS $TERMLIBS"
86 AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
87 [termok=yes], [termok=no])

--- 117 unchanged lines hidden (view full) ---

205AH_TEMPLATE([HAVE_UPPER_LOWER],
206 [Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower.])
207AH_TEMPLATE([HAVE_SIGSET_T],
208 [Define HAVE_SIGSET_T you have the sigset_t type.])
209AH_TEMPLATE([HAVE_SIGEMPTYSET],
210 [Define HAVE_SIGEMPTYSET if you have the sigemptyset macro.])
211AH_TEMPLATE([EDIT_PGM],
212 [Define EDIT_PGM to your editor.])
213AH_TEMPLATE([SECURE_COMPILE],
214 [Define SECURE_COMPILE=1 to build a secure version of less.])
199
200# Checks for identifiers.
201AC_TYPE_OFF_T
202AC_MSG_CHECKING(for void)
203AC_TRY_COMPILE(, [void *foo = 0;],
204 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
205AC_MSG_CHECKING(for const)
206AC_TRY_COMPILE(, [const int foo = 0;],
207 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
208AC_MSG_CHECKING(for time_t)
209AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
210 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
211
212# Checks for library functions.
213AC_TYPE_SIGNAL
215
216# Checks for identifiers.
217AC_TYPE_OFF_T
218AC_MSG_CHECKING(for void)
219AC_TRY_COMPILE(, [void *foo = 0;],
220 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
221AC_MSG_CHECKING(for const)
222AC_TRY_COMPILE(, [const int foo = 0;],
223 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
224AC_MSG_CHECKING(for time_t)
225AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
226 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
227
228# Checks for library functions.
229AC_TYPE_SIGNAL
214AC_CHECK_FUNCS([fsync memcpy popen _setjmp sigprocmask sigsetmask stat strchr strstr system])
230AC_CHECK_FUNCS([fsync memcpy popen _setjmp sigprocmask sigsetmask snprintf stat strchr strstr system fchmod])
215
216# Some systems have termios.h but not the corresponding functions.
217AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
218
219AC_MSG_CHECKING(for fileno)
220AC_TRY_LINK([
221#if HAVE_STDIO_H
222#include <stdio.h>

--- 69 unchanged lines hidden (view full) ---

292#endif], [ospeed = 0;],
293[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
294if test $have_ospeed = no; then
295AC_TRY_LINK(, [extern short ospeed; ospeed = 0;],
296 [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
297 [AC_MSG_RESULT(no)])
298fi
299
231
232# Some systems have termios.h but not the corresponding functions.
233AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
234
235AC_MSG_CHECKING(for fileno)
236AC_TRY_LINK([
237#if HAVE_STDIO_H
238#include <stdio.h>

--- 69 unchanged lines hidden (view full) ---

308#endif], [ospeed = 0;],
309[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
310if test $have_ospeed = no; then
311AC_TRY_LINK(, [extern short ospeed; ospeed = 0;],
312 [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
313 [AC_MSG_RESULT(no)])
314fi
315
316# Compile in secure mode?
317AC_ARG_WITH(secure,
318 [ --with-secure Compile in secure mode],
319 AC_DEFINE(SECURE_COMPILE, 1), AC_DEFINE(SECURE_COMPILE, 0))
320
300# Checks for regular expression functions.
301have_regex=no
302have_posix_regex=unknown
303AC_MSG_CHECKING(for regcomp)
304
321# Checks for regular expression functions.
322have_regex=no
323have_posix_regex=unknown
324AC_MSG_CHECKING(for regcomp)
325
326# Select a regular expression library.
305WANT_REGEX=auto
306AC_ARG_WITH(regex,
307 [ --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library [auto]],
308 WANT_REGEX="$withval")
309
310if test $have_regex = no; then
311if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
312# Some versions of Solaris have a regcomp() function, but it doesn't work!

--- 83 unchanged lines hidden (view full) ---

396 * so config.status doesn't overwrite your changes.
397 */
398
399/* User preferences. */
400
401/*
402 * SECURE is 1 if you wish to disable a bunch of features in order to
403 * be safe to run by unprivileged users.
327WANT_REGEX=auto
328AC_ARG_WITH(regex,
329 [ --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library [auto]],
330 WANT_REGEX="$withval")
331
332if test $have_regex = no; then
333if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
334# Some versions of Solaris have a regcomp() function, but it doesn't work!

--- 83 unchanged lines hidden (view full) ---

418 * so config.status doesn't overwrite your changes.
419 */
420
421/* User preferences. */
422
423/*
424 * SECURE is 1 if you wish to disable a bunch of features in order to
425 * be safe to run by unprivileged users.
426 * SECURE_COMPILE is set by the --with-secure configure option.
404 */
427 */
405#define SECURE 0
428#define SECURE SECURE_COMPILE
406
407/*
408 * SHELL_ESCAPE is 1 if you wish to allow shell escapes.
409 * (This is possible only if your system supplies the system() function.)
410 */
411#define SHELL_ESCAPE (!SECURE)
412
413/*

--- 69 unchanged lines hidden (view full) ---

483#define ONLY_RETURN 0
484
485/*
486 * LESSKEYFILE is the filename of the default lesskey output file
487 * (in the HOME directory).
488 * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file.
489 * DEF_LESSKEYINFILE is the filename of the default lesskey input
490 * (in the HOME directory).
429
430/*
431 * SHELL_ESCAPE is 1 if you wish to allow shell escapes.
432 * (This is possible only if your system supplies the system() function.)
433 */
434#define SHELL_ESCAPE (!SECURE)
435
436/*

--- 69 unchanged lines hidden (view full) ---

506#define ONLY_RETURN 0
507
508/*
509 * LESSKEYFILE is the filename of the default lesskey output file
510 * (in the HOME directory).
511 * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file.
512 * DEF_LESSKEYINFILE is the filename of the default lesskey input
513 * (in the HOME directory).
514 * LESSHISTFILE is the filename of the history file
515 * (in the HOME directory).
491 */
492#define LESSKEYFILE ".less"
493#define LESSKEYFILE_SYS SYSDIR "/sysless"
494#define DEF_LESSKEYINFILE ".lesskey"
516 */
517#define LESSKEYFILE ".less"
518#define LESSKEYFILE_SYS SYSDIR "/sysless"
519#define DEF_LESSKEYINFILE ".lesskey"
520#define LESSHISTFILE ".lesshst"
495
496
497/* Settings always true on Unix. */
498
499/*
500 * Define MSDOS_COMPILER if compiling under Microsoft C.
501 */
502#define MSDOS_COMPILER 0

--- 27 unchanged lines hidden (view full) ---

530/*
531 * HAVE_SHELL is 1 if your system supports a SHELL command interpreter.
532 */
533#define HAVE_SHELL 1
534
535/*
536 * Default shell metacharacters and meta-escape character.
537 */
521
522
523/* Settings always true on Unix. */
524
525/*
526 * Define MSDOS_COMPILER if compiling under Microsoft C.
527 */
528#define MSDOS_COMPILER 0

--- 27 unchanged lines hidden (view full) ---

556/*
557 * HAVE_SHELL is 1 if your system supports a SHELL command interpreter.
558 */
559#define HAVE_SHELL 1
560
561/*
562 * Default shell metacharacters and meta-escape character.
563 */
538#define DEF_METACHARS "; *?\t\n'\"()<>|&^`#\\"
564#define DEF_METACHARS "; *?\t\n'\"()<>[]|&^`#\\"
539#define DEF_METAESCAPE "\\"
540
541/*
542 * HAVE_DUP is 1 if your system has the dup() call.
543 */
544#define HAVE_DUP 1
545
546/*

--- 17 unchanged lines hidden ---
565#define DEF_METAESCAPE "\\"
566
567/*
568 * HAVE_DUP is 1 if your system has the dup() call.
569 */
570#define HAVE_DUP 1
571
572/*

--- 17 unchanged lines hidden ---