Rename of openbabel.pc.in

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Rename of openbabel.pc.in

Stefan_Klinger
Dear all,

I noticed that you changed the pkgconfig file from openbabel.pc.in to
openbabel-2.0.pc.in. This makes the following line in my configure
script fail:

PKG_CHECK_MODULES(OPENBABEL, openbabel >= 1.100.2)

with error "No package 'openbabel' found"

Is there an easy way around so that I could use either the old or the
new version? Or am I missing something?

Thanks,

Stefan


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Rename of openbabel.pc.in

Jean Bréfort-3
Le mercredi 07 décembre 2005 à 14:38 +0000, Stefan Klinger a écrit :

> Dear all,
>
> I noticed that you changed the pkgconfig file from openbabel.pc.in to
> openbabel-2.0.pc.in. This makes the following line in my configure
> script fail:
>
> PKG_CHECK_MODULES(OPENBABEL, openbabel >= 1.100.2)
>
> with error "No package 'openbabel' found"
>
> Is there an easy way around so that I could use either the old or the
> new version? Or am I missing something?

The name has been changed because the new version is not source
compatible with 1.100.x.
The following code in your configure.ac (extracted from gchemutils code)
should work:

OPENBABEL_REQUIRED_VERSION=1.100.2
OPENBABEL2_REQUIRED_VERSION=2.0.0
PKG_CHECK_MODULES(OB2, openbabel-2.0 >= $OPENBABEL2_REQUIRED_VERSION,
[has_openbabel_2=yes], [has_openbabel_2=no])
if test "$has_openbabel_2" = "yes"; then
        ...
        OBPACK="openbabel2"
        AC_SUBST(OBPACK)
        ...
else
        PKG_CHECK_MODULES(OB, openbabel >= $OPENBABEL_REQUIRED_VERSION,\
                have_openbabel="yes", have_openbabel="no")
        if test "$have_openbabel" = "yes"; then
                ...
                OBPACK="openbabel"
                AC_SUBST(OBPACK)
        fi
fi




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Rename of openbabel.pc.in

Michael Banck
On Wed, Dec 07, 2005 at 07:37:14PM +0100, Jean Br?fort wrote:

> OPENBABEL_REQUIRED_VERSION=1.100.2
> OPENBABEL2_REQUIRED_VERSION=2.0.0
> PKG_CHECK_MODULES(OB2, openbabel-2.0 >= $OPENBABEL2_REQUIRED_VERSION,
> [has_openbabel_2=yes], [has_openbabel_2=no])
> if test "$has_openbabel_2" = "yes"; then
> ...
> OBPACK="openbabel2"
> AC_SUBST(OBPACK)
> ...
> else
> PKG_CHECK_MODULES(OB, openbabel >= $OPENBABEL_REQUIRED_VERSION,\
> have_openbabel="yes", have_openbabel="no")
> if test "$have_openbabel" = "yes"; then
> ...
> OBPACK="openbabel"
> AC_SUBST(OBPACK)
> fi
> fi

AFAICT, AC_SUBST will not #define anything, so you couldn't adjust your
code depending on which version was found.  An additional AC_DEFINE
would be needed.

Hrm, maybe we should provide a .m4 snippet, like AC_CHECK_OBABEL?


Michael

--
Michael Banck
Debian Developer
[hidden email]
http://www.advogato.org/person/mbanck/diary.html


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss