[gmx-developers] Check for gromacs library using autotools
Erik Lindahl
lindahl at cbr.su.se
Thu Jun 19 23:30:38 CEST 2008
Hi Victor,
Unfortunately not pre-packaged, but what you could do is:
1) Check if libgmx is present with
AC_CHECK_LIB(libgmx,GromacsVersion,,AC_MSG_ERROR([Gromacs library not
found])
2) Search for the headers, e.g.
AC_CHECK_HEADERS([gromacs/copyrite.h])
3) According to the autotools modus operandi you should check
functionality rather than versions, but if you absolutely need it you
could
write a small test script that includes the header copyrite.h and
executes GromacsVersion() to return the version as a string. That
won't work
for cross-compiles, though - then you'd have to use "strings" to
extract strings from the binary and grep for "VERSION".
Cheers,
Erik
On Jun 19, 2008, at 5:03 PM, Victor Rühle wrote:
> Hi,
>
> since I use the libgmx in one of my projects, I'm wondering weather
> anyone already has a m4 script to check weather/which version of
> gromacs is installed.
>
> Thanks for your help,
>
> Victor
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-developers-request at gromacs.org.
------------
Erik Lindahl <lindahl at cbr.su.se> Backup: <erik.lindahl at gmail.com>
Associate Professor, Computational Structural Biology
Center for Biomembrane Research, Dept. Biochemistry & Biophysics
Stockholm University, SE-106 91 Stockholm, Sweden
Tel: +46(0)8164675 Mobile: +46(0)704218767 Fax: mail a PDF instead
More information about the gromacs.org_gmx-developers
mailing list