File: configure

package info (click to toggle)
exactimage 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,040 kB
  • sloc: cpp: 35,940; ansic: 1,952; xml: 1,447; makefile: 338; perl: 138; sh: 110; python: 45; php: 37; ruby: 12
file content (109 lines) | stat: -rwxr-xr-x 3,439 bytes parent folder | download
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/env bash

. config/functions

with_options="x11 freetype evas libjpeg libjxl libheif libtiff libpng libgif jasper openexr expat lcms bardecode lua swig perl python php ruby"

feature_options="evasgl tga pcx static"
TGA=1 # default to yes
PCX=1

PACKAGE="exact-image"
VERSION_MAJOR=1
VERSION_MINOR=2
VERSION_MICRO=1

init

prefix="/usr/local"

parse_options $*

compile c++ available.c ||
	status_error "A C++ compiler is not installed or does not work correctly.
A C++ compiler is vital for exact-image - so you need to install it first."

compile c++ stl.c template.c template-specialization.c \
        partial-template-specialization.c function-template.c \
        || status_error \
	"At least one of the advanced ANSI C++ tests failed. Since these
features are vital for exact-image you need to update to a more recent compiler first."

headercheck c++ iostream string iostream sstream fstream ||
	status_error "Not all tested STL headers are present - please install them."

pkgcheck x11 compile X11 atleast 11.0
pkgcheck libagg pkg-config LIBAGG atleast 2.3 ||
	status_error "Anti-Grain Geometry was not found, since it is vital
(for vector objects and text) obtained it from: www.antigrain.com"

# latest tested, even older ones /might/ work -ReneR
if ! pkgcheck freetype2 pkg-config FREETYPE atleast 9.5.0; then
	cat <<-EOT

		Freetype2 was not found - font rendering is disabled.
		Freetype2 can be obtained from: www.freetype.org

EOT
fi

if ! pkgcheck evas pkg-config EVAS atleast 0.9.9; then
	cat <<-EOT

		Enlightenment Evas was not found - edisplay is disabled.
		Evas can be obtained from: www.enlightenment.org

EOT
fi

if headercheck "cc $EVASINCS " "Evas_Engine_GL_X11.h"
then EVASGL=1
else EVASGL=0
fi

pkgcheck libjpeg header LIBJPEG cc jconfig.h
pkgcheck libjxl pkg-config LIBJXL atleast 0.6
pkgcheck libheif pkg-config LIBHEIF atleast 1.16
pkgcheck libtiff header LIBTIFF c++ tiffconf.h tiffio.h # tiffio.hxx
pkgcheck libpng pkg-config LIBPNG atleast 1.2
pkgcheck libgif header LIBGIF c++ gif_lib.h
pkgcheck jasper header JASPER c++ jasper/jasper.h
if pkgcheck expat header EXPAT c++ expat.h; then # just for the SVG parser
	var_append EXPATLIBS " " "-lexpat"
fi

pkgcheck OpenEXR pkg-config OPENEXR atleast 1.2.0
#pkgcheck libopenraw-1.0 pkg-config LIBOPENRAW atleast 0.0.5
pkgcheck lcms pkg-config LCMS atleast 1.10

# this is PROPERITARY SOFTWARE - only use this if you have to ...
if pkgcheck bardecode shell BARDECODE \
    '[ -e external/bardecode.a -a -e external/barcode.h ] && echo yes'; then
    var_append BARDECODEINCS " " "-I external"
    var_append BARDECODELIBS " " "external/bardecode.a"
else
	cat <<-EOT
		For optional, proprietary barcode recognition, place it in 'external/'.

EOT
fi

# due to swig-1.3.32/Lib/perl5/perlstrings.swg:FromCharPtrAndSize fix -ReneR
pkgcheck swig shell SWIG 'swig -version 2>/dev/null | sed -n "s/SWIG Version \(.*\)/\1/p"' atleast 1.3.32

# supported swig target languages so far

pkgcheck lua pkg-config LUA atleast 5.1

pkgcheck perl shell PERL 'perl -version 2>/dev/null | sed -n "s/This is perl.*v\([0-9.]*\).*built.*/\1/p"' atleast 5.8.0 &&
	PERLINCS="`perl -MExtUtils::Embed -e ccopts`"

pkgcheck php -config PHP atleast 5.2.0 &&
	PHPINCS="`php-config --includes`"

pkgcheck python shell PYTHON 'python3 -V 2>&1 | sed -n "s/Python //p"' atleast 2.5.0 &&
	PYTHONINCS="`python3-config --includes`"

pkgcheck ruby-2.4 pkg-config RUBY atleast 1.9

save