Re: amber-developers: Possible patch to enable $AMBERHOME/src/configure to check/test for the presence of X11 libs

From: Scott Brozell <sbrozell.scripps.edu>
Date: Sat, 6 Jan 2007 17:01:03 -0800

Hi Mark,

Thanks for the contribution.
Last night I committed a similar check using a different implementation.
I'll continue to enhance configure.

Scott

On Sat, 6 Jan 2007, Mark Williamson wrote:

> Dear All,
>
> Here's an initial offering for AMBER9's configure script to check/test
> for the presence of X11 libs. It's rather ad-hoc and may break things on
> systems where one only wants to build the non-graphical components of
> AMBER, but I think it generally does the job.
>
> If the patch is mangled by email, try the copy at
>
> http://dumb.ch.ic.ac.uk/~mjw99/tmp/X11.diff
>
> regards,
>
> Mark
>
>
>
>
> diff -urN ./amber-9.17/src/configure /opt/amber-9.17/src/configure
> --- ./amber-9.17/src/configure 2007-01-06 09:00:46.000000000 +0000
> +++ /opt/amber-9.17/src/configure 2007-01-06 09:06:14.000000000 +0000
> .@ -1254,6 +1254,36 @@
> slko='test.sander.DFTB'
> fi
>
> +#--------------------------------------------------------------------------
> +# Check if X11 libs are present
> +#--------------------------------------------------------------------------
> +
> +echo ""
> +echo "Testing for X11 libs..."
> +
> +cat <<EOF > conftest.c
> +#include <X11/Intrinsic.h>
> +int main ()
> +{
> + XtMalloc (0);
> + return 0;
> +}
> +EOF
> +
> +$cc -o conftest conftest.c $xlibs -lXt &>/dev/null
> +if [ $? != 0 ]; then
> + echo "X11 libs not found, quitting"
> + echo "<give some useful tips here>"
> + rm conftest.c &>/dev/null
> + exit
> +else
> + echo "X11 libs found"
> + rm conftest conftest.c &>/dev/null
> +fi
> +
> +
> +
> +
>
Received on Sun Jan 07 2007 - 06:08:00 PST
Custom Search