diff options
author | delphij <delphij@FreeBSD.org> | 2007-06-04 01:42:54 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-06-04 01:42:54 +0000 |
commit | 7672cb6e48e2ed472cbd72caaa0eb155608a644d (patch) | |
tree | ee770081db4ef1d4b6022e0608a222ea35319caa /contrib/less/configure.ac | |
parent | 5297f4bc59da861bbe3beb5ee12839fa05e79882 (diff) | |
download | FreeBSD-src-7672cb6e48e2ed472cbd72caaa0eb155608a644d.zip FreeBSD-src-7672cb6e48e2ed472cbd72caaa0eb155608a644d.tar.gz |
/home/delphij/m
Diffstat (limited to 'contrib/less/configure.ac')
-rw-r--r-- | contrib/less/configure.ac | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/contrib/less/configure.ac b/contrib/less/configure.ac index 7ca55c6..80ec43a 100644 --- a/contrib/less/configure.ac +++ b/contrib/less/configure.ac @@ -1,6 +1,6 @@ # Process this file with autoconf to produce a configure script. -# Copyright (C) 1984-2004 Mark Nudelman +# Copyright (C) 1984-2007 Mark Nudelman # # You may distribute under the terms of either the GNU General Public # License or the Less License, as specified in the README file. @@ -64,7 +64,7 @@ if test "x$TERMLIBS" = x; then fi fi -dnl -- Try ncursesw. +# -- Try ncursesw. if test "x$TERMLIBS" = x; then if test $have_ncursesw = yes; then TERMLIBS="-lncursesw" @@ -154,7 +154,7 @@ LIBS="$LIBS $TERMLIBS" # Checks for header files. AC_HEADER_STDC -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 sys/ptem.h]) +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]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT @@ -227,7 +227,29 @@ AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;], # Checks for library functions. AC_TYPE_SIGNAL -AC_CHECK_FUNCS([fsync memcpy popen _setjmp sigprocmask sigsetmask snprintf stat strchr strstr system fchmod]) +AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod]) + +# AC_CHECK_FUNCS may not work for inline functions, so test these separately. +AC_MSG_CHECKING(for memcpy) +AC_TRY_LINK([ +#if HAVE_STRING_H +#include <string.h> +#endif], [memcpy(0,0,0);], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MEMCPY)], [AC_MSG_RESULT(no)]) + +AC_MSG_CHECKING(for strchr) +AC_TRY_LINK([ +#if HAVE_STRING_H +#include <string.h> +#endif], [strchr("x",'x');], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRCHR)], [AC_MSG_RESULT(no)]) + +AC_MSG_CHECKING(for strstr) +AC_TRY_LINK([ +#if HAVE_STRING_H +#include <string.h> +#endif], [strstr("x","x");], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRSTR)], [AC_MSG_RESULT(no)]) # Some systems have termios.h but not the corresponding functions. AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS)) @@ -256,11 +278,7 @@ AC_MSG_CHECKING(for sys_errlist) AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) -AC_MSG_CHECKING(for sigset_t) -AC_TRY_LINK([ -#include <signal.h> -], [sigset_t s; s = 0;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)], [AC_MSG_RESULT(no)]) +AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>]) AC_MSG_CHECKING(for sigemptyset) AC_TRY_LINK([ @@ -533,6 +551,12 @@ AH_TOP([ #define PATHNAME_SEP "/" /* + * The value returned from tgetent on success. + * Some HP-UX systems return 0 on success. + */ +#define TGETENT_OK 1 + +/* * HAVE_SYS_TYPES_H is 1 if your system has <sys/types.h>. */ #define HAVE_SYS_TYPES_H 1 @@ -561,7 +585,7 @@ AH_TOP([ /* * Default shell metacharacters and meta-escape character. */ -#define DEF_METACHARS "; *?\t\n'\"()<>[]|&^`#\\" +#define DEF_METACHARS "; *?\t\n'\"()<>[]|&^`#\\$%=~" #define DEF_METAESCAPE "\\" /* @@ -569,6 +593,15 @@ AH_TOP([ */ #define HAVE_DUP 1 +/* Define to 1 if you have the memcpy() function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the strchr() function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the strstr() function. */ +#define HAVE_STRSTR 1 + /* * Sizes of various buffers. */ |