/[winpt]/trunk/configure.ac
ViewVC logotype

Contents of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 126 - (show annotations)
Fri Dec 16 12:57:17 2005 UTC (19 years, 2 months ago) by twoaday
File size: 7232 byte(s)
Migration to gettext.

WARNING: gpg4win installer needs to change
         inst-winpt.nsi when this or any later
		 version will be used.

1 # configure.ac - for WinPT
2 # Copyright (C) 2005 g10 Code GmbH
3 #
4 # This file is free software; as a special exception the author gives
5 # unlimited permission to copy and/or distribute it, with or without
6 # modifications, as long as this notice is preserved.
7 #
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 # Process this file with autoconf to produce a configure script.
13 AC_PREREQ(2.59)
14 min_automake_version="1.9.4"
15
16 # Version number: Remember to change it immediately *after* a release.
17 # Add a "-cvs" prefix for non-released code.
18 AC_INIT(WinPT, 0.11.4-cvs, http://www.winpt.org)
19
20 NEED_GPGME_API=1
21 NEED_GPGME_VERSION=1.1.0
22 NEED_GPG_ERROR_VERSION=1.2
23
24 PACKAGE=$PACKAGE_NAME
25 PACKAGE_GT=${PACKAGE_NAME}
26 VERSION=$PACKAGE_VERSION
27
28 AC_CONFIG_SRCDIR(Src/WinPT.cpp)
29 AM_CONFIG_HEADER(config.h)
30 AC_CANONICAL_TARGET()
31 AM_INIT_AUTOMAKE
32
33 AC_GNU_SOURCE
34
35 AC_SUBST(PACKAGE)
36 AC_SUBST(PACKAGE_GT)
37 AC_SUBST(VERSION)
38 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
39 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
40 [Name of this package for gettext])
41 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
42 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
43 [Bug report address])
44 AC_DEFINE_UNQUOTED(NEED_GPGME_VERSION, "$NEED_GPGME_VERSION",
45 [Required version of GPGME])
46
47 BUILD_TIMESTAMP=`date --iso-8601=minutes`
48 AC_SUBST(BUILD_TIMESTAMP)
49 changequote(,)dnl
50 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1.0/;s/\./,/g'`
51 changequote([,])dnl
52 AC_SUBST(BUILD_FILEVERSION)
53
54 # For the distcheck target of make we need to set a few options for
55 # the cross compiling environment. We assume the same conevtion as
56 # used in autogen.sh; i.e. we take the root from the $w32root variable
57 # or default to ~/w32root.
58 if test -n "$w32root"; then
59 W32ROOT="$w32root"
60 else
61 W32ROOT="$HOME/w32root"
62 fi
63 AC_SUBST(W32ROOT)
64
65
66 AH_BOTTOM([
67 /* Some global constants. */
68
69 /* Set to distinguish between the old custom Makefile based build
70 system and our new automake based one. This is only required in
71 Include/wptVersion.h. Fixme: See whether we may define the constants
72 there by means of command line apssed args or similar. */
73 #define WINPT_MODERN_BUILD 1
74
75 /* We need to include this header to be able to include specific parts
76 of the header files. For now we require at least Internet Exploder
77 4.01 to be installed. */
78 #include <w32api.h>
79 #define _WIN32_IE IE401
80
81 ])
82
83 AM_MAINTAINER_MODE
84
85 # Checks for programs.
86 AC_PROG_MAKE_SET
87 AM_SANITY_CHECK
88 missing_dir=`cd $ac_aux_dir && pwd`
89 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
90 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
91 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
92 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
93 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
94 AC_PROG_AWK
95 AC_PROG_CC
96 AC_PROG_CPP
97 AC_PROG_CXX
98 AC_PROG_INSTALL
99 AC_PROG_LN_S
100 AC_PROG_MAKE_SET
101 AC_PROG_RANLIB
102 AC_CHECK_TOOL(AR, ar, :)
103 AC_CHECK_TOOL(DLLTOOL, dlltool, :)
104 AC_CHECK_TOOL(WINDRES, windres, :)
105
106
107 try_gettext=yes
108 have_dosish_system=no
109 have_w32_system=no
110 case "${host}" in
111 *-mingw32*)
112 # special stuff for Windoze NT
113 ac_cv_have_dev_random=no
114 AC_DEFINE(USE_ONLY_8DOT3,1,
115 [set this to limit filenames to the 8.3 format])
116 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
117 [defined if we must run on a stupid file system])
118 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
119 [because the Unix gettext has too much overhead on
120 MingW32 systems and these systems lack Posix functions,
121 we use a simplified version of gettext])
122 have_dosish_system=yes
123 have_w32_system=yes
124 try_gettext="no"
125 ;;
126 *)
127 AC_MSG_ERROR([[
128 ***
129 *** This software my only be build for W32 systems. Use
130 *** ./autogen.sh --build-w32
131 *** to prepare it for such a build.
132 ***]])
133 ;;
134 esac
135
136
137 AH_BOTTOM([
138 /* Force using of NLS for W32 even if no libintl has been found. This is
139 okay because we have our own gettext implementation for W32. */
140 #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
141 #define ENABLE_NLS 1
142 #endif
143 ])
144
145 # Note, that autogen.sh greps for the next line.
146 AM_GNU_GETTEXT_VERSION(0.12.1)
147 AM_GNU_GETTEXT([external])
148
149
150 if test "$have_dosish_system" = yes; then
151 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
152 [Defined if we run on some of the PCDOS like systems
153 (DOS, Windoze. OS/2) with special properties like
154 no file modes])
155 fi
156 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
157
158 if test "$have_w32_system" = yes; then
159 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
160 fi
161 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
162
163
164
165 #
166 # Checks for libraries.
167 #
168
169
170 AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
171 have_gpgme=yes,have_gpgme=no)
172 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
173 have_gpg_error=yes,have_gpg_error=no)
174
175 # Checks for header files.
176 AC_HEADER_STDC
177 AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
178
179 AC_CHECK_FUNCS(stpcpy)
180
181 # Checks for typedefs, structures, and compiler characteristics.
182 AC_C_CONST
183 AC_C_INLINE
184 AC_TYPE_SIZE_T
185 AC_TYPE_SIGNAL
186
187 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
188
189 # Add some extra libs here so that previous tests don't fail for
190 # mysterious reasons - the final link step should bail out.
191 if test "$have_w32_system" = yes; then
192 W32LIBS="-lwsock32"
193 fi
194
195 if test "$GCC" = yes; then
196 CFLAGS="$CFLAGS -Wall -mms-bitfields"
197 CXXFLAGS="$CXXFLAGS -Wall -mms-bitfields"
198 if test "$USE_MAINTAINER_MODE" = "yes"; then
199 CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
200 CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
201 CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
202 CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
203 fi
204 fi
205
206 AC_SUBST(W32LIBS)
207
208
209
210 #
211 # Print errors here so that they are visible all
212 # together and the user can acquire them all together.
213 #
214 die=no
215 if test "$have_gpgme" = "no"; then
216 die=yes
217 AC_MSG_NOTICE([[
218 ***
219 *** You need gpgme to build this program.
220 ** This library is for example available at
221 *** ftp://ftp.gnupg.org/gcrypt/gpgme/
222 *** (at least version $NEED_GPGME_VERSION is required.)
223 ***]])
224 fi
225 if test "$have_gpg_error" = "no"; then
226 die=yes
227 AC_MSG_NOTICE([[
228 ***
229 *** You need libgpg-error to build this program.
230 ** This library is for example available at
231 *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
232 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
233 ***]])
234 fi
235 if test "$die" = "yes"; then
236 AC_MSG_ERROR([[
237 ***
238 *** Required libraries not found. Please consult the above messages
239 *** and install them before running configure again.
240 ***]])
241 fi
242
243
244 AC_CONFIG_FILES([ Makefile
245 PTD/Makefile
246 PTD/versioninfo.rc
247 Src/Makefile
248 Src/versioninfo.rc
249 Include/Makefile
250 Ico/Makefile
251 icons/Makefile
252 m4/Makefile
253 Gnupg/Makefile
254 Po/Makefile.in
255 ])
256 AC_OUTPUT

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26