Re: [elinks-dev] Patch to make libtre dependency optional.

2009-05-21 Thread Kalle Olavi Niemitalo
Hema Seetharamaiah h...@treap.net writes:

 Yes, I provide explicit permission [...]

Thanks.  I pushed your patch and related changes to elinks-0.12.
They'll soon get to master too.

 On Sun, May 17, 2009 11:05 pm, Kalle Olavi Niemitalo wrote:
 - desirable: BSD-like licence, to avoid being forced to
   upgrade to ever more complex versions of GNU GPL.

 I also explicitly license my code to be used under the modified BSD and
 X11 license.

Well, that was more a preference than a requirement :-) as the
code inherited from Links will probably prevent distributing
ELinks as a whole under a permissive licence, even if we can get
permission from all ELinks contributors.  I appreciate the grant
though.


pgp6EML15KYin.pgp
Description: PGP signature
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Patch to make libtre dependency optional.

2009-05-17 Thread Kalle Olavi Niemitalo
Hema Seetharamaiah h...@treap.net writes:

 I license my changes under GPL V2 or later. 

 Please accept the patch if this is ok.

Can you also give permission to link with OpenSSL?  I see your
patch affects only configure.in, which doesn't really become part
of the elinks executable, but anyway I think it'd be clearest to
get such permission for all ELinks-specific code.  (We don't
currently have explicit permission from all copyright holders
but I don't want to make the situation any worse.)

The FSF apparently recommends also giving explicit permission to
link with libraries licensed under LGPL:
http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs
I don't know how necessary that really is.  (It seems related
to section 3 of LGPLv2.)

Then, I'd like to store your name and email address in at least
these publicly visible places:
- In the AUTHORS file, whence the name would get to 
  http://elinks.cz/authors.html too.  The licensing notice would
  also go here.
- In related release announcements.  (Perhaps not the email
  address though.)
- In the Git commit metadata.  The cia.vc and ohloh.com web sites
  are already collecting information from there and others might
  do so in the future.
Is such use of your personal information OK with you?  I presume
it is, because you included that info in the From: line of the
patch, but I'd like to have explicit permission if possible.

The Linux and Git projects document similar requirements in their
SubmittingPatches files and expect contributors to add a
Signed-Off-By line to their commit messages if they grant the
necessary permissions.  ELinks doesn't currently have these
things written down; each committer apparently decides on his own
what he dares to push.

At this time, I think the licensing of any code added to ELinks
should satisfy:
- requirement: GPLv2 compatible.
- very desirable: OpenSSL compatible. 
- very desirable: GPLv3 compatible, so that the current
  libsmbclient could be used.
- desirable: GPLv2-or-later, so that when GPLv4 comes out and
  libraries switch to it, we wouldn't have to locate the
  original copyright holder's heirs.
- desirable: BSD-like licence, to avoid being forced to
  upgrade to ever more complex versions of GNU GPL.

Other ELinks developers might not share these opinions.


pgpq9Dmyktyxc.pgp
Description: PGP signature
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Patch to make libtre dependency optional.

2009-04-28 Thread Hema Seetharamaiah
Kalle Olavi Niemitalo wrote:
 Your patch also contains spaces between tabs in indentation,
 and a redundant use of EL_SAVE_FLAGS.

 I'm attaching a revised patch that should fix these problems.
 I also renamed HAVE_TRE_REGEX_H to CONFIG_TRE because it can
 now be unset even if the header and library exist all right.
   
Thanks for the revised patch.
 I should also ask about storage of personal data and licensing
 of changes but it's getting too late here.
I license my changes under GPL V2 or later. 

Please accept the patch if this is ok.

Regards,
Hema.
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Patch to make libtre dependency optional.

2009-04-26 Thread Kalle Olavi Niemitalo
Hema Seetharamaiah h...@treap.net writes:

 Attached is a patch that provides a new option without-tre - which can be
 used to build elinks without libtre dependency.

With that patch, configure without any TRE-related option outputs here:

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

i.e. you have nested AC_MSG_CHECKING/AC_MSG_RESULT pairs, and the
final result is also incorrect.  I think the simplest solution
would be just

if test $with_tre = no; then
AC_MSG_CHECKING([[for TRE]])
AC_MSG_RESULT([[not used]])
else
... put the original tests here ...
fi

Your patch also contains spaces between tabs in indentation,
and a redundant use of EL_SAVE_FLAGS.

I'm attaching a revised patch that should fix these problems.
I also renamed HAVE_TRE_REGEX_H to CONFIG_TRE because it can
now be unset even if the header and library exist all right.

I should also ask about storage of personal data and licensing
of changes but it's getting too late here.

From 3fee12ca965f3e6269800f79b054e5d26c842fb9 Mon Sep 17 00:00:00 2001
From: Kalle Olavi Niemitalo k...@iki.fi
Date: Sun, 26 Apr 2009 23:46:17 +0300
Subject: [PATCH] Add --without-tre option

elinks-lite in Debian does not depend on any libraries (except
gnutls and the usual libc and libgcc). Including this option
will allow elinks-lite to be built without libtre dependency.

Based on a patch by Hema Seetharamaiah h...@treap.net.
---
 configure.in |   83 --
 src/config/options.inc   |2 +-
 src/elinks.h |2 +-
 src/viewer/text/search.c |   22 ++--
 4 files changed, 64 insertions(+), 45 deletions(-)

diff --git a/configure.in b/configure.in
index 631b605..bf56d95 100644
--- a/configure.in
+++ b/configure.in
@@ -933,43 +933,62 @@ fi
 # Check for TRE library
 # ===
 
-AC_MSG_CHECKING([[for TRE in pkg-config]])
-if pkg-config tre; then
-	TRE_CFLAGS=`pkg-config --cflags tre`
-	TRE_LIBS=`pkg-config --libs tre`
-	AC_MSG_RESULT([[yes]])
+AC_ARG_WITH([[tre]], [[  --without-tre   disable TRE regex search support]])
+if test $with_tre = no; then
+	AC_MSG_CHECKING([[for TRE]])
+	AC_MSG_RESULT([[disabled]])
+	tre_log=no (explicitly disabled)
 else
-	# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513055
-	# libtre-dev: /usr/lib/pkgconfig/tre.pc missing
-	# so we look for the library even if pkg-config doesn't know about it.
-	TRE_CFLAGS=
-	TRE_LIBS=-ltre
-	AC_MSG_RESULT([[no, but let's try defaults]])
-fi
+	AC_MSG_CHECKING([[for TRE in pkg-config]])
+	if pkg-config tre; then
+		TRE_CFLAGS=`pkg-config --cflags tre`
+		TRE_LIBS=`pkg-config --libs tre`
+		AC_MSG_RESULT([[yes]])
+	else
+		# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513055
+		# libtre-dev: /usr/lib/pkgconfig/tre.pc missing
+		# so we look for the library even if pkg-config doesn't know about it.
+		TRE_CFLAGS=
+		TRE_LIBS=-ltre
+		AC_MSG_RESULT([[no, but let's try defaults]])
+	fi
 
-AC_MSG_CHECKING([[for TRE header and library]])
-EL_SAVE_FLAGS
-CFLAGS=$TRE_CFLAGS $CFLAGS
-LIBS=$TRE_LIBS $LIBS
-AC_TRY_LINK([#include tre/regex.h],
-	[regex_t re;
-	 regmatch_t match[1];
-	 regwcomp(re, Lzap, REG_ICASE);
-	 regwexec(re, LELIZAPROGRAM, 1, match, 0);],
-	[AC_MSG_RESULT([[yes]])
-	 AC_DEFINE([HAVE_TRE_REGEX_H], [1],
-		   [Define to 1 if you have the tre/regex.h header file.])
-	 # TRE_CFLAGS will be used only where needed.
-	 # TRE_LIBS will be kept in LIBS and used everywhere.
-	 EL_RESTORE_FLAGS
-	 LIBS=$TRE_LIBS $LIBS],
-	[AC_MSG_RESULT([[no]])
-	 TRE_CFLAGS=
-	 TRE_LIBS=
-	 EL_RESTORE_FLAGS])
+	AC_MSG_CHECKING([[for TRE header and library]])
+	EL_SAVE_FLAGS
+	CFLAGS=$TRE_CFLAGS $CFLAGS
+	LIBS=$TRE_LIBS $LIBS
+	AC_TRY_LINK([#include tre/regex.h],
+		[regex_t re;
+		 regmatch_t match[1];
+		 regwcomp(re, Lzap, REG_ICASE);
+		 regwexec(re, LELIZAPROGRAM, 1, match, 0);],
+		[AC_MSG_RESULT([[yes]])
+		 AC_DEFINE([CONFIG_TRE], [1],
+			   [Define as 1 to use the TRE library for regular expression searching.  This requires the tre/regex.h header file.])
+		 # TRE_CFLAGS will be used only where needed.
+		 # TRE_LIBS will be kept in LIBS and used everywhere.
+		 EL_RESTORE_FLAGS
+		 LIBS=$TRE_LIBS $LIBS
+		 # Using TRE with UTF-8 in ELinks requires that wchar_t
+		 # has the same representation as unicode_val_T.  See
+		 # src/elinks.h for the check.  It would be nice to move
+		 # the check to this configure script, so that the result
+		 # could be logged, but the ac_cv_sizeof_wchar_t shell
+		 # variable set by AC_CHECK_SIZEOF is undocumented.
+		 tre_log=TRE (if wchar_t is suitable)],
+		[AC_MSG_RESULT([[no]])
+		 TRE_CFLAGS=
+		 TRE_LIBS=
+		 EL_RESTORE_FLAGS
+		 tre_log=no])
+fi
 AC_SUBST(TRE_CFLAGS)
 AC_SUBST(TRE_LIBS)