[32228] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | package=zlib
|
---|
| 4 | version=-1.2.7
|
---|
| 5 |
|
---|
| 6 | progname=$0
|
---|
| 7 |
|
---|
| 8 | source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
|
---|
| 9 |
|
---|
| 10 | prefix=$GEXTXPDFTOOLS_INSTALLED
|
---|
| 11 |
|
---|
| 12 | if [ "x$CROSSCONFIGURE_ARGS" != "x" ] ; then
|
---|
| 13 | if [ "x$crossOS" = "xwindows" ] ; then
|
---|
| 14 | export LDSHAREDLIBC=-lcrtdll
|
---|
| 15 | fi
|
---|
| 16 | # zlib configure does not support '--host'
|
---|
| 17 | export CROSSCONFIGURE_ARGS=
|
---|
| 18 | fi
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | opt_run_untar $force_untar $auto_untar $package $version
|
---|
| 22 |
|
---|
| 23 | #opt_run_configure $force_config $auto_config $package $version $prefix
|
---|
| 24 |
|
---|
| 25 | if [ $auto_config = "1" ] ; then
|
---|
| 26 | if [ ! -f $package$version/configure.log ] ; then
|
---|
| 27 | force_config=1
|
---|
| 28 | fi
|
---|
| 29 |
|
---|
| 30 | fi
|
---|
| 31 |
|
---|
[32251] | 32 | # We don't want the generated .so/.dylibs on linux and mac, just the .a static libs
|
---|
| 33 | # According to https://github.com/luvit/zlib/blob/master/configure
|
---|
| 34 | # "Normally configure builds both a static and a shared library.
|
---|
| 35 | # If you want to build just a static library, use: ./configure --static"
|
---|
[32228] | 36 | if [ $force_config = "1" ] ; then
|
---|
| 37 | echo "[pushd $package$version]"
|
---|
| 38 | ( cd $package$version ; \
|
---|
[32251] | 39 | echo $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \
|
---|
| 40 | eval $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
|
---|
[32228] | 41 | if [ $? != 0 ] ; then
|
---|
| 42 | echo " Error encountered running *configure* stage of $progname"
|
---|
| 43 | exit 1
|
---|
| 44 | fi
|
---|
| 45 | echo "[popd]"
|
---|
| 46 | else
|
---|
| 47 | if [ $auto_config = "1" ] ; then
|
---|
| 48 | echo "Found top-level for ${progname%.*} => no need to run ./configure"
|
---|
| 49 | fi
|
---|
| 50 | fi
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | opt_run_make $compile $package $version
|
---|
| 55 | opt_run_make $install $package $version "install"
|
---|
| 56 | opt_run_make $clean $package $version "clean"
|
---|
| 57 | opt_run_make $distclean $package $version "distclean"
|
---|
| 58 |
|
---|
| 59 | opt_run_tarclean $tarclean $package $version
|
---|