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

Annotation of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 36 - (hide annotations)
Thu Oct 27 15:25:13 2005 UTC (19 years, 4 months ago) by werner
File size: 6063 byte(s)
First set of changes to use autotools for building.
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     AC_INIT(WinPT, 0.11.0-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($PACKAGE, $VERSION)
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    
55     AH_BOTTOM([
56     /* Some global constants. */
57    
58     /* Set to distinguish between the old custom Makefile based build
59     system and our new automake based one. */
60     #define WINPT_MODERN_BUILD 1
61    
62     ])
63    
64     AM_MAINTAINER_MODE
65    
66     # Checks for programs.
67     AC_PROG_MAKE_SET
68     AM_SANITY_CHECK
69     missing_dir=`cd $ac_aux_dir && pwd`
70     AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
71     AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
72     AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
73     AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
74     AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
75     AC_PROG_AWK
76     AC_PROG_CC
77     AC_PROG_CPP
78     AC_PROG_CXX
79     AC_PROG_INSTALL
80     AC_PROG_LN_S
81     AC_PROG_MAKE_SET
82     AC_PROG_RANLIB
83     AC_CHECK_TOOL(AR, ar, :)
84     AC_CHECK_TOOL(DLLTOOL, dlltool, :)
85     AC_CHECK_TOOL(WINDRES, windres, :)
86    
87    
88     try_gettext=yes
89     have_dosish_system=no
90     have_w32_system=no
91     case "${host}" in
92     *-mingw32*)
93     # special stuff for Windoze NT
94     ac_cv_have_dev_random=no
95     AC_DEFINE(USE_ONLY_8DOT3,1,
96     [set this to limit filenames to the 8.3 format])
97     AC_DEFINE(HAVE_DRIVE_LETTERS,1,
98     [defined if we must run on a stupid file system])
99     AC_DEFINE(USE_SIMPLE_GETTEXT,1,
100     [because the Unix gettext has too much overhead on
101     MingW32 systems and these systems lack Posix functions,
102     we use a simplified version of gettext])
103     have_dosish_system=yes
104     have_w32_system=yes
105     try_gettext="no"
106     ;;
107     *)
108     AC_MSG_ERROR([[
109     ***
110     *** This software my only be build for W32 systems. Use
111     *** ./autogen.sh --build-w32
112     *** to prepare it for such a build.
113     ***]])
114     ;;
115     esac
116    
117     if test "$have_dosish_system" = yes; then
118     AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
119     [Defined if we run on some of the PCDOS like systems
120     (DOS, Windoze. OS/2) with special properties like
121     no file modes])
122     fi
123     AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
124    
125     if test "$have_w32_system" = yes; then
126     AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
127     fi
128     AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
129    
130    
131    
132     #
133     # Checks for libraries.
134     #
135    
136    
137     AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
138     have_gpgme=yes,have_gpgme=no)
139     AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
140     have_gpg_error=yes,have_gpg_error=no)
141    
142     # Checks for header files.
143     AC_HEADER_STDC
144     AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
145    
146     AC_CHECK_FUNCS(stpcpy)
147    
148     # Checks for typedefs, structures, and compiler characteristics.
149     AC_C_CONST
150     AC_C_INLINE
151     AC_TYPE_SIZE_T
152     AC_TYPE_SIGNAL
153    
154     AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
155    
156     # Add some extra libs here so that previous tests don't fail for
157     # mysterious reasons - the final link step should bail out.
158     if test "$have_w32_system" = yes; then
159     W32LIBS="-lwsock32"
160     fi
161    
162     if test "$GCC" = yes; then
163     CFLAGS="$CFLAGS -Wall -mms-bitfields"
164     CXXFLAGS="$CXXFLAGS -Wall -mms-bitfields"
165     if test "$USE_MAINTAINER_MODE" = "yes"; then
166     CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
167     CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
168     CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
169     CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
170     fi
171     fi
172    
173     AC_SUBST(W32LIBS)
174    
175    
176    
177     #
178     # Print errors here so that they are visible all
179     # together and the user can acquire them all together.
180     #
181     die=no
182     if test "$have_gpgme" = "no"; then
183     die=yes
184     AC_MSG_NOTICE([[
185     ***
186     *** You need gpgme to build this program.
187     ** This library is for example available at
188     *** ftp://ftp.gnupg.org/gcrypt/gpgme/
189     *** (at least version $NEED_GPGME_VERSION is required.)
190     ***]])
191     fi
192     if test "$have_gpg_error" = "no"; then
193     die=yes
194     AC_MSG_NOTICE([[
195     ***
196     *** You need libgpg-error to build this program.
197     ** This library is for example available at
198     *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
199     *** (at least version $NEED_GPG_ERROR_VERSION is required.)
200     ***]])
201     fi
202     if test "$die" = "yes"; then
203     AC_MSG_ERROR([[
204     ***
205     *** Required libraries not found. Please consult the above messages
206     *** and install them before running configure again.
207     ***]])
208     fi
209    
210    
211     AC_CONFIG_FILES([ Makefile
212     src/Makefile
213     src/versioninfo.rc
214     ])
215     AC_OUTPUT

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26