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

Annotation of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 132 - (hide annotations)
Fri Jan 6 19:45:59 2006 UTC (19 years, 1 month ago) by werner
File size: 7335 byte(s)
Hack to create MO files

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

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26