Welcome to mirror list, hosted at ThFree Co, Russian Federation.

configure.ac « w32api « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e16a2ffbaf72e1582314d3fd54d3d6f4d94f154a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Process this file with autoconf to produce a configure script.
#
# This file is part of a free win32 library
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

AC_PREREQ([2.59])
#
# Extract current release version from include/w32api.h
# at autoconf time...
#
m4_define([__ver__],dnl
m4_esyscmd([awk '$2=="__W32API_VERSION"{printf "%s","v"$3}' include/w32api.h]))
#
# ...and confirm it at configure time.
#
AC_DEFUN([MINGW_AC_CONFIG_SRCDIR],
[AC_CONFIG_SRCDIR([$2])
 AC_MSG_CHECKING([package version])
 PACKAGE_VERSION=`awk '$[2] == "'"$1"'" { print $[3] }' ${srcdir}/$2`
 AC_MSG_RESULT([$PACKAGE_VERSION])dnl
])# MINGW_AC_CONFIG_SRCDIR

AC_INIT([MS-Windows API],[__ver__],[http://mingw.org/reporting_bugs],[w32api])
MINGW_AC_CONFIG_SRCDIR([__W32API_VERSION],[include/w32api.h])

AC_ARG_VAR([RELEASE],[release serial number for current package version])
AC_SUBST([PACKAGE_RELEASE],[${RELEASE-"1"}])

AC_CANONICAL_SYSTEM

# Identify commands which are to be used for installation.
#
AC_PROG_MKDIR_P
AC_PROG_INSTALL

# Check for CC and CFLAGS
# FIXME: why do we not just use AC_PROG_CC here?  AC_CHECK_TOOL
# may be better, in this instance, because it avoids the check for
# ability to create executables, (which we don't actually need).  It
# does also cost us a few other checks, such as identification of the
# proper object file extension, OBJEXT, but that may be a price which
# is justifiable, since we may need to run this in a partially built
# compiler environment, before the compiler is capable of creating
# executables; since we don't actually need that capability, the
# check for it, in AC_PROG_CC, could hurt.
#
AC_CHECK_TOOL([CC], [gcc], [gcc])
AC_SUBST([CFLAGS], [${CFLAGS-"-O2 -g"}])

# FIXME: What is the purpose of this? I think it should go away.
#
AC_SUBST([with_cross_host])

# Check for various tools
#
AC_CHECK_TOOL([AS],      [as],      [as])
AC_CHECK_TOOL([AR],      [ar],      [ar])
AC_CHECK_TOOL([RANLIB],  [ranlib],  [ranlib])
AC_CHECK_TOOL([DLLTOOL], [dlltool], [dlltool])
AC_CHECK_TOOL([WINDRES], [windres], [windres])
AC_CHECK_TOOL([LD],      [ld],      [ld])


AC_MSG_CHECKING([for build environment])
case "$build_alias" in
*-mingw*) BUILDENV=mingw;;
*-cygwin*) BUILDENV=cygwin;;
esac
if test -z "$BUILDENV"; then
        AC_MSG_RESULT([standard])
else
        AC_MSG_RESULT([$BUILDENV])
fi
AC_SUBST([BUILDENV])

AC_CONFIG_FILES([Makefile Makefile.comm])
AC_CONFIG_FILES([lib/Makefile lib/ddk/Makefile lib/directx/Makefile])
AC_OUTPUT

# configure.ac: end of file