[elinks-dev] [PATCH] Add support for nss_compat_ossl library (OpenSSL replacement).

Kamil Dudka kdudka at redhat.com
Mon Sep 8 03:21:13 PDT 2008


On Sunday 07 September 2008 02:05:07 Kalle Olavi Niemitalo wrote:
> Kamil Dudka <kdudka at redhat.com> writes:
> > +AC_ARG_WITH(nss_compat_ossl,
> > AC_HELP_STRING([--with-nss_compat_ossl[=DIR]], +	    [NSS compatibility
> > SSL libraries/include files]))
> > +
> > +# nss_compat_ossl
> > +if test "$with_nss_compat_ossl" != "no"; then
> > +	if test -z "$with_nss_compat_ossl"; then
> > +		if pkg-config nss; then
> > +			CFLAGS="$CFLAGS_X `pkg-config --cflags nss`"
> > +			LIBS="$LIBS_X `pkg-config --libs nss`"
>
> Unfortunately, this part breaks Ruby scripting support.
> EL_CONFIG_SCRIPTING_RUBY saves CFLAGS and LIBS in the *_X
> variables, checks for Ruby, and restores the variables if Ruby
> did not work.  Now when you copy LIBS_X to LIBS, you lose the
> -lruby1.8 that was added in LIBS but not in LIBS_X.
> In general, each check should set the *_X variables on its own
> rather than rely on values left from the previous check.
Good point, fixed by calling EL_SAVE_FLAGS.

> The NSS support should be mentioned in doc/installation.txt.
> I was thinking of the following change, but you can do something
> else if you have better ideas.
Good idea.


On Sunday 07 September 2008 02:27:16 Kalle Olavi Niemitalo wrote:
> > +if test "$with_nss_compat_ossl" != "no"; then
> > +	if test -z "$with_nss_compat_ossl"; then
> > +		if pkg-config nss; then
> > +			CFLAGS="$CFLAGS_X `pkg-config --cflags nss`"
> > +			LIBS="$LIBS_X `pkg-config --libs nss`"
> > +		else
> > +			with_nss_compat_ossl=no
> > +		fi
> > +	else
> > +		# Without pkg-config, we'll kludge in some defaults
> > +		CFLAGS="$CFLAGS_X -I$with_nss_compat_ossl/include -I/usr/include/nss3
> > -I/usr/include/nspr4" +		LIBS="$LIBS_X -L$with_nss_compat_ossl/lib -lssl3
> > -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" +	fi

> Autoconf considers --with-nss_compat_ossl equivalent to
> --with-nss_compat_ossl=yes.  Your code seems to treat that
> "yes" as a directory name and skip pkg-config.
Fixed by  -o "$with_nss_compat_ossl" = yes.

> > +	# TODO: Mark this as non-warning when it becomes stable
> > +	AC_MSG_WARN([Using nss_compat_ossl library for SSL.])
>
> Because you don't consider the nss_compat_ossl support stable,
> I think the configure script should select it only if the user
> explicitly requests it or no other SSL library is available.
I consider nss_compat_ossl support stable, but it has not been tested by users 
yet. If it will be used by default, we can get more experiences from users to 
declare it stable. I don't think ordinary user uses last git snapshot of 
elinks :-) Anyway I have removed this configure warning, it may frighten 
users. New patch in attachment.


Kamil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: elinks-nss.patch
Type: text/x-diff
Size: 10735 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/elinks-dev/attachments/20080908/ec6f97b1/attachment.patch>


More information about the elinks-dev mailing list