Relaxed checking of Automake requirements, and removed any need for the
'myacprep' script. Also support Python is now checked for by default when building the development version (i.e., from version control).
This commit is contained in:
parent
8dc5f14b65
commit
b555649589
3 changed files with 24 additions and 38 deletions
51
acprep
51
acprep
|
|
@ -11,8 +11,6 @@
|
||||||
export AUTOCONF_VERSION=2.62
|
export AUTOCONF_VERSION=2.62
|
||||||
export AUTOMAKE_VERSION=1.10.1
|
export AUTOMAKE_VERSION=1.10.1
|
||||||
|
|
||||||
touch AUTHORS COPYING ChangeLog
|
|
||||||
|
|
||||||
cmd=$(which glibtoolize 2>&1)
|
cmd=$(which glibtoolize 2>&1)
|
||||||
if [ -x "$cmd" ]; then
|
if [ -x "$cmd" ]; then
|
||||||
export LIBTOOLIZE="$cmd"
|
export LIBTOOLIZE="$cmd"
|
||||||
|
|
@ -25,22 +23,23 @@ echo "m4_define([VERSION_NUMBER], [$COMMIT])" > version.m4
|
||||||
autoreconf --force --install
|
autoreconf --force --install
|
||||||
|
|
||||||
|
|
||||||
SWITCHES=""
|
SWITCHES="--enable-python" # always build with Python support
|
||||||
|
|
||||||
|
PYTHON_HOME="/usr"
|
||||||
BOOST_SUFFIX=""
|
BOOST_SUFFIX=""
|
||||||
|
|
||||||
INCDIRS="-isystem /usr/local/include"
|
INCDIRS="-isystem /usr/local/include"
|
||||||
INCDIRS="$INCDIRS -isystem /opt/local/include"
|
INCDIRS="$INCDIRS -isystem /opt/local/include"
|
||||||
INCDIRS="$INCDIRS -isystem /opt/local/include/libofx"
|
INCDIRS="$INCDIRS -isystem /opt/local/include/libofx"
|
||||||
INCDIRS="$INCDIRS -isystem /usr/local/include/boost-1_35"
|
INCDIRS="$INCDIRS -isystem /usr/local/include/boost-1_35"
|
||||||
|
INCDIRS="$INCDIRS -isystem $PYTHON_HOME/include/python2.5"
|
||||||
|
|
||||||
LDFLAGS=""
|
LDFLAGS=""
|
||||||
LIBDIRS="-L/usr/local/lib -L/opt/local/lib"
|
LIBDIRS="-L/usr/local/lib -L/opt/local/lib"
|
||||||
|
LIBDIRS="$LIBDIRS -L$PYTHON_HOME/lib/python2.5/config"
|
||||||
|
|
||||||
ARCHFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
ARCHFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||||
|
|
||||||
PYTHON_HOME="/usr"
|
|
||||||
|
|
||||||
|
|
||||||
SYSTEM=$(uname -s)
|
SYSTEM=$(uname -s)
|
||||||
|
|
||||||
|
|
@ -60,7 +59,7 @@ fi
|
||||||
CPPFLAGS="$INCDIRS"
|
CPPFLAGS="$INCDIRS"
|
||||||
CXXFLAGS="$CXXFLAGS -pipe"
|
CXXFLAGS="$CXXFLAGS -pipe"
|
||||||
LDFLAGS="$LDFLAGS $LIBDIRS"
|
LDFLAGS="$LDFLAGS $LIBDIRS"
|
||||||
LOCAL=false
|
BUILD_DIR=false
|
||||||
|
|
||||||
# Warning flags
|
# Warning flags
|
||||||
CXXFLAGS="$CXXFLAGS -Wall -ansi -Winvalid-pch"
|
CXXFLAGS="$CXXFLAGS -Wall -ansi -Winvalid-pch"
|
||||||
|
|
@ -90,13 +89,10 @@ CXXFLAGS="$CXXFLAGS -Wwrite-strings"
|
||||||
# but gives you useful stack traces to mention in your bug reports.
|
# but gives you useful stack traces to mention in your bug reports.
|
||||||
# Recommended if you're not running a release version.
|
# Recommended if you're not running a release version.
|
||||||
#
|
#
|
||||||
# --local
|
# --dir PATH
|
||||||
#
|
#
|
||||||
# Prepare for building in the same directory as the sources. This is
|
# Building the sources in PATH instead of in the source directory. This
|
||||||
# required for using pre-compiled headers with the --devel option (see
|
# breaks pre-compiled headers, but keeps your source tree clean.
|
||||||
# below). Otherwise, if you have a directory named ~/Products, Ledger will
|
|
||||||
# build itself there. There's no option for changing that directory yet, so
|
|
||||||
# just edit this script if you need to.
|
|
||||||
#
|
#
|
||||||
# --boost SUFFIX
|
# --boost SUFFIX
|
||||||
#
|
#
|
||||||
|
|
@ -159,7 +155,7 @@ CXXFLAGS="$CXXFLAGS -Wwrite-strings"
|
||||||
#
|
#
|
||||||
# Now you're ready to run acprep like this:
|
# Now you're ready to run acprep like this:
|
||||||
#
|
#
|
||||||
# $ ./acprep --local --devel --debug --boost sd
|
# $ ./acprep --devel --debug --boost sd
|
||||||
#
|
#
|
||||||
# Or, as I do it:
|
# Or, as I do it:
|
||||||
#
|
#
|
||||||
|
|
@ -193,6 +189,13 @@ while [ -n "$1" ]; do
|
||||||
|
|
||||||
BOOST_SUFFIX="-d-1_35" # I built mine with _GLIBCXX_DEBUG
|
BOOST_SUFFIX="-d-1_35" # I built mine with _GLIBCXX_DEBUG
|
||||||
|
|
||||||
|
# Do the same thing as --debug below
|
||||||
|
SWITCHES="$SWITCHES --enable-debug"
|
||||||
|
CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING=1"
|
||||||
|
CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE=1"
|
||||||
|
CXXFLAGS="$CXXFLAGS -g"
|
||||||
|
LDFLAGS="$LDFLAGS -g"
|
||||||
|
|
||||||
#LDFLAGS="-Wl,-read_only_relocs,suppress"
|
#LDFLAGS="-Wl,-read_only_relocs,suppress"
|
||||||
#LIBS=""
|
#LIBS=""
|
||||||
#if [ -f /opt/local/lib/libexpat.a ]; then
|
#if [ -f /opt/local/lib/libexpat.a ]; then
|
||||||
|
|
@ -228,14 +231,6 @@ while [ -n "$1" ]; do
|
||||||
CXXFLAGS="$CXXFLAGS -g -pg"
|
CXXFLAGS="$CXXFLAGS -g -pg"
|
||||||
shift 1 ;;
|
shift 1 ;;
|
||||||
|
|
||||||
--python)
|
|
||||||
if [ -d "$PYTHON_HOME" ]; then
|
|
||||||
SWITCHES="$SWITCHES --enable-python"
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$PYTHON_HOME/include/python2.5"
|
|
||||||
LDFLAGS="$LDFLAGS -L$PYTHON_HOME/lib/python2.5/config"
|
|
||||||
fi
|
|
||||||
shift 1;;
|
|
||||||
|
|
||||||
--pic)
|
--pic)
|
||||||
CXXFLAGS="$CXXFLAGS -fPIC"
|
CXXFLAGS="$CXXFLAGS -fPIC"
|
||||||
shift 1 ;;
|
shift 1 ;;
|
||||||
|
|
@ -244,8 +239,9 @@ while [ -n "$1" ]; do
|
||||||
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3"
|
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3"
|
||||||
shift 1 ;;
|
shift 1 ;;
|
||||||
|
|
||||||
--local)
|
--dir)
|
||||||
LOCAL=true
|
shift 1
|
||||||
|
BUILD_DIR="$1"
|
||||||
shift 1 ;;
|
shift 1 ;;
|
||||||
|
|
||||||
--build)
|
--build)
|
||||||
|
|
@ -269,12 +265,11 @@ done
|
||||||
|
|
||||||
HERE="$PWD"
|
HERE="$PWD"
|
||||||
|
|
||||||
if [ "$LOCAL" = "false" -a -d "$HOME/Products" ]; then
|
if [ ! "$BUILD_DIR" = "false" ]; then
|
||||||
projdir="$HOME/Products/ledger"
|
if [ ! -d "$BUILD_DIR" ]; then
|
||||||
if [ ! -d "$projdir" ]; then
|
mkdir -p "$BUILD_DIR"
|
||||||
mkdir -p "$projdir"
|
|
||||||
fi
|
fi
|
||||||
cd "$projdir" || (echo "Cannot change to $projdir"; exit 1)
|
cd "$BUILD_DIR" || (echo "Cannot change to $BUILD_DIR"; exit 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$HERE/configure" --srcdir="$HERE" CXX="$CXX" \
|
"$HERE/configure" --srcdir="$HERE" CXX="$CXX" \
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ m4_include([version.m4])
|
||||||
AC_INIT([ledger],[VERSION_NUMBER],[johnw@newartisans.com])
|
AC_INIT([ledger],[VERSION_NUMBER],[johnw@newartisans.com])
|
||||||
AC_CONFIG_SRCDIR([src/main.cc])
|
AC_CONFIG_SRCDIR([src/main.cc])
|
||||||
AC_CONFIG_HEADER([acconf.h])
|
AC_CONFIG_HEADER([acconf.h])
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|
|
||||||
9
myacprep
9
myacprep
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This is how I run acprep on my OS X Leopard machine.
|
|
||||||
|
|
||||||
if [[ "$1" = "--release" ]]; then
|
|
||||||
./acprep --local --python "$@"
|
|
||||||
else
|
|
||||||
./acprep --local --devel --debug --python "$@"
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Reference in a new issue