#! /bin/sh # Call this without arguments if t8code is the toplevel package. # Call this with two arguments if t8code is itself a subdirectory: # ./bootstrap <sc config directory> <p4est config directory> # RUNNING BOOTSTRAP FOR LIBSC # override by option argument SC_CONFIG="sc/config" if test -n "$1" ; then SC_CONFIG="$1" if test ! -d "$SC_CONFIG" ; then echo "Cannot find directory $SC_CONFIG" echo " If you just called ./bootstrap from a fresh clone of t8code" echo " you may need to checkout the submodules sc and p4est:" echo " \$ git submodule init && git submodule update" exit 1 fi fi # convert into an absolute path SC_CONFIG=`cd "$SC_CONFIG" && pwd` if test -x "sc/bootstrap" ; then echo "Running bootstrap in subdirectory sc" (cd sc && ./bootstrap) fi # RUNNING BOOTSTRAP FOR P4EST #override by option argument P4EST_CONFIG="p4est/config" if test -n "$2" ; then P4EST_CONFIG="$2" if test ! -d "$P4EST_CONFIG" ; then echo "Cannot find directory $P4EST_CONFIG" echo " If you just called ./bootstrap from a fresh clone of t8code" echo " you may need to checkout the submodules sc and p4est:" echo " \$ git submodule init && git submodule update" exit fi fi #convert into an absolute path P4EST_CONFIG=`cd "$P4EST_CONFIG" && pwd` if test -x "p4est/bootstrap" ; then echo "Running bootstrap in subdirectory p4est" (cd p4est && ./bootstrap "$SC_CONFIG") fi echo "--- This is the bootstrap script for t8code ---" echo "Current directory is $PWD" rm -rf autom4te.cache LIBTOOLIZE=`which glibtoolize` if test ! -x "$LIBTOOLIZE" ; then LIBTOOLIZE=`which libtoolize` ; fi if test ! -x "$LIBTOOLIZE" ; then echo "bootstrap requires libtoolize" ; \ exit 1 ; fi aclocal -Wall -I config -I "$SC_CONFIG" -I "$P4EST_CONFIG" autoconf -Wall --force autoheader -Wall --force "$LIBTOOLIZE" --install --copy automake -Wall --add-missing --copy