source: gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBZ.sh

Last change on this file was 32251, checked in by ak19, 6 years ago
  1. Getting LIBJPEG to compile on Mac requires not passing --enable-static. On Mac too, compiling LIBJPEG also only produces .a (and no .so/.dylib) no matter what, but that happens to be what we want anyway. 2. Turning off building shared libraries (--disable-shared) for all libraries we build that are used by xpdftools, so that on Mac it hopefully chooses to link these in (which won't happen if there's a preferred dylib elsewhere, particularly on the system, which will then get linked in in preference on Macs). Still need to test these changes on Linux again.
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2
3package=zlib
4version=-1.2.7
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
9
10prefix=$GEXTXPDFTOOLS_INSTALLED
11
12if [ "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=
18fi
19
20
21opt_run_untar $force_untar $auto_untar $package $version
22
23#opt_run_configure $force_config $auto_config $package $version $prefix
24
25if [ $auto_config = "1" ] ; then
26 if [ ! -f $package$version/configure.log ] ; then
27 force_config=1
28 fi
29
30fi
31
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"
36if [ $force_config = "1" ] ; then
37 echo "[pushd $package$version]"
38 ( cd $package$version ; \
39 echo $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \
40 eval $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
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
50fi
51
52
53
54opt_run_make $compile $package $version
55opt_run_make $install $package $version "install"
56opt_run_make $clean $package $version "clean"
57opt_run_make $distclean $package $version "distclean"
58
59opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.