Installed the new compendium.
[gpg4win.git] / configure.ac
1 # configure.ac for GPG4Win
2 # Copyright (C) 2005, 2006, 2007, 2008 g10 Code GmbH
3
4 # This file is part of GPG4Win
5
6 # GPG4Win is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GPG4Win is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18  
19 # (Process this file with autoconf to produce a configure script.)
20
21 AC_PREREQ(2.59)
22 min_automake_version="1.9.3"
23
24 # Remember to change the version number immediately *after* a release.
25 # Set my_issvn to "yes" for non-released code.  Remember to run an
26 # "svn up" and "autogen.sh" right before creating a distribution.
27 # Right after a release the make target "copy-news" is to be called!
28 m4_define([my_version], [1.9.6-beta])
29 m4_define([my_issvn], [no])
30
31 m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
32           ||echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
33 AC_INIT([gpg4win], 
34         [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
35         [gpg4win-devel@wald.intevation.org])
36
37 # Remember to update these version numbers also in the NEWS file.
38 MANUALVERSION_EINSTEIGER="2.0.2"
39 MANUALDATE_EINSTEIGER="30. Mai 2006"
40 MANUALVERSION_DURCHBLICKER="2.0.2"
41 MANUALDATE_DURCHBLICKER="30. Mai 2006"
42 MANUALVERSION_NOVICES="1.0.0"
43 MANUALDATE_NOVICES="Nov. 30, 2006"
44 MANUALVERSION_ADVANCED="0.0.0"
45 MANUALDATE_ADVANCED="Nov. 30, 2006"
46 COMPENDIUM_VERSION_DE="3.0.0-beta1"
47 COMPENDIUM_DATE_DE="19. August 2008"
48
49
50 MANUALINPROGRESS_DE=m4_if(my_issvn,[yes],["~und evtl. seitdem weiter bearbeitet"])
51 MANUALINPROGRESS_EN=m4_if(my_issvn,[yes],["~and may have been further edited"])
52 SVN_REVISION=svn_revision
53 PACKAGE=$PACKAGE_NAME
54 VERSION=$PACKAGE_VERSION
55
56
57 AC_CONFIG_SRCDIR(include/config.nsi.in)
58 AC_CONFIG_MACRO_DIR(m4)
59
60 AM_INIT_AUTOMAKE
61 AM_MAINTAINER_MODE
62 AC_CANONICAL_HOST
63 AM_CONFIG_HEADER(config.h)
64
65 # Language support
66 AM_PO_SUBDIRS
67
68
69 AC_SUBST(PACKAGE)
70 AC_SUBST(VERSION)
71 AC_SUBST(MANUALVERSION_EINSTEIGER)
72 AC_SUBST(MANUALDATE_EINSTEIGER)
73 AC_SUBST(MANUALVERSION_DURCHBLICKER)
74 AC_SUBST(MANUALDATE_DURCHBLICKER)
75 AC_SUBST(MANUALINPROGRESS_DE)
76 AC_SUBST(MANUALVERSION_NOVICES)
77 AC_SUBST(MANUALDATE_NOVICES)
78 AC_SUBST(MANUALVERSION_ADVANCED)
79 AC_SUBST(MANUALDATE_ADVANCED)
80 AC_SUBST(MANUALINPROGRESS_EN)
81 AC_SUBST(COMPENDIUM_VERSION_DE)
82 AC_SUBST(COMPENDIUM_DATE_DE)
83
84
85 # Generate extended version information.  Note, that for NSIS use we
86 # must not translate the dots to commas in the BUILD_FILEVERSION.
87 BUILD_TIMESTAMP=`date --iso-8601=minutes`
88 BUILD_ISODATE=`date --iso-8601`
89 changequote(,)dnl
90 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
91 changequote([,])dnl
92 BUILD_FILEVERSION="${BUILD_FILEVERSION}${SVN_REVISION}"
93 AC_SUBST(BUILD_TIMESTAMP)
94 AC_SUBST(BUILD_ISODATE)
95 AC_SUBST(BUILD_FILEVERSION)
96
97
98 # To test tye manuals using an actual web server, the preview target
99 # may be used in doc/manuals.  The default is my (wk) test environment
100 # but may be overriden using another preview variable.  PREVIEWHOST is
101 # expected to be the target for an rsync command.
102 if test -z "$PREVIEWHOST" ; then
103    PREVIEWHOST="vigenere:/var/www/all/preview.gpg4win.org/htdocs/"
104 fi
105 AC_SUBST(PREVIEWHOST)
106
107
108 # For development of this package it is useful to build without
109 # creating the source installer (takes a long time).  This option may
110 # be used to suppress creation of the source installer.
111 AC_ARG_ENABLE(source-installer,
112     AC_HELP_STRING([--disable-source-installer],
113                    [Do not create the Source installer]),
114                     build_source_installer=$enableval,
115                     build_source_installer=yes)
116 AC_MSG_RESULT($source_installer)
117 AM_CONDITIONAL(BUILD_SOURCE_INSTALLER, test "$build_source_installer" = yes)
118
119
120 # You can build a light version of the installer in addition to the
121 # regular version.  This one does not contain the manuals.
122 AC_ARG_ENABLE(light-installer,
123     AC_HELP_STRING([--disable-light-installer],
124                    [Do not create the light version of the installer]),
125                     build_light_installer=$enableval,
126                     build_light_installer=yes)
127 AC_MSG_RESULT($light_installer)
128 AM_CONDITIONAL(BUILD_LIGHT_INSTALLER, test "$build_light_installer" = yes)
129
130
131 # Required tools.
132 AC_PROG_CC
133 AC_PROG_CPP
134 AC_PROG_RANLIB
135 AC_CHECK_TOOL(AR, ar, :)
136 AC_CHECK_TOOLS(STRIP, strip)
137 AC_CHECK_TOOLS(DLLTOOL, dlltool)
138 AC_CHECK_PROGS(MAKE, make)
139 AC_CHECK_PROGS(UNZIP, unzip)
140 AC_CHECK_PROGS(TAR, tar)
141 AC_CHECK_PROGS(MKDIR, mkdir)
142 AC_CHECK_PROGS(CP, cp)
143 AC_CHECK_PROGS(RM, rm)
144 AC_CHECK_PROGS(STOW, stow)
145 AC_CHECK_PROGS(MAKENSIS, makensis)
146 AC_CHECK_PROGS(ZCAT, zcat)
147 AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
148 AC_CHECK_PROGS(DVIPDF, dvipdf)
149 AC_CHECK_PROGS(CONVERT, convert)
150 AC_CHECK_PROGS(SHA1SUM, sha1sum)
151 AC_CHECK_PROGS(MSGFMT, msgfmt)
152 AC_PROG_INSTALL
153
154 missing_tools=
155 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
156          DVIPDF CONVERT SHA1SUM MSGFMT ; do
157    eval tmp='$'$i
158    if test -z "$tmp"; then 
159       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
160    fi
161 done
162
163
164 # Optional tools.
165
166 AC_CHECK_PROGS(WGET, wget)
167
168
169 # Packages.
170
171 GPG4WIN_BPKG_GNU([libiconv])
172 GPG4WIN_BPKG_GNU([gettext], [libiconv])
173
174 GPG4WIN_BPKG_GNUWIN32([zlib])
175 GPG4WIN_BPKG_GNUWIN32_LIB([crypt])
176 GPG4WIN_BPKG_GNUWIN32([regex])
177 GPG4WIN_BPKG_GNUWIN32([libpng], [pkgconfig])
178 GPG4WIN_BPKG_GNUWIN32([jpeg])
179
180 GPG4WIN_BPKG_GTK([pkgconfig])
181 # We build our own version of glib, because we need to apply a few patches.
182 # GPG4WIN_BPKG_GTK_DEV([glib], [pkgconfig])
183 GPG4WIN_SPKG([glib], [libiconv gettext pkgconfig])
184 GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig cairo])
185 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
186 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
187 GPG4WIN_BPKG_GTK_DEV([cairo], [glib pkgconfig])
188
189 GPG4WIN_SPKG([bzip2])
190 GPG4WIN_SPKG([adns])
191 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
192 GPG4WIN_SPKG([libgcrypt], [libgpg-error])
193 GPG4WIN_SPKG([libksba], [libgpg-error])
194 GPG4WIN_SPKG([libassuan], [w32pth])
195 GPG4WIN_SPKG([dirmngr], [libgpg-error libgcrypt libassuan libksba])
196 GPG4WIN_SPKG([w32pth])
197 GPG4WIN_SPKG([pinentry], [libiconv gtk+])
198 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg2 glib])
199 GPG4WIN_SPKG([gnupg2], [libiconv libgcrypt libksba libassuan libgpg-error dnl
200                         w32pth zlib bzip2 adns pinentry])
201 GPG4WIN_SPKG([pthreads-w32])
202 GPG4WIN_SPKG([gpgol], [gpgme libassuan])
203 GPG4WIN_SPKG([gpgex], [libassuan])
204 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
205 GPG4WIN_SPKG([winpt], [gpgme gnupg2])
206 GPG4WIN_SPKG([libgsasl])
207 GPG4WIN_SPKG([libtasn1])
208 GPG4WIN_SPKG([opencdk], [libgpg-error libgcrypt])
209 GPG4WIN_SPKG([gnutls], [libgsasl libtasn1 opencdk])
210 GPG4WIN_SPKG([libetpan], [pthreads-w32])
211 GPG4WIN_SPKG([claws-mail], [libiconv gettext zlib gtk+ libpng jpeg glib dnl
212                             gpgme pthreads-w32 crypt regex libetpan gnutls])
213
214 GPG4WIN_IPKG([compendium_de])
215 GPG4WIN_IPKG([man_novice_en])
216 #GPG4WIN_IPKG([man_advanced_en])
217
218 # Qt related stuff.
219 GPG4WIN_BPKG_GNUWIN32([kdesupport])
220 GPG4WIN_BPKG_GNUWIN32([qt], [kdesupport])
221 GPG4WIN_BPKG_BINSRC([oxygen-icons])
222 GPG4WIN_BPKG_GNUWIN32([kdelibs], [qt oxygen-icons])
223 #GPG4WIN_BPKG_BINSRC([kleopatra], [gpgme gnupg2 kdelibs])
224 GPG4WIN_BPKG_GNUWIN32([kleopatra], [gpgme gnupg2 kdelibs])
225
226 GPG4WIN_FINALIZE
227
228 # Qt is compiled with -mthreads, and thus requires the mingwm10.dll.
229 mingwm_dll=no
230 AC_ARG_WITH([mingwm-dll],
231             AC_HELP_STRING([--with-mingwm-dll=FILE], [use the mingwm DLL]),
232             [mingwm_dll=$withval])
233 if test "$mingwm_dll" = "no"; then
234   file="/usr/share/doc/mingw32-runtime/mingwm10.dll.gz"
235   if test -r "$file"; then
236     mingwm_dll="$file"
237   fi
238 fi
239 if test "$mingwm_dll" = "no"; then
240   missing_tools="mingwm10.dll $missing_tools"
241 fi
242 # To make things simple, we just install a copy of the file in the
243 # source directory.  No need to make this ugly hack any uglier by
244 # messing around with the build system.
245 case "$mingwm_dll" in
246     *.gz)
247       $ZCAT $mingwm_dll > src/mingwm10.dll
248       ;;
249     *)
250       cp $mingwm_dll src/mingwm10.dll
251       ;;
252 esac
253
254
255 # Throw an error if required tools are missing
256 if test -n "$missing_tools"; then
257     for i in $missing_tools; do 
258       AC_MSG_NOTICE([$i is missing])
259     done
260     AC_MSG_ERROR([[
261 ***
262 *** Required tools not found. Please consult the above messages
263 *** and install them before running configure again.
264 ***]])
265 fi
266
267
268 # Finalize.
269
270 AC_CONFIG_COMMANDS([gpg4win-conf],[[
271 chmod +x patches/gnupg2/01-version.patch
272 ]])
273
274 AC_CONFIG_FILES(Makefile)
275 AC_CONFIG_FILES(packages/Makefile include/Makefile src/Makefile po/Makefile.in)
276 AC_CONFIG_FILES(include/config.nsi src/gpg4win.mk)
277 AC_CONFIG_FILES(doc/Makefile)
278 AC_CONFIG_FILES(doc/logo/Makefile)
279 AC_CONFIG_FILES(doc/manual/Makefile doc/manual/version.tex)
280 AC_CONFIG_FILES(doc/website/Makefile)
281 AC_CONFIG_FILES(patches/gnupg2/01-version.patch)
282 AC_OUTPUT