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, 10 Mar 2009 09:33:37 GMT
Gordon Sim escribió:
> Manuel Teira Paz wrote:
>   
>> 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?
>>     
>
> Yes, it does.
>
>  > I think that could be used to configure properly CFLAGS and/or
>   
>> LIBS before running the AC_CHECK_LIB macro?
>>     
>
> I think you're right.
>   
Following with this issue, I've made some changes to the SSL section of 
the configure.ac file. Do you think this could be a valid approach (I 
can only check now the negative case (no nspr/nss in my solaris system), 
but I think it should work. Note that I'm running AC_SUBST on SSL_CFLAGS 
and SSL_LDFLAGS that could be used later wherever the ssl libraries are 
needed. If you agree with this approach, I will commit the change soon:

Index: configure.ac
===================================================================
--- configure.ac        (revision 752019)
+++ configure.ac        (working copy)
@@ -313,14 +313,19 @@
 AM_CONDITIONAL([RDMA], [test x$with_RDMA = xyes])
 
 # Setup --with-ssl/--without-ssl as arguments to configure
-tmp_LIBS=$LIBS
+SSL_CFLAGS=""
+SSL_LDFLAGS=""
 AC_ARG_WITH([ssl],
   [AS_HELP_STRING([--with-ssl], [Build with support for SSL])],
   [case ${withval} in
    yes)
      with_SSL=yes
-     PKG_CHECK_MODULES([SSL], [nspr],,[AC_MSG_ERROR([nspr not found])])
-     PKG_CHECK_MODULES([SSL], [nss],,[AC_MSG_ERROR([nss not found])])
+     AC_PATH_PROG([NSPR_CONFIG], [nspr-config])
+     AS_IF([test x$NSPR_CONFIG = x], [AC_MSG_ERROR([libnspr not 
found])], [])
+     AC_PATH_PROG([NSS_CONFIG], [nss-config])
+     AS_IF([test x$NSS_CONFIG = x], [AC_MSG_ERROR([libnss not found])], [])
+     SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`"
+     SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`"
      ;;
    no)
      with_SSL=no
@@ -331,13 +336,18 @@
    esac],
   [
     with_SSL=yes
-    PKG_CHECK_MODULES([SSL], [nspr],,[with_SSL=no])
-    PKG_CHECK_MODULES([SSL], [nss],,[with_SSL=no])
+    AC_PATH_PROG([NSPR_CONFIG], [nspr-config])
+    AS_IF([test x$NSPR_CONFIG = x], [with_SSL=no],
+      [AC_PATH_PROG([NSS_CONFIG], [nss-config])
+       AS_IF([test x$NSS_CONFIG = x], [with_SSL=no],
+             [SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`"
+              SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`"])])
   ]
 )
 # Remove from LIBS, we will link it explicitly in make files.
-LIBS=$tmp_LIBS
 AM_CONDITIONAL([SSL], [test x$with_SSL = xyes])
+AC_SUBST([SSL_CFLAGS])
+AC_SUBST([SSL_LDFLAGS])
 
 
 poller=no



Regards.

--
Manuel.




> ---------------------------------------------------------------------
> 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