Commit 7c0e9a1a authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.6pre2

parent 1a9fbb01
Changes since Lynx 2.8 release
===============================================================================
2006-09-03 (2.8.6pre.2)
* change configure script to put the ".cfg" and ".lss" files by default in the
--sysconfdir, e.g., $prefix/etc, and the help-files in lynx_doc and lynx_help
directories under --datadir, e.g., $prefix/share/lynx_doc,
$prefix/share/lynx_doc. To obtain the old behavior, use
configure --sysconfdir=/usr/local/lib --datadir=/usr/local/lib
(patch by Rado Smiljanic).
* simplified stop_curses(), ensuring that it does what it claims (report by
William McBrine) -TD
* corrected placement of statements used for quiet compiler warnings for unused
variables in fancy_mouse() (reported by Rado Smiljanic, Nelson Beebe) -TD
* simplify ifdef's in HTCheckForInterrupt() to make it clearer that the win32
PDCurses configuration uses nodelay() as an alternative to select() -TD
* correct fix for PDCurses on win32, i.e., the workaround in LYStrings.c
myGetChar() (report by William McBrine) -TD
* replace a couple of wmove(LYwin,y,x) calls with LYmove(y,x) -TD
* modify configure macro CF_PATH_SYNTAX to account for the --prefix and
--exec-prefix options, making the --with-cfg-file and --with-lss-file options
have the expected behavior of using the given prefix (reported by PG) -TD
* modify ifdef's for Current_Attr variable to allow scrollbar feature to build
with slang configuration on Windows (report by Gisle Vanem) -TD
2006-08-31 (2.8.6pre.1)
2006-08-31 (2.8.6dev.19)
* add --enable-widec configure option to allow building lynx without wide
character support using ncursesw, to accommodate users with older releases
of ncurses (request by Emanuele Giaquinta) -TD
* add -stderr option to write error messages when doing a -dump -or -source.
Normally these are written to the status line but that does not exist when
dumping to standard output (Debian #375736) -TD
* fixes for GNU TLS configuration (also addresses Debian #231609) -TG, TH
* add check for failure to write to disk, e.g., on disk full, and report
error condition via HTAlert() -PG
* updated README.sslcerts -Stef Caunter
* add example of -source in manpage to explain how HREF's are constructed
(Debian #347989) -TD
* fixes to make redraw_part_of_line() to work with double-width characters.
This is used in color-style to repaint an inactive hyperlink -TD
* ensure the number of "extra" blanks in a line is greater than zero before
attempting to perform text-justification (Debian #363538) -TD
* improve wrapping logic in LYwaddnstr() by using a derived window. This fixes
a problem with wrapping of multibyte character links -TD
* repair fix for Debian #171312 by ensuring that it is only invoked if the
document was not being reloaded, or popped off the history stack (report
by TH) -TD
* add error-reporting for the PRETTYSRC_SPEC data in lynx.cfg
(prompted by discussion by OpenMacNews and Thorsten Glaser) -TD
* add a carriage-return in stop_curses() to work around PDCurses leaving the
cursor position other places than lower-level when stopping curses (report
by DK) -TD
* add an explicit wmove() in display_line() to accommodate some wide-character
pages which are not handled well by the nested-table logic, resulting in
unexpected wrapping (report by Dan Jacobson) -TD
* modify limit for CDK double-byte characters in display_line() to accommodate
a test-case rightSideEdgeTest.html provided by TH -TD
* add a workaround in LYStrings.c myGetChar() for PDCurses, which may return an
ERR value which is not -1 (reports by DK, William McBrine) -TD
* remove ifdef from 2.8.2dev.14 which omitted bindtextdomain() call from DJGPP
NLS configuration -DK
* modify autoconf macro AM_PATH_PROG_WITH_TEST to account for executable suffix
in win32 environment -DK
* correct a mistyped parameter to CreateThread() (report by DK) -TD
* do not use LIBOBJS symbol directly in configure script except to support
AC_REPLACE_FUNCS, since the autoconf macros dealing with that symbol changed
incompatibly in autoconf 2.54 (report by DK) -TD
* fixes to work with BeOS 5.0 -Nigel Horne
* use portable TXT_R rather than "rt" for popen() mode in clip_grab() (reported
by Antonio Maria Borneo) -TD
* modify makeutcb.c to avoid compile-time dependency upon gettext, in case it
is used in cross-compiling -TD
* modify expression for ws_read_per_sec in ws_netread() to avoid potential
divide-by-zero on a network error
(reported by David Potter) -Takeshi Hataguchi, -TD
* modify fix for Debian #335593 to ensure that only image maps for the current
page are listed (report by DK) -TD
* correct URL for HTML'ized description of all settings in lynx.cfg (report
by DK) -TD
* use configure macro CF_SIGWINCH to work around special case on Mac OS X
which leaves SIGWINCH undefined -TD
* add configure options --with-cfg-file and --with-lss-file to allow one to
specify the names and paths of the default configuration and color-style
files -TD
* change configure script --enable-color-style so it is enabled by default
(prompted by request by Jason Spiro) -TD
* add COLOR_STYLE setting to lynx.cfg -TD
* change default initialization of color-style code when no lss file is given
to simulate the non-color-style code. There are some visual differences,
e.g., links that contain a mixture of styles will display with mixed colors,
but overall the visual effect matches the non-color-style code well enough
to change the default configuration.
If an empty string is given for the lss filename, this is treated as an
empty style file, and lynx will not use its built-in default color style.
To make the behavior easier to diagnose, lynx will now exit with an error
if it cannot find the lss file. cf: 2000-07-16 (2.8.4dev.5) -TD
* fix a sign-extension in alignment case-statement in split_line() which could
cause a large indent for lines which are wider than the display (Debian
#360832, #372670) -TD
* fix ifdef's in LYOptions.c to make --disable-menu-options work (report by
PW) -TD
2006-05-29 (2.8.6dev.18)
* suppress OpenSSL URL from version message if it happens to be built using
GNU TLS -TD
......@@ -24,7 +124,7 @@ Changes since Lynx 2.8 release
* modify HTLoadHTTP() to interpret leading asterisks in common name fields as
wildcards -Thorsten Glaser
* remove SH_EX hardcoded Latin-1 table for strcasecomp() -TD
* fixes for compiling in Cygwin environment -TD
* fixes for compiling in Cygwin environment -TH
+ modify not to check d_ino when __CYGWIN__ is defined because it
does not seem to be supported by Cygwin now.
+ modify to use fill_rehostent to avoid segfault in _fork_func,
......@@ -848,7 +948,7 @@ FreeBSD 4.1, 4.8, NetBSD 1.5, 1.6 and OpenBSD 2.8 (curses/ncurses).
(report by Atsuhito Kohda) -TD
* modify ifdef's to use mkdtemp() if it is available (prompted by MirBSD
patch) -TD
* several fixes from Thorsten Glaser (MirBSD):
* several fixes from (TG) (Thorsten Glaser - MirBSD):
+ workaround for invoking shell scripts when executable permissions are
discarded as a result from using CVS.
+ adjust buffer-size used in a readlink() call in case the result is too
......
......@@ -33,7 +33,7 @@ Step 1. Compile-time Variables.
and there are others you may want to change.
Lynx MUST be able to find lynx.cfg at start-up: using configure
(e.g. with UNIX or Cygwin), its location is best set with --libdir ;
(e.g. with UNIX or Cygwin), its location is best set with --sysconfdir ;
you can check in lynx_cfg.h after configure has run, if you wish.
otherwise, you can use LYNX_CFG_FILE in userdefs.h ,
environment variable LYNX_CFG or the -cfg command-line option.
......@@ -179,6 +179,15 @@ II. Compile instructions -- UNIX
--disable-bibp-urls (define DISABLE_BIBP)
Disable (do not compile code) support for bibp: URLs.
--disable-color-style (define USE_COLOR_STYLE)
Use this option to disable optional color style. This is implemented
for modern curses implementations, e.g., those that support color.
Before lynx 2.8.6dev.18, this option was disabled by default.
You can achieve a similar color effect to match the non-color-style
(but still allowing users to use color-style) by using the
--without-lss-file option.
--disable-config-info (define NO_CONFIG_INFO)
Use this option to disable extended browsable configuration information
(a screen that shows the result of the configuration script, as well
......@@ -360,11 +369,6 @@ II. Compile instructions -- UNIX
Add experimental logic for supporting CJK documents. (This is not
necessary for CJK support and may go away in a future release.)
--enable-color-style (define USE_COLOR_STYLE)
Use this option to enable optional and *experimental* color style.
This is implemented for curses (if it supports color), ncurses and
PDCurses, but not slang.
--enable-debug (The symbol DEBUG is always defined.)
Use this option to compile-in support for debugging.
Note that this flag is ignored if the CFLAGS environment
......@@ -467,10 +471,17 @@ II. Compile instructions -- UNIX
--enable-warnings
Use this option to turn on GCC compiler warnings.
--libdir (affect LYNX_CFG_FILE)
--enable-widec
Use this option to allow the configure script to look for wide-curses
features. If you do not specify the option, the configure script
will look for these features if --with-screen=ncursesw is given.
For this release of Lynx, we recommend the ncursew library built from
ncurses 5.5.
--sysconfdir (affect LYNX_CFG_FILE)
Defines the location where you want the lynx.cfg file installed.
The configure script defines the symbol LYNX_CFG_FILE to correspond
with the $libdir environment variable. (For platforms which do not
with the $sysconfdir environment variable. (For platforms which do not
support a configure script, such as MS-DOS, Win32 and VMS, you must
edit userdefs.h if you wish to specify the location of lynx.cfg).
......@@ -486,6 +497,11 @@ II. Compile instructions -- UNIX
Limit the number of charsets that are compiled-in to the specified
list of comma-separated MIME names.
--with-cfg-file (define LYNX_CFG_FILE)
Specify the default configuration file's name. Use --without-cfg-file
to force the user to specify the configuration file on the command
line.
--with-curses-dir
Specify directory under which curses/ncurses is installed. This
assumes a standard install, e.g., with an include and lib subdirectory.
......@@ -515,6 +531,10 @@ II. Compile instructions -- UNIX
--with-libiconv-prefix=DIR
search for libiconv in DIR/include and DIR/lib
--with-lss-file{=path} (define LYNX_LSS_FILE)
Specify the default style-sheet file's name. Use --without-lss-file
to make the default behavior match the non-color-style (if no --lss
option is given, and no COLOR_STYLE setting is in lynx.cfg).
--with-neXtaw
This option allows you to specify the X libraries used if you
......@@ -541,7 +561,7 @@ II. Compile instructions -- UNIX
Note that some systems may have a default curses library which
does not support color, while on others, ncurses is installed as
the curses library. The variant ncursesw is the wide-character
version of ncurses.
version of ncurses. See also the --enable-widec option.
The pdcurses selection supported by the configure script is a UNIX-only
library which uses X11. If you are configuring with DJGPP, the likely
......@@ -669,7 +689,7 @@ II. Compile instructions -- UNIX
setenv CPPFLAGS "-I$HOME/slang -I$HOME/.usr/include"
setenv LIBS "-L$HOME/.slang/lib -L$HOME/.usr/lib"
./configure --exec-prefix=$HOME --bindir=$HOME/.lynx \
--mandir=$HOME/.usr/man --libdir=$HOME/.usr/lib \
--mandir=$HOME/.usr/man --sysconfdir=$HOME/.usr/lib \
--with-screen=slang --with-zlib
CPPFLAGS in this example defines the full path to the slang and zlib header
......@@ -677,7 +697,7 @@ II. Compile instructions -- UNIX
the nonstandard locations of libslang.a and libz.a. Setting the option
--bindir tells the configure script where I want to install the lynx
binary; setting --mandir tells it where to put the lynx.1 man page, and
setting --libdir tells it (while at the same time defining LYNX_CFG_FILE)
setting --sysconfdir tells it (while at the same time defining LYNX_CFG_FILE)
where to put the configuration file "lynx.cfg", when I type "make install".
The --with-screen=slang and --with-zlib options are explained above.
......@@ -1155,7 +1175,7 @@ V. Compile instructions -- 386 DOS
--enable-file-upload \
--enable-nested-tables \
--enable-nls \
--libdir=d:/djgpp/lynx-rel/lynx-cnf \
--sysconfdir=d:/djgpp/lynx-rel/lynx-cnf \
--with-bzlib \
--with-zlib \
--with-ssl
......
......@@ -793,6 +793,7 @@
#define FAILED_RETRY_WITH_AUTH gettext("Can't retry with authorization! Contact the server's WebMaster.")
#define FAILED_RETRY_WITH_PROXY gettext("Can't retry with proxy authorization! Contact the server's WebMaster.")
#define HTTP_RETRY_WITH_PROXY gettext("Retrying with proxy authorization information.")
#define SSL_FORCED_PROMPT gettext("SSL error:%s-Continue?")
/* HTWAIS.c */
#define HTWAIS_MESSAGE_TOO_BIG gettext("HTWAIS: Return message too large.")
......
......@@ -736,9 +736,11 @@ static HTAAScheme HTAA_selectScheme(HTAASetup * setup)
int scheme;
if (setup && setup->valid_schemes) {
for (scheme = HTAA_BASIC; scheme < HTAA_MAX_SCHEMES; scheme++)
if (-1 < HTList_indexOf(setup->valid_schemes, (void *) scheme))
for (scheme = HTAA_BASIC; scheme < HTAA_MAX_SCHEMES; scheme++) {
void *object = (void *) scheme;
if (-1 < HTList_indexOf(setup->valid_schemes, object))
return (HTAAScheme) scheme;
}
}
return HTAA_BASIC;
}
......
......@@ -1132,7 +1132,8 @@ LYNX_HOSTENT *LYGetHostByName(char *str)
#ifdef _WINDOWS_NSL
{
HANDLE hThread, dwThreadID;
HANDLE hThread;
DWORD dwThreadID;
#ifndef __CYGWIN__
if (!system_is_NT) { /* for Windows9x */
......@@ -1150,7 +1151,7 @@ LYNX_HOSTENT *LYGetHostByName(char *str)
WSASetLastError(WSAHOST_NOT_FOUND);
hThread = CreateThread(NULL, 4096UL, _fork_func, host, 0UL,
(unsigned long *) &dwThreadID);
&dwThreadID);
if (!hThread)
MessageBox(NULL, "CreateThread",
"CreateThread Failed", 0L);
......@@ -1954,7 +1955,7 @@ int HTDoRead(int fildes,
int nb;
#endif /* UCX, BSN */
#ifdef UNIX
#if defined(UNIX) && !defined(__BEOS__)
if (fildes == 0) {
/*
* 0 can be a valid socket fd, but if it's a tty something must have
......
......@@ -62,14 +62,14 @@ static void free_ssl_ctx(void)
SSL_CTX_free(ssl_ctx);
}
static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx)
static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED)
{
char *msg = NULL;
int result = 1;
if (!(preverify_ok || ssl_okay || ssl_noprompt)) {
#ifdef USE_X509_SUPPORT
HTSprintf0(&msg, "SSL error:%s-Continue?",
HTSprintf0(&msg, SSL_FORCED_PROMPT,
X509_verify_cert_error_string(X509_STORE_CTX_get_error(x509_ctx)));
if (HTForcedPrompt(ssl_noprompt, msg, YES))
ssl_okay = 1;
......@@ -84,6 +84,10 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx)
SSL *HTGetSSLHandle(void)
{
#ifdef USE_GNUTLS_INCL
static char *certfile = NULL;
#endif
if (ssl_ctx == NULL) {
/*
* First time only.
......@@ -98,8 +102,19 @@ SSL *HTGetSSLHandle(void)
SSL_CTX_set_default_verify_paths(ssl_ctx);
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, HTSSLCallback);
#endif /* SSLEAY_VERSION_NUMBER < 0x0800 */
#ifdef USE_GNUTLS_INCL
if ((certfile = LYGetEnv("SSL_CERT_FILE")) != NULL) {
CTRACE((tfp,
"HTGetSSLHandle: certfile is set to %s by SSL_CERT_FILE\n",
certfile));
}
#endif
atexit(free_ssl_ctx);
}
#ifdef USE_GNUTLS_INCL
ssl_ctx->certfile = certfile;
ssl_ctx->certfile_type = GNUTLS_X509_FMT_PEM;
#endif
ssl_okay = 0;
return (SSL_new(ssl_ctx));
}
......@@ -206,9 +221,12 @@ static int ws_read(int fd, char *buf, int len)
return res;
}
#define DWORD_ERR ((DWORD)-1)
static DWORD __stdcall _thread_func(void *p)
{
int i, val, ret;
DWORD result;
int i, val;
recv_data_t *q = (recv_data_t *) p;
i = 0;
......@@ -224,12 +242,12 @@ static DWORD __stdcall _thread_func(void *p)
i, ws_errno, q->fd, q->len);
MessageBox(NULL, buff, BOX_TITLE, BOX_FLAG);
#endif
ret = -1;
result = DWORD_ERR;
} else {
ret = val;
result = val;
}
return ((DWORD) ret);
return result;
}
/* The same like read, but takes care of EINTR and uses select to
......@@ -244,7 +262,8 @@ int ws_netread(int fd, char *buf, int len)
HANDLE hThread;
DWORD dwThreadID;
DWORD exitcode = 0;
DWORD ret_val = -1, val, process_time, now_TickCount, save_TickCount;
DWORD ret_val = DWORD_ERR;
DWORD val, process_time, now_TickCount, save_TickCount;
static recv_data_t para;
......@@ -279,7 +298,7 @@ int ws_netread(int fd, char *buf, int len)
i++;
if (val == WAIT_FAILED) {
HTInfoMsg("Wait Failed");
ret_val = -1;
ret_val = DWORD_ERR;
break;
} else if (val == WAIT_TIMEOUT) {
i++;
......@@ -298,7 +317,7 @@ int ws_netread(int fd, char *buf, int len)
}
} else if (val == WAIT_OBJECT_0) {
if (GetExitCodeThread(hThread, &exitcode) == FALSE) {
exitcode = -1;
exitcode = DWORD_ERR;
}
if (CloseHandle(hThread) == FALSE) {
HTInfoMsg("Thread terminate Failed");
......@@ -312,13 +331,22 @@ int ws_netread(int fd, char *buf, int len)
if (process_time == 0)
process_time = 1;
g_total_times += process_time;
g_total_bytes += exitcode;
if (g_total_bytes > 2000000) {
ws_read_per_sec = g_total_bytes / (g_total_times / 1000);
/*
* DWORD is unsigned, and could be an error code which is signed.
*/
if ((long) exitcode > 0)
g_total_bytes += exitcode;
ws_read_per_sec = g_total_bytes;
if (ws_read_per_sec > 2000000) {
if (g_total_times > 1000)
ws_read_per_sec /= (g_total_times / 1000);
} else {
ws_read_per_sec = g_total_bytes * 1000 / g_total_times;
ws_read_per_sec *= 1000;
ws_read_per_sec /= g_total_times;
}
ret_val = exitcode;
break;
}
......@@ -460,6 +488,11 @@ static int HTLoadHTTP(const char *arg,
char *ssl_dn_start;
char *ssl_all_cns;
#ifdef USE_GNUTLS_INCL
int ret;
unsigned tls_status;
#endif
#if SSLEAY_VERSION_NUMBER >= 0x0900
BOOL try_tls = TRUE;
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
......@@ -621,9 +654,62 @@ static int HTLoadHTTP(const char *arg,
goto done;
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
}
#ifdef USE_GNUTLS_INCL
ret = gnutls_certificate_verify_peers2(handle->gnutls_state, &tls_status);
if ((ret < 0) || tls_status) {
int flag_continue = 1;
char *msg2;
if (tls_status & GNUTLS_CERT_SIGNER_NOT_FOUND) {
msg2 = gettext("no issuer was found");
} else if (tls_status & GNUTLS_CERT_SIGNER_NOT_CA) {
msg2 = gettext("issuer is not a CA");
} else if (tls_status & GNUTLS_CERT_SIGNER_NOT_FOUND) {
msg2 = gettext("the certificate has no known issuer");
} else if (tls_status & GNUTLS_CERT_REVOKED) {
msg2 = gettext("the certificate has been revoked");
} else {
msg2 = gettext("the certificate is not trusted");
}
HTSprintf0(&msg, SSL_FORCED_PROMPT, msg2);
CTRACE((tfp, "HTLoadHTTP: %s\n", msg));
if (!ssl_noprompt) {
if (!HTForcedPrompt(ssl_noprompt, msg, YES)) {
flag_continue = 0;
}
} else if (ssl_noprompt == FORCE_PROMPT_NO) {
flag_continue = 0;
}
FREE(msg);
if (flag_continue == 0) {
status = HT_NOT_LOADED;
FREE(msg);
goto done;
}
}
#endif
X509_NAME_oneline(X509_get_subject_name(SSL_get_peer_certificate(handle)),
#ifndef USE_GNUTLS_INCL
ssl_dn, sizeof(ssl_dn));
#else
ssl_dn + 1, sizeof(ssl_dn) - 1);
/* Iterate over DN in incompatible GnuTLS format to bring it into OpenSSL format */
ssl_dn[0] = '/';
ssl_dn_start = ssl_dn;
while (*ssl_dn_start) {
if ((*ssl_dn_start == ',') && (*(ssl_dn_start + 1) == ' ')) {
*ssl_dn_start++ = '/';
if (*(p = ssl_dn_start) != 0) {
while ((p[0] = p[1]) != 0)
++p;
}
} else {
ssl_dn_start++;
}
}
#endif
/*
* X.509 DN validation taking ALL CN fields into account
......@@ -681,8 +767,8 @@ static int HTLoadHTTP(const char *arg,
/* if an error occurred, format the appropriate message */
if (status_sslcertcheck == 0) {
HTSprintf0(&msg,
gettext("SSL error:Can't find common name in certificate-Continue?"));
HTSprintf0(&msg, SSL_FORCED_PROMPT,
gettext("Can't find common name in certificate"));
} else if (status_sslcertcheck == 1) {
HTSprintf0(&msg,
gettext("SSL error:host(%s)!=cert(%s)-Continue?"),
......
......@@ -126,6 +126,13 @@ char *alloca();
#endif /* HAVE_CONFIG_H */
/* suppress inadvertant use of gettext in makeuctb when cross-compiling */
#ifdef DONT_USE_GETTEXT
#undef HAVE_GETTEXT
#undef HAVE_LIBGETTEXT_H
#undef HAVE_LIBINTL_H
#endif
#ifndef lynx_srand
#define lynx_srand srand
#endif
......
......@@ -168,10 +168,22 @@ error Host character set is not ASCII.
/* convert a char to an unsigned, needed if we have signed characters for ctype.h */
#define UCH(ch) ((unsigned char)(ch))
/*
* These parameters were provided by Nigel Horne, using BeOS professional 5.0
*/
#ifdef __BEOS__
#undef NETREAD
#undef NETWRITE
#undef NETCLOSE
#define NETREAD(s,b,l) recv((s),(b),(l),0)
#define NETWRITE(s,b,l) send((s),(b),(l),0)
#define NETCLOSE(s) closesocket(s)
#endif
/*
IBM-PC running Windows NT
These parameters providede by Susan C. Weber <sweber@kyle.eitech.com>.
These parameters provided by Susan C. Weber <sweber@kyle.eitech.com>.
*/
#ifdef _WINDOWS
......@@ -705,7 +717,11 @@ typedef unsigned short mode_t;
#define DECL_SYS_ERRLIST 1
#endif
#if defined(VMS)
#define socklen_t unsigned
#else
#define socklen_t int /* used for default LY_SOCKLEN definition */
#endif
#endif /* !HAVE_CONFIG_H */
......
......@@ -4,13 +4,38 @@ dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
dnl and Philippe De Muyter <phdm@macqel.be>
dnl
dnl Created: 1997/1/28
dnl Updated: 2006/5/29
dnl Updated: 2006/9/2
dnl
dnl The autoconf used in Lynx development is GNU autoconf 2.13 or 2.52, patched
dnl by Thomas Dickey. See your local GNU archives, and this URL:
dnl http://invisible-island.net/autoconf/autoconf.html
dnl
dnl ---------------------------------------------------------------------------
dnl
dnl Copyright 1997-2005,2006 by Thomas E. Dickey
dnl
dnl Permission to use, copy, modify, and distribute this software and its
dnl documentation for any purpose and without fee is hereby granted,
dnl provided that the above copyright notice appear in all copies and that
dnl both that copyright notice and this permission notice appear in
dnl supporting documentation, and that the name of the above listed
dnl copyright holder(s) not be used in advertising or publicity pertaining
dnl to distribution of the software without specific, written prior
dnl permission.
dnl
dnl THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
dnl TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dnl AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
dnl LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
dnl
dnl ---------------------------------------------------------------------------
dnl A few macros (the AM_xxx ones) are originally from gettext 0.10.35 (but
dnl are modified), and are part of this file due to mechanical limitations of
dnl autoconf.
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl AM_GNU_GETTEXT version: 11 updated: 2004/01/26 20:58:40
dnl --------------
......@@ -227,7 +252,7 @@ AC_DEFUN([AM_LC_MESSAGES],
fi
fi])dnl
dnl ---------------------------------------------------------------------------
dnl AM_PATH_PROG_WITH_TEST version: 6 updated: 2006/05/29 11:25:53
dnl AM_PATH_PROG_WITH_TEST version: 7 updated: 2006/08/06 19:45:29
dnl ----------------------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
......@@ -264,9 +289,9 @@ AC_CACHE_VAL(ac_cv_path_$1,
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test -f $ac_dir/$ac_word$ac_exeext; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
ac_cv_path_$1="$ac_dir/$ac_word$ac_exeext"
break
fi
fi
......@@ -3259,13 +3284,19 @@ if test -n "$cf_path_prog" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PATH_SYNTAX version: 10 updated: 2006/01/02 19:36:00
dnl CF_PATH_SYNTAX version: 11 updated: 2006/09/02 08:55:46
dnl --------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
dnl result begins with 'NONE'. This is necessary to work around autoconf's
dnl delayed evaluation of those symbols.
AC_DEFUN([CF_PATH_SYNTAX],[
if test "x$prefix" != xNONE; then
cf_path_syntax="$prefix"
else
cf_path_syntax="$ac_default_prefix"
fi
case ".[$]$1" in #(vi
.\[$]\(*\)*|.\'*\'*) #(vi
;;
......@@ -3277,12 +3308,12 @@ case ".[$]$1" in #(vi
eval $1="[$]$1"
case ".[$]$1" in #(vi
.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
;;
esac
;; #(vi
.no|.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
;;
*)
ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
......@@ -3544,6 +3575,65 @@ int main()
test "$cf_cv_set_errno" != no && AC_DEFINE(CAN_SET_ERRNO)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SIGWINCH version: 1 updated: 2006/04/02 16:41:09
dnl -----------
dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all
dnl programs need this test).
dnl
dnl This is really a MacOS X 10.4.3 workaround. Defining _POSIX_C_SOURCE
dnl forces SIGWINCH to be undefined (breaks xterm, ncurses). Oddly, the struct
dnl winsize declaration is left alone - we may revisit this if Apple choose to
dnl break that part of the interface as well.
AC_DEFUN([CF_SIGWINCH],
[
AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/signal.h>
],[int x = SIGWINCH],
[cf_cv_define_sigwinch=yes],
[AC_TRY_COMPILE([
#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>
],[int x = SIGWINCH],
[cf_cv_define_sigwinch=maybe],
[cf_cv_define_sigwinch=no])
])
])
if test "$cf_cv_define_sigwinch" = maybe ; then
AC_CACHE_CHECK(for actual SIGWINCH definition,cf_cv_fixup_sigwinch,[
cf_cv_fixup_sigwinch=unknown
cf_sigwinch=32
while test $cf_sigwinch != 1
do
AC_TRY_COMPILE([
#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>
],[
#if SIGWINCH != $cf_sigwinch
make an error
#endif
int x = SIGWINCH],
[cf_cv_fixup_sigwinch=$cf_sigwinch
break])
cf_sigwinch=`expr $cf_sigwinch - 1`
done
])
if test "$cf_cv_fixup_sigwinch" != unknown ; then
CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16
dnl -------------
dnl Check for definitions & structures needed for window size-changing
......@@ -4090,7 +4180,7 @@ test -d /usr && {
}
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SUBST version: 2 updated: 1997/09/06 23:41:28
dnl CF_SUBST version: 4 updated: 2006/06/17 12:33:03
dnl --------
dnl Shorthand macro for substituting things that the user may override
dnl with an environment variable.
......@@ -4101,11 +4191,29 @@ dnl $3 = default value
AC_DEFUN([CF_SUBST],
[AC_CACHE_VAL(cf_cv_subst_$2,[
AC_MSG_CHECKING(for $1 (symbol $2))
test -z "[$]$2" && $2=$3
CF_SUBST_IF([-z "[$]$2"], [$2], [$3])
cf_cv_subst_$2=[$]$2
AC_MSG_RESULT([$]$2)
])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SUBST_IF version: 2 updated: 2006/06/17 12:33:03
dnl -----------
dnl Shorthand macro for substituting things that the user may override
dnl with an environment variable.
dnl
dnl $1 = condition to pass to "test"
dnl $2 = environment variable
dnl $3 = value if the test succeeds
dnl $4 = value if the test fails
AC_DEFUN([CF_SUBST_IF],
[
if test $1 ; then
$2=$3
ifelse($4,,,[else
$2=$4])
fi
AC_SUBST($2)
cf_cv_subst_$2=[$]$2])
$2=${cf_cv_subst_$2}
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SYSTEM_MAIL_FLAGS version: 3 updated: 1998/11/18 14:45:34
......@@ -4776,7 +4884,7 @@ AC_ARG_WITH(curses-dir,