Apache Portable Runtime
From DreamHost
The mission of the Apache Portable Runtime (APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.
There are three packages:
- apr - a portable runtime library
- apr-util - a companion library to APR
- apr-iconv - a portable implementation of the
iconv()library
Contents |
Choose the package(s) version(s)
You should find the latest release in the project homepage.
The example here uses APR version 1.2.9, APR-util version 1.2.8 and and APR-iconv version 1.2.0 current as of August 2007. Put the version numbers in environment variables:
APRVERSION=1.2.9 APRUTILVERSION=1.2.8 APRICONVERSION=1.2.0
Choose an installation destination
If you use the Unix account setup you have already a ${RUN} environment variable set up (in .bashrc) and you install everything there.
If you install packages directly in your home directory (${HOME}), then type:
export RUN=${HOME}
If you install packages in other directory of your choice (e.g. packages directly under your home directory -${HOME}), then type:
export RUN=${HOME}/packages
(replace packages above by the directory name you want).
Note where you installed it, since you'll probably need to know this when you want to configure other packages to use APR.
Download, open, configure, compile and install
APR
This is the main library. You have to install this one.
mkdir -pv ${HOME}/soft
cd ${HOME}/soft
wget http://mirrors.ibiblio.org/pub/mirrors/apache/apr/apr-${APRVERSION}.tar.gz
tar xvzf apr-${APRVERSION}.tar.gz
cd apr-${APRVERSION}
./configure --prefix=${RUN}
make
make install
APR util
This is the utility library. You probably want to install this one too.
mkdir -pv ${HOME}/soft
cd ${HOME}/soft
wget http://mirrors.ibiblio.org/pub/mirrors/apache/apr/apr-util-${APRUTILVERSION}.tar.gz
tar xvzf apr-util-${APRUTILVERSION}.tar.gz
cd apr-util-${APRUTILVERSION}
./configure --prefix=${RUN} --with-apr=${RUN}/bin/apr-1-config
make
make install
APR iconv
This a portable apr implementation of the iconv library that is included in the standard GNU C Library (glibc). You probably don't need to install this one, but anyway, here's how to do it.
Note: This takes awfully long to compile and install (the make and make install steps below).
mkdir -pv ${HOME}/soft
cd ${HOME}/soft
wget http://mirrors.ibiblio.org/pub/mirrors/apache/apr/apr-iconv-${APRICONVERSION}.tar.gz
tar xvzf apr-iconv-${APRICONVERSION}.tar.gz
cd apr-iconv-${APRICONVERSION}
./configure --prefix=${RUN} --with-apr=${RUN}/bin/apr-1-config
make
make install

