.
[gpg4win.git] / configure.ac
1 # configure.ac for GPG4Win
2 # Copyright (C) 2005, 2006 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, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19  
20 # (Process this file with autoconf to produce a configure script.)
21
22 AC_PREREQ(2.59)
23 min_automake_version="1.9.3"
24
25 # Remember to change the version number immediately *after* a release.
26 # Uncomment the my_iscvs macro for non-released code.
27 m4_define(my_version, [0.5.2])
28 m4_define(my_iscvs, yes)
29
30 AC_INIT([gpg4win], my_version[]m4_ifdef([my_iscvs], [-cvs[]m4_translit(
31                   [$Revision$],[Ra-z $:])]),
32                   [gpg4win-devel@wald.intevation.org])
33
34 PACKAGE=$PACKAGE_NAME
35 VERSION=$PACKAGE_VERSION
36
37 AC_CONFIG_SRCDIR(include/config.nsi.in)
38 AC_CONFIG_MACRO_DIR(m4)
39
40 AM_INIT_AUTOMAKE
41 AM_MAINTAINER_MODE
42 AC_CANONICAL_HOST
43
44 AC_SUBST(PACKAGE)
45 AC_SUBST(VERSION)
46
47
48 # Generate extended version information.  Note, that for NSIS use we
49 # must not translate the dots to commas in the BUILD_FILEVERSION.
50 BUILD_TIMESTAMP=`date --iso-8601=minutes`
51 changequote(,)dnl
52 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
53 tmp="`echo '$Revision$' | sed 's/[^0-9]//g'`"
54 changequote([,])dnl
55 test -z "$tmp" && tmp="0"
56 BUILD_FILEVERSION="${BUILD_FILEVERSION}$tmp"
57 AC_SUBST(BUILD_TIMESTAMP)
58 AC_SUBST(BUILD_FILEVERSION)
59
60
61 # Required tools.
62 AC_PROG_CC
63 AC_PROG_CPP
64 AC_CHECK_TOOLS(DLLTOOL, dlltool)
65 AC_CHECK_PROGS(MAKE, make)
66 AC_CHECK_PROGS(UNZIP, unzip)
67 AC_CHECK_PROGS(TAR, tar)
68 AC_CHECK_PROGS(MKDIR, mkdir)
69 AC_CHECK_PROGS(CP, cp)
70 AC_CHECK_PROGS(RM, rm)
71 AC_CHECK_PROGS(STOW, stow)
72 AC_CHECK_PROGS(MAKENSIS, makensis)
73 AC_CHECK_PROGS(ZCAT, zcat)
74 AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
75 AC_CHECK_PROGS(DVIPDF, dvipdf)
76 AC_CHECK_PROGS(SHA1SUM, sha1sum)
77 AC_PROG_INSTALL
78
79 missing_tools=
80 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
81          DVIPDF SHA1SUM ; do
82    eval tmp='$'$i
83    if test -z "$tmp"; then 
84       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
85    fi
86 done
87
88
89 # Optional tools.
90
91 AC_CHECK_PROGS(WGET, wget)
92
93
94 # Packages.
95
96 GPG4WIN_BPKG_GNU([libiconv])
97 GPG4WIN_BPKG_GNU([gettext], [libiconv])
98
99 GPG4WIN_BPKG_GNUWIN32([zlib])
100 GPG4WIN_BPKG_GNUWIN32_LIB([crypt])
101 GPG4WIN_BPKG_GNUWIN32_LIB([regex])
102 GPG4WIN_BPKG_GNUWIN32([libpng], [pkgconfig])
103
104 GPG4WIN_BPKG_GTK([pkgconfig])
105 # We build our own version of glib, because we need to patch giowin32.c.
106 # GPG4WIN_BPKG_GTK_DEV([glib], [pkgconfig])
107 GPG4WIN_SPKG([glib], [libiconv gettext pkgconfig])
108 GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig])
109 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
110 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
111 GPG4WIN_BPKG_BINSRC([GPGee], [gnupg])
112
113 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
114 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg glib])
115 GPG4WIN_SPKG([gnupg])
116 GPG4WIN_SPKG([pthreads-w32])
117 GPG4WIN_SPKG([gpgol], [gpgme])
118 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
119 GPG4WIN_SPKG([winpt], [gpgme gnupg])
120 GPG4WIN_SPKG([sylpheed-claws], [libiconv gettext zlib gtk+ libpng glib dnl
121                                 gpgme pthreads-w32 crypt regex])
122 GPG4WIN_SPKG([eudoragpg])
123 GPG4WIN_SPKG([man_novice_de])
124 GPG4WIN_SPKG([man_advanced_de])
125
126 GPG4WIN_FINALIZE
127
128 # Throw an error if required tools are missing
129 if test -n "$missing_tools"; then
130     for i in $missing_tools; do 
131       AC_MSG_NOTICE([$i is missing])
132     done
133     AC_MSG_ERROR([[
134 ***
135 *** Required tools not found. Please consult the above messages
136 *** and install them before running configure again.
137 ***]])
138 fi
139
140
141 # Finalize.
142
143 AC_CONFIG_FILES(Makefile packages/Makefile include/Makefile src/Makefile)
144 AC_CONFIG_FILES(include/config.nsi src/gpg4win.mk)
145 AC_CONFIG_FILES(doc/Makefile)
146 AC_CONFIG_FILES(doc/manual-de/Makefile)
147 AC_CONFIG_FILES(doc/website/Makefile)
148 AC_OUTPUT