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

From: Mark Williamson <Mark.Williamson.imperial.ac.uk>
Date: Sat, 06 Jan 2007 09:30:17 +0000

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
+
+
+
+
 
#------------------------------------------------------------------------------
  # Finally, write out the config.h file:
 
#------------------------------------------------------------------------------
Received on Sun Jan 07 2007 - 06:07:53 PST
Custom Search