Allegro

From Genunix

allegro - A portable game programming library

Contents

Rating

2 points (out of 4)

Rating scheme: 4 points means the source builds seamlessly on Solaris Express (OpenSolaris). Points are subtracted as follows:

  • Minus 1 if the source doesn't come with an automated way to localize the build (e.g. configure)
  • Minus 1 if the source won't compile with Sun's cc (this usually means the code is gcc-centric)
  • Minus 1 if a minor patch is required, or
  • Minus 2 if a major patch(es) is required

How to build allegro-4.2.0 on Solaris Express

Build Environment (platform, compiler, tools, PATH, ld)

Configure and compile steps (on x86 hardware)

/usr/bin/gzip -dc allegro-4.2.0.tar.gz | /usr/sfw/bin/gtar xf -

cd allegro-4.2.0


# This source is gcc-centric, therefore...
export CC=/usr/sfw/bin/gcc
# export CFLAGS="%optflags"
export CFLAGS="-O4 -fPIC -DPIC -Xlinker -i -fno-omit-frame-pointers"

export LDFLAGS="-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -R/usr/gnu/lib"

# The following on-the-fly patch is applied because this source's makefile
# uses syntax that works with bash(1) but not sh(1); yet makefile.in
# hardcodes SHELL = /bin/sh (and likely gets away with it because /bin/sh
# on some (all?) Linux systems is symlink'd to /bin/bash.)
# TODO: Report this upstream

perl -i.orig -lpe 's/^(SHELL = \/bin\/sh).*/#$1/ and print "SHELL = /bin/bash"' makefile.in

./configure --prefix=/usr/gnu  \
            --mandir=/usr/gnu/share/man

make

Other configure options

output of ./configure --help

Directory paths that allegro installs to

bin
include
include/allegro
include/allegro/inline
include/allegro/internal
include/allegro/platform
lib
share/aclocal
share/man/man3

Other 3rd party software allegro requires

(none)