1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-16 01:08:31 -04:00
Commit Graph

221 Commits

Author SHA1 Message Date
Witold Filipczyk
685cd47c2e Ubuntu has liblua5.1.so, so added 5.1 to the "search path".
Reported by Ahmed El-Mahmoudy.
2010-07-25 20:13:09 +02:00
Witold Filipczyk
4ec7aeafe0 configure options --with-xulrunner_includes= and --with-xulrunner_libs=
The first option specifies the directory of xulrunner includes, eg.
--with-xulrunner_includes=/usr/include/xulrunner
The second: compiler options to find library, eg.
--with-xulrunner_libs="-Wl,-R/usr/lib/xulrunner -L/usr/lib/xulrunner -lmozjs"
2010-07-21 21:08:00 +02:00
Witold Filipczyk
331a4dc62b Link against lua51, not lua50. 2010-07-21 19:07:49 +02:00
Witold Filipczyk
cb6556302c gcc-4.5.0 show a warning when comparing enums. 2010-07-04 13:32:06 +02:00
Witold Filipczyk
a42cd2bb67 configure.in: Do not test if jsapi.h exists.
One can add eg.
CPPFLAGS="-I/usr/include/xulrunner" LDFLAGS="-L/usr/lib/xulrunner -Wl,-R/usr/lib/xulrunner"
to the ./configure
Before xulrunner wasn't found. Now it is possible.
2010-03-31 18:16:10 +02:00
Witold Filipczyk
b456fba69f Compilation fix. 2010-03-21 17:18:32 +01:00
Witold Filipczyk
caaa7b3d13 Force tre-0.8.0 or higher.
Functions in the tre-0.8.0 have the "tre_" prefix.
They won't collide with Perl.
2009-11-28 15:45:24 +01:00
Miciah Dashiel Butler Masters
f31cf6f9fe Heartbeat code using JS_TriggerOperationCallback
Implement new heartbeat code to catch runaway execution of document
ECMAScript code.  The old code uses JS_SetBranchCallback which is
deprecated in new versions of SpiderMonkey.  The new code uses setitimer(2)
and the JS_SetOperationCallback and JS_TriggerOperationCallback interfaces,
introduced in SpiderMonkey 1.8.1.  Compatibility with both the old
JS_SetBranchCallback and the new interfaces is maintained.
2009-11-26 00:57:21 +00:00
Kalle Olavi Niemitalo
822e9d6921 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	po/fr.po: kept version from elinks-0.13
	src/viewer/dump/dump.c
2009-06-12 23:18:46 +03:00
Kalle Olavi Niemitalo
4f29067169 bug 1081: Fix regfree crashes by changing order of libraries 2009-06-12 23:14:45 +03:00
Kalle Olavi Niemitalo
683cfe4c86 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS: merged
	configure.in: VERSION changed in elinks-0.12; kept 0.13.GIT
	doc/man/man1/elinks.1.in: regenerated
	doc/man/man5/elinks.conf.5: regenerated
	doc/man/man5/elinkskeys.5: regenerated
	po/fr.po: kept 0.13.GIT
	po/pl.po: kept 0.13.GIT
2009-05-31 16:18:23 +03:00
Kalle Olavi Niemitalo
c15a337529 ELinks 0.12pre4.GIT 2009-05-31 12:17:55 +03:00
Kalle Olavi Niemitalo
a23a49fb4e ELinks 0.12pre4 2009-05-31 11:48:47 +03:00
Kalle Olavi Niemitalo
681e377027 Debian bug 528661: Check for gnutls_priority_set_direct
Avoid compilation error with GNUTLS 1.2.9:

/home/Kalle/src/elinks-0.12/src/network/ssl/ssl.c:258: error: implicit declaration of function ‘gnutls_priority_set_direct’

If the function is not available, use gnutls_set_default_priority instead.
Perhaps it'll work with bugzilla.novell.com, perhaps not.
2009-05-30 14:34:01 +03:00
Kalle Olavi Niemitalo
5def50bed9 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	configure.in
	doc/installation.txt
2009-05-23 12:40:52 +03:00
Kalle Olavi Niemitalo
3d4919507a configure: More extensible choice of SSL library
In 0.13.GIT, the configure script sets disable_gnutls=yes if it
decides to use nss_compat_ossl.  In recent elinks-0.12, the script
logs "explicitly disabled" if $disable_gnutls is set.  Thus, merging
those together could have caused an incorrect claim to be logged.

Rearrange the logic to make it easier to extend to multiple libraries.
Code that deals with one library no longer needs to worry about each
alternative library separately.  Instead just test and set the one
shared chosen_ssl_library variable.

While at it, get rid of openssl_withval, which merely mirrored the
with_openssl variable provided by Autoconf.
2009-05-23 10:48:16 +03:00
Kalle Olavi Niemitalo
f8bbf1a227 Debian bug 529821: Use pkg-config, not libgnutls-config
The configure script used to run libgnutls-config in order to find the
compiler and linker options needed for using GNUTLS, but GNUTLS 2.7
apparently doesn't ship that script any more.  Use pkg-config instead.
GNUTLS 1.2.0 is the oldest version supported by ELinks, and that already
installs the gnutls.pc file required by pkg-config.

This commit also removes support for configure --with-gnutls=DIR.
The configure script used to look for libgnutls-config in DIR.
DIR thus had to be a directory where executable programs were installed,
and it's unlikely that gnutls.pc would be found there.  So, any callers
that used this feature would have to be changed anyway, and they can as
well be changed to set the PKG_CONFIG_PATH environment variable instead.
2009-05-22 22:53:06 +03:00
Kalle Olavi Niemitalo
feb640f29c configure: Cosmetic changes in C99 inline check 2009-05-22 22:53:06 +03:00
Kalle Olavi Niemitalo
284ac21486 configure: Require Autoconf 2.61 or later
Autoconf 2.61 has been installed on elinks.cz.  I don't know when.
2009-05-22 22:53:05 +03:00
Kalle Olavi Niemitalo
ca1d540a41 configure: Fix "not a valid shell variable" with Autoconf 2.63
Fix this error:

configure.in:1430: error: AC_SUBST: `[CONFIG_TRE]' is not a valid shell variable name
acinclude.m4:31: EL_LOG_CONFIG is expanded from...
configure.in:1430: the top level
autom4te: /usr/bin/m4 failed with exit status: 1

Reported by witekfl.
2009-05-22 22:53:01 +03:00
Kalle Olavi Niemitalo
82e67f8ebc Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/intl/charsets.h
	src/viewer/text/search.c
2009-05-21 19:50:16 +03:00
Kalle Olavi Niemitalo
0c756fc3e8 TRE: Check for 32-bit wchar_t at configure time
This check used to be in src/elinks.h.  Move it to configure.in so
that (1) the result can be logged and (2) ELinks won't even link with
TRE if wchar_t prevents its use.

Also, rename HAVE_TRE_REGEX_H to CONFIG_TRE, to reflect that it is not
always defined if the header exists.
2009-05-21 17:22:12 +03:00
Kalle Olavi Niemitalo
07c90ea438 --without-tre: Don't nest AC_MSG_CHECKING...AC_MSG_RESULT
The previous version could display its progress like this:

checking for TRE... checking for TRE in pkg-config... yes
checking for TRE header and library... yes
no

Omit the outer "checking for TRE..." and "no" (which was untrue
anyway), unless --without-tre causes the inner checks to be skipped.
2009-05-21 14:57:54 +03:00
Hema Seetharamaiah
4c95dd86a7 Add --without-tre option
elinks-lite in Debian does not depend on any libraries (except
gnutls). Including this option will allow elinks-lite to be built
without libtre dependency.
2009-05-21 13:49:29 +03:00
Kalle Olavi Niemitalo
180ddcddb0 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/session.c: Kept the elinks-0.13 version.
		Bug 1077 did not occur in elinks-0.13 because
		setup_session here calls render_document_frames
		directly and that sets ses->doc_view->vs.
2009-05-10 11:49:41 +03:00
Kalle Olavi Niemitalo
8e20417bdb Debian bug 526349: Bundle asciidoc.py with ELinks.
The AsciiDoc 7.1.2 configuration files included in the ELinks
source tree apparently aren't compatible with AsciiDoc 8.4.4:

 [ASCIIDOC]   doc/elinks.1.xml
FAILED: [listdef-bulleted] missing section: [listtags-None]
make[1]: *** [elinks.1.xml] Error 1

Fix this by including asciidoc.py from AsciiDoc 7.1.2 as well.
The build system now doesn't care at all whether the user has
installed some version of AsciiDoc or not.
2009-05-01 20:40:25 +03:00
Kalle Olavi Niemitalo
34f8f6a58f Merge branch 'elinks-0.12' into master
Conflicts:
	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (used elinks-0.12)
	po/be.po (used elinks-0.12)
	po/bg.po (used elinks-0.12)
	po/ca.po (used elinks-0.12)
	po/cs.po (used elinks-0.12)
	po/da.po (used elinks-0.12)
	po/de.po (used elinks-0.12)
	po/el.po (used elinks-0.12)
	po/es.po (used elinks-0.12)
	po/et.po (used elinks-0.12)
	po/fi.po (used elinks-0.12)
	po/fr.po (used master)
	po/gl.po (used elinks-0.12)
	po/hr.po (used elinks-0.12)
	po/hu.po (used elinks-0.12)
	po/id.po (used elinks-0.12)
	po/is.po (used elinks-0.12)
	po/it.po (used elinks-0.12)
	po/lt.po (used elinks-0.12)
	po/nb.po (used elinks-0.12)
	po/nl.po (used elinks-0.12)
	po/pl.po (used master)
	po/pt.po (used elinks-0.12)
	po/pt_BR.po (used elinks-0.12)
	po/ro.po (used elinks-0.12)
	po/ru.po (used elinks-0.12)
	po/sk.po (used elinks-0.12)
	po/sr.po (used elinks-0.12)
	po/sv.po (used elinks-0.12)
	po/tr.po (used elinks-0.12)
	po/uk.po (used elinks-0.12)
2009-03-29 18:26:20 +03:00
Kalle Olavi Niemitalo
a845050c3b ELinks 0.12pre3.GIT 2009-03-29 01:14:06 +02:00
Kalle Olavi Niemitalo
3801698ff1 ELinks 0.12pre3 2009-03-29 01:14:03 +02:00
Kalle Olavi Niemitalo
d7d18e4e43 bug 1047: inline functions C99 conformance
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared.  In particular, any
function declared inline must also be defined in the same translation
unit.  To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.

Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions.  Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h.  Then use that in the definitions of all non-static
inline functions.

Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
58b5e3968f Restore original wording of Pasky's comment
The SEE_FLAGS configury may be derived from Guile but there are no
SEE_FLAGS in the Guile source tree.
2009-03-24 07:37:16 +02:00
Witold Filipczyk
9b9f5d9973 Fixed issue with EL_CONFIG_OPTIONAL_LIBRARY and features.conf
Settings of features.conf were ignored by the EL_CONFIG_OPTIONAL_LIBRARY.
(cherry picked from commit 3e8f774659)
2009-02-23 12:17:29 +01:00
Witold Filipczyk
3e8f774659 Fixed issue with EL_CONFIG_OPTIONAL_LIBRARY and features.conf
Settings of features.conf were ignored by the EL_CONFIG_OPTIONAL_LIBRARY.
2009-02-23 11:00:59 +01:00
Witold Filipczyk
0787b95634 - lzma disabled by default.
(cherry picked from commit 56b7d38a28)
2009-02-22 14:04:06 +01:00
Witold Filipczyk
56b7d38a28 - lzma disabled by default. 2009-02-22 13:58:55 +01:00
Witold Filipczyk
9054e57c55 Merge branch 'elinks-0.12'
Conflicts:
	src/document/dom/renderer.c
2009-02-12 10:01:57 +01:00
Kalle Olavi Niemitalo
7067fc7af9 Check for JS_ReportAllocationOverflow before using it.
Debian libmozjs-dev 1.9.0.4-2 has JS_ReportAllocationOverflow but
js-1.7.0 reportedly hasn't.  Check at configure time whether that
function is available.  If not, use JS_ReportOutOfMemory instead.

Reported by Witold Filipczyk.
2009-02-08 23:07:22 +02:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Kalle Olavi Niemitalo
63a362ee53 Bug 1060: Try TRE_LIBS=-ltre if pkg-config tre fails.
This works around Debian bug 513055 in libtre-dev.
2009-02-08 18:26:22 +02:00
Witold Filipczyk
664048098a Bug 1060: #undef HAVE_TRE_REGEX_H only in elinks.h
I didn't read the code of the tre library, but I suppose that when sizes of
wchar_t and unicode_val_T are equal it will work fine.

[ From bug 1060 attachment 508.  --KON ]
2009-02-08 18:26:22 +02:00
Witold Filipczyk
c5a7f87c43 Bug 1060: Use libtre for regexp searches.
When the user tells ELinks to search for a regexp, ELinks 0.11.0
passes the regexp to regcomp() and the formatted document to
regexec(), both in the terminal charset.  This works OK for unibyte
ASCII-compatible charsets because the regexp metacharacters are all in
the ASCII range.  And ELinks 0.11.0 doesn't support multibyte or
ASCII-incompatible (e.g. EBCDIC) charsets in terminals, so it is no
big deal if regexp searches fail in such locales.

ELinks 0.12pre1 attempts to support UTF-8 as the terminal charset if
CONFIG_UTF8 is defined.  Then, struct search contains unicode_val_T c
rather than unsigned char c, and get_srch() and add_srch_chr()
together save UTF-32 values there if the terminal charset is UTF-8.
In plain-text searches, is_in_range_plain() compares those values
directly if the search is case sensitive, or folds them to lower case
if the search is case insensitive: with towlower() if the terminal
charset is UTF-8, or with tolower() otherwise.  In regexp searches
however, get_search_region_from_search_nodes() still truncates all
values to 8 bits in order to generate the string that
search_for_pattern() then passes to regexec().  In UTF-8 locales,
regexec() expects this string to be in UTF-8 and can't make sense of
the truncated characters.  There is also a possible conflict in
regcomp() if the locale is UTF-8 but the terminal charset is not, or
vice versa.

Rejected ways of fixing the charset mismatches:

* When the terminal charset is UTF-8, recode the formatted document
  from UTF-32 to UTF-8 for regexp searching.  This would work if the
  terminal and the locale both use UTF-8, or if both use unibyte
  ASCII-compatible charsets, but not if only one of them uses UTF-8.

* Convert both the regexp and the formatted document to the charset of
  the locale, as that is what regcomp() and regexec() expect.  ELinks
  would have to somehow keep track of which bytes in the converted
  string correspond to which characters in the document; not entirely
  trivial because convert_string() can replace a single unconvertible
  character with a string of ASCII characters.  If ELinks were
  eventually changed to use iconv() for unrecognized charsets, such
  tracking would become even harder.

* Temporarily switch to a locale that uses the charset of the
  terminal.  Unfortunately, it seems there is no portable way to
  construct a name for such a locale.  It is also possible that no
  suitable locale is available; especially on Windows, whose C library
  defines MB_LEN_MAX as 2 and thus cannot support UTF-8 locales.

Instead, this commit makes ELinks do the regexp matching with regwcomp
and regwexec from the TRE library.  This way, ELinks can losslessly
recode both the pattern and the document to Unicode and rely on the
regexp code in TRE decoding them properly, regardless of locale.

There are some possible problems though:

1. ELinks stores strings as UTF-32 in arrays of unicode_val_T, but TRE
   uses wchar_t instead.  If wchar_t is UTF-16, as it is on Microsoft
   Windows, then TRE will misdecode the strings.  It wouldn't be too
   hard to make ELinks convert to UTF-16 in this case, but (a) TRE
   doesn't currently support UTF-16 either, and it seems possible that
   wchar_t-independent UTF-32 interfaces will be added to TRE; and (b)
   there seems to be little interest on using ELinks on Windows anyway.

2. The Citrus Project apparently wanted BSD to use a locale-dependent
   wchar_t: e.g. UTF-32 in some locales and an ISO 2022 derivative in
   others.  Regexp searches in ELinks now do not support the latter.

[ Adapted to elinks-0.12 from bug 1060 attachment 506.
  Commit message by me.  --KON ]
2009-02-08 18:26:22 +02:00
Kamil Dudka
a00a413765 add support for nss_compat_ossl library (OpenSSL replacement)
* configure.in: New configure parameter --with-nss_compat_ossl.
 * socket.c: New configure option connection.ssl.client_cert.nickname.
 * ssl.h: Handle CONFIG_NSS_COMPAT_OSSL macro.
 * ssl.c: Add support for nss_compat_ossl.
 * TODO: Remove completed task.
 * NEWS: Mention the change.
2008-09-27 16:32:36 +03:00
Kalle Olavi Niemitalo
b40736cafe Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/fr.po (kept 0.13.GIT version)
	po/pl.po (kept 0.13.GIT version)
2008-09-27 16:28:28 +03:00
Kamil Dudka
58ebb4447b fix mangled indentation in configure --help 2008-09-27 15:53:17 +03:00
Kalle Olavi Niemitalo
856a429038 ELinks 0.12pre2.GIT 2008-09-21 14:49:04 +03:00
Kalle Olavi Niemitalo
319e05d106 ELinks 0.12pre2 2008-09-21 11:45:22 +03:00
Kalle Olavi Niemitalo
80a5c6d466 Merge branch 'elinks-0.12' into elinks-0.13 2008-09-04 12:08:38 +03:00
Kalle Olavi Niemitalo
49f529a582 1044: Check for -rdynamic with libraries.
With Sun Studio 11 on Solaris 9, we get "cc: Warning: illegal option
-dynamic"; then, cc proceeds anyway, but the option can prevent the
linker from finding the libraries listed in -l operands.  To detect
this, move the -rdynamic check in configure.in down to a place where
the libraries have already been added to $LDFLAGS.  So if -rdynamic
interferes with the search for libraries, ELinks won't use it.

Merely moving the test would also change the location of -rdynamic in
$LDFLAGS.  Counteract that by making the test add -rdynamic to the
beginning of $LDFLAGS, rather than to the end.  This may make the test
more reliable on Solaris.
2008-09-04 02:41:46 +03:00
Kalle Olavi Niemitalo
64f0f6e7a8 Don't link with libgnutls-openssl, which is now GPLv3+.
ELinks used to call the MD5 code in libgnutls-openssl, part of
GNUTLS-EXTRA, which was licensed under GNU GPL version 2 or later.
In GnuTLS 2.2.0 however, the license of GNUTLS-EXTRA has been changed
to GNU GPL version 3 or later.  This is no longer compatible with
GNU GPL version 2 as used in the current ELinks, because GPLv2 clause
2. b) requires the whole work to be licensed under GPLv2, and GPLv3
does not allow that.

If anyone is still using a pre-2.2 GnuTLS, he or she can tweak
configure.in to check the version or just assume it's old enough.
There is not much reason to do so though, as including the MD5 code
in ELinks seems to cost only about 4 kilobytes on i686.
(cherry picked from commit 9ca0182ec6)
2008-08-17 21:43:20 +03:00
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00