OSDN Git Service

Add a custom profile for use by the setup tool.
[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   m4_include([VERSION.m4])
26   AC_INIT([mingw-get],__VERSION__,[http://mingw.org/Reporting_Bugs])
27
28   AC_SUBST([COPYRIGHT_HOLDER],["MinGW.org Project"])
29   AC_SUBST([YEARS_OF_ISSUE],["2009-2013"])
30
31 # Identify the formal release classes for each of the CLI and the GUI
32 # application sub-packages; these may be overriden at configure time,
33 # by specifying a common SNAPSHOT_CLASS definition, (e.g. by running
34 #
35 #   SNAPSHOT_CLASS=pre ./config.status --recheck && ./config.status
36 #
37 # to update the configuration for the "preview" class), when we wish
38 # to build snapshots for distribution between formal releases.
39 #
40   AC_SUBST([CLI_RELEASE_CLASS],[${SNAPSHOT_CLASS-"beta"}])
41   AC_SUBST([GUI_RELEASE_CLASS],[${SNAPSHOT_CLASS-"alpha"}])
42
43 # Override the normal UNIX-centric autoconf default prefix;
44 # substitute the MinGW standard in its place.
45 #
46   AC_PREFIX_DEFAULT([C:/MinGW])
47
48 # We need the canonical representation of the intended host platform
49 # identification triplet, from which to deduce the subsystem designator
50 # in distributed tarball names.  (Note that we explicitly override any
51 # user specified "build_alias", because autoconf gets upset if "host"
52 # is specified without "build", and we need "host" if cross-compiling;
53 # all we need in this case is "host" != "build", and we don't really
54 # care what "build" is, but AC_CANONICAL_HOST gets very upset, when it
55 # calls ${srcdir}/build-aux/config.sub, if the user specifies a short
56 # form which it cannot resolve -- e.g. "--build=linux" will fail).
57 #
58   AC_CONFIG_AUX_DIR([build-aux])
59   build_alias=`${srcdir}/build-aux/config.guess`
60   AC_CANONICAL_HOST
61
62 # Establish the appropriate mechanism for invoking 'make' recursively,
63 # WITHOUT incurring the noise of its "Entering directory..." messages.
64 #
65   MINGW_AC_MAKE_NO_PRINT_DIRECTORY
66
67 # We need both C and C++ compilers; check how to invoke them
68 #
69   AC_PROG_CC
70   AC_PROG_CXX
71
72 # We also need a Windows resource compiler,
73 # and a lexical analyser generator
74 #
75   AC_CHECK_TOOL([RC],[windres],[windres])
76   MINGW_AC_PROG_LEX
77
78 # Ensure that (at least the headers for) prerequisite libraries,
79 # zlib, libbz2, liblzma, liblua, and libwtklite are available
80 #
81   AC_CHECK_HEADER([zlib.h],,MINGW_AC_ASSERT_MISSING([zlib-dev],
82     [libz-1.2.3-1-mingw32-dev.tar.gz]))
83   AC_CHECK_HEADER([bzlib.h],,MINGW_AC_ASSERT_MISSING([libbz2-dev],
84     [bzip2-1.0.5-2-mingw32-dev.tar.gz]))
85   AC_CHECK_HEADER([lzma.h],,MINGW_AC_ASSERT_MISSING([liblzma-dev],
86     [liblzma-4.999.9beta_20091209-3-mingw32-dev.tar.bz2]))
87   AC_CHECK_HEADER([lua.h],,MINGW_AC_ASSERT_MISSING([lua-dev],
88     [lua-5.2.0-1-mingw32-dev.tar.xz]))
89   AC_CHECK_HEADER([wtklite.h],,MINGW_AC_ASSERT_MISSING([wtklite-dev],
90     [wtklite-0.1.0-1-mingw32-dev.tar.xz]))
91
92 # Set up the archive librarian, to match our compiler settings
93 #
94   AC_CHECK_TOOL([AR],[ar],[ar])
95   AC_SUBST([ARFLAGS],[${ARFLAGS-rcs}])
96
97 # Identify tools required for product installation
98 #
99   AC_PROG_MKDIR_P
100   AC_PROG_INSTALL
101   AC_PROG_LN_S
102
103 # As for the archive librarian, we need to ensure that the tool
104 # for stripping binaries is compatible with the compiler
105 #
106   AC_CHECK_TOOL([STRIP],[strip],[strip])
107
108 # Identify features to be traced to facilitate debugging; make
109 # it precious, to avoid introducing accidental inconsistencies.
110 #
111   AC_ARG_VAR([DEBUGLEVEL],[tracing flags to facilitate debugging])
112   AC_SUBST([DEBUGLEVEL],[${DEBUGLEVEL-0}])
113
114 # Establish the product version banner, and create a makefile
115 #
116   AC_CONFIG_FILES([Makefile])
117   MINGW_AC_OUTPUT
118 #
119 # $RCSfile$: end of file