[cig-commits] r18264 - short/3D/PyLith/pylith_installer/trunk
brad at geodynamics.org
brad at geodynamics.org
Thu Apr 21 09:01:04 PDT 2011
Author: brad
Date: 2011-04-21 09:01:04 -0700 (Thu, 21 Apr 2011)
New Revision: 18264
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:
More fixes.
Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am 2011-04-21 15:52:45 UTC (rev 18263)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am 2011-04-21 16:01:04 UTC (rev 18264)
@@ -32,6 +32,7 @@
CPPUNIT_VER=1.12.1
+PCRE_VER=8.12
SWIG_VER=2.0.2
NUMPY_VER=1.5.1
@@ -105,14 +106,14 @@
# ----------------------------------------------------------------------
# Environment settings for configure for "installed" packages.
# ----------------------------------------------------------------------
-env_flags="CPPFLAGS=-I$(prefix)/include LDFLAGS=-L$(prefix)/lib"
+env_flags=CPPFLAGS=-I$(prefix)/include LDFLAGS=-L$(prefix)/lib PATH=$(prefix)/bin:$(PATH)
# ----------------------------------------------------------------------
# Targets
# ----------------------------------------------------------------------
default: installed_pylith
-all: compilers python mpi cppunit swig numpy proj4 netcdf hdf5 petsc nemesis spatialdata fiat
+all: finished_mkdest compilers python mpi cppunit swig numpy proj4 netcdf hdf5 petsc nemesis spatialdata fiat
# ----------------------------------------------------------------------
# Note on configure invocations
@@ -124,9 +125,19 @@
# make install.
# ----------------------------------------------------------------------
+# setup
+# ----------------------------------------------------------------------
+mkdest:
+ $(MKDIR_P) $(prefix)/include $(prefix)/lib $(prefix)/bin
+
+finished_mkdest:
+ $(MAKE) $(AM_MAKEFLAGS) mkdest
+ touch $@
+
+# ----------------------------------------------------------------------
# compilers
# ----------------------------------------------------------------------
-compilers:
+compilers: finished_mkdest
if INSTALL_GCC
LANGUAGES = "c,c++"
if WITH_FORTRAN
@@ -207,10 +218,10 @@
# ----------------------------------------------------------------------
openmpi: installed_compilers
$(FETCH_SCRIPT) "$(downloader)" openmpi-$(OPENMPI_VER).tar.gz http://geodynamics.org/~buildbot/deps
- $(TAR) -zxf openmpi-$(MPICH2_VER).tar.gz
+ $(TAR) -zxf openmpi-$(OPENMPI_VER).tar.gz
$(MKDIR_P) openmpi-build
cd openmpi-build && \
- ../openmpi-$(MPICH2_VER)/configure \
+ ../openmpi-$(OPENMPI_VER)/configure \
--prefix=$(prefix) $(env_flags) ; \
make && \
make install
@@ -257,9 +268,30 @@
# ----------------------------------------------------------------------
+# pcre
+# ----------------------------------------------------------------------
+pcre: installed_compilers
+if INSTALL_PCRE
+ $(FETCH_SCRIPT) "$(downloader)" pcre-$(PCRE_VER).tar.gz http://geodynamics.org/~buildbot/deps
+ $(TAR) -zxf pcre-$(PCRE_VER).tar.gz
+ $(MKDIR_P) pcre-build
+ cd pcre-build && \
+ ../pcre-$(PCRE_VER)/configure --prefix=$(prefix) $(env_flags) ; \
+ make -j $(make_threads) && \
+ make install
+else
+ @echo "$@ already installed. Skipping installation."
+endif
+
+installed_pcre:
+ $(MAKE) $(AM_MAKEFLAGS) pcre
+ touch $@
+
+
+# ----------------------------------------------------------------------
# swig
# ----------------------------------------------------------------------
-swig: installed_compilers
+swig: installed_pcre installed_compilers
if INSTALL_SWIG
$(FETCH_SCRIPT) "$(downloader)" swig-$(SWIG_VER).tar.gz http://geodynamics.org/~buildbot/deps
$(TAR) -zxf swig-$(SWIG_VER).tar.gz
@@ -333,8 +365,8 @@
$(TAR) -zxf netcdf-$(NETCDF_VER).tar.gz
$(MKDIR_P) netcdf-build
cd netcdf-build && \
- ../netcdf-$(NETCDF_VER)/configure --prefix=$(prefix) $(env_flags) \
- --enable-shared --disable-static --disable-netcdf-4 ; \
+ ../netcdf-$(NETCDF_VER)/configure --prefix=$(prefix) \
+ --enable-shared --disable-static --disable-netcdf-4 $(env_flags) ; \
make -j $(make_threads) && \
make install
Modified: short/3D/PyLith/pylith_installer/trunk/TODO
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/TODO 2011-04-21 15:52:45 UTC (rev 18263)
+++ short/3D/PyLith/pylith_installer/trunk/TODO 2011-04-21 16:01:04 UTC (rev 18264)
@@ -1,3 +1,5 @@
+create prefix/include and prefix/lib directories
+
Makefile
gcc
@@ -7,7 +9,6 @@
test
mpich
- set shared lib flag based on system
test
openmpi
Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac 2011-04-21 15:52:45 UTC (rev 18263)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac 2011-04-21 16:01:04 UTC (rev 18264)
@@ -60,6 +60,14 @@
[install_cppunit=yes])
AM_CONDITIONAL([INSTALL_CPPUNIT], [test "$install_cppunit" = yes])
+# PCRE
+AC_ARG_ENABLE([pcre],
+ [AC_HELP_STRING([--enable-pcre],
+ [install PCRE @<:@default=no@:>@])],
+ [if test "$enableval" = "yes" ; then install_pcre=yes; else install_pcre=no; fi],
+ [install_pcre=no])
+AM_CONDITIONAL([INSTALL_PCRE], [test "$install_pcre" = yes])
+
# SWIG
AC_ARG_ENABLE([swig],
[AC_HELP_STRING([--enable-swig],
@@ -328,6 +336,29 @@
fi
fi
+# PCRE
+if test "$install_pcre" = yes ; then
+ echo "do nothing" >& /dev/null
+else
+ if test "$install_swig" = yes ; then
+ AC_LANG(C++)
+ AC_CHECK_HEADER([pcre.h], [], [
+ AC_MSG_ERROR([pcre header not found; try CPPFLAGS="-I<pcre include dir>"])
+ ])dnl
+ AC_LANG(C++)
+ AC_MSG_CHECKING([for real_pcre in -lpcre])
+ AC_REQUIRE_CPP
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <pcre.h>]],
+ [[real_pcre value;]])],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([pcre library not found; try LDFLAGS="-L<pcre lib dir>"])
+ ])dnl
+ AC_PATH_PROG(PCRETEST, pcretest)
+ fi
+fi
+
# SWIG
if test "$install_swig" = yes ; then
echo "do nothing" >& /dev/null
More information about the CIG-COMMITS
mailing list