Ignore:
Timestamp:
2018-07-11T17:46:20+12:00 (6 years ago)
Author:
sjm84
Message:

Changes to get xpdftools compiled up on the 32 bit linux LSB, since 32 bit xpdftools binaries is what we hope to use on both 32 and 64 bit machines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh

    r32249 r32256  
    1212prefix=$GEXTXPDFTOOLS_INSTALLED
    1313
     14# When trying to compile xpdf-tools on a 32 bit linux LSB, we get the error
     15# "undefined reference to `__sync_add_and_fetch_4'" unless we follow the instructions at
     16# https://stackoverflow.com/questions/130740/link-error-when-compiling-gcc-atomic-operation-in-32-bit-mode
     17# and append to CXXFLAGS "-march=i486", which is the earliest architecture for which compilation
     18# succeeds and the xpdftool binaries produced work (even though our 32 bit LSB is i686).
     19arch=`uname -m`
     20if [[ $arch = *"64"* ]]; then
     21    arch=
     22else
     23    echo "@@@ 32 bit unix, passing in -march=i486 to avoid certain linking errors"
     24    arch="-march=i486"
     25fi
     26
    1427# Use C/CPP/CXX FLAGS and LDFLAGS for further setting up
    1528# libpng and libz for compiling xpdftools
    1629export CFLAGS="$CFLAGS -I$GEXTXPDFTOOLS_INSTALLED/include -I$GEXTXPDFTOOLS_INSTALLED/include/libpng15"
    1730export CPPFLAGS="$CPPFLAGS -I$GEXTXPDFTOOLS_INSTALLED/include -I$GEXTXPDFTOOLS_INSTALLED/include/libpng15"
    18 export CXXFLAGS="$CXXFLAGS -I$GEXTXPDFTOOLS_INSTALLED/include -I$GEXTXPDFTOOLS_INSTALLED/include/libpng15"
     31export CXXFLAGS="$CXXFLAGS -I$GEXTXPDFTOOLS_INSTALLED/include -I$GEXTXPDFTOOLS_INSTALLED/include/libpng15 $arch"
    1932export LDFLAGS="$LDFLAGS -L$GEXTXPDFTOOLS_INSTALLED/lib"
    2033
     
    114127
    115128## For building dynamic xpdf-tools executables, change the above to have the following instead
    116 ## (still unable get the .so for LIBJPEG generated, so could try JPEG_LIBRARY set same as above)
     129## The .so for LIBJPEG gets generated for libjpeg version 9c (but not 6b). Correct the .so version number below.
    117130#       -DZLIB_LIBRARY=$prefix/lib/libz.so.1.2.7 \
    118131#       -DTIFF_LIBRARY=$prefix/lib/libtiff.so.5.2.2 \
    119132#       -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \
     133#       -DJPEG_LIBRARY=$prefix/lib/libjpeg.so.PUT_THE_NUMBER_HERE \
    120134#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \
    121135# (The 3rd line can alternatively be "-DFREETYPE_DIR=$prefix")
Note: See TracChangeset for help on using the changeset viewer.