OSDN Git Service

Avoid a potential macro definition conflict.
[mingw/mingw-get.git] / configure.ac
1 # configure.ac -*- autoconf -*- vim: filetype=config
2 #
3 # $Id$
4 #
5 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
6 # Copyright (C) 2009-2013, MinGW.org Project
7 #
8 #
9 # Configuration script for mingw-get
10 #
11 #
12 # This is free software.  Permission is granted to copy, modify and
13 # redistribute this software, under the provisions of the GNU General
14 # Public License, Version 3, (or, at your option, any later version),
15 # as published by the Free Software Foundation; see the file COPYING
16 # for licensing details.
17 #
18 # Note, in particular, that this software is provided "as is", in the
19 # hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
20 # even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
21 # PARTICULAR PURPOSE.  Under no circumstances will the author, or the
22 # MinGW.org Project, accept liability for any damages, however caused,
23 # arising from the use of this software.
24 #
25   AC_INIT([mingw-get],[0.6.0],[http://mingw.org/Reporting_Bugs])
26
27   AC_SUBST([COPYRIGHT_HOLDER],["MinGW.org Project"])
28   AC_SUBST([YEARS_OF_ISSUE],["2009-2013"])
29
30 # Identify the formal release classes for each of the CLI and the GUI
31 # application sub-packages; these may be overriden at configure time,
32 # by specifying a common SNAPSHOT_CLASS definition, (e.g. by running
33 #
34 #   SNAPSHOT_CLASS=pre ./config.status --recheck && ./config.status
35 #
36 # to update the configuration for the "preview" class), when we wish
37 # to build snapshots for distribution between formal releases.
38 #
39   AC_SUBST([CLI_RELEASE_CLASS],[${SNAPSHOT_CLASS-"beta"}])
40   AC_SUBST([GUI_RELEASE_CLASS],[${SNAPSHOT_CLASS-"alpha"}])
41
42 # Override the normal UNIX-centric autoconf default prefix;
43 # substitute the MinGW standard in its place.
44 #
45   AC_PREFIX_DEFAULT([C:/MinGW])
46
47 # We need the canonical representation of the intended host platform
48 # identification triplet, from which to deduce the subsystem designator
49 # in distributed tarball names.  (Note that we explicitly override any
50 # user specified "build_alias", because autoconf gets upset if "host"
51 # is specified without "build", and we need "host" if cross-compiling;
52 # all we need in this case is "host" != "build", and we don't really
53 # care what "build" is, but AC_CANONICAL_HOST gets very upset, when it
54 # calls ${srcdir}/build-aux/config.sub, if the user specifies a short
55 # form which it cannot resolve -- e.g. "--build=linux" will fail).
56 #
57   AC_CONFIG_AUX_DIR([build-aux])
58   build_alias=`${srcdir}/build-aux/config.guess`
59   AC_CANONICAL_HOST
60
61 # Establish the appropriate mechanism for invoking 'make' recursively,
62 # WITHOUT incurring the noise of its "Entering directory..." messages.
63 #
64   MINGW_AC_MAKE_NO_PRINT_DIRECTORY
65
66 # We need both C and C++ compilers; check how to invoke them
67 #
68   AC_PROG_CC
69   AC_PROG_CXX
70
71 # We also need a Windows resource compiler,
72 # and a lexical analyser generator
73 #
74   AC_CHECK_TOOL([RC],[windres],[windres])
75   MINGW_AC_PROG_LEX
76
77 # Ensure that (at least the headers for) prerequisite libraries,
78 # zlib, libbz2, liblzma, liblua, and libwtklite are available
79 #
80   AC_CHECK_HEADER([zlib.h],,MINGW_AC_ASSERT_MISSING([zlib-dev],
81     [libz-1.2.3-1-mingw32-dev.tar.gz]))
82   AC_CHECK_HEADER([bzlib.h],,MINGW_AC_ASSERT_MISSING([libbz2-dev],
83     [bzip2-1.0.5-2-mingw32-dev.tar.gz]))
84   AC_CHECK_HEADER([lzma.h],,MINGW_AC_ASSERT_MISSING([liblzma-dev],
85     [liblzma-4.999.9beta_20091209-3-mingw32-dev.tar.bz2]))
86   AC_CHECK_HEADER([lua.h],,MINGW_AC_ASSERT_MISSING([lua-dev],
87     [lua-5.2.0-1-mingw32-dev.tar.xz]))
88   AC_CHECK_HEADER([wtklite.h],,MINGW_AC_ASSERT_MISSING([wtklite-dev],
89     [wtklite-0.1.0-1-mingw32-dev.tar.xz]))
90
91 # Set up the archive librarian, to match our compiler settings
92 #
93   AC_CHECK_TOOL([AR],[ar],[ar])
94   AC_SUBST([ARFLAGS],[${ARFLAGS-rcs}])
95
96 # Identify tools required for product installation
97 #
98   AC_PROG_MKDIR_P
99   AC_PROG_INSTALL
100   AC_PROG_LN_S
101
102 # As for the archive librarian, we need to ensure that the tool
103 # for stripping binaries is compatible with the compiler
104 #
105   AC_CHECK_TOOL([STRIP],[strip],[strip])
106
107 # Identify features to be traced to facilitate debugging; make
108 # it precious, to avoid introducing accidental inconsistencies.
109 #
110   AC_ARG_VAR([DEBUGLEVEL],[tracing flags to facilitate debugging])
111   AC_SUBST([DEBUGLEVEL],[${DEBUGLEVEL-0}])
112
113 # Establish the product version banner, and create a makefile
114 #
115   AC_CONFIG_FILES([Makefile])
116   MINGW_AC_OUTPUT
117 #
118 # $RCSfile$: end of file