• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.65])
5AC_INIT([mingw-w64],[4.0b],[mingw-w64-public@lists.sourceforge.net])
6AC_CONFIG_AUX_DIR([build-aux])
7AC_CONFIG_SRCDIR([AUTHORS])
8AC_CONFIG_HEADERS([config.h])
9
10AM_MAINTAINER_MODE
11AM_INIT_AUTOMAKE([foreign])
12
13AC_CANONICAL_HOST
14
15AC_DEFUN([MW64_OPTION_ERROR],[AC_MSG_ERROR([Invalid argument to --$1: $AS_TR_SH([$1])])])
16
17# Checks for programs.
18
19# Checks for libraries.
20
21# Checks for header files.
22
23# Checks for typedefs, structures, and compiler characteristics.
24
25# Checks for library functions.
26
27AC_MSG_CHECKING([whether to build the headers])
28AC_ARG_WITH([headers],
29  [AS_HELP_STRING([--without-headers],
30    [Skip building the mingw-w64 headers])],
31  [],
32  [with_headers=yes])
33AS_CASE([$with_headers],
34  [yes],[AC_CONFIG_SUBDIRS([mingw-w64-headers])],
35  [no],[],
36  [MW64_OPTION_ERROR([with-headers])])
37AM_CONDITIONAL([HEADER],[test "x$with_headers" = xyes])
38AC_MSG_RESULT([$with_headers])
39
40AC_MSG_CHECKING([whether to build the crt])
41AC_ARG_WITH([crt],
42  [AS_HELP_STRING([--without-crt],
43    [Skip building the mingw-w64 crt])],
44  [],
45  [with_crt=yes])
46AS_CASE([$with_crt],
47  [yes],[AC_CONFIG_SUBDIRS([mingw-w64-crt])],
48  [no],[],
49  [MW64_OPTION_ERROR([with-crt])])
50AM_CONDITIONAL([CRT],[test "x$with_crt" = xyes])
51AC_MSG_RESULT([$with_crt])
52
53AC_MSG_CHECKING([whether to build the optional libraries])
54AC_ARG_WITH([libraries],
55  [AS_HELP_STRING([--with-libraries=ARG],
56    [Build the extra mingw-w64 libs, where ARG is comma separated list of libmangle, pseh, winpthreads, or all])],
57  [],
58  [with_libraries=no])
59libraries="winpthreads mangle"
60AS_CASE([$host_cpu],
61  [i?86], [
62    libraries="$libraries pseh"
63  ])
64for l in $libraries; do
65  res=`echo "$with_libraries" | grep $l > /dev/null && echo yes || echo no`
66  AS_CASE([$with_libraries],
67    [all|yes],[res=yes])
68    AS_VAR_COPY([with_libraries_$l], [res])
69done
70AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
71AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
72AM_CONDITIONAL([LIBRARIES_WINPTHREADS],[test "x$with_libraries_winpthreads" = xyes])
73AM_COND_IF([LIBRARIES_MANGLE],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/libmangle])])
74AM_COND_IF([LIBRARIES_PSEH],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/pseh])])
75AM_COND_IF([LIBRARIES_WINPTHREADS],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/winpthreads])])
76AC_MSG_RESULT([$with_libraries])
77
78AC_MSG_CHECKING([whether to build the optional tools])
79AC_ARG_WITH([tools],
80  [AS_HELP_STRING([--with-tools=ARG],
81    [Build the extra mingw-w64 tools, where ARG is comma separated list of gendef, genidl, or all])],
82  [],
83  [with_tools=no])
84for t in gendef genidl; do
85  res=`echo "${with_tools}" | grep $t > /dev/null && echo yes || echo no`
86  AS_CASE([$with_tools],
87    [all|yes],[res=yes])
88    AS_VAR_COPY([with_tools_$t], [res])
89done
90AM_CONDITIONAL([TOOLS_GENDEF],[test "x$with_tools_gendef" = xyes])
91AM_CONDITIONAL([TOOLS_GENIDL],[test "x$with_tools_genidl" = xyes])
92AM_COND_IF([TOOLS_GENDEF],[AC_CONFIG_SUBDIRS([mingw-w64-tools/gendef])])
93AM_COND_IF([TOOLS_GENIDL],[AC_CONFIG_SUBDIRS([mingw-w64-tools/genidl])])
94AC_MSG_RESULT([$with_tools])
95
96AC_CONFIG_FILES([Makefile])
97AC_OUTPUT
98
99