diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2015-04-02 12:14:24 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2015-04-06 14:14:56 +0100 |
commit | ad0c3d1a9f4f209aefa4414b8073e42cd440edd5 (patch) | |
tree | 66e84a23d2f9b0ce1ee522cf0c60050f7b9d2d3c | |
parent | 54f502f35b12fd889a47e048b15d92bd8ca66d55 (diff) | |
download | ghostpdl-ad0c3d1a9f4f209aefa4414b8073e42cd440edd5.tar.gz |
Tidy jbig2dec build configuration:
1) Remove automake version specific tests/use
The script does unpleasant things which can cause us to attempt to use a
specific version of automake, which should not really be needed these days.
So we now just check that the automake version is greater than or equal to the
version we require.
The old method can still be accessed by invoking autogen.sh thus:
USE_OLD=yes ./autogen.sh
2) Add automake option to make dist "self contained"
The automake default is to symlink to a few scripts ('compile', 'missing' etc)
in the current system's automake install. That results in a configuration
reliant on automake being installed, and the same version, for a build.
Add the '--copy' automake option so the script files are copied rather than
linked, so we get a self contained configure/make/install setup.
No cluster differences.
-rwxr-xr-x | gs/ijs/autogen.sh | 2 | ||||
-rwxr-xr-x | gs/jbig2dec/autogen.sh | 131 |
2 files changed, 78 insertions, 55 deletions
diff --git a/gs/ijs/autogen.sh b/gs/ijs/autogen.sh index a2c044738..fcc92731d 100755 --- a/gs/ijs/autogen.sh +++ b/gs/ijs/autogen.sh @@ -146,7 +146,7 @@ $ACLOCAL $ACLOCAL_FLAGS #autoheader echo " $LIBTOOLIZE --automake" -$LIBTOOLIZE --automake +$LIBTOOLIZE -c --automake echo " $AUTOMAKE --add-missing $AUTOMAKE_OPTIONS" $AUTOMAKE --add-missing --copy $AUTOMAKE_OPTIONS diff --git a/gs/jbig2dec/autogen.sh b/gs/jbig2dec/autogen.sh index 983f50ea2..3fd544303 100755 --- a/gs/jbig2dec/autogen.sh +++ b/gs/jbig2dec/autogen.sh @@ -23,61 +23,84 @@ VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/" VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//" # do we need automake? -if test -r Makefile.am; then - AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am` - AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP` - if test "x$AM_NEEDED" = "x$AM_OPTIONS"; then - AM_NEEDED="" - fi - if test -z "$AM_NEEDED"; then - echo -n "checking for automake... " - AUTOMAKE=automake - ACLOCAL=aclocal - if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then - echo "yes" - else - echo "no" - AUTOMAKE= +if test "x$USE_OLD" = "xyes" ; then + if test -r Makefile.am; then + AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am` + AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP` + if test "x$AM_NEEDED" = "x$AM_OPTIONS"; then + AM_NEEDED="" fi - else - echo -n "checking for automake $AM_NEEDED or later... " - majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ` - minneeded=`echo $AM_NEEDED | $VERSIONMKMIN` - for am in automake-$AM_NEEDED automake$AM_NEEDED automake \ - automake-1.7 automake-1.8 automake-1.9 automake-1.10; do - ($am --version < /dev/null > /dev/null 2>&1) || continue - ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP` - maj=`echo $ver | $VERSIONMKMAJ` - min=`echo $ver | $VERSIONMKMIN` - if test $maj -eq $majneeded -a $min -ge $minneeded; then - AUTOMAKE=$am - echo $AUTOMAKE - break - fi - done - test -z $AUTOMAKE && echo "no" - echo -n "checking for aclocal $AM_NEEDED or later... " - for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal\ - aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do - ($ac --version < /dev/null > /dev/null 2>&1) || continue - ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP` - maj=`echo $ver | $VERSIONMKMAJ` - min=`echo $ver | $VERSIONMKMIN` - if test $maj -eq $majneeded -a $min -ge $minneeded; then - ACLOCAL=$ac - echo $ACLOCAL - break + if test -z "$AM_NEEDED"; then + echo -n "checking for automake... " + AUTOMAKE=automake + ACLOCAL=aclocal + if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then + echo "yes" + else + echo "no" + AUTOMAKE= fi - done - test -z $ACLOCAL && echo "no" + else + echo -n "checking for automake $AM_NEEDED or later... " + majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ` + minneeded=`echo $AM_NEEDED | $VERSIONMKMIN` + for am in automake-$AM_NEEDED automake$AM_NEEDED automake \ + automake-1.7 automake-1.8 automake-1.9 automake-1.10; do + ($am --version < /dev/null > /dev/null 2>&1) || continue + ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP` + maj=`echo $ver | $VERSIONMKMAJ` + min=`echo $ver | $VERSIONMKMIN` + if test $maj -eq $majneeded -a $min -ge $minneeded; then + AUTOMAKE=$am + echo $AUTOMAKE + break + fi + done + test -z $AUTOMAKE && echo "no" + echo -n "checking for aclocal $AM_NEEDED or later... " + for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal\ + aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do + ($ac --version < /dev/null > /dev/null 2>&1) || continue + ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP` + maj=`echo $ver | $VERSIONMKMAJ` + min=`echo $ver | $VERSIONMKMIN` + if test $maj -eq $majneeded -a $min -ge $minneeded; then + ACLOCAL=$ac + echo $ACLOCAL + break + fi + done + test -z $ACLOCAL && echo "no" + fi + test -z $AUTOMAKE || test -z $ACLOCAL && { + echo + echo "You must have automake installed to compile $package." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + exit 1 + } + fi +else + AUTOMAKE=automake + ACLOCAL=aclocal + AM_VER=`$AUTOMAKE --version | grep "automake (GNU automake)" | sed 's/[^0-9\.]*//g'` + AM_MAJ=`echo $AM_VER |cut -d. -f1` + AM_MIN=`echo $AM_VER |cut -d. -f2` + AM_PAT=`echo $AM_VER |cut -d. -f3` + + AM_NEEDED=`fgrep AUTOMAKE_OPTIONS Makefile.am | $VERSIONGREP` + AM_MAJOR_REQ=`echo $AM_NEEDED |cut -d. -f1` + AM_MINOR_REQ=`echo $AM_NEEDED |cut -d. -f2` + + echo "checking for automake $AM_NEEDED or later..." + + if [ $AM_MAJ -lt $AM_MAJOR_REQ -o $AM_MIN -lt $AM_MINOR_REQ ] ; then + echo + echo "You must have automake $AM_NEEDED or better installed to compile $package." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + exit 1 fi - test -z $AUTOMAKE || test -z $ACLOCAL && { - echo - echo "You must have automake installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - exit 1 - } fi # do we need libtool? @@ -106,7 +129,7 @@ echo " $ACLOCAL $ACLOCAL_FLAGS" $ACLOCAL $ACLOCAL_FLAGS echo " $LIBTOOLIZE" -$LIBTOOLIZE +$LIBTOOLIZE --copy echo " autoheader" autoheader @@ -135,7 +158,7 @@ cat >config_types.h.in <<EOF EOF echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS" -$AUTOMAKE --add-missing $AUTOMAKE_FLAGS +$AUTOMAKE --add-missing --copy $AUTOMAKE_FLAGS echo " autoconf" autoconf |