$ pwd
/stage/build
$ ./gnu-build-preparation ../source/.../zlib-1.2.11.tar.xz
...
$ cd zlib/zlib-1.2.11-64
$ source ../setenv 64
CONFIG_SHELL=/usr/bin/bash
CC=/usr/bin/gcc CFLAGS=-m64 -march=core2 -std=gnu89
CXX=/usr/bin/g++ CXXFLAGS=-m64 -march=core2 -std=gnu++03
LD=/usr/bin/ld LDFLAGS=-m64 -march=core2
PATH=/opt/gnu/bin:/usr/gnu/bin:/usr/bin:/usr/sbin
PKG_CONFIG_PATH=
Suggested build sequence:
Fine-tune/fix config.h.in, Makefile.in and others...
$ ./configure \
--build=x86_64-pc-solaris2.11 \
--prefix=/opt/... \
...
$ gmake -j3
For IPS package:
$ gmake DESTDIR=/stage/prototype/zlib/1.2.11/64 install
For immediate use:
$ sudo gmake install
$ sudo zfs snapshot -r .../opt/...@zlib-1.2.11
NOTE
According to my personal preference, I'm assuming the existence of a .../opt/usr ZFS dataset mounted as /opt/usr.$ ./configure --prefix=/opt/usr --64
Checking for shared library support...
Building shared library libz.so.1.2.11 with /usr/bin/gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
$ gmake -j3
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
/usr/bin/gcc -shared -m64 -march=core2 -std=gnu89 -fPIC -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc -m64 -march=core2
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
rm -f libz.so libz.so.1
ln -s libz.so.1.2.11 libz.so
ln -s libz.so.1.2.11 libz.so.1
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.11
/usr/bin/gcc -m64 -march=core2 -std=gnu89 -m64 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.11
$ gmake DESTDIR=/stage/prototype/zlib/1.2.11/64 install
rm -f /stage/prototype/zlib/1.2.11/64/opt/usr/lib/libz.a
cp libz.a /stage/prototype/zlib/1.2.11/64/opt/usr/lib
chmod 644 /stage/prototype/zlib/1.2.11/64/opt/usr/lib/libz.a
cp libz.so.1.2.11 /stage/prototype/zlib/1.2.11/64/opt/usr/lib
chmod 755 /stage/prototype/zlib/1.2.11/64/opt/usr/lib/libz.so.1.2.11
rm -f /stage/prototype/zlib/1.2.11/64/opt/usr/share/man/man3/zlib.3
cp zlib.3 /stage/prototype/zlib/1.2.11/64/opt/usr/share/man/man3
chmod 644 /stage/prototype/zlib/1.2.11/64/opt/usr/share/man/man3/zlib.3
rm -f /stage/prototype/zlib/1.2.11/64/opt/usr/lib/pkgconfig/zlib.pc
cp zlib.pc /stage/prototype/zlib/1.2.11/64/opt/usr/lib/pkgconfig
chmod 644 /stage/prototype/zlib/1.2.11/64/opt/usr/lib/pkgconfig/zlib.pc
rm -f /stage/prototype/zlib/1.2.11/64/opt/usr/include/zlib.h /stage/prototype/zlib/1.2.11/64/opt/usr/include/zconf.h
cp zlib.h zconf.h /stage/prototype/zlib/1.2.11/64/opt/usr/include
chmod 644 /stage/prototype/zlib/1.2.11/64/opt/usr/include/zlib.h /stage/prototype/zlib/1.2.11/64/opt/usr/include/zconf.h
$ sudo gmake install
Password:
rm -f /opt/usr/lib/libz.a
cp libz.a /opt/usr/lib
chmod 644 /opt/usr/lib/libz.a
cp libz.so.1.2.11 /opt/usr/lib
chmod 755 /opt/usr/lib/libz.so.1.2.11
rm -f /opt/usr/share/man/man3/zlib.3
cp zlib.3 /opt/usr/share/man/man3
chmod 644 /opt/usr/share/man/man3/zlib.3
rm -f /opt/usr/lib/pkgconfig/zlib.pc
cp zlib.pc /opt/usr/lib/pkgconfig
chmod 644 /opt/usr/lib/pkgconfig/zlib.pc
rm -f /opt/usr/include/zlib.h /opt/usr/include/zconf.h
cp zlib.h zconf.h /opt/usr/include
chmod 644 /opt/usr/include/zlib.h /opt/usr/include/zconf.h
$ sudo zfs snapshot -r .../opt/gnu@zlib-1.2.11