[cig-commits] r18083 - short/3D/PyLith/pylith_installer/trunk

brad at geodynamics.org brad at geodynamics.org
Tue Mar 8 21:04:59 PST 2011


Author: brad
Date: 2011-03-08 21:04:59 -0800 (Tue, 08 Mar 2011)
New Revision: 18083

Modified:
   short/3D/PyLith/pylith_installer/trunk/Makefile.am
   short/3D/PyLith/pylith_installer/trunk/TODO
   short/3D/PyLith/pylith_installer/trunk/configure.ac
Log:
Added creation of setup.sh.

Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-09 04:17:45 UTC (rev 18082)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-09 05:04:59 UTC (rev 18083)
@@ -326,8 +326,8 @@
 	@echo "$@ already installed. Skipping installation."
 else
 	@echo "netcdf option not requested. To enable NetCDF option, "
-#	@echo "reconfigure with --enable-netcdf (to install NetCDF) or "
-#	@echo "--with-netcdf (to use an existing installation)."
+	@echo "reconfigure with --enable-netcdf (to install NetCDF) or "
+	@echo "--with-netcdf (to use an existing installation)."
 endif
 endif
 
@@ -354,8 +354,8 @@
 	@echo "$@ already installed. Skipping installation."
 else
 	@echo "hdf5 option not requested. To enable HDF5 option, "
-#	@echo "reconfigure with --enable-hdf5 (to install HDF5) or "
-#	@echo "--with-hdf5 (to use an existing installation)."
+	@echo "reconfigure with --enable-hdf5 (to install HDF5) or "
+	@echo "--with-hdf5 (to use an existing installation)."
 endif
 endif
 

Modified: short/3D/PyLith/pylith_installer/trunk/TODO
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/TODO	2011-03-09 04:17:45 UTC (rev 18082)
+++ short/3D/PyLith/pylith_installer/trunk/TODO	2011-03-09 05:04:59 UTC (rev 18083)
@@ -1,10 +1,3 @@
-SVN configure checking
-
-PETSc
-  if building PyLith from SVN, build PETSc from repository
-  check for mercurial
-
-
 Makefile
 
   gcc
@@ -40,3 +33,6 @@
   pylith
     build from source
     build from repository
+
+
+Automatically set environment variables for make.
\ No newline at end of file

Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-09 04:17:45 UTC (rev 18082)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-09 05:04:59 UTC (rev 18083)
@@ -191,6 +191,7 @@
         [use spatialdata from SVN repository @<:@default=no@:>@])],
 	[spatialdata_svn=yes],
 	[spatialdata_svn=no])
+AC_SUBST(spatialdata_svn)
 
 # pylith svn
 AC_ARG_WITH([pylith-svn],
@@ -198,6 +199,7 @@
         [use PyLith from SVN repository (trunk, stable, BRANCH) @<:@default=no@:>@])],
 	[pylith_svn==$withval],
 	[pylith_svn=no])
+AC_SUBST(pylith_svn)
 
 # fetch tool
 AC_ARG_WITH([fetch],
@@ -212,9 +214,8 @@
         [set number of threads to use in parallel builds @<:@default=1@:>@])],
 	[make_threads=$withval],
 	[make_threads=1])
+AC_SUBST(make_threads)
 
-# :TODO: Add option to use/not use NETCDF, HDF5
-
 # ----------------------------------------------------------------------
 # BASIC TOOLS
 # ----------------------------------------------------------------------
@@ -250,17 +251,23 @@
 fi
 AC_SUBST(downloader)
 
-# svn
+# svn/mercurial
 if test "$spatialdata_svn" != "no" || test "$pylith_svn" != "no" ; then
   AC_PATH_PROG(SVN, svn)
   if test -z "$SVN" ; then
-    AC_MSG_FAILURE([cannot find 'svn' program.'])
+    AC_MSG_FAILURE([cannot find 'svn' program.])
   fi
 fi
+petsc_hg=no
+if test "$pylith_svn" != "no" ; then
+  AC_PATH_PROG(HG, hg)
+  if test -z "$HG" ; then
+    AC_MSG_FAILURE([cannot find 'hg' program.])
+  fi
+  petsc_hg=yes
+fi
+AC_SUBST(petsc_hg)
 
-# build threads
-AC_SUBST(make_threads)
-
 # ----------------------------------------------------------------------
 # CHECK COMPATIBILITY OF OPTIONS
 # ----------------------------------------------------------------------
@@ -307,8 +314,9 @@
 fi
 
 # SWIG
+swig_ok=false
 if test "$install_swig" = "yes" ; then
-  echo "do nothing" >& /dev/null
+  swig_ok=true
 else
   if test "$spatialdata_svn" != "no" || test "$pylith_svn" != "no" ; then
     AC_PROG_SWIG(1.3.33)
@@ -357,21 +365,11 @@
   echo "do nothing" >& /dev/null
 else
   CIT_PATH_PETSC([3.1.0])
-  # TEMPORARY TO SPEED UP
-  #CIT_HEADER_PETSC
-  #CIT_CHECK_LIB_PETSC
-  #CIT_CHECK_LIB_PETSC_SIEVE
+  CIT_HEADER_PETSC
+  CIT_CHECK_LIB_PETSC
+  CIT_CHECK_LIB_PETSC_SIEVE
 fi
 
-
-# spatialdata
-if test "$install_spatialdata" = "yes" ; then
-  echo "do nothing" >& /dev/null
-else
-  CIT_SPATIALDATA_HEADER
-  CIT_SPATIALDATA_LIB
-fi
-
 # nemesis
 if test "$install_nemesis" = "yes" ; then
   echo "do nothing" >& /dev/null
@@ -390,7 +388,15 @@
   CIT_PYTHON_MODULE([FIAT],[0.9.9])
 fi
 
+# spatialdata
+if test "$install_spatialdata" = "yes" ; then
+  echo "do nothing" >& /dev/null
+else
+  CIT_SPATIALDATA_HEADER
+  CIT_SPATIALDATA_LIB
+fi
 
+
 # ----------------------------------------------------------------------
 AC_CONFIG_FILES([Makefile
 		bin/Makefile
@@ -398,10 +404,24 @@
 
 AC_OUTPUT
 
+echo "#!/bin/bash" > setup.sh
+echo "PATH=$prefix/bin:\${PATH}" >> setup.sh
+echo "LD_LIBRARY_PATH=$prefix/lib:$prefix/lib64:\${LD_LIBRARY_PATH}" >> setup.sh
+echo "PYTHONPATH=$prefix/lib/python$PYTHON_VERSION/site-packages:\${PYTHONPATH}" >> setup.sh
+
 echo ""
 echo "Additional info:"
 echo "  Using $downloader to download tarballs."
 echo "  Using $make_threads thread(s) when running make in parallel."
+echo ""
+echo "IMPORTANT"
+echo ""
+echo "Runing "make" will install PyLith and its dependencies to $prefix."
+echo ""
+echo "Before attempting to use PyLith you may need to update your environment "
+echo "variables. See setup.sh for how to set your environment variables for the "
+echo "bash shell. You can either run "source setup.sh" in the shell where you will"
+echo "run PyLith or add these settings to your .bashrc or equivalent file."
 
 
 dnl end of configure.ac



More information about the CIG-COMMITS mailing list