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

brad at geodynamics.org brad at geodynamics.org
Tue Mar 8 11:37:16 PST 2011


Author: brad
Date: 2011-03-08 11:37:16 -0800 (Tue, 08 Mar 2011)
New Revision: 18078

Added:
   short/3D/PyLith/pylith_installer/trunk/TODO
Modified:
   short/3D/PyLith/pylith_installer/trunk/Makefile.am
   short/3D/PyLith/pylith_installer/trunk/configure.ac
   short/3D/PyLith/pylith_installer/trunk/notes.txt
Log:
Worked on setting up builds.

Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-08 17:48:07 UTC (rev 18077)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-08 19:37:16 UTC (rev 18078)
@@ -17,6 +17,41 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
+# ----------------------------------------------------------------------
+# Package Versions
+# ----------------------------------------------------------------------
+GCC_VER=4.5.2
+MPC_VER=0.8.2
+GMP_VER=4.3.2
+MPFR_VER=2.4.2
+
+PYTHON_VER=2.6.6
+
+MPICH2_VER=1.3.2p1
+OPENMPI_VER=1.4.3
+
+CPPUNIT_VER=1.12.1
+
+SWIG_VER=2.0.2
+
+NUMPY_VER=1.5.1
+
+PROJ4_VER=4.7.0
+
+NETCDF_VER=4.1.1
+HDF5_VER=1.8.6
+
+SCIENTIFICPYTHON_VER=2.9.1
+FIAT_VER=0.9.9
+
+NEMESIS_VER=1.0.1
+SPATIALDATA_VER=0.6.0
+PYLITH_VER=1.5.1
+
+
+# ----------------------------------------------------------------------
+# Files
+# ----------------------------------------------------------------------
 SUBDIRS = \
 	bin
 
@@ -51,25 +86,29 @@
 	pylith-build
 
 noinst_srcdirs = \
-	gcc-4.5.2 \
-	Python-2.6.6 \
-	openmpi-1.4.3 \
-	mpich2-1.3.2p1 \
-	cppunit-1.12.1 \
-	swig-2.0.2 \
-	proj-4.7.0 \
-	netcdf-4.1.1 \
-	hdf5-1.8.6 \
-	spatialdata-X.X.X \
-	nemesis-X.X.X \
-	pylith-X.X.X
+	gcc-$(GCC_VER) \
+	Python-$(PYTHON_VER) \
+	openmpi-$(OPENMPI_VER) \
+	mpich2-$(MPICH2_VER) \
+	cppunit-$(CPPUNIT_VER) \
+	swig-$(SWIG_VER) \
+	proj-$(PROJ4_VER) \
+	netcdf-$(NETCDF_VER) \
+	hdf5-$(HDF5_VER) \
+	spatialdata-$(SPATIALDATA_VER) \
+	nemesis-$(NEMESIS_VER) \
+	pylith-$(PYLITH_VER)
 
+
+FETCH_SCRIPT = $(top_srcdir)/bin/fetch.sh
+
+# ----------------------------------------------------------------------
+# Targets
+# ----------------------------------------------------------------------
 default: installed_pylith
 
 all: gcc python mpi cppunit swig numpy proj4 netcdf hdf5 petsc nemesis spatialdata fiat
 
-FETCH_SCRIPT = $(top_srcdir)/bin/fetch.sh
-
 # ----------------------------------------------------------------------
 # Note on configure invocations
 #
@@ -84,10 +123,14 @@
 # ----------------------------------------------------------------------
 gcc:
 if INSTALL_GCC
-	$(FETCH_SCRIPT) "$(downloader)" gcc-4.5.2.tar.bz2 http://geodynamics.org/~buildbot/deps
-	$(FETCH_SCRIPT) "$(downloader)" mpc-0.8.2.tar.gz http://geodynamics.org/~buildbot/deps
-	$(FETCH_SCRIPT) "$(downloader)" gmp-4.3.2.tar.gz http://geodynamics.org/~buildbot/deps
-	$(FETCH_SCRIPT) "$(downloader)" mpfr-2.4.2.tar.bz2 http://geodynamics.org/~buildbot/deps
+	LANGUAGES = "c,c++"
+if WITH_FORTRAN
+	$(LANGUAGES) += ",fortran"
+endif
+	$(FETCH_SCRIPT) "$(downloader)" gcc-$(GCC_VER).tar.bz2 http://geodynamics.org/~buildbot/deps
+	$(FETCH_SCRIPT) "$(downloader)" mpc-$(MPC_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(FETCH_SCRIPT) "$(downloader)" gmp-$(GMP_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(FETCH_SCRIPT) "$(downloader)" mpfr-$(MPFR_VER).tar.bz2 http://geodynamics.org/~buildbot/deps
 	$(TAR) -jxf gcc-4.5.2.tar.bz2
 	cd gcc-4.5.2; \
 		tar -zxf ../gmp-4.3.2.tar.gz; \
@@ -98,12 +141,7 @@
 		ln -sf mpfr-2.4.2/ mpfr
 	$(MKDIR_P) gcc-build
 	cd gcc-build && \
-		../gcc-4.5.2/configure --prefix=$(prefix) \
-if ENABLE_FORTRAN
-			--enable-languages=c,c++,fortran && \
-else
-			--enable-languages=c,c++ && \
-endif
+		../gcc-4.5.2/configure --prefix=$(prefix) $(LANGUAGES)
 		make -j $(make_threads) && \
 		make install
 
@@ -115,16 +153,17 @@
 	$(MAKE) $(AM_MAKEFLAGS) gcc
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # python
 # ----------------------------------------------------------------------
 python: installed_gcc
 if INSTALL_PYTHON
-	$(FETCH_SCRIPT) $(downloader) Python-2.6.6.tgz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf Python-2.6.6.tgz
+	$(FETCH_SCRIPT) $(downloader) Python-$(PYTHON_VER).tgz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf Python-$(PYTHON_VER).tgz
 	$(MKDIR_P) python-build
 	cd python-build && \
-		../Python-2.6.6/configure --prefix=$(prefix) && \
+		../Python-$(PYTHON_VER)/configure --prefix=$(prefix) && \
 		make -j $(make_threads) && \
 		make install
 else
@@ -135,6 +174,7 @@
 	$(MAKE) $(AM_MAKEFLAGS) python
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # mpi
 # ----------------------------------------------------------------------
@@ -156,20 +196,22 @@
 	$(MAKE) $(AM_MAKEFLAGS) mpi
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # openmpi
 # ----------------------------------------------------------------------
 openmpi: installed_gcc
 
+
 # ----------------------------------------------------------------------
 # mpich
 # ----------------------------------------------------------------------
 mpich: installed_gcc
-	$(FETCH_SCRIPT) "$(downloader)" mpich2-1.3.2p1.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf mpich2-1.3.2p1.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" mpich2-$(MPICH2_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf mpich2-$(MPICH2_VER).tar.gz
 	$(MKDIR_P) mpich-build
 	cd mpich-build && \
-		../mpich2-1.3.2p1/configure --with-pm=gforker \
+		../mpich2-$(MPICH2_VER)/configure --with-pm=gforker \
 			--enable-shared --enable-sharedlibs=gcc \
 			--disable-static --disable-mpe \
 			--prefix=$(HOME)/install/$(BUILDBOT) \
@@ -178,16 +220,17 @@
 		make install
 	if [ ! -x $(prefix)/mpirun ]; then cd $(prefix)/bin && $(LN_S) mpiexec mpirun; fi
 
+
 # ----------------------------------------------------------------------
 # cppunit
 # ----------------------------------------------------------------------
 cppunit: installed_gcc
 if INSTALL_CPPUNIT
-	$(FETCH_SCRIPT) "$(downloader)" cppunit-1.12.1.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf cppunit-1.12.1.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" cppunit-$(CPPUNIT_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf cppunit-$(CPPUNIT_VER).tar.gz
 	$(MKDIR_P) cppunit-build
 	cd cppunit-build && \
-		../cppunit-1.12.1/configure --prefix=$(prefix) ; \
+		../cppunit-$(CPPUNIT_VER)/configure --prefix=$(prefix) ; \
 		make -j $(make_threads) && \
 		make install
 
@@ -199,16 +242,17 @@
 	$(MAKE) $(AM_MAKEFLAGS) cppunit
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # swig
 # ----------------------------------------------------------------------
 swig: installed_gcc
 if INSTALL_SWIG
-	$(FETCH_SCRIPT) "$(downloader)" swig-2.0.2.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf swig-2.0.2.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" swig-$(SWIG_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf swig-$(SWIG_VER).tar.gz
 	$(MKDIR_P) swig-build
 	cd swig-build && \
-		../swig-2.0.2/configure --prefix=$(HOME)/pylith_deps ; \
+		../swig-$(SWIG_VER)/configure --prefix=$(HOME)/pylith_deps ; \
 		make -j 4 && \
 		make install
 else
@@ -219,12 +263,13 @@
 	$(MAKE) $(AM_MAKEFLAGS) swig
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # numpy
 # ----------------------------------------------------------------------
 numpy: installed_python
 if INSTALL_NUMPY
-	$(FETCH) "(downloader)" swig-2.0.2.tar.gz http://geodynamics.org/~buildbot/deps
+	$(FETCH_SCRIPT) "$(downloader)" numpy-$(NUMPY_VER).tar.gz http://geodynamics.org/~buildbot/deps
 	$(TAR) -zxf numpy-1.5.1.tar.gz
 	cd numpy-1.5.1 && $(PYTHON) setup.py install --prefix=$(prefix)
 
@@ -236,19 +281,20 @@
 	$(MAKE) $(AM_MAKEFLAGS) numpy
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # proj4
 # ----------------------------------------------------------------------
 proj4: installed_gcc
 if INSTALL_PROJ4
-	$(FETCH_SCRIPT) "$(downloader)" proj-4.7.0.tar.gz http://geodynamics.org/~buildbot/deps
+	$(FETCH_SCRIPT) "$(downloader)" proj-$(PROJ4_VER).tar.gz http://geodynamics.org/~buildbot/deps
 	$(FETCH_SCRIPT) "$(downloader)" proj-datumgrid-1.3.zip http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf proj-4.7.0.tar.gz
+	$(TAR) -zxf proj-$(PROJ4_VER).tar.gz
 	$(MKDIR_P) proj4-build/nad
 	cd proj4-build/nad && \
 		unzip ../../proj-datumgrid-1.3.zip
 	cd proj4-build && \
-		../proj-4.7.0/configure --prefix=$(prefix) ; \
+		../proj-$(PROJ4_VER)/configure --prefix=$(prefix) ; \
 		make -j $(make_threads) && \
 		make install
 
@@ -260,55 +306,72 @@
 	$(MAKE) $(AM_MAKEFLAGS) proj4
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # netcdf
 # ----------------------------------------------------------------------
 netcdf: installed_gcc
 if INSTALL_NETCDF
-	$(FETCH_SCRIPT) "$(downloader)" netcdf-4.1.1.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxvf netcdf-4.1.1.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" netcdf-$(NETCDF_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf netcdf-$(NETCDF_VER).tar.gz
 	$(MKDIR_P) netcdf-build
 	cd netcdf-build && \
-		../netcdf-4.1.1/configure --prefix=$(prefix) \
+		../netcdf-$(NETCDF_VER)/configure --prefix=$(prefix) \
 			--enable-shared --disable-static --disable-netcdf-4 ; \
 		make -j $(make_threads) && \
 		make install
 
 else
+if WITH_HDF5
 	@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)."
 endif
+endif
 
 installed_netcdf:
 	$(MAKE) $(AM_MAKEFLAGS) netcdf
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # hdf5
 # ----------------------------------------------------------------------
 hdf5: installed_mpi
 if INSTALL_HDF5
-	$(FETCH_SCRIPT) "$(downloader)" hdf5-1.8.6.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxvf hdf5-1.8.6.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" hdf5-$(HDF5_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf hdf5-$(HDF5_VER).tar.gz
 	$(MKDIR_P) hdf5-build
 	cd hdf5-build && \
-		../hdf5-1.8.6/configure --enable-parallel --enable-shared --disable-static --prefix=$(prefix) CC=mpicc CXX=mpicxx FC=mpif90 ; \
+		../hdf5-$(HDF5_VER)/configure --enable-parallel --enable-shared --disable-static --prefix=$(prefix) CC=mpicc CXX=mpicxx FC=mpif90 ; \
 		make -j $(make_threads) && \
 		make install
 
 else
+if WITH_HDF5
 	@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)."
 endif
+endif
 
 installed_hdf5:
 	$(MAKE) $(AM_MAKEFLAGS) hdf5
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # petsc
 # ----------------------------------------------------------------------
 petsc: installed_mpi
 if INSTALL_PETSC
-
+# :TODO: Use nightly tarball if PyLith is coming from SVN repository
+	$(FETCH_SCRIPT) "$(downloader)" petsc-dev-pylith-$(PYLITH_VER).tgz http://www.geodynamics.org/cig/software/pylith
+	$(TAR) -zxf petsc-dev-$(PYLITH_VER).tar.gz
 else
 	@echo "$@ already installed. Skipping installation."
 endif
@@ -317,12 +380,22 @@
 	$(MAKE) $(AM_MAKEFLAGS) petsc
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # spatialdata
 # ----------------------------------------------------------------------
 spatialdata: installed_numpy installed_proj4 installed_swig installed_cppunit
 if INSTALL_SPATIALDATA
-
+	spatialdata_options =
+if WITH_TESTING
+	spatialdata_options += --enable-testing
+endif
+# :TODO: Add switch for using SVN repository (add --enable-swig)
+	$(FETCH_DIR) "$(downloader)" spatialdata-$(SPATIALDATA_VER).tgz http://www.geodynamics.org/cig/software/pylith
+	$(TAR) -zxvf spatialdata-$(SPATIALDATA_VER).tgz
+	$(MKDIR_P) spatialdata-build
+	cd spatialdata-build && \
+		../spatialdata-$(SPATIALDATA_VER)/configure --prefix=$(prefix) $(spatialdata_options)
 else
 	@echo "$@ already installed. Skipping installation."
 endif
@@ -331,16 +404,17 @@
 	$(MAKE) $(AM_MAKEFLAGS) spatialdata
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # nemesis
 # ----------------------------------------------------------------------
 nemesis: installed_mpi installed_python
 if INSTALL_NEMESIS
-	$(FETCH_DIR) "$(downloader)" nemesis.tar.gz 
-	$(TAR) -zxvf hdf5-1.8.6.tar.gz
+	$(FETCH_SCRIPT) "$(downloader)" nemesis-$(NEMESIS_VER).tar.gz http://www.geodynamics.org/cig/software/pythia
+	$(TAR) -zxvf nemesis-$(NEMESIS_VER).tar.gz
 	$(MKDIR_P) nemesis-build
 	cd nemesis-build && \
-		../nemesis-dev/configure --prefix=$(prefix) ; \
+		../nemesis-$(NEMESIS_VER)/configure --prefix=$(prefix) ; \
 		make && \
 		make install
 
@@ -352,17 +426,18 @@
 	$(MAKE) $(AM_MAKEFLAGS) nemesis
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # fiat
 # ----------------------------------------------------------------------
 fiat: installed_numpy
 if INSTALL_FIAT
-	$(FETCH_SCRIPT) "$(downloader)" ScientificPython-2.9.1.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf ScientificPython-2.9.1.tar.gz
-	cd ScientificPython-2.9.1 && python setup.py install --prefix=$(prefix)
-	$(FETCH_SCRIPT) "$(downloader)" ScientificPython-2.9.1.tar.gz http://geodynamics.org/~buildbot/deps
-	$(TAR) -zxf fiat-0.9.9.tar.gz
-	cd fiat-0.9.9 && python setup.py install --prefix=$(prefix)
+	$(FETCH_SCRIPT) "$(downloader)" ScientificPython-$(SCIENTIFICPYTHON_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf ScientificPython-$(SCIENTIFICPYTHON_VER).tar.gz
+	cd ScientificPython-$(SCIENTIFICPYTHON_VER) && python setup.py install --prefix=$(prefix)
+	$(FETCH_SCRIPT) "$(downloader)" fiat-$(FIAT_VER).tar.gz http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf fiat-$(FIAT_VER).tar.gz
+	cd fiat-$(FIAT_VER) && python setup.py install --prefix=$(prefix)
 
 else
 	@echo "$@ already installed. Skipping installation."
@@ -372,6 +447,7 @@
 	$(MAKE) $(AM_MAKEFLAGS) fiat
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # pylith
 # ----------------------------------------------------------------------
@@ -381,6 +457,7 @@
 	$(MAKE) $(AM_MAKEFLAGS) pylith
 	touch $@
 
+
 # ----------------------------------------------------------------------
 # clean
 # ----------------------------------------------------------------------
@@ -394,4 +471,4 @@
 
 clean-local: clean-builddirs clean-srcdirs
 
-# End of file
\ No newline at end of file
+# End of file

Added: short/3D/PyLith/pylith_installer/trunk/TODO
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/TODO	                        (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/TODO	2011-03-08 19:37:16 UTC (rev 18078)
@@ -0,0 +1,42 @@
+SVN configure checking
+
+PETSc
+  if building PyLith from SVN, build PETSc from repository
+  check for mercurial
+
+
+Makefile
+
+  gcc
+    test
+
+  python
+    test
+
+  mpich
+    set shared lib flag based on system
+    test
+
+  openmpi
+    setup
+
+  swig
+    test
+
+  netcdf
+    test
+
+  hdf5
+    test
+
+  petsc
+    build from source
+    build from repository
+  
+  spatialdata
+    build from source
+    build from repository
+
+  pylith
+    build from source
+    build from repository

Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-08 17:48:07 UTC (rev 18077)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-08 19:37:16 UTC (rev 18078)
@@ -56,15 +56,15 @@
 AC_ARG_ENABLE([cppunit],
     [AC_HELP_STRING([--enable-cppunit],
         [install CppUnit @<:@default=yes@:>@])],
-	[if test "$enableval" = "no" ; then install_cppunit=yes; else install_cppunit=no; fi],
+	[if test "$enableval" = "yes" ; then install_cppunit=yes; else install_cppunit=no; fi],
 	[install_cppunit=yes])
 AM_CONDITIONAL([INSTALL_CPPUNIT], [test "$install_cppunit" = yes])
 
 # SWIG
 AC_ARG_ENABLE([swig],
     [AC_HELP_STRING([--enable-swig],
-        [install SWIG @<:@default=yes@:>@])],
-	[install_swig=yes],
+        [install SWIG @<:@default=no@:>@])],
+	[if test "$enableval" = "yes" ; then install_swig=yes; else install_swig=no; fi],
 	[install_swig=no])
 AM_CONDITIONAL([INSTALL_SWIG], [test "$install_swig" = yes])
 
@@ -72,31 +72,31 @@
 AC_ARG_ENABLE([numpy],
     [AC_HELP_STRING([--enable-numpy],
         [install numpy @<:@default=yes@:>@])],
-	[install_numpy=yes],
-	[install_numpy=no])
+	[if test "$enableval" = "yes" ; then install_numpy=yes; else install_numpy=no; fi],
+	[install_numpy=yes])
 AM_CONDITIONAL([INSTALL_NUMPY], [test "$install_numpy" = yes])
 
 # PROJ4
 AC_ARG_ENABLE([proj4],
     [AC_HELP_STRING([--enable-proj4],
         [install Proj4 @<:@default=yes@:>@])],
-	[install_proj4=yes],
-	[install_proj4=no])
+	[if test "$enableval" = "yes" ; then install_proj4=yes; else install_proj4=no; fi],
+	[install_proj4=yes])
 AM_CONDITIONAL([INSTALL_PROJ4], [test "$install_proj4" = yes])
 
 # NETCDF
 AC_ARG_ENABLE([netcdf],
     [AC_HELP_STRING([--enable-netcdf],
         [install NetCDF @<:@default=yes@:>@])],
-	[install_netcdf=yes],
-	[install_netcdf=no])
+	[if test "$enableval" = "yes" ; then install_netcdf=yes; else install_netcdf=no; fi],
+	[install_netcdf=yes])
 AM_CONDITIONAL([INSTALL_NETCDF], [test "$install_netcdf" = yes])
 
 # HDF5
 AC_ARG_ENABLE([hdf5],
     [AC_HELP_STRING([--enable-hdf5],
         [install HDF5 @<:@default=yes@:>@])],
-	[install_hdf5=yes],
+	[if test "$enableval" = "yes" ; then install_hdf5=yes; else install_hdf5=no; fi],
 	[install_hdf5=no])
 AM_CONDITIONAL([INSTALL_HDF5], [test "$install_hdf5" = yes])
 
@@ -104,32 +104,32 @@
 AC_ARG_ENABLE([petsc],
     [AC_HELP_STRING([--enable-petsc],
         [install PETSc (development version) @<:@default=yes@:>@])],
-	[install_petsc=yes],
-	[install_petsc=no])
+	[if test "$enableval" = "yes" ; then install_petsc=yes; else install_petsc=no; fi],
+	[install_petsc=yes])
 AM_CONDITIONAL([INSTALL_PETSC], [test "$install_petsc" = yes])
 
 # SPATIALDATA
 AC_ARG_ENABLE([spatialdata],
     [AC_HELP_STRING([--enable-spatialdata],
         [install spatialdata (CIG) @<:@default=yes@:>@])],
-	[install_spatialdata=yes],
-	[install_spatialdata=no])
+	[if test "$enableval" = "yes" ; then install_spatialdata=yes; else install_spatialdata=no; fi],
+	[install_spatialdata=yes])
 AM_CONDITIONAL([INSTALL_SPATIALDATA], [test "$install_spatialdata" = yes])
 
 # NEMESIS
 AC_ARG_ENABLE([nemesis],
     [AC_HELP_STRING([--enable-nemesis],
         [install nemesis (CIG) @<:@default=yes@:>@])],
-	[install_nemesis=yes],
-	[install_nemesis=no])
+	[if test "$enableval" = "yes" ; then install_nemesis=yes; else install_nemesis=no; fi],
+	[install_nemesis=yes])
 AM_CONDITIONAL([INSTALL_NEMESIS], [test "$install_nemesis" = yes])
 
 # FIAT
 AC_ARG_ENABLE([fiat],
     [AC_HELP_STRING([--enable-fiat],
         [install FIAT @<:@default=yes@:>@])],
-	[install_fiat=yes],
-	[install_fiat=no])
+	[if test "$enableval" = "yes" ; then install_fiat=yes; else install_fiat=no; fi],
+	[install_fiat=yes])
 AM_CONDITIONAL([INSTALL_FIAT], [test "$install_fiat" = yes])
 
 
@@ -138,28 +138,67 @@
 # ----------------------------------------------------------------------
 
 # TESTING
-AC_ARG_ENABLE([testing],
-    [AC_HELP_STRING([--enable-testing],
+if test "$install_cppunit" = "yes" ; then
+  with_testing=yes
+fi
+AC_ARG_WITH([testing],
+    [AC_HELP_STRING([--with-testing],
         [enable testing (requires cppunit) @<:@default=yes@:>@])],
-	[enable_testing=yes],
-	[enable_testing=no])
-AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_testing" = yes])
+	[with_testing=yes],
+	[])
+AM_CONDITIONAL([WITH_TESTING], [test "$with_testing" = yes])
 
 # FORTRAN
-AC_ARG_ENABLE([fortran],
-    [AC_HELP_STRING([--enable-fortran],
+AC_ARG_WITH([fortran],
+    [AC_HELP_STRING([--with-fortran],
         [enable Fortran options for packages @<:@default=yes@:>@])],
-	[enable_fortran=yes],
-	[enable_fortran=no])
-AM_CONDITIONAL([ENABLE_FORTRAN], [test "$enable_fortran" = yes])
+	[with_fortran=yes],
+	[with_fortran=no])
+AM_CONDITIONAL([WITH_FORTRAN], [test "$with_fortran" = yes])
 
+# NetCDF
+if test "$install_netcdf" = "yes"; then
+  with_netcdf=yes
+fi
+AC_ARG_WITH([netcdf],
+    [AC_HELP_STRING([--with-netcdf],
+        [enable NetCDF (CUBIT) options for PyLith @<:@default=yes@:>@])],
+	[with_netcdf=yes],
+	[])
+AM_CONDITIONAL([WITH_NETCDF], [test "$with_netcdf" = yes])
+
+# HDF5
+if test "$install_hdf5" = "yes"; then
+  with_hdf5=yes
+fi
+AC_ARG_WITH([hdf5],
+    [AC_HELP_STRING([--with-hdf5],
+        [enable HDF5 options for PyLith @<:@default=yes@:>@])],
+	[with_hdf5=yes],
+	[])
+AM_CONDITIONAL([WITH_HDF5], [test "$with_hdf5" = yes])
+
 # PETSC options
 AC_ARG_WITH([petsc-options],
     [AC_HELP_STRING([--with-petsc-options],
-        [set PETSc configure options @<:@default=none@:>@])],
+        [set PETSc configure options @<:@default=--download-chaco=1 --download-ml=1 --download-f-blas-lapack=1@:>@])],
 	[petsc_options=$withval],
-	[petsc-options=none])
+	[petsc_options="--download-chaco=1 --download-ml=1 --download-f-blas-lapack=1"])
 
+# spatialdata svn
+AC_ARG_WITH([spatialdata-svn],
+    [AC_HELP_STRING([--with-spatialdata-svn],
+        [use spatialdata from SVN repository @<:@default=no@:>@])],
+	[spatialdata_svn=yes],
+	[spatialdata_svn=no])
+
+# pylith svn
+AC_ARG_WITH([pylith-svn],
+    [AC_HELP_STRING([--with-pylith-svn],
+        [use PyLith from SVN repository (trunk, stable, BRANCH) @<:@default=no@:>@])],
+	[pylith_svn==$withval],
+	[pylith_svn=no])
+
 # fetch tool
 AC_ARG_WITH([fetch],
     [AC_HELP_STRING([--with-fetch],
@@ -176,9 +215,6 @@
 
 # :TODO: Add option to use/not use NETCDF, HDF5
 
-# :TODO: Add option to use SVN for CIG code and PETSc. Use enableval
-# to switch between stable release and trunk for PyLith.
-
 # ----------------------------------------------------------------------
 # BASIC TOOLS
 # ----------------------------------------------------------------------
@@ -200,7 +236,7 @@
   if test -z "$WGET" ; then
     AC_MSG_FAILURE([cannot find 'wget' program.])
   else
-    downloader="$WGET -r"
+    downloader="$WGET -nd -r"
   fi
 elif test "$with_fetch" = "curl" ; then
   AC_PATH_PROG(CURL, curl)
@@ -214,6 +250,14 @@
 fi
 AC_SUBST(downloader)
 
+# svn
+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.'])
+  fi
+fi
+
 # build threads
 AC_SUBST(make_threads)
 
@@ -228,7 +272,7 @@
 else
   # Must have a C++ compiler
   AC_PROG_CXX  
-  if test "$enable_fortran" = "yes" ; then
+  if test "$with_fortran" = "yes" ; then
     AC_PROG_FC
   fi
 fi
@@ -256,15 +300,20 @@
 if test "$install_cppunit" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
-  CIT_CPPUNIT_HEADER
-  CIT_CPPUNIT_LIB
+  if test "$with_testing" = "yes" ; then
+    CIT_CPPUNIT_HEADER
+    CIT_CPPUNIT_LIB
+  fi
 fi
 
 # SWIG
 if test "$install_swig" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
-  AC_PROG_SWIG(1.3.33)
+  if test "$spatialdata_svn" != "no" || test "$pylith_svn" != "no" ; then
+    AC_PROG_SWIG(1.3.33)
+    swig_ok=true
+  fi
 fi
 
 # numpy
@@ -287,22 +336,24 @@
 if test "$install_proj4" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
-  CIT_NETCDF_HEADER
-  CIT_NETCDF_LIB
+  if test "$with_netcdf" = "yes" ; then
+    CIT_NETCDF_HEADER
+    CIT_NETCDF_LIB
+  fi
 fi
 
 # HDF5
 if test "$install_hdf5" = "yes" ; then
+  # Need to account for PETSc option --download-hdf5=1.
   echo "do nothing" >& /dev/null
 else
-  echo "do nothing" >& /dev/null
-  # Need to account for PETSc option --download-hdf5=1.
-  #CIT_HDF5_PETSC_HEADER
-  #CIT_HDF5_PETSC_LIB
+  if test "$with_hdf5" = "yes" ; then
+    echo "ADD TEST FOR HDF5"
+  fi
 fi
 
 # PETSC
-if test "$install_hdf5" = "yes" ; then
+if test "$install_petsc" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
   CIT_PATH_PETSC([3.1.0])
@@ -314,7 +365,7 @@
 
 
 # spatialdata
-if test "$install_proj4" = "yes" ; then
+if test "$install_spatialdata" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
   CIT_SPATIALDATA_HEADER
@@ -333,7 +384,7 @@
 fi
 
 # fiat
-if test "$install_proj4" = "yes" ; then
+if test "$install_fiat" = "yes" ; then
   echo "do nothing" >& /dev/null
 else
   CIT_PYTHON_MODULE([FIAT],[0.9.9])
@@ -347,6 +398,7 @@
 
 AC_OUTPUT
 
+echo ""
 echo "Additional info:"
 echo "  Using $downloader to download tarballs."
 echo "  Using $make_threads thread(s) when running make in parallel."

Modified: short/3D/PyLith/pylith_installer/trunk/notes.txt
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/notes.txt	2011-03-08 17:48:07 UTC (rev 18077)
+++ short/3D/PyLith/pylith_installer/trunk/notes.txt	2011-03-08 19:37:16 UTC (rev 18078)
@@ -62,7 +62,6 @@
 
 13. Check for wget or curl
 
-14. Check for svn, hg
 
 INSTALL
 



More information about the CIG-COMMITS mailing list