Included Sylpheed.
[gpg4win.git] / configure.ac
1 # configure.ac for GPG4Win
2 # Copyright (C) 2005 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 AC_INIT([gpg4win],[0.1.0-cvs],[gpg4win-devel@wald.intevation.org])
26
27 PACKAGE=$PACKAGE_NAME
28 VERSION=$PACKAGE_VERSION
29
30 AC_CONFIG_SRCDIR(include/config.nsi.in)
31 AC_CONFIG_MACRO_DIR(m4)
32
33 AM_INIT_AUTOMAKE
34 AM_MAINTAINER_MODE
35 AC_CANONICAL_HOST
36
37 AC_SUBST(PACKAGE)
38 AC_SUBST(VERSION)
39
40
41 # Generate extended version information.  Note, that for NSIS use we
42 # must not translate the dots to commas in the BUILD_FILEVERSION.
43 BUILD_TIMESTAMP=`date --iso-8601=minutes`
44 changequote(,)dnl
45 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
46 tmp="`echo '$Revision$' | sed 's/[^0-9]//g'`"
47 changequote([,])dnl
48 test -z "$tmp" && tmp="0"
49 BUILD_FILEVERSION="${BUILD_FILEVERSION}$tmp"
50 AC_SUBST(BUILD_TIMESTAMP)
51 AC_SUBST(BUILD_FILEVERSION)
52
53
54 # Required tools.
55 AC_PROG_CC
56 AC_PROG_CPP
57 AC_CHECK_TOOLS(DLLTOOL, dlltool)
58 AC_CHECK_PROGS(MAKE, make)
59 AC_CHECK_PROGS(UNZIP, unzip)
60 AC_CHECK_PROGS(TAR, tar)
61 AC_CHECK_PROGS(MKDIR, mkdir)
62 AC_CHECK_PROGS(CP, cp)
63 AC_CHECK_PROGS(RM, rm)
64 AC_CHECK_PROGS(STOW, stow)
65 AC_CHECK_PROGS(MAKENSIS, makensis)
66 AC_PROG_INSTALL
67
68 missing_tools=
69 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS; do
70    eval tmp='$'$i
71    if test -z "$tmp"; then 
72       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
73    fi
74 done
75
76
77 # Optional tools.
78
79 AC_CHECK_PROGS(WGET, wget)
80
81
82 # Packages.
83
84 GPG4WIN_BPKG_GNU([libiconv])
85 GPG4WIN_BPKG_GNU([gettext], [libiconv])
86
87 GPG4WIN_BPKG_GNUWIN32([zlib])
88 GPG4WIN_BPKG_GNUWIN32_LIB([crypt])
89 GPG4WIN_BPKG_GNUWIN32_LIB([regex])
90 GPG4WIN_BPKG_GNUWIN32([libpng], [pkgconfig])
91
92 GPG4WIN_BPKG_GTK([pkgconfig])
93 GPG4WIN_BPKG_GTK_DEV([glib], [pkgconfig])
94 GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig])
95 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
96 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
97 #fixme: These are intermediate package.
98 GPG4WIN_BPKG_BINSRC([gpgee], [gnupg])
99
100
101 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
102 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg glib])
103 GPG4WIN_SPKG([gnupg])
104 GPG4WIN_SPKG([pthreads-w32])
105 GPG4WIN_SPKG([gpgol], [gpgme])
106 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
107 GPG4WIN_SPKG([winpt], [gpgme gnupg])
108 GPG4WIN_SPKG([sylpheed-claws], [libiconv gettext zlib gtk+ libpng glib dnl
109                                 gpgme pthreads-w32 crypt regex])
110 GPG4WIN_SPKG([eudoragpg])
111 GPG4WIN_SPKG([man_novice_de])
112 GPG4WIN_SPKG([man_advanced_de])
113
114 GPG4WIN_FINALIZE
115
116 # Throw an error if required tools are missing
117 if test -n "$missing_tools"; then
118     for i in $missing_tools; do 
119       AC_MSG_NOTICE([$i is missing])
120     done
121     AC_MSG_ERROR([[
122 ***
123 *** Required tools not found. Please consult the above messages
124 *** and install them before running configure again.
125 ***]])
126 fi
127
128
129 # Finalize.
130
131 AC_CONFIG_FILES(Makefile packages/Makefile include/Makefile src/Makefile)
132 AC_CONFIG_FILES(include/config.nsi src/gpg4win.mk)
133 AC_OUTPUT