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