summaryrefslogtreecommitdiff
path: root/obsolete/support/png2pdf/configure.in
blob: 57b4d3533157695e89954906877b24bb755adbc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
dnl	Bitmap to PNG conversion
AC_INIT(png2pdf.c)
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
DKLIBS="no"
DKLIBSINC=""
DKLIBSLIB=""
AC_HEADER_CHECK(dk.h, [DKLIBS="yes";AC_DEFINE(HAVE_DK_H)])
ZLIB=""
BZLIB=""
AC_HEADER_CHECK(setjmp.h,[AC_DEFINE(HAVE_SETJMP_H)])
AC_HEADER_CHECK(bzlib.h,BZLIB="-lbz2";AC_DEFINE(HAVE_BZLIB_H))
AC_HEADER_CHECK(dk.h,[DKLIBS="yes";AC_DEFINE(HAVE_DK_H)])
AC_CHECK_LIB(z, deflate, ZLIB='-lz';AC_DEFINE(HAVE_ZLIB_H),ZLIB='')
AC_MSG_CHECKING(libpng)
AC_TRY_COMPILE([#include <png.h>], [
png_structp png_ptr;
], LIBPNG='-lpng';echo yes;AC_DEFINE(HAVE_PNG_H), LIBPNG='';echo no)
AC_ARG_WITH(dklibs,[  --with-dklibs=DIR       dklibs base directory],[DKLIBS="$withval"])
case "X$DKLIBS" in
Xno)
echo 'ERROR: The dklibs library set was not found!'
echo 'These libraries are required to build this application.'
echo 'See http://dklibs.sourceforge.net for documentation or'
echo 'http://sourceforge.net/projects/dklibs for download.'
;;
Xyes)
AC_DEFINE(HAVE_DK_H)
;;
*)
DKLIBSINC="-I${DKLIBS}/include"
DKLIBSLIB="-L${DKLIBS}/lib"
AC_DEFINE(HAVE_DK_H)
;;
esac
DKLIBSJ='${bindir}/dklibsj.jar'
AC_ARG_WITH(dklibsj,[  --with-dklibsj=jarfile  use specified dklibsj.jar file],DKLIBSJ=$withval)
AC_SUBST(DKLIBSJ)
AC_SUBST(DKLIBSINC)
AC_SUBST(DKLIBSLIB)
AC_SUBST(BZLIB)
AC_SUBST(ZLIB)
AC_SUBST(LIBPNG)
AC_OUTPUT(Makefile)
AC_OUTPUT(png2pdf-gui)
AC_OUTPUT(Java/Png2PdfGUI/Makefile)
AC_OUTPUT(Java/Png2PdfGUI/src/compile-archive)
if test "X$ZLIB" = "X"
then
echo 'ERROR: The zlib library was not found!'
echo 'This library is required to build this application.'
echo 'See http://www.gzip.org/zlib for download.'
fi
if test "X$LIBPNG" = "X"
then
echo 'ERROR: The libpng library was not found!'
echo 'This library is required to build this application.'
echo 'See http://www.libpng.org for download.'
fi
if test "X$BZLIB" = "X"
then
echo 'Warning: The bzip2 library was not found.'
echo 'This library is recommended by the dklibs library set.'
echo 'If the dklibs library set was built without bzip2 support'
echo '(I have no way to test this) you can ignore this warning.'
echo 'When in doubt check linker output for undefined references.'
echo 'See http://sources.redhat.com/bzip2/ for download.'
fi