source: trunk/bin/get_colpack.sh @ 2939

Last change on this file since 2939 was 2939, checked in by bradbell, 7 years ago
  1. Make sure all '# defines' have an '# undef' and vise-verser.
  2. Add adolc tests to jenkins.sh.

check_define.sh: New reoutine that check defines have matching undef.
package.sh: run check_define.sh.
search.sh: add missing source directory to search.
configure.hpp.in: fix bug in speed tests (name of preprocessor macro).
pow.hpp: fix comment.
thread_alloc.hpp: fix spelling in comment.
jenkins.sh: Automatically set LD_LIBRARY_PATH.
base_adolc.hpp: fix problem when using ADOL-C-2.4.1
adolc_prefix.omh: add link to get_adolc.sh.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1#! /bin/bash -e
2# $Id: get_colpack.sh 2939 2013-10-14 11:06:18Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13# $begin get_colpack.sh$$ $newlinech #$$
14# $spell
15#       colpack
16#       gz
17#       Col
18#       CppAD
19# $$
20#
21# $section Download and Install ColPack in Build Directory$$
22# $index colpack, download and install$$
23# $index download, install colpack$$
24# $index install, colpack$$
25#
26# $head Syntax$$
27# $code bin/get_colpack.sh$$
28#
29# $head Purpose$$
30# If you are using Unix, this command will download and install
31# $href%http://www.cs.odu.edu/~dnguyen/dox/colpack/html/%ColPack%$$ in the
32# CppAD $code build$$ directory.
33#
34# $head Distribution Directory$$
35# This command must be executed in the
36# $cref/distribution directory/download/Distribution Directory/$$.
37#
38# $head External Directory$$
39# The ColPack source code is downloaded into the sub-directory
40# $code build/external$$ below the distribution directory.
41#
42# $head Prefix Directory$$
43# The ColPack include files are installed in the sub-directory
44# $code build/prefix/include/ColPack$$ below the distribution directory.
45#
46# $head Reuse$$
47# The file $codei%build/external/ColPack-%version%.tar.gz%$$
48# and the directory $codei%build/external/ColPack-%version%$$
49# will be reused if they exist. Delete this file and directory
50# to get a complete rebuild.
51#
52# $end
53# -----------------------------------------------------------------------------
54if [ $0 != "bin/get_colpack.sh" ]
55then
56        echo "bin/get_colpack.sh: must be executed from its parent directory"
57        exit 1
58fi
59# -----------------------------------------------------------------------------
60# bash function that echos and executes a command
61echo_eval() {
62        echo $*
63        eval $*
64}
65# -----------------------------------------------------------------------------
66echo 'Download colpack to build/external and install it to build/prefix'
67version='1.0.9'
68web_page='http://cscapes.cs.purdue.edu/download/ColPack'
69prefix=`pwd`'/build/prefix'
70# --------------------------------------------------------------------------
71if [ -e /usr/lib64 ]
72then
73        libdir='lib64'
74else
75        libdir='lib'
76fi
77# -----------------------------------------------------------------------------
78if [ ! -d build/external ]
79then
80        echo_eval mkdir -p build/external
81fi
82echo_eval cd build/external
83# -----------------------------------------------------------------------------
84if [ ! -e "ColPack-$version.tar.gz" ]
85then
86        echo_eval wget --no-check-certificate $web_page/ColPack-$version.tar.gz
87fi
88# -----------------------------------------------------------------------------
89if [ ! -e ColPack-$version ]
90then
91        echo_eval tar -xzf ColPack-$version.tar.gz
92fi
93echo_eval cd ColPack-$version
94# -----------------------------------------------------------------------------
95echo_eval rm aclocal.m4 ltmain.sh
96echo_eval libtoolize
97echo_eval autoreconf --force
98#
99system_name=`uname | sed -e 's|\(......\).*|\1|'`
100if [ "$version" == 'ColPack-1.0.9' ] && [ "$system_name" == 'CYGWIN' ]
101then
102        sed -i.save \
103                -e 's|\(^ *enable_dlopen\)=no|\1=yes|' \
104                -e 's|\(^ *enable_win32_dll\)=no|\1=yes|' \
105                -e 's|\(^ *enable_shared\)=no|\1=yes|' \
106                -e 's|\(^ *enable_shared\)=no|\1=yes|' \
107                -e 's|\(^ *no) *enable_shared\)=no|\1=yes|' \
108                -e 's|\(^ *enable_static\)=yes|\1=no|' \
109                -e 's|\(^ *yes) *enable_static\)=yes|\1=no|' \
110                -e 's|\(^ *enable_shared_with_static_runtimes\)=no|\1=yes|' \
111                -e 's|\(^ *enable_shared_with_static_runtimes_CXX\)=no|\1=yes|' \
112                configure
113fi
114echo_eval ./configure \
115        --prefix=$prefix \
116        --libdir=$prefix/$libdir \
117        --enable-shared
118if [ "$version" == 'ColPack-1.0.9' ] && [ "$system_name" == 'CYGWIN' ]
119then
120        sed -i.save \
121                -e 's|\(^ *allow_undefined\)=yes|\1=no|' \
122                libtool
123fi
124echo_eval make install
125# -----------------------------------------------------------------------------
126echo "get_colpack: OK"
Note: See TracBrowser for help on using the repository browser.