[cig-commits] r18075 - in short/3D/PyLith/pylith_installer/trunk: . bin

brad at geodynamics.org brad at geodynamics.org
Mon Mar 7 21:31:16 PST 2011


Author: brad
Date: 2011-03-07 21:31:15 -0800 (Mon, 07 Mar 2011)
New Revision: 18075

Added:
   short/3D/PyLith/pylith_installer/trunk/bin/
   short/3D/PyLith/pylith_installer/trunk/bin/Makefile.am
   short/3D/PyLith/pylith_installer/trunk/bin/fetch.sh
Modified:
   short/3D/PyLith/pylith_installer/trunk/Makefile.am
   short/3D/PyLith/pylith_installer/trunk/configure.ac
Log:
More work on installer.

Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-08 03:35:09 UTC (rev 18074)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am	2011-03-08 05:31:15 UTC (rev 18075)
@@ -17,20 +17,78 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-default: all
+SUBDIRS = \
+	bin
 
+noinst_tmp = \
+	installed_gcc \
+	installed_python \
+	installed_mpi \
+	installed_cppunit \
+	installed_swig \
+	installed_numpy \
+	installed_proj \
+	installed_netcdf \
+	installed_hdf5 \
+	installed_petsc \
+	installed_spatialdata \
+	installed_nemesis \
+	installed_fiat \
+	installed_pylith
+
+noinst_builddirs = \
+	gcc-build \
+	python-build \
+	openmpi-build \
+	mpich-build \
+	cppunit-build \
+	swig-build \
+	proj4-build \
+	netcdf-build \
+	hdf5-build \
+	spatialdata-build \
+	nemesis-build \
+	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
+
+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
+#
+# Normally, we would like to do configure ARGS && make && make
+# install. However a bug in autoconf results in d.SYM directories
+# generating an error when configure tries to remove them with "rm"
+# rather than "rm -r". As a result, we use configure ARGS ; make &&
+# make install.
+
+# ----------------------------------------------------------------------
 # gcc
 # ----------------------------------------------------------------------
 gcc:
 if INSTALL_GCC
-	$(download) http://geodynamics.org/~buildbot/deps/gcc-4.5.2.tar.bz2
-	$(download) http://geodynamics.org/~buildbot/deps/mpc-0.8.2.tar.gz
-	$(download) http://geodynamics.org/~buildbot/deps/gmp-4.3.2.tar.gz
-	$(doanload) http://geodynamics.org/~buildbot/deps/mpfr-2.4.2.tar.bz2
-	tar -jxf gcc-4.5.2.tar.bz2
+	$(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
+	$(TAR) -jxf gcc-4.5.2.tar.bz2
 	cd gcc-4.5.2; \
 		tar -zxf ../gmp-4.3.2.tar.gz; \
 		ln -sf gmp-4.3.2/ gmp; \
@@ -38,27 +96,45 @@
 		ln -sf mpc-0.8.2/ mpc; \
 		tar -jxf ../mpfr-2.4.2.tar.bz2; \
 		ln -sf mpfr-2.4.2/ mpfr
-	mkdir -p gcc-4.5.2-build
-	cd gcc-4.5.2-build && \
-		../gcc-4.5.2/configure --prefix=$(HOME)/install/$(BUILDBOT) \
+	$(MKDIR_P) gcc-build
+	cd gcc-build && \
+		../gcc-4.5.2/configure --prefix=$(prefix) \
+if ENABLE_FORTRAN
 			--enable-languages=c,c++,fortran && \
-		make -j 4 && \
+else
+			--enable-languages=c,c++ && \
+endif
+		make -j $(make_threads) && \
 		make install
 
 else
-	@echo "Skipping gcc installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_gcc:
+	$(MAKE) $(AM_MAKEFLAGS) gcc
+	touch $@
+
 # ----------------------------------------------------------------------
 # python
 # ----------------------------------------------------------------------
-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
+	$(MKDIR_P) python-build
+	cd python-build && \
+		../Python-2.6.6/configure --prefix=$(prefix) && \
+		make -j $(make_threads) && \
+		make install
 else
-	@echo "Skipping Python installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_python:
+	$(MAKE) $(AM_MAKEFLAGS) python
+	touch $@
+
 # ----------------------------------------------------------------------
 # mpi
 # ----------------------------------------------------------------------
@@ -73,124 +149,249 @@
 
 else
 mpi:
-	@echo "Skipping MPI installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_mpi:
+	$(MAKE) $(AM_MAKEFLAGS) mpi
+	touch $@
+
 # ----------------------------------------------------------------------
 # openmpi
 # ----------------------------------------------------------------------
-openmpi:
+openmpi: installed_gcc
 
 # ----------------------------------------------------------------------
 # mpich
 # ----------------------------------------------------------------------
-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
+	$(MKDIR_P) mpich-build
+	cd mpich-build && \
+		../mpich2-1.3.2p1/configure --with-pm=gforker \
+			--enable-shared --enable-sharedlibs=gcc \
+			--disable-static --disable-mpe \
+			--prefix=$(HOME)/install/$(BUILDBOT) \
+			CC=gcc CXX=g++ FC=gfortran ; \
+		make && \
+		make install
+	if [ ! -x $(prefix)/mpirun ]; then cd $(prefix)/bin && $(LN_S) mpiexec mpirun; fi
 
 # ----------------------------------------------------------------------
 # cppunit
 # ----------------------------------------------------------------------
-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
+	$(MKDIR_P) cppunit-build
+	cd cppunit-build && \
+		../cppunit-1.12.1/configure --prefix=$(prefix) ; \
+		make -j $(make_threads) && \
+		make install
 
 else
-	@echo "Skipping CppUnit installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_cppunit:
+	$(MAKE) $(AM_MAKEFLAGS) cppunit
+	touch $@
+
 # ----------------------------------------------------------------------
 # swig
 # ----------------------------------------------------------------------
-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
+	$(MKDIR_P) swig-build
+	cd swig-build && \
+		../swig-2.0.2/configure --prefix=$(HOME)/pylith_deps ; \
+		make -j 4 && \
+		make install
 else
-	@echo "Skipping SWIG installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_swig:
+	$(MAKE) $(AM_MAKEFLAGS) swig
+	touch $@
+
 # ----------------------------------------------------------------------
 # numpy
 # ----------------------------------------------------------------------
-numpy:
+numpy: installed_python
 if INSTALL_NUMPY
+	$(FETCH) "(downloader)" swig-2.0.2.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)
 
 else
-	@echo "Skipping Numpy installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_numpy:
+	$(MAKE) $(AM_MAKEFLAGS) numpy
+	touch $@
+
 # ----------------------------------------------------------------------
 # proj4
 # ----------------------------------------------------------------------
-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-datumgrid-1.3.zip http://geodynamics.org/~buildbot/deps
+	$(TAR) -zxf proj-4.7.0.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) ; \
+		make -j $(make_threads) && \
+		make install
 
 else
-	@echo "Skipping Proj4 installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_proj4:
+	$(MAKE) $(AM_MAKEFLAGS) proj4
+	touch $@
+
 # ----------------------------------------------------------------------
 # netcdf
 # ----------------------------------------------------------------------
-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
+	$(MKDIR_P) netcdf-build
+	cd netcdf-build && \
+		../netcdf-4.1.1/configure --prefix=$(prefix) \
+			--enable-shared --disable-static --disable-netcdf-4 ; \
+		make -j $(make_threads) && \
+		make install
 
 else
-	@echo "Skipping NetCDF installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_netcdf:
+	$(MAKE) $(AM_MAKEFLAGS) netcdf
+	touch $@
+
 # ----------------------------------------------------------------------
 # hdf5
 # ----------------------------------------------------------------------
-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
+	$(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 ; \
+		make -j $(make_threads) && \
+		make install
 
 else
-	@echo "Skipping HDF5 installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_hdf5:
+	$(MAKE) $(AM_MAKEFLAGS) hdf5
+	touch $@
+
 # ----------------------------------------------------------------------
 # petsc
 # ----------------------------------------------------------------------
-petsc:
+petsc: installed_mpi
 if INSTALL_PETSC
 
 else
-	@echo "Skipping PETSc installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_petsc:
+	$(MAKE) $(AM_MAKEFLAGS) petsc
+	touch $@
+
 # ----------------------------------------------------------------------
 # spatialdata
 # ----------------------------------------------------------------------
-spatialdata:
+spatialdata: installed_numpy installed_proj4 installed_swig installed_cppunit
 if INSTALL_SPATIALDATA
 
 else
-	@echo "Skipping spatialdata installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_spatialdata:
+	$(MAKE) $(AM_MAKEFLAGS) spatialdata
+	touch $@
+
 # ----------------------------------------------------------------------
 # nemesis
 # ----------------------------------------------------------------------
-nemesis:
+nemesis: installed_mpi installed_python
 if INSTALL_NEMESIS
+	$(FETCH_DIR) "$(downloader)" nemesis.tar.gz 
+	$(TAR) -zxvf hdf5-1.8.6.tar.gz
+	$(MKDIR_P) nemesis-build
+	cd nemesis-build && \
+		../nemesis-dev/configure --prefix=$(prefix) ; \
+		make && \
+		make install
 
 else
-	@echo "Skipping nemesis installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_nemesis:
+	$(MAKE) $(AM_MAKEFLAGS) nemesis
+	touch $@
+
 # ----------------------------------------------------------------------
 # fiat
 # ----------------------------------------------------------------------
-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)
 
 else
-	@echo "Skipping FIAT installation."
+	@echo "$@ already installed. Skipping installation."
 endif
 
+installed_fiat:
+	$(MAKE) $(AM_MAKEFLAGS) fiat
+	touch $@
 
 # ----------------------------------------------------------------------
 # pylith
 # ----------------------------------------------------------------------
-pylith:
+pylith: installed_cppunit installed_swig installed_netcdf installed_hdf5 installed_petsc installed_nemesis installed_spatialdata installed_fiat
 
+installed_pylith:
+	$(MAKE) $(AM_MAKEFLAGS) pylith
+	touch $@
 
+# ----------------------------------------------------------------------
+# clean
+# ----------------------------------------------------------------------
+CLEANFILES = $(noinst_tmp)
+
+clean-builddirs:
+	$(RM) $(RMFLAGS) -r $(noinst_builddirs)
+
+clean-srcdirs:
+	$(RM) $(RMFLAGS) -r $(noinst_srcdirs)
+
+clean-local: clean-builddirs clean-srcdirs
+
 # End of file
\ No newline at end of file

Added: short/3D/PyLith/pylith_installer/trunk/bin/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/bin/Makefile.am	                        (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/bin/Makefile.am	2011-03-08 05:31:15 UTC (rev 18075)
@@ -0,0 +1,23 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+
+dist_noinst_PROGRAM = \
+	fetch.sh
+
+
+
+# End of file
\ No newline at end of file

Added: short/3D/PyLith/pylith_installer/trunk/bin/fetch.sh
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/bin/fetch.sh	                        (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/bin/fetch.sh	2011-03-08 05:31:15 UTC (rev 18075)
@@ -0,0 +1,39 @@
+#~/bin/bash
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+
+if [ $# != 3 ] ; then
+    echo "usage: FETCH_PROGRAM FILE URL"
+    exit -1
+fi
+fetch=$1
+file=$2
+url=$3
+
+if [ ! -f $file ]; then
+  if [ "$fetch" == "none" ]; then
+    echo "No local copy of $file found and no downloader specified."
+    exit -1
+  else
+    echo "Downloading $file from $url."
+    $fetch $url/$file
+  fi
+else
+    echo "Found local copy of $file."
+fi 
+
+
+# End of file
\ No newline at end of file


Property changes on: short/3D/PyLith/pylith_installer/trunk/bin/fetch.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-08 03:35:09 UTC (rev 18074)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac	2011-03-08 05:31:15 UTC (rev 18075)
@@ -18,7 +18,6 @@
 
 AC_PREREQ(2.59)
 AC_INIT([PyLith Installer], [1.0.0], [cig-short at geodynamics.org])
-AC_CONFIG_HEADER([portinfo])
 AC_CONFIG_AUX_DIR([./aux-config])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([foreign])
@@ -30,118 +29,110 @@
 # GCC
 AC_ARG_ENABLE([gcc],
     [AC_HELP_STRING([--enable-gcc],
-        [install GNU compilers) @<:@default=no@:>@])],
-	[install_gcc=yes],
+        [install GNU compilers @<:@default=no@:>@])],
+	[if test "$enableval" = yes ; then install_gcc=yes; else install_gcc=no; fi],
 	[install_gcc=no])
-AM_CONDITIONAL([INSTALL_GCC], [test "$install_gcc" == "yes"])
+AM_CONDITIONAL([INSTALL_GCC], [test "$install_gcc" = yes])
 
 # PYTHON
 AC_ARG_ENABLE([python],
     [AC_HELP_STRING([--enable-python],
-        [install Python) @<:@default=no@:>@])],
-	[install_python=yes],
+        [install Python @<:@default=no@:>@])],
+	[if test "$enableval" = yes ; then install_python=yes; else install_python=no; fi],
 	[install_python=no])
-AM_CONDITIONAL([INSTALL_PYTHON], [test "$install_python" == "yes"])
+AM_CONDITIONAL([INSTALL_PYTHON], [test "$install_python" = yes])
 
 # MPI
 AC_ARG_ENABLE([mpi],
     [AC_HELP_STRING([--enable-mpi],
-        [install OpenMPI version of MPI) @<:@default=no@:>@])],
-	[install_mpi=$enableval],
+        [install MPI (no, openmpi, mpich) @<:@default=no@:>@])],
+	[if test "$enableval" != no ; then install_mpi=$enableval; else install_mpi=no; fi],
 	[install_mpi=no])
 AM_CONDITIONAL([INSTALL_MPI], [test "$install_mpi" != no])
-AM_CONDITIONAL([INSTALL_OPENMPI], [test "$install_mpi" = "openmpi"])
-AM_CONDITIONAL([INSTALL_MPICH], [test "$install_mpi" = "mpich"])
+AM_CONDITIONAL([INSTALL_OPENMPI], [test "$install_mpi" = openmpi])
+AM_CONDITIONAL([INSTALL_MPICH], [test "$install_mpi" = mpich])
 
 # CPPUNIT
 AC_ARG_ENABLE([cppunit],
     [AC_HELP_STRING([--enable-cppunit],
-        [install GNU compilers) @<:@default=yes@:>@])],
-	[install_cppunit=yes],
-	[install_cppunit=no])
-AM_CONDITIONAL([INSTALL_CPPUNIT], [test "$install_cppunit" = "yes"])
+        [install CppUnit @<:@default=yes@:>@])],
+	[if test "$enableval" = "no" ; 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 @<:@default=yes@:>@])],
 	[install_swig=yes],
 	[install_swig=no])
-AM_CONDITIONAL([INSTALL_SWIG], [test "$install_swig" = "yes"])
+AM_CONDITIONAL([INSTALL_SWIG], [test "$install_swig" = yes])
 
 # NUMPY
 AC_ARG_ENABLE([numpy],
     [AC_HELP_STRING([--enable-numpy],
-        [install numpy) @<:@default=yes@:>@])],
+        [install numpy @<:@default=yes@:>@])],
 	[install_numpy=yes],
 	[install_numpy=no])
-AM_CONDITIONAL([INSTALL_NUMPY], [test "$install_numpy" = "yes"])
+AM_CONDITIONAL([INSTALL_NUMPY], [test "$install_numpy" = yes])
 
 # PROJ4
 AC_ARG_ENABLE([proj4],
     [AC_HELP_STRING([--enable-proj4],
-        [install GNU compilers) @<:@default=yes@:>@])],
+        [install Proj4 @<:@default=yes@:>@])],
 	[install_proj4=yes],
 	[install_proj4=no])
-AM_CONDITIONAL([INSTALL_PROJ4], [test "$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 @<:@default=yes@:>@])],
 	[install_netcdf=yes],
 	[install_netcdf=no])
-AM_CONDITIONAL([INSTALL_NETCDF], [test "$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 @<:@default=yes@:>@])],
 	[install_hdf5=yes],
 	[install_hdf5=no])
-AM_CONDITIONAL([INSTALL_HDF5], [test "$install_hdf5" = "yes"])
+AM_CONDITIONAL([INSTALL_HDF5], [test "$install_hdf5" = yes])
 
 # PETSC
 AC_ARG_ENABLE([petsc],
     [AC_HELP_STRING([--enable-petsc],
-        [install PETSc (development version)) @<:@default=yes@:>@])],
+        [install PETSc (development version) @<:@default=yes@:>@])],
 	[install_petsc=yes],
 	[install_petsc=no])
-AM_CONDITIONAL([INSTALL_PETSC], [test "$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 (CIG) @<:@default=yes@:>@])],
 	[install_spatialdata=yes],
 	[install_spatialdata=no])
-AM_CONDITIONAL([INSTALL_SPATIALDATA], [test "$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 (CIG) @<:@default=yes@:>@])],
 	[install_nemesis=yes],
 	[install_nemesis=no])
-AM_CONDITIONAL([INSTALL_NEMESIS], [test "$install_nemesis" = "yes"])
+AM_CONDITIONAL([INSTALL_NEMESIS], [test "$install_nemesis" = yes])
 
 # FIAT
 AC_ARG_ENABLE([fiat],
     [AC_HELP_STRING([--enable-fiat],
-        [install GNU compilers) @<:@default=yes@:>@])],
+        [install FIAT @<:@default=yes@:>@])],
 	[install_fiat=yes],
 	[install_fiat=no])
-AM_CONDITIONAL([INSTALL_FIAT], [test "$install_fiat" = "yes"])
+AM_CONDITIONAL([INSTALL_FIAT], [test "$install_fiat" = yes])
 
-# TESTING
-AC_ARG_ENABLE([fiat],
-    [AC_HELP_STRING([--enable-fiat],
-        [install GNU compilers) @<:@default=yes@:>@])],
-	[install_fiat=yes],
-	[install_fiat=no])
-AM_CONDITIONAL([INSTALL_FIAT], [test "$install_fiat" = "yes"])
 
-
 # ----------------------------------------------------------------------
 # OPTIONS
 # ----------------------------------------------------------------------
@@ -152,7 +143,7 @@
         [enable testing (requires cppunit) @<:@default=yes@:>@])],
 	[enable_testing=yes],
 	[enable_testing=no])
-AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_testing" = "yes"])
+AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_testing" = yes])
 
 # FORTRAN
 AC_ARG_ENABLE([fortran],
@@ -160,7 +151,7 @@
         [enable Fortran options for packages @<:@default=yes@:>@])],
 	[enable_fortran=yes],
 	[enable_fortran=no])
-AM_CONDITIONAL([ENABLE_FORTRAN], [test "$enable_fortran" = "yes"])
+AM_CONDITIONAL([ENABLE_FORTRAN], [test "$enable_fortran" = yes])
 
 # PETSC options
 AC_ARG_WITH([petsc-options],
@@ -192,21 +183,36 @@
 # BASIC TOOLS
 # ----------------------------------------------------------------------
 AC_PROG_LIBTOOL
+AC_PROG_MKDIR_P
+AC_PROG_LN_S
 
 # tar
 AC_PATH_PROG(TAR, tar)
+if test -z "$TAR" ; then
+  AC_MSG_FAILURE([cannot find 'tar' program.])
+  TAR=`echo "Error: tar is not installed." ; false`
+fi
 
 # wget/curl
+downloader=none
 if test "$with_fetch" = "wget" ; then
   AC_PATH_PROG(WGET, wget)
-  download="wget -r"
+  if test -z "$WGET" ; then
+    AC_MSG_FAILURE([cannot find 'wget' program.])
+  else
+    downloader="$WGET -r"
+  fi
 elif test "$with_fetch" = "curl" ; then
   AC_PATH_PROG(CURL, curl)
-  download="curl -O"
+  if test -z "$CURL" ; then
+    AC_MSG_FAILURE([cannot find 'curl' program.])
+  else
+    downloader="$CURL -O"
+  fi
 else
-  AC_MSG_FAILURE([Error in configure logic for fetch tool])
+  AC_MSG_FAILURE([Error in configure logic for downloader.])
 fi
-AC_SUBST(download)
+AC_SUBST(downloader)
 
 # build threads
 AC_SUBST(make_threads)
@@ -240,6 +246,10 @@
   echo "do nothing" >& /dev/null
 else
   AC_PATH_PROG(MPICXX, mpicxx)
+  if test -z "$MPICXX"; then
+    AC_MSG_FAILURE([cannot find 'mpicxx' program.])
+    MPICXX=`echo "Error: MPI is not installed properly." ; false`
+  fi
 fi
 
 # cppunit
@@ -296,9 +306,10 @@
   echo "do nothing" >& /dev/null
 else
   CIT_PATH_PETSC([3.1.0])
-  CIT_HEADER_PETSC
-  CIT_CHECK_LIB_PETSC
-  CIT_CHECK_LIB_PETSC_SIEVE
+  # TEMPORARY TO SPEED UP
+  #CIT_HEADER_PETSC
+  #CIT_CHECK_LIB_PETSC
+  #CIT_CHECK_LIB_PETSC_SIEVE
 fi
 
 
@@ -315,6 +326,10 @@
   echo "do nothing" >& /dev/null
 else
   AC_PATH_PROG(NEMESIS, nemesis)
+  if test -z $NEMESIS; then
+    AC_MSG_FAILURE([cannot find 'nemesis' program.])
+    NEMESIS=`echo "Error: nemesis is not installed properly." ; false`
+  fi
 fi
 
 # fiat
@@ -327,13 +342,14 @@
 
 # ----------------------------------------------------------------------
 AC_CONFIG_FILES([Makefile
+		bin/Makefile
 		])
 
 AC_OUTPUT
 
 echo "Additional info:"
-echo "  Using $download to download tarballs."
-echo "  Using $make_thread(s) threads when running make in parallel."
+echo "  Using $downloader to download tarballs."
+echo "  Using $make_threads thread(s) when running make in parallel."
 
 
 dnl end of configure.ac



More information about the CIG-COMMITS mailing list