qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Teira Paz <mte...@tid.es>
Subject Re: Solaris Port. Project dependencies
Date Tue, 24 Feb 2009 13:11:17 GMT
Gordon Sim escribió:
> Manuel Teira Paz wrote:
>   
>> Hello everybody. Finally, I've got some spare time and would be nice to 
>> spend it helping the project a while.
>>
>> I've seen lots of changes happened, and was trying to put everything in 
>> place again, porting uncommited changes to the trunk, and so on, to have 
>> the solaris port working again.
>>
>> The first issue I ran into is the way SSL support is intended to be 
>> detected in configure.ac. I'm not sure about the roots of the problem, 
>> but after getting:
>>
>> checking for infiniband/verbs.h... no
>> checking rdma/rdma_cma.h usability... no
>> checking rdma/rdma_cma.h presence... no
>> checking for rdma/rdma_cma.h... no
>> ./configure: line 25092: syntax error near unexpected token `SSL,'
>> ./configure: line 25092: `     PKG_CHECK_MODULES(SSL, 
>> nspr,,AC_MSG_ERROR([nspr not found]))'
>>
>> I found that SSL is the only library to be detected using pkgconfig (I 
>> guess I'm missing the macros and hence they're not expanded). While 
>> pkgconfig is shipped (I think) with most of linux flavours, and provides 
>> a helpful way to  check for dependencies, that is not the case for other 
>> unix environments. Don't know what happens with windows, I suppose it 
>> doesn't even use this kind of configuration.
>>
>> Question here is, should we use an homogeneus way to check for 
>> dependencies, like the AC_CHECK_LIB/AC_CHECK_HEADERS , or perhaps allow 
>> the use of pkg-config stuff, but I think that at least, we should 
>> provide an updated list of dependencies for the project to be build.
>>     
>
> Certainly the intention is that if you don't have nss/nspr then the 
> build proceeds but the SSL modules are not built.
>
> The reason I ended up using PKG_CHECK_MODULES was due to the fact that 
> the nss header files refer to the nspr4 headers without using the full 
> path under which they were installed (at least on my system). [I dug out 
> the original patch I created that did not use pkg-config, see blow if 
> interested]
>
> I'm no expert on autotools, but am happy to go with any suggestions that 
> work as widely (and cleanly) as possible.
>   
Neither I am, unfortunately. :-(


At least on Ubuntu, the dev packages for nss3 and nspr4 provide a 
nss-config and nspr-config executables, returning:


mteira@colossus:~$ nspr-config --cflags
-I/usr/include/nspr
mteira@colossus:~$ nss-config --cflags
-I/usr/include/nss

Does your system packages provide something similar returning the right 
path? I think that could be used to configure properly CFLAGS and/or 
LIBS before running the AC_CHECK_LIB macro?


Regards.


>
>
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 703347)
> +++ configure.ac	(working copy)
> @@ -292,6 +292,50 @@
>   LIBS=$tmp_LIBS
>   AM_CONDITIONAL([RDMA], [test x$with_RDMA = xyes])
>
> +# Setup --with-ssl/--without-ssl as arguments to configure
> +tmp_LIBS=$LIBS
> +AC_ARG_WITH([ssl],
> +  [AS_HELP_STRING([--with-ssl], [Build with support for SSL])],
> +  [case ${withval} in
> +   yes)
> +     with_SSL=yes
> +     AC_CHECK_LIB([nspr4],[PR_Read],,[AC_MSG_ERROR([libnspr4 not found])])
> +     AC_CHECK_LIB([nss3],[NSS_Init],,[AC_MSG_ERROR([libnss3 not found])])
> +     AC_CHECK_LIB([ssl3],[SSL_ImportFD],,[AC_MSG_ERROR([libssl3 not 
> found])])
> +     AC_CHECK_HEADERS([nspr4/nspr.h],,[AC_MSG_ERROR([nspr header files 
> not found])])
> +     #TODO: is there a better way to do this? have to include nspr4 in
> +     #order for configure to pick up the installed nss headers correctly as
> +     #they refer to the nspr headers without the nspr4 prefix:
> +     tmp_CPPFLAGS=$CPPFLAGS
> +     CPPFLAGS=-I/usr/include/nspr4
> +     AC_CHECK_HEADERS([nss3/nss.h nss3/ssl.h],,[AC_MSG_ERROR([nss 
> header files not found])])
> +     CPPFLAGS=$tmp_CPPFLAGS
> +     ;;
> +   no)
> +     with_SSL=no
> +     ;;
> +   *)
> +     AC_MSG_ERROR([Bad value for --with-ssl: ${withval}])
> +     ;;
> +   esac],
> +  [
> +    with_SSL=yes
> +    AC_CHECK_LIB([nspr4],[PR_Read],,[with_SSL=no])
> +    AC_CHECK_LIB([nss3],[NSS_Init],,[with_SSL=no])
> +    AC_CHECK_LIB([ssl3],[SSL_ImportFD],,[with_SSL=no])
> +    AC_CHECK_HEADERS([nspr4/nspr.h],,[with_SSL=no])
> +    #TODO: is there a better way to do this?:
> +    tmp_CPPFLAGS=$CPPFLAGS
> +    CPPFLAGS=-I/usr/include/nspr4
> +    AC_CHECK_HEADERS([nss3/nss.h nss3/ssl.h],,[with_SSL=no])
> +    CPPFLAGS=$tmp_CPPFLAGS
> +  ]
> +)
> +# Remove from LIBS, we will link it explicitly in make files.
> +LIBS=$tmp_LIBS
> +AM_CONDITIONAL([SSL], [test x$with_SSL = xyes])
> +
> +
>   poller=no
>   AC_ARG_WITH([poller],
>    [AS_HELP_STRING([--with-poller], [The low level poller 
> implementation: poll/solaris-ecf/epoll])],
>
>   
>> Best regards.
>>
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message