Boost logo

Boost :

From: Nick Rasmussen (nick_at_[hidden])
Date: 2005-04-28 13:59:19


On Wed, 27 Apr 2005, Rene Rivera wrote:

> >>tar xjvf package-0.0.tar.bz2
> >>mkdir build-PLATFORM
> >>cd build-PLATFORM
> >>../package-0.0/configure <options>
> >>make
> >>make install
> >>
> >>With bjam I found things a bit more difficult. Once I downloaded and built
> >>bjam, to build boost I first made a shell script:
> >>
> >>#!/bin/sh -x
> >>bjam
> >>--prefix=/dept/rnd/importlibs/LINUX_IA32/suse9.2/boost-1.32.0-gcc400pre1 \
> >> --builddir=build-SUSE_IA32-gcc400pre1 --with-python-root=/usr \
> >> -sPYTHON_VERSION=2.3
> >> -sGCC=/dept/rnd/vendor/gcc-4.0.0-20050410/bin/gcc \
> >> -sGXX=/dept/rnd/vendor/gcc-4.0.0-20050410/bin/g++ --layout=system $*
> >
> >I agree that's too hard.
>
> But it's not any harder than the *real* autoconf equivalent of:
>
> tar xjvf package-0.0.tar.bz2
> mkdir build-SUSE_IA32-gcc400pre1
> cd build-SUSE_IA32-gcc400pre1

> export PYTHON_VERSION=2.3
> export PYTHON_ROOT=/usr
> ###-haven't seen a configure script you can change which
> ###-python should be used

these would probably be a --with option, not environment variables.

> export GCC=/dept/rnd/vendor/gcc-4.0.0-20050410/bin/gcc
> export GXX=/dept/rnd/vendor/gcc-4.0.0-20050410/bin/g++
> ../package-0.0/configure
> --prefix=/dept/rnd/importlibs/LINUX_IA32/suse9.2/boost-1.32.0-gcc400pre1
> make
> make install
>
> And I dare people to point more than one configure script, or configure
> installation instructions that tell you that you can set GCC/CC etc. to
> use something other than the system compiler.

The AC_PROG_CC and AC_PROG_CXX print this out by default now at the bottom
of the configure --help output. e.g.:

Some influential environment variables:
  CC C compiler command
  CFLAGS C compiler flags
  LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP C preprocessor
  CXX C++ compiler command
  CXXFLAGS C++ compiler flags
  CXXCPP C++ preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

The one thing you're missing that makes bjam a lot more complex than
autoconf is that you have to specify all your options for every invocation
of bjam, where as once you configure a particular build root with an autoconf
setup, all that information is baked into the generated Makefiles. After I
configure there's no requirement to have any particular environment variables
set or arguments passed to make.

-nick


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk