File: configure.in

package info (click to toggle)
gimp-help 2%2B0.7-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 30,852 kB
  • ctags: 4
  • sloc: xml: 104,248; sh: 544; makefile: 262; perl: 42
file content (143 lines) | stat: -rw-r--r-- 3,842 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
dnl  This the autoconf script for the gimp-help-2 project.
dnl  The GPL version 2 applies to it which you may get from
dnl  http://www.gnu.org/.

AC_PREREQ(2.54)

m4_define([help_major_version], [0])
m4_define([help_minor_version], [7])

m4_define([help_version], [help_major_version.help_minor_version])

AC_INIT(gimp-help-2, [help_version])

AC_CONFIG_SRCDIR([src/gimp.xml])

AM_INIT_AUTOMAKE(no-define)


AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET


dnl  You can set the ALL_LINGUAS environment variable to
dnl  control what languages are build.

if test "x$ALL_LINGUAS" != "x"; then
  ALL_LINGUAS=$ALL_LINGUAS
else
  ALL_LINGUAS="cs de en fr sv zh_CN"
fi

AC_SUBST(ALL_LINGUAS)


dnl  The build of the HTML files is optional

AC_ARG_ENABLE(build,
              [  --enable-build          build the help files from XML (needs xsltproc)],, enable_build=no)

AM_CONDITIONAL(GIMP_HELP_BUILD, test "x$enable_build" = "xyes")

dnl Using convert for optimizing screenshots for the html version is
dnl optional

AC_ARG_ENABLE(convert,
              [  --enable-convert        optimize the PNGs for the Web in file size (needs convert)],, enable_convert=no)

AM_CONDITIONAL(USE_CONVERT, test "x$enable_convert" = "xyes")

dnl  Search the XSLT processor

AC_PATH_PROG(XSLTPROC, xsltproc)
if test -z "$XSLTPROC" && test "x$enable_build" = "xyes"; then
  AC_MSG_ERROR([
** Couldn't find xsltproc. You will need it to build the help files.
** If you want to install the prebuilt help files only, use --disable-build.
** See the file 'INSTALL' for more help.])
fi

dnl  Search for xmllint

AC_PATH_PROG(XMLLINT, xmllint)
if test -z "$XMLLINT" && test "x$enable_build" = "xyes"; then
  AC_MSG_WARN([Couldn't find xmllint, won't be able to validate the XML.])
fi

dnl Search for image magic convert

AC_PATH_PROG(CONVERT, convert)
if test -z "$CONVERT" && test "x$enable_convert" = "xyes"; then
  AC_MSG_ERROR([
** Coudn't find convert. You will need it to optimize the images for the
** web.])
fi

dnl  Optionally allow xsltproc to access DTDs over the network

AC_ARG_ENABLE(network,
              [  --enable-network        allow to fetch DTDs or entities over the network])

if test "x$enable_network" != "xyes"; then
  XSLTFLAGS='--nonet'
fi

AC_SUBST(XSLTFLAGS)


dnl  Default to the correct way of identifying stylesheets.
dnl  People need an XML catalog to resolve this to a local file.

STYLEBASE='http://docbook.sourceforge.net/release/xsl/current'

dnl  Allow to explicitely specify the stylesheet location
dnl  in case the XML catalog doesn't exist or is broken.

AC_ARG_WITH(xsl,
            [  --with-xsl=<basedir>    path to the base of the DocBook Modular Stylesheets])

if test "x$with_xsl" != "x"; then
  STYLEBASE=$with_xsl
  AC_CHECK_FILE($STYLEBASE/xhtml/docbook.xsl,,
    AC_MSG_ERROR([** Couldn't find docbook.xsl in $STYLEBASE/xhtml]))
fi

AC_SUBST(STYLEBASE)


dnl  We need the GIMP data directory to install the help files

AC_ARG_WITH(gimp,
  [  --without-gimp          skip check for gimp2, install into prefix])

if test "x$with_gimp" != "xno"; then
  PKG_CHECK_MODULES(GIMP, gimp-2.0,, [
AC_MSG_ERROR([
** Couldn't find a GIMP-2.0 installation. If you want to skip this check and
** install the help files to the configured prefix, use the --without-gimp
** configure option. Note that GIMP will then only find the help files if it
** is installed in the same prefix. See the file 'INSTALL' for more help.])
])

  GIMP_DATADIR=`$PKG_CONFIG --variable=gimpdatadir gimp-2.0`
else
  GIMP_DATADIR='${datadir}/gimp/2.0'
fi

AC_SUBST(GIMP_DATADIR)


AC_CONFIG_FILES([
Makefile
stylesheets/plainhtml.xsl
])

AC_OUTPUT

AC_MSG_RESULT([
 Rebuild the help files:         $enable_build
 Languages:                      $ALL_LINGUAS
 Installation prefix:            $GIMP_DATADIR
 Optimize PNGs for HTML files:   $enable_convert 
])