b86ab0a9dd
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9228 a95241bf-73f2-0310-859d-f6bbb57e9c96
1096 lines
32 KiB
Plaintext
1096 lines
32 KiB
Plaintext
dnl ---------------------------------------------------------------------------*
|
|
dnl PDFlib - A library for generating PDF on the fly |
|
|
dnl ---------------------------------------------------------------------------+
|
|
dnl Copyright (c) 1997-2004 Thomas Merz and PDFlib GmbH. All rights reserved. |
|
|
dnl ---------------------------------------------------------------------------+
|
|
dnl |
|
|
dnl This software is subject to the PDFlib license. It is NOT in the |
|
|
dnl public domain. Extended versions and commercial licenses are |
|
|
dnl available, please check http://www.pdflib.com. |
|
|
dnl |
|
|
dnl --------------------------------------------------------------------------*/
|
|
|
|
dnl $Id: configure.in,v 1.1 2004/10/06 17:10:36 laplace Exp $
|
|
dnl
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
dnl
|
|
|
|
# --------------------------------------------------------------------
|
|
# PDFlib general setup
|
|
# --------------------------------------------------------------------
|
|
|
|
dnl source directory sanity check using an arbitrary source file
|
|
AC_INIT(libs/pdcore/pc_config.h)
|
|
|
|
dnl do not change this (version.sh will do it for you :)
|
|
VERSION="5.0.3"
|
|
PDFLIB_MAJOR=5
|
|
PDFLIB_MINOR=0
|
|
PDFLIB_REVISION=3
|
|
|
|
AC_SUBST(PDFLIB_MAJOR)
|
|
AC_SUBST(PDFLIB_MINOR)
|
|
AC_SUBST(PDFLIB_REVISION)
|
|
|
|
dnl Important: Interface numbers are completely independent of release
|
|
dnl or version numbers! See doc/readme-source-unix.txt for details.
|
|
|
|
PDFLIB_LTCURRENT=4
|
|
PDFLIB_LTREVISION=1
|
|
PDFLIB_LTAGE=2
|
|
|
|
LTVERSIONINFO="$PDFLIB_LTCURRENT:$PDFLIB_LTREVISION:$PDFLIB_LTAGE"
|
|
|
|
AC_SUBST(LTVERSIONINFO)
|
|
AC_SUBST(PDFLIB_LTCURRENT)
|
|
AC_SUBST(PDFLIB_LTREVISION)
|
|
AC_SUBST(PDFLIB_LTAGE)
|
|
|
|
dnl Get the current directory, needed to feed absolut paths to linkers
|
|
dnl even if called outside of our build environment (i.e. PHP). Might cause some
|
|
dnl problems on exotic platforms, but we are not yet aware of problems,
|
|
dnl so we use $PDFWD like $top_builddir if abspath is needed.
|
|
PDFPWD=`pwd`
|
|
|
|
dnl The name of the library should only be changed in very rare cases,
|
|
dnl such as Digital Unix where a (completely different) libpdf already exists.
|
|
dnl Note: do not include any file name suffix here.
|
|
|
|
PDFLIBNAME=pdf
|
|
MATHLIB="-lm"
|
|
|
|
AC_ARG_WITH(pdflibname,[ --with-pdflibname=name set file name of generated library [default=pdf]],[PDFLIBNAME="$withval"])
|
|
|
|
AC_ARG_WITH(libm,[ --with-libm=name set math library option [default=-lm]],[MATHLIB="$withval"])
|
|
|
|
AC_SUBST(PDFLIBNAME)
|
|
|
|
dnl install-sh will be searched (and found) here
|
|
AC_CONFIG_AUX_DIR(config)
|
|
|
|
builtin(include, config/aclocal.m4)
|
|
|
|
dnl Check the system name
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_MSG_CHECKING(MACHDEP)
|
|
if test -z "$MACHDEP"
|
|
then
|
|
if test -f /usr/lib/NextStep/software_version; then
|
|
set X `hostinfo | grep 'NeXT Mach.*:' | \
|
|
sed -e 's/://' -e 's/\./_/'` && \
|
|
ac_sys_system=next && ac_sys_release=$4
|
|
MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
|
|
else
|
|
ac_sys_system=`uname -s`
|
|
if test "$ac_sys_system" = "AIX" ; then
|
|
ac_sys_release=`uname -v`
|
|
else
|
|
ac_sys_release=`uname -r`
|
|
fi
|
|
ac_md_system=`echo $ac_sys_system |
|
|
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
|
ac_md_release=`echo $ac_sys_release |
|
|
tr -d '[/ ]' | sed 's/\..*//'`
|
|
MACHDEP="$ac_md_system$ac_md_release"
|
|
fi
|
|
case MACHDEP in
|
|
'') MACHDEP=unknown;;
|
|
esac
|
|
fi
|
|
|
|
AC_MSG_RESULT($MACHDEP)
|
|
|
|
dnl choose compiler
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_INSTALL
|
|
dnl common stuff, unlikely to be changed
|
|
SHELL="/bin/sh"
|
|
RM="rm -rf"
|
|
|
|
dnl Default defines -- some systems may need special handling here
|
|
dnl We also map some system names to a more user-friendly and well-known version
|
|
|
|
INCLUDES=
|
|
|
|
PLATFORM_ID=$ac_sys_system
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"$ac_sys_system\"\\\""
|
|
|
|
case $ac_sys_system in
|
|
dnl TODO: check if this is still true
|
|
dnl Our TIFF code currently requires special handling on AIX
|
|
aix*|AIX*)
|
|
DEFINES="$DEFINES -DAIX";;
|
|
|
|
cyg*|CYG*) DEFINES="$DEFINES -U_WIN32 -UWIN32 -U__WIN32__ -U_Windows";;
|
|
|
|
dnl HP needs option for ANSI mode if the HP compiler is used instead of gcc
|
|
hp*|HP*)
|
|
if test "$GCC" = ""; then
|
|
DEFINES="$DEFINES -Ae"
|
|
fi;;
|
|
|
|
dnl The OSF JNI requires libraries to be built thread-safe, which is true
|
|
dnl for PDFlib
|
|
osf1*|OSF1*)
|
|
if test "$GCC" = ""; then
|
|
DEFINES="$DEFINES -pthread"
|
|
fi;;
|
|
|
|
SunOS*)
|
|
ac_sys_arch=`uname -p`
|
|
if test "$ac_sys_arch" = "i386" ; then
|
|
PLATFORM_ID="SunOS-i386"
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"sunOS\"\\\""
|
|
fi
|
|
|
|
if test "$GCC" = ""; then
|
|
DEFINES="$DEFINES -xmemalign"
|
|
fi
|
|
;;
|
|
|
|
dnl MacOS X doesn't seem to like -lm, and doesn't actually need it;
|
|
dnl libtool only works if --with-gnu-ld=yes is supplied, so we try
|
|
dnl to set it here already.
|
|
rhapsody|Rhapsody*)
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"Mac OS X Server\"\\\""
|
|
with_gnu_ld=yes
|
|
MATHLIB="";;
|
|
|
|
darwin|Darwin*)
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"Mac OS X\"\\\""
|
|
PLATFORM_ID="MacOSX"
|
|
with_gnu_ld=yes
|
|
MATHLIB="";;
|
|
|
|
dnl TODO: add sparc, ...
|
|
linux|Linux*)
|
|
ac_sys_arch=`uname -m`
|
|
if test "$ac_sys_arch" = "s390" ; then
|
|
PLATFORM_ID="zSeries-Linux"
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"ZSeries Linux\"\\\""
|
|
fi
|
|
if test "$ac_sys_arch" = "ppc" ; then
|
|
PLATFORM_ID="ppc-Linux"
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"ppc Linux\"\\\""
|
|
fi
|
|
# neccesary to be compatible with glibc 2.3.2 on RH 9
|
|
if test "$ac_sys_arch" = "i686" ; then
|
|
DEFINES="$DEFINES -D__NO_CTYPE"
|
|
fi
|
|
if test "$ac_sys_arch" = "ia64" ; then
|
|
PLATFORM_ID="Linux-ia64"
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"Linux-ia64\"\\\""
|
|
fi
|
|
;;
|
|
|
|
|
|
FreeBSD)
|
|
tmp_vers=`uname -r`
|
|
case $tmp_vers in
|
|
5.*)
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"FreeBSD5\"\\\"" ;;
|
|
esac
|
|
;;
|
|
|
|
OpenBSD)
|
|
tmp_vers=`uname -r`
|
|
if test "$tmp_vers" = "3.4" ; then
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"OpenBSD34\"\\\""
|
|
fi
|
|
;;
|
|
|
|
dnl OS/390 specials
|
|
*OS/390*)
|
|
DEFINES="$DEFINES -DOS390"
|
|
CC=c89
|
|
LD=c89
|
|
PLATFORM_ID=OS390
|
|
PLATFORM="-DPDF_PLATFORM=\\\"\"zSeries USS\"\\\""
|
|
# add special compile options for java2 on s390
|
|
set X `java -version 2>&1 | grep '1.3.'` && \
|
|
DEFINES="$DEFINES -W \"c,langlvl(extended)\" -W \"c,float(ieee)\""
|
|
;;
|
|
|
|
*) ;;
|
|
esac
|
|
|
|
GENERATED_FILES=""
|
|
|
|
dnl select debugging configuration
|
|
WITH_DEBUG=no
|
|
|
|
dnl add special compileoptions for xplink
|
|
WITH_XPLINK=no
|
|
AC_ARG_ENABLE(xplink, [ --enable-xplink turn on xplink linking],
|
|
if test "$enableval" = "yes" ; then
|
|
WITH_XPLINK=yes
|
|
fi)
|
|
|
|
if test "$WITH_XPLINK" = "yes"; then
|
|
case $ac_sys_system in
|
|
*OS/390*)
|
|
DEFINES="-W \"c,xplink\" -W \"l,xplink\" -1 -W c,expo,dll -W c,GONUM $DEFINES"
|
|
;;
|
|
*) ;;
|
|
esac
|
|
fi
|
|
|
|
dnl We hope to build shared libraries on this platform
|
|
WITH_SHARED=yes
|
|
|
|
WITH_PROFILE=no
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging],
|
|
if test "$enableval" = "yes" ; then
|
|
WITH_DEBUG=yes
|
|
fi)
|
|
|
|
AC_ARG_ENABLE(profile, [ --enable-profile turn on profiling],
|
|
if test "$enableval" = "yes" ; then
|
|
WITH_PROFILE=yes
|
|
fi)
|
|
|
|
AC_EXEEXT
|
|
AC_OBJEXT
|
|
|
|
dnl Prepare libtool
|
|
dnl Required for dlopening our libraries, as done in the language interpreters.
|
|
|
|
AC_LIBTOOL_DLOPEN
|
|
AC_LIBTOOL_WIN32_DLL
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_SUBST(PLATFORM_ID)
|
|
AC_SUBST(SHELL)
|
|
AC_SUBST(EXEEXT)
|
|
AC_SUBST(OBJEXT)
|
|
AC_SUBST(VERSION)
|
|
AC_SUBST(CC)
|
|
AC_SUBST(RM)
|
|
|
|
# --------------------------------------------------------------------
|
|
# PDFlib Java binding (JNI)
|
|
# --------------------------------------------------------------------
|
|
|
|
WITH_JAVA=yes
|
|
JAVAINCLUDE=""
|
|
JAVAPACKAGE=""
|
|
|
|
AC_ARG_WITH(java,[ --with-java=path full path of Java Developers Kit, or no],[
|
|
case $withval in
|
|
no) WITH_JAVA=no ;;
|
|
yes) WITH_JAVA=yes ;;
|
|
*) JAVAPACKAGE=$withval
|
|
;;
|
|
esac
|
|
])
|
|
|
|
if test "$WITH_JAVA" != "no" ; then
|
|
WITH_JAVA=no
|
|
AC_MSG_CHECKING(for Java header files)
|
|
|
|
# try without any precautions
|
|
AC_TRY_CPP([#include <jni.h>], WITH_JAVA=yes,
|
|
[ dirs="$prefix /usr/lib/java /usr/java /usr/java/jdk1.4 /usr/lib/jdk1.4 /opt/java1.4 /usr/lpp/java/J1.4 /usr/java/jdk1.4 /usr/lib/jdk1.4 /usr/jdk14 /jdk1.4 /usr/java/jdk1.3 /usr/include/java /usr/local/java /usr/local/include/kaffe /usr/lib/jdk1.3 /opt/java1.3 /usr/lpp/java/J1.3 /usr/java/jdk1.2 /usr/lib/jdk1.2.2 /usr/lib/jdk1.2.1 /usr/jdk122 /usr/lib/jdk122 /usr/lib/jdk1.2.1 /opt/java1.2 /usr/lpp/java/J1.2 /usr/lib/jdk1.1.8 /usr/jdk118 /usr/lib/jdk118 /usr/lpp/java/J1.1 /opt/java1.1 /usr /opt/local /jdk1.3 /jdk1.2.3 /jdk1.2.2 /jdk1.2.1 /System/Library/Frameworks/JavaVM.framework/Headers /usr/jdk_base/include"
|
|
|
|
if test "$JAVAPACKAGE" != ""; then
|
|
dirs="$JAVAPACKAGE $dirs"
|
|
fi
|
|
|
|
# now try to find jni.h
|
|
for i in $dirs ; do
|
|
if test -r $i/jni.h; then
|
|
JAVAINCLUDE="$i"
|
|
break
|
|
elif test -r $i/include/jni.h; then
|
|
JAVAINCLUDE="$i/include"
|
|
break
|
|
fi
|
|
done
|
|
])
|
|
|
|
# now try with an include path
|
|
if test "$JAVAINCLUDE" != ""; then
|
|
OCPPFLAGS="$CPPFLAGS"
|
|
CPPFLAGS="-I$JAVAINCLUDE $OCPPFLAGS"
|
|
AC_TRY_CPP([#include <jni.h>], [
|
|
WITH_JAVA=yes
|
|
JAVAINCLUDE="-I$JAVAINCLUDE"
|
|
],)
|
|
CPPFLAGS="$OCPPFLAGS"
|
|
fi
|
|
|
|
# if the above didn't work probably jni_md.h is missing
|
|
if test "WITH_JAVA" != "yes" ; then
|
|
if test "$JAVAINCLUDE" != ""; then
|
|
subdirs="$JAVAINCLUDE $JAVAINCLUDE/$MACHDEP $JAVAINCLUDE/$ac_md_system $JAVAINCLUDE/solaris $JAVAINCLUDE/genunix $JAVAINCLUDE/alpha $JAVAINCLUDE/win32 $JAVAINCLUDE/mvs $JAVAINCLUDE/irix"
|
|
for i in $subdirs ; do
|
|
if test -r $i/jni_md.h; then
|
|
JAVAINCLUDE="-I$JAVAINCLUDE -I$i"
|
|
WITH_JAVA=yes
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
fi
|
|
|
|
if test "$WITH_JAVA" = "no"; then
|
|
AC_MSG_RESULT(not found)
|
|
else
|
|
AC_MSG_RESULT($JAVAINCLUDE)
|
|
AC_SUBST(JAVAINCLUDE)
|
|
fi
|
|
|
|
fi
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib Perl binding
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_PERL=yes
|
|
PERLBIN=nope
|
|
PERLINCLUDE=nope
|
|
|
|
AC_ARG_WITH(perl,[ --with-perl=path full path of Perl executable, or no],[PERLBIN="$withval"],[PERLBIN=nope])
|
|
|
|
if test "$PERLBIN" = "no" ; then
|
|
WITH_PERL=no
|
|
fi
|
|
|
|
AC_ARG_WITH(perlincl,[ --with-perlincl=path full path of Perl include directory],[PERLINCLUDE="$withval"],[PERLINCLUDE=nope])
|
|
|
|
if test "$WITH_PERL" = "yes" ; then
|
|
|
|
WITH_PERL=no
|
|
dnl First figure out what the name of Perl is
|
|
if test "$PERLBIN" = "nope"; then
|
|
AC_CHECK_PROGS(PERL, perl perl5.7.0 perl5.6.0 perl5.005 perl5.004 perl5.003 perl5.002 perl5.001 perl5, nope)
|
|
else
|
|
PERL="$PERLBIN"
|
|
fi
|
|
AC_MSG_CHECKING(for Perl header file)
|
|
if test "$PERL" != "nope"; then
|
|
PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null`
|
|
if test "$PERL5DIR" != ""; then
|
|
if test "$PERLINCLUDE" = "nope"; then
|
|
if test -r "$PERL5DIR/perl.h"; then
|
|
AC_MSG_RESULT(PERL5DIR/perl.h)
|
|
WITH_PERL=yes
|
|
PERLINCLUDE="$PERL5DIR"
|
|
elif test -r "$PERL5DIR/CORE/perl.h"; then
|
|
AC_MSG_RESULT($PERL5DIR/CORE/perl.h)
|
|
WITH_PERL=yes
|
|
PERLINCLUDE="$PERL5DIR/CORE"
|
|
fi
|
|
else
|
|
WITH_PERL=yes
|
|
AC_MSG_RESULT($PERLINCLUDE)
|
|
fi
|
|
if test "$PERLINCLUDE" = "nope"; then
|
|
AC_MSG_RESULT(could not locate perl.h...)
|
|
WITH_PERL=no
|
|
fi
|
|
else
|
|
AC_MSG_RESULT(unable to determine Perl configuration)
|
|
WITH_PERL=no
|
|
fi
|
|
|
|
PERLLIBDIR=`($PERL -e 'use Config; print $Config{sitearchexp};') 2>/dev/null`
|
|
if test -z "$PERLLIBDIR" -o ! -d "$PERLLIBDIR"; then
|
|
AC_MSG_RESULT( unable to determine perl shared library directory)
|
|
fi
|
|
|
|
else
|
|
AC_MSG_RESULT(could not figure out how to run perl)
|
|
PERLINCLUDE="/usr/local/lib/perl5/5.6.0/archname/CORE"
|
|
fi
|
|
|
|
dnl The Perl include files contain special handling for the bool type
|
|
dnl on NeXT (sigh). We'll run into trouble if we don't work around this.
|
|
|
|
case $ac_sys_system in
|
|
NeXT|next) PERLBOOLDEF="";;
|
|
*) PERLBOOLDEF="-Dbool=char -DHAS_BOOL";;
|
|
esac
|
|
|
|
dnl Some platforms require linking the perl library directly.
|
|
dnl We use $PERLINCLUDE for this since it both contains the Perl library
|
|
dnl _and_ the include files. Other systems don't explicitly link the
|
|
dnl Perl library.
|
|
dnl $MATHLIB comes from EXTERNALLIBS if needed
|
|
|
|
case $ac_sys_system/$ac_sys_release in
|
|
hp*|HP*) PERLLINK="";;
|
|
cyg*|CYG*) PERLLINK="-L$PERLINCLUDE -lperl $PERLLINK";;
|
|
aix*|AIX*) PERLLINK="-L$PERLINCLUDE -lperl $PERLLINK";;
|
|
osf1*|OSF1*) PERLLINK="-L$PERLINCLUDE -lperl $PERLLINK";;
|
|
darwin|Darwin*) PERLLINK="-L$PERLINCLUDE -lperl $PERLLINK";;
|
|
*) ;;
|
|
esac
|
|
|
|
PERLINCLUDE="-I$PERLINCLUDE"
|
|
AC_SUBST(PERLINCLUDE)
|
|
AC_SUBST(PERLLIBDIR)
|
|
AC_SUBST(PERLBOOLDEF)
|
|
AC_SUBST(PERLLINK)
|
|
AC_SUBST(PERL)
|
|
fi
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib Python binding
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_PYTHON=yes
|
|
PYINCLUDE=nope
|
|
PYPACKAGE=nope
|
|
|
|
AC_ARG_WITH(py,[ --with-py=path full path of Python root directory, or no],[PYPACKAGE="$withval"], [PYPACKAGE=nope])
|
|
|
|
if test "$PYPACKAGE" = "no" ; then
|
|
WITH_PYTHON=no
|
|
fi
|
|
|
|
AC_ARG_WITH(pyincl,[ --with-pyincl=path full path of Python include directory],[PYINCLUDE="$withval"], [PYINCLUDE=nope])
|
|
|
|
if test "$PYINCLUDE" = "nope" -a "$PYPACKAGE" != "no"; then
|
|
PYINCLUDE="$PYPACKAGE/include"
|
|
fi
|
|
|
|
if test "$WITH_PYTHON" != "no" ; then
|
|
WITH_PYTHON=no
|
|
AC_MSG_CHECKING(for Python header files)
|
|
|
|
dirs="$PYINCLUDE \
|
|
$PYINCLUDE/python2.3 \
|
|
$prefix/include/python2.3 \
|
|
/usr/local/include/python2.3 \
|
|
/usr/include/python2.3 \
|
|
$prefix/include/python2.3 \
|
|
$PYINCLUDE/python2.2 \
|
|
$prefix/include/python2.2 \
|
|
/usr/local/include/python2.2 \
|
|
/usr/include/python2.2 \
|
|
$prefix/include/python2.2 \
|
|
$PYINCLUDE/python2.1 \
|
|
$prefix/include/python2.1 \
|
|
/usr/local/include/python2.1 \
|
|
/usr/include/python2.1 \
|
|
$prefix/include/python2.1 \
|
|
$PYINCLUDE/python2.0 \
|
|
$prefix/include/python2.0 \
|
|
/usr/local/include/python2.0 \
|
|
/usr/include/python2.0 \
|
|
$prefix/include/python2.0 \
|
|
$PYINCLUDE/python1.6 \
|
|
$prefix/include/python1.6 \
|
|
/usr/local/include/python1.6 \
|
|
/usr/include/python1.6 \
|
|
$prefix/include/python1.6 \
|
|
$PYINCLUDE/python1.5 \
|
|
$prefix/include/python1.5 \
|
|
/usr/local/include/python1.5 \
|
|
/usr/include/python1.5 \
|
|
$prefix/include/python1.5 \
|
|
$PYINCLUDE/python1.4 \
|
|
$prefix/include/python1.4 \
|
|
/usr/local/include/python1.4 \
|
|
/usr/include/python1.4 \
|
|
$prefix/include/python1.4"
|
|
for i in $dirs ; do
|
|
if test -r $i/Python.h; then
|
|
AC_MSG_RESULT($i)
|
|
PYINCLUDE="-I$i"
|
|
WITH_PYTHON=yes
|
|
break
|
|
fi
|
|
done
|
|
if test "$PYINCLUDE" = "nope" -o "$PYINCLUDE" = "$PYPACKAGE/include"; then
|
|
AC_MSG_RESULT(not found)
|
|
WITH_PYTHON=no
|
|
fi
|
|
|
|
AC_SUBST(PYINCLUDE)
|
|
|
|
AC_CHECK_PROGS(PYTHONBIN, python, nope)
|
|
|
|
if test "$PYTHONBIN" = "nope" ; then
|
|
WITH_PYTHON=no
|
|
fi
|
|
|
|
if test "$WITH_PYTHON" = "yes" ; then
|
|
AC_MSG_CHECKING(for Python shared library path)
|
|
|
|
if test "$PYTHONBIN" = "nope" ; then
|
|
WITH_PYTHON=no
|
|
else
|
|
PYTHONLIBDIR=`cat << EOF | python
|
|
import sys
|
|
import string
|
|
print string.join(filter(lambda x: -1 != string.find(x, 'dynload'), sys.path))
|
|
EOF
|
|
`
|
|
if test "$PYTHONLIBDIR" = "" ; then
|
|
PYTHONLIBDIR=/usr/lib
|
|
fi
|
|
AC_SUBST(PYTHONLIBDIR)
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($PYTHONLIBDIR)
|
|
fi
|
|
fi
|
|
|
|
# --------------------------------------------------------------------
|
|
# PDFlib Tcl binding
|
|
# --------------------------------------------------------------------
|
|
|
|
WITH_TCL=yes
|
|
TCLINCLUDE=nope
|
|
TCLPACKAGEDIR=nope
|
|
TCLBIN=nope
|
|
|
|
AC_ARG_WITH(tcl,[ --with-tcl=path full path of Tcl executable, or no],[TCLBIN="$withval"])
|
|
|
|
if test "$TCLBIN" = "no" ; then
|
|
WITH_TCL=no
|
|
fi
|
|
|
|
AC_ARG_WITH(tclpkg,[ --with-tclpkg=path full path of Tcl package install directory],[TCLPACKAGEDIR="$withval"],[TCLPACKAGEDIR=nope])
|
|
|
|
AC_ARG_WITH(tclincl,[ --with-tclincl=path full path of Tcl include directory],[TCLINCLUDE="$withval"],[TCLINCLUDE=nope])
|
|
|
|
if test "$WITH_TCL" = "yes" ; then
|
|
WITH_TCL=no
|
|
AC_MSG_CHECKING(for Tcl header files)
|
|
|
|
if test "$TCLINCLUDE" = "nope"; then
|
|
AC_TRY_CPP([#include <tcl.h>], , TCLINCLUDE="nope")
|
|
if test "$TCLINCLUDE" = "nope"; then
|
|
dirs="$prefix/include /usr/local/include /usr/include /opt/local/include /home/sci/local/include /usr/pkg/include /System/Library/Frameworks/Tcl.framework/Versions/8.3/Headers /System/Library/Frameworks/Tcl.framework/Versions/8.2/Headers"
|
|
for i in $dirs ; do
|
|
if test -r $i/tcl.h; then
|
|
AC_MSG_RESULT($i)
|
|
TCLINCLUDE="$i"
|
|
WITH_TCL=yes
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if test "$TCLINCLUDE" = "nope"; then
|
|
AC_MSG_RESULT(not found)
|
|
WITH_TCL=no
|
|
fi
|
|
else
|
|
AC_MSG_RESULT($TCLINCLUDE)
|
|
fi
|
|
|
|
dnl We need at least Tcl 8.0 because of its support for binary strings
|
|
dnl and the object interface.
|
|
|
|
if test "$TCLINCLUDE" != "nope" -a "$TCLBIN" = "nope"; then
|
|
AC_CHECK_PROGS(TCL, tclsh tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0, nope)
|
|
TCLBIN=$TCL
|
|
fi
|
|
|
|
if test "$TCLINCLUDE" = "nope" -o "$TCLBIN" = "nope"; then
|
|
WITH_TCL=no
|
|
else
|
|
dnl Check the installed Tcl version -- must be 8.0 or higher
|
|
TCLVERSION=`echo "puts [[info tclversion]]" | $TCLBIN`
|
|
if test "$TCLVERSION" = "7.6" -o "$TCLVERSION" = "7.5" -o "$TCLVERSION" = "7.4" -o "$TCLVERSION" = "7.3" -o "$TCLVERSION" = "7.1" -o "$TCLVERSION" = "7.0"; then
|
|
AC_MSG_RESULT([ Tcl version 8.0 or newer is required for PDFlib.])
|
|
AC_MSG_RESULT([ PDFlib support for Tcl will not be built.])
|
|
WITH_TCL=no
|
|
else
|
|
if test "$TCLVERSION" = "8.0" -o "$TCLVERSION" = "8.1"; then
|
|
AC_MSG_RESULT([ The PDFlib build process requires Tcl 8.2 or above. Please read])
|
|
AC_MSG_RESULT([ bind/tcl/readme.txt for instructions on manually building PDFlib])
|
|
AC_MSG_RESULT([ for Tcl 8.0 or 8.1.])
|
|
fi
|
|
|
|
if test "$TCLPACKAGEDIR" = "nope"; then
|
|
dnl Let tcl decide where to install the package
|
|
TCLPACKAGEDIR=`(echo "puts \\$auto_path" | "$TCLBIN" | awk '{print $1}') 2>/dev/null`
|
|
fi
|
|
|
|
if test "$TCLPACKAGEDIR" = "nope" -o -z "$TCLPACKAGEDIR" -o ! -d "$TCLPACKAGEDIR"; then
|
|
AC_MSG_RESULT(unable to determine Tcl package directory)
|
|
WITH_TCL=no
|
|
|
|
else
|
|
|
|
TCLPACKAGEDIR=$TCLPACKAGEDIR/pdflib
|
|
WITH_TCL=yes
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
TCLINCLUDE="-I$TCLINCLUDE"
|
|
AC_SUBST(TCLINCLUDE)
|
|
AC_SUBST(TCLPACKAGEDIR)
|
|
AC_SUBST(TCLBIN)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib/PSP auxiliary libraries:
|
|
# We support only our own copy of tifflib, libpng and zlib
|
|
# pdcore is needed in all configurations
|
|
# ----------------------------------------------------------------
|
|
|
|
# The list of Makefile targets for our internal libraries
|
|
# pdcore is always needed
|
|
PHP_PDFLIBS="$PDFPWD/libs/pdflib/p_basic.lo"
|
|
|
|
PDCORELIBINC="-I\$(top_builddir)/libs/pdcore"
|
|
PDCORELIBLINK="\$(top_builddir)/libs/pdcore/libpdcore\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/pdcore/libpdcore.la"
|
|
LIBTARGETS="$LIBTARGETS pdcore"
|
|
BINDTARGETS=""
|
|
PROGTARGETS=""
|
|
|
|
AC_SUBST(PDCORELIBINC)
|
|
AC_SUBST(PDCORELIBLINK)
|
|
|
|
# zlib
|
|
if test -d libs/flate ; then
|
|
FLATELIBINC="-I\$(top_builddir)/libs/flate"
|
|
FLATELIBLINK="\$(top_builddir)/libs/flate/libz\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/flate/libz.la"
|
|
LIBTARGETS="$LIBTARGETS flate"
|
|
else
|
|
FLATELIBINC=""
|
|
FLATELIBLINK=""
|
|
fi
|
|
AC_SUBST(FLATELIBLINK)
|
|
AC_SUBST(FLATELIBINC)
|
|
|
|
# pnglib
|
|
if test -d libs/png ; then
|
|
PNGLIBINC="-I\$(top_builddir)/libs/png"
|
|
PNGLIBLINK="\$(top_builddir)/libs/png/libpng\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/png/libpng.la"
|
|
LIBTARGETS="$LIBTARGETS png"
|
|
else
|
|
PNGLIBINC=""
|
|
PNGLIBLINK=""
|
|
fi
|
|
AC_SUBST(PNGLIBINC)
|
|
AC_SUBST(PNGLIBLINK)
|
|
|
|
# tifflib
|
|
if test -d libs/tiff ; then
|
|
AC_C_BIGENDIAN()
|
|
TIFFLIBINC="-I\$(top_builddir)/libs/tiff"
|
|
TIFFLIBLINK="\$(top_builddir)/libs/tiff/libtiff\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/tiff/libtiff.la"
|
|
LIBTARGETS="$LIBTARGETS tiff"
|
|
else
|
|
TIFFLIBINC=""
|
|
TIFFLIBLINK=""
|
|
fi
|
|
AC_SUBST(TIFFLIBINC)
|
|
AC_SUBST(TIFFLIBLINK)
|
|
|
|
# jpeglib
|
|
#if test -d libs/jpeg6 ; then
|
|
# AC_C_BIGENDIAN()
|
|
# JPEGLIBINC="-I\$(top_builddir)/libs/jpeg6"
|
|
# JPEGLIBLINK="\$(top_builddir)/libs/jpeg6/libjpeg\$(LA)"
|
|
# PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/jpeg6/libjpeg6.la"
|
|
# LIBTARGETS="$LIBTARGETS jpeg6"
|
|
#else
|
|
JPEGLIBINC=""
|
|
JPEGLIBLINK=""
|
|
#fi
|
|
AC_SUBST(JPEGLIBINC)
|
|
AC_SUBST(JPEGLIBLINK)
|
|
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib auxiliary library: PDI (PDF import library)
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_PDI=no
|
|
|
|
AC_MSG_CHECKING(for PDF import library PDI)
|
|
|
|
if test -d libs/pdi ; then
|
|
WITH_PDI=yes
|
|
dnl PDI must be in front because it needs zlib and pdcore
|
|
PDILIBINC="-I\$(top_builddir)/libs/pdi"
|
|
PDILIBLINK="\$(top_builddir)/libs/pdi/libpdi\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/pdi/libpdi.la"
|
|
|
|
LIBTARGETS="$LIBTARGETS pdi"
|
|
PROGTARGETS="$PROGTARGETS pdi"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
PDILIBINC=""
|
|
PDILIBLINK=""
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
AC_SUBST(PDILIBINC)
|
|
AC_SUBST(PDILIBLINK)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib main library: not needed for PSP
|
|
# ----------------------------------------------------------------
|
|
|
|
dnl PDFLIBCONVENIENT contains all convenient libs to build shared libs
|
|
dnl like PDFlib, and the wrapper libraries.
|
|
dnl PDFLIBLINK contains the files needed to link a program against PDFlib
|
|
dnl PDFLIB_LINK contains the files convenient lib
|
|
dnl PHP_PDFLIBS contains all libs needed for linking PHP (with ABS paths)
|
|
dnl EXTERNALLIBS contains extra libs to be added (i.e. -lm)
|
|
|
|
EXTERNALLIBS="$MATHLIB"
|
|
|
|
WITH_PDFLIB=no
|
|
|
|
AC_MSG_CHECKING(for PDFlib base library pdflib)
|
|
|
|
if test -d libs/pdflib ; then
|
|
WITH_PDFLIB=yes
|
|
PDFLIBINC="-I\$(top_builddir)/libs/pdflib"
|
|
PDFLIBLINK="\$(top_builddir)/libs/pdflib/lib$PDFLIBNAME\$(LA)"
|
|
PDFLIB_LINK="\$(top_builddir)/libs/pdflib/libpdf_\$(LA)"
|
|
PHP_PDFLIBS="$PHP_PDFLIBS $PDFPWD/libs/pdflib/libpdf_.la"
|
|
LIBTARGETS="$LIBTARGETS pdflib"
|
|
BINDTARGETS="$BINDTARGETS pdflib"
|
|
PROGTARGETS="$PROGTARGETS pdflib"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
PDFLIBINC=""
|
|
PDFLIBLINK=""
|
|
PDFLIB_LINK=""
|
|
PDFLIBCONVENIENT=""
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
|
|
AC_SUBST(PDFLIBCONVENIENT)
|
|
AC_SUBST(PDFLIBINC)
|
|
AC_SUBST(PDFLIBLINK)
|
|
AC_SUBST(PDFLIB_LINK)
|
|
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib auxiliary library: PSP (Pretty Safe PDF)
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_PSP=no
|
|
PSPLIBINC=""
|
|
PSPLIBLINK=""
|
|
PSPLIB_LINK=""
|
|
|
|
AC_MSG_CHECKING(for PDFlib PSP (Pretty Safe PDF))
|
|
|
|
if test -d libs/psp ; then
|
|
WITH_PSP=yes
|
|
AC_ARG_WITH(PSP,[ --without-PSP don't include PSP (Pretty Safe PDF)],[WITH_PSP="$withval"])
|
|
if test "$WITH_PSP" = "yes"; then
|
|
LIBTARGETS="$LIBTARGETS psp"
|
|
BINDTARGETS="$BINDTARGETS psp"
|
|
PROGTARGETS="$PROGTARGETS psp"
|
|
PSPLIBINC="-I\$(top_builddir)/libs/psp"
|
|
PSPLIBLINK="\$(top_builddir)/libs/psp/libpsp\$(LA)"
|
|
PSPLIB_LINK="\$(top_builddir)/libs/psp/libpsp_\$(LA)"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
AC_MSG_RESULT(not used)
|
|
fi
|
|
else
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
AC_SUBST(PSPLIBINC)
|
|
AC_SUBST(PSPLIBLINK)
|
|
AC_SUBST(PSPLIB_LINK)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib auxiliary library: TET
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_TET=no
|
|
TETLIBINC=""
|
|
TETLIBLINK=""
|
|
TETLIB_LINK=""
|
|
|
|
AC_MSG_CHECKING(for PDFlib TET)
|
|
|
|
if test -d libs/tet ; then
|
|
WITH_TET=yes
|
|
AC_ARG_WITH(TET,[ --without-TET don't include TET],[WITH_TET="$withval"])
|
|
if test "$WITH_TET" = "yes"; then
|
|
LIBTARGETS="$LIBTARGETS tet"
|
|
PROGTARGETS="$PROGTARGETS tet"
|
|
TETLIBINC="-I\$(top_builddir)/libs/tet"
|
|
TETLIBLINK="\$(top_builddir)/libs/tet/libtet\$(LA)"
|
|
TETLIB_LINK="\$(top_builddir)/libs/tet/libtet_\$(LA)"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
AC_MSG_RESULT(not used)
|
|
fi
|
|
else
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
AC_SUBST(TETLIBINC)
|
|
AC_SUBST(TETLIBLINK)
|
|
AC_SUBST(TETLIB_LINK)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib auxiliary library: PDU
|
|
# ----------------------------------------------------------------
|
|
#
|
|
WITH_PDU=no
|
|
PDULIBINC=""
|
|
PDULIBLINK=""
|
|
|
|
AC_MSG_CHECKING(for PDFlib PDU)
|
|
|
|
if test -d libs/pdu ; then
|
|
WITH_PDU=yes
|
|
AC_ARG_WITH(PDU,[ --without-PDU don't include PDU],[WITH_PDU="$withval"])
|
|
if test "$WITH_PDU" = "yes"; then
|
|
LIBTARGETS="$LIBTARGETS pdu"
|
|
PROGTARGETS="$PROGTARGETS pdu"
|
|
PDULIBINC="-I\$(top_builddir)/libs/pdu"
|
|
PDULIBLINK="\$(top_builddir)/libs/pdu/libpdu\$(LA)"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
AC_MSG_RESULT(not used)
|
|
fi
|
|
else
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
AC_SUBST(PDULIBINC)
|
|
AC_SUBST(PDULIBLINK)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib auxiliary library: PDPAGE
|
|
# ----------------------------------------------------------------
|
|
|
|
WITH_PDPAGE=no
|
|
|
|
AC_MSG_CHECKING(for PDFlib PDPAGE)
|
|
|
|
if test -d libs/pdpage ; then
|
|
if test "$WITH_TET" = "yes" ; then
|
|
WITH_PDPAGE=yes
|
|
fi
|
|
fi
|
|
if test "$WITH_PDPAGE" = "yes" ; then
|
|
LIBTARGETS="$LIBTARGETS pdpage"
|
|
PDPAGELIBINC="-I\$(top_builddir)/libs/pdpage"
|
|
PDPAGELIBLINK="\$(top_builddir)/libs/pdpage/libpdpage\$(LA)"
|
|
AC_MSG_RESULT(found)
|
|
else
|
|
PDPAGELIBINC=""
|
|
PDPAGELIBLINK=""
|
|
AC_MSG_RESULT(not found)
|
|
fi
|
|
AC_SUBST(PDPAGELIBINC)
|
|
AC_SUBST(PDPAGELIBLINK)
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib/PSP PHP binding
|
|
# ----------------------------------------------------------------
|
|
|
|
if test -f bind/pdflib/php/Makefile.frag.in ; then
|
|
GENERATED_FILES="$GENERATED_FILES bind/pdflib/php/Makefile.frag"
|
|
fi
|
|
if test -f bind/psp/php/Makefile.frag.in ; then
|
|
GENERATED_FILES="$GENERATED_FILES bind/psp/php/Makefile.frag"
|
|
fi
|
|
|
|
# --------------------------------------------------------------------
|
|
# PDFlib C++ language binding
|
|
# --------------------------------------------------------------------
|
|
|
|
WITH_CXX=yes
|
|
|
|
STDCPP=""
|
|
|
|
AC_ARG_ENABLE(cxx,[ --enable-cxx enable C++ language binding [default=no]], WITH_CXX=$enableval)
|
|
|
|
if test "$WITH_CXX" = "yes"; then
|
|
AC_LANG_CPLUSPLUS
|
|
AC_PROG_CXX
|
|
AC_MSG_CHECKING(whether the previously found C++ compiler works)
|
|
AC_TRY_COMPILE(, [class a { int b; } ], WITH_CXX=yes, WITH_CXX=no)
|
|
AC_LANG_C
|
|
|
|
case $ac_sys_system/$ac_sys_release in
|
|
osf1*|OSF1*) STDCPP="";;
|
|
|
|
*) dnl don't change $WITH_CXX
|
|
;;
|
|
esac
|
|
|
|
dnl If working with gcc add the name of the stdc++ library
|
|
if test "x$GCC" != "x"; then
|
|
STDCPP="-lstdc++"
|
|
fi
|
|
|
|
if test "$WITH_CXX" = "yes"; then
|
|
AC_SUBST(STDCPP)
|
|
AC_SUBST(CXX)
|
|
AC_MSG_RESULT(yes)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
fi
|
|
fi
|
|
|
|
# ----------------------------------------------------------------
|
|
# PDFlib wrapup
|
|
# ----------------------------------------------------------------
|
|
|
|
dnl The following variables are used to tell the Makefile what to
|
|
dnl actually do, depending on the available language bindings.
|
|
dnl PDFlib itself will be built and installed by default, regardless
|
|
dnl of the settings below.
|
|
|
|
dnl PDI must be in front because it needs zlib and pdcore
|
|
if test "$PLATFORM_ID" = "MacOSX"; then
|
|
INCLUDES="$INCLUDES -I/Developer/Headers/FlatCarbon"
|
|
LDFLAGS="$LDFLAGS -framework CoreServices -framework ApplicationServices"
|
|
fi
|
|
|
|
dnl pedantic warnings ??
|
|
WITHPEDANTIC=no
|
|
AC_ARG_ENABLE(pedantic,[ --enable-pedantic enable pedantic warnings (gcc only)]], WITHPEDANTIC=$enableval)
|
|
if test "$WITHPEDANTIC" = "yes"; then
|
|
dnl If working with gcc and we want pedantic
|
|
if test "x$GCC" != "x"; then
|
|
PDFPEDANTIC="-Wall -pedantic -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith"
|
|
AC_SUBST(PDFPEDANTIC)
|
|
fi
|
|
fi
|
|
|
|
BINDINGS="c"
|
|
PSPBINDINGS="c"
|
|
|
|
if ${CONFIG_SHELL-/bin/sh} ./libtool --features | grep "disable shared" >/dev/null; then
|
|
WITH_SHARED=no
|
|
fi
|
|
|
|
dnl Building the language wrappers based on a shared PDFlib is no longer supported!
|
|
if test "$WITH_SHARED" = "no"; then
|
|
WITH_JAVA=no
|
|
WITH_PERL=no
|
|
WITH_PYTHON=no
|
|
WITH_TCL=no
|
|
fi
|
|
|
|
if test "$WITH_CXX" = "yes" ; then
|
|
BINDINGS="$BINDINGS cpp"
|
|
fi
|
|
if test "$WITH_JAVA" = "yes" ; then
|
|
BINDINGS="$BINDINGS java"
|
|
PSPBINDINGS="$PSPBINDINGS java"
|
|
fi
|
|
if test "$WITH_PERL" = "yes" ; then
|
|
BINDINGS="$BINDINGS perl"
|
|
fi
|
|
if test "$WITH_PYTHON" = "yes" ; then
|
|
BINDINGS="$BINDINGS python"
|
|
fi
|
|
if test "$WITH_TCL" = "yes" ; then
|
|
BINDINGS="$BINDINGS tcl"
|
|
fi
|
|
|
|
if test -f ptf/Makefile ; then
|
|
PTFDIR="ptf"
|
|
GENERATED_FILES="$GENERATED_FILES ptf/src/dot/dot.pl"
|
|
fi
|
|
|
|
if test "$WITH_DEBUG" = "yes"; then
|
|
CFLAGS="$CFLAGS -DDEBUG"
|
|
fi
|
|
|
|
if test "$WITH_PROFILE" = "yes"; then
|
|
CFLAGS="$CFLAGS -pg"
|
|
LDFLAGS="$LDFLAGS -pg"
|
|
fi
|
|
|
|
DEFINES="$CFLAGS $DEFINES $INCLUDES $PLATFORM"
|
|
|
|
dnl EXTERNALLIBS contains extra libs to be added (i.e. -lm)
|
|
EXTERNALLIBS="$LDFLAGS $EXTERNALLIBS"
|
|
|
|
PDFLIBCONVENIENT="$PDFLIB_LINK \$(top_builddir)/libs/pdflib/p_basic\$(LO) $PDCORELIBLINK $PNGLIBLINK $FLATELIBLINK $TIFFLIBLINK $PDILIBLINK $JPEGLIBLINK"
|
|
|
|
if test "$WITH_SHARED" = "no"; then
|
|
dnl We can generate a static lib only, but not a shared
|
|
RPATH=""
|
|
else
|
|
dnl we generate both static and shared libs
|
|
RPATH="-rpath \$(libdir) -version-info $LTVERSIONINFO"
|
|
|
|
fi
|
|
|
|
AC_SUBST(PHP_PDFLIBS)
|
|
AC_SUBST(LIBTARGETS)
|
|
AC_SUBST(BINDTARGETS)
|
|
AC_SUBST(PROGTARGETS)
|
|
AC_SUBST(BINDINGS)
|
|
AC_SUBST(PSPBINDINGS)
|
|
AC_SUBST(PTFDIR)
|
|
AC_SUBST(WITH_PDI)
|
|
AC_SUBST(LDFLAGS)
|
|
AC_SUBST(EXTERNALLIBS)
|
|
AC_SUBST(RPATH)
|
|
AC_SUBST(MATHLIB)
|
|
AC_SUBST(INCLUDES)
|
|
AC_SUBST(DEFINES)
|
|
AC_SUBST(DEFS)
|
|
AC_SUBST(WITH_SHARED)
|
|
|
|
dnl ---------- Generate the Makefiles
|
|
|
|
GENERATED_FILES="$GENERATED_FILES config/mkcommon.inc config/mkprogs.inc config/mklibs.inc config/mksubdirs.inc config/mkbind.inc pdflib-config"
|
|
|
|
AC_OUTPUT([$GENERATED_FILES],[
|
|
chmod +x pdflib-config
|
|
])
|
|
|
|
if test "$WITH_SHARED" = "no" ; then
|
|
AC_MSG_WARN([Can't create shared PDFlib libraries on this platform.])
|
|
AC_MSG_WARN([PDFlib will work when linked to a C or C++ program,])
|
|
AC_MSG_WARN([but other language bindings will be unavailable.])
|
|
fi
|
|
|
|
if test "$WITH_PSP" = "yes" ; then
|
|
AC_MSG_RESULT([_____________________________________________________________])
|
|
AC_MSG_RESULT([For your convenience, here's a summary of configure's results:])
|
|
AC_MSG_RESULT([Java language binding for PSP: $WITH_JAVA])
|
|
AC_MSG_RESULT([PHP language binding for PSP: no, see bind/psp/php/readme.txt])
|
|
fi
|
|
|
|
if test "$WITH_PDFLIB" = "yes" ; then
|
|
AC_MSG_RESULT([_____________________________________________________________])
|
|
AC_MSG_RESULT([For your convenience, here's a summary of configure's results:])
|
|
AC_MSG_RESULT([])
|
|
AC_MSG_RESULT([Support for shared libraries: $WITH_SHARED])
|
|
AC_MSG_RESULT([C++ language binding for PDFlib: $WITH_CXX])
|
|
AC_MSG_RESULT([Java language binding for PDFlib: $WITH_JAVA])
|
|
AC_MSG_RESULT([Perl language binding for PDFlib: $WITH_PERL])
|
|
AC_MSG_RESULT([Python language binding for PDFlib: $WITH_PYTHON])
|
|
AC_MSG_RESULT([Tcl language binding for PDFlib: $WITH_TCL])
|
|
AC_MSG_RESULT([PHP language binding for PDFlib: no, see bind/pdflib/php/readme.txt])
|
|
|
|
AC_MSG_RESULT([PDF import library (PDI): $WITH_PDI])
|
|
if test "$WITH_PDI" = "no" ; then
|
|
AC_MSG_RESULT([ Note: if you purchase the additional PDF import library (PDI)])
|
|
AC_MSG_RESULT([ you can also manipulate existing PDF documents with PDFlib.])
|
|
AC_MSG_RESULT([ The additional block feature can be used to personalize PDF.])
|
|
AC_MSG_RESULT([ See http://www.pdflib.com for details.])
|
|
fi
|
|
fi
|
|
|
|
AC_MSG_RESULT([])
|
|
AC_MSG_RESULT([Please observe the licensing terms for commercial PDFlib usage.])
|
|
AC_MSG_RESULT([PDFlib license agreement and purchase order can be found in the doc directory.])
|
|
AC_MSG_RESULT([])
|