OSDN Git Service

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