1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00
Commit Graph

191 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
53b67c1a4a 0.12pre6.GIT 2012-10-30 19:36:00 +02:00
Kalle Olavi Niemitalo
06c602c2c0 ELinks 0.12pre6 2012-10-28 14:57:15 +02:00
witekfl
a4d2cf5867 Deleted ecmascript code using SEE.
AFAIK SEE is no longer developped.
I see no reason to use SEE in ELinks.
(cherry picked from commit 81c9f462c2)
2011-05-15 14:26:33 +03:00
Kalle Olavi Niemitalo
4369b052ef configure: Avoid two errors if TERM=unknown
http://buildd.debian-ports.org/fetch.php?pkg=elinks&arch=hurd-i386&ver=0.12%7Epre5-1&stamp=1247378205&file=log&as=raw
shows two unsightly errors, apparently triggered by TERM=unknown:

tput: unknown terminal "unknown"
/build/buildd/elinks-0.12~pre5/configure: line 25480: test: -ge: unary operator expected

Hide the first of them by redirecting to /dev/null,
and avoid the second one by substituting "0" if tput fails.

I'm not sure why `which tput` is used instead of plain tput,
but it doesn't seem to be causing any problems in practice.
(There are problems in theory if tput is not installed,
tput is found in a directory whose name contains spaces,
or tput is a shell function or builtin.)
2009-08-15 01:59:09 +03:00
Kalle Olavi Niemitalo
3935269b5a ELinks 0.12pre5.GIT 2009-07-08 13:14:31 +03:00
Kalle Olavi Niemitalo
d522efa5be ELinks 0.12pre5 2009-07-07 15:23:17 +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
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
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
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
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
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
0787b95634 - lzma disabled by default.
(cherry picked from commit 56b7d38a28)
2009-02-22 14:04:06 +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
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
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
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
e019038c17 When checking for <net/if.h>, #include <sys/socket.h> first.
On Mac OS X 10.5.4, <net/if.h> does not #include <sys/socket.h> but
uses struct sockaddr defined there.  Autoconf 2.61 generates a
configure script that warns if the header can be preprocessed but not
compiled.  The Autoconf manual cautions that future versions of
Autoconf will treat the file as missing in this case.  To let ELinks
detect <net/if.h> even with a future Autoconf, make the test program
#include <sys/socket.h> before <net/if.h>.
2008-08-01 00:40:34 +03:00
Kalle Olavi Niemitalo
f479d6e82a Explain in config.h.in what a hack _ALLOCA_H is 2008-07-15 22:53:26 +03:00
Witold Filipczyk
37ce1ca658 Here is a patch, which adds support for tcc's alloca. 2008-07-15 22:28:01 +03:00
Kalle Olavi Niemitalo
8493d6c021 ELinks 0.12pre1.GIT 2008-07-01 03:16:25 +03:00
Kalle Olavi Niemitalo
c0ef72117d ELinks 0.12pre1 2008-07-01 03:11:44 +03:00
Kalle Olavi Niemitalo
2e1df1dc78 Bug 1012: Compile with -fno-strict-overflow or -fwrapv.
(cherry picked from commit b7312e6882)
2008-05-10 23:31:05 +03:00
Jonas Fonseca
705acfa05a Use git tools instead of cogito for getting the build ID
The build ID now includes both last tagged version, commit generation
since last tagged version, as well as the leading characters of the
commit ID and a flag for dirty working tree.
(cherry picked from commit c2a0d3b969)
2008-03-01 13:55:16 +02:00
Witold Filipczyk
8492e6b1af lzma: used the lzma library from tukaani.org. 2008-02-24 20:45:32 +02:00
Kalle Olavi Niemitalo
ac03086754 configure.in: Explain why to check for gzclearerr. 2008-02-17 21:54:19 +02:00
Kalle Olavi Niemitalo
4672bad9c7 configure.in: Change most "dnl" comments to "#".
Autoconf and m4 copy the "#" comments from configure.in to configure.
This should make it easier to find the part of configure that was
expanded from a specific check in configure.in.
2008-02-17 21:42:48 +02:00
Kalle Olavi Niemitalo
172771bcfc configure.in: Remove obsolete comment. 2008-02-17 21:42:40 +02:00
Kalle Olavi Niemitalo
df07b7839c configure: Don't try to link with Lua 5.1.
ELinks does not yet work with Lua 5.1 (see bug 742),
so the configure script should not suggest that it does.
When bug 742 is eventually fixed, ELinks should probably
prefer Lua 5.1 over 5.0, as the newer version seems likely
to be kept installed longer.
(cherry picked from commit dc747a6ec3)
2008-02-09 14:11:14 +02:00
Kalle Olavi Niemitalo
cb1454918a Bug 54: Don't force 8-bit characters and no parity.
Actually, don't use the cfmakeraw function at all,
and don't look for it during configure either.

(cherry picked from commit 87f1661314
 but moved the NEWS entry into the 0.12 section)
2008-02-04 23:19:40 +02:00
Kalle Olavi Niemitalo
61341d9237 Bug 822: Show --disable-utf-8 in configure --help.
Because features.conf now contains CONFIG_UTF8=yes,
configure --enable-utf-8 is not useful, and it is better
to document configure --disable-utf-8.
Reported by witekfl.
2007-12-16 01:06:48 +02:00
Kalle Olavi Niemitalo
5d7e26fc90 GCC 4.2.1 needs -Wno-address, not -Wno-always-true. 2007-09-24 10:29:20 +03:00
Jonas Fonseca
1079c95b9d Integrate Doxygen better in the build system
This change:

 - Adds a check for the doxygen program to configure.
 - Moves the Doxyfile from src/Doxyfile to doc/Doxyfile.in.
 - Generates a doc/Doxyfile from doc/Doxyfile.in inserting
   an absolute path to the source directory, so that it
   also works when builddir != srcdir.
 - Adds `make api` rule for running doxygen; it depends on
   api/doxygen file which is never created to force the rule
   to always run.
2007-08-08 14:23:21 +02:00