blob: 3a94969f5be77a37eca629f98d776c3eaaa59c8b [file] [log] [blame]
NightStrike748174d2010-02-24 17:55:02 +00001# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.65])
NightStrikeadb344b2010-02-26 14:13:00 +00005AC_INIT([mingw-w64],[1.0b],[mingw-w64-public@lists.sourceforge.net])
NightStrike748174d2010-02-24 17:55:02 +00006AC_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
NightStriked6b2d4b2010-03-04 16:48:56 +000015AC_DEFUN([MW64_OPTION_ERROR],[AC_MSG_ERROR([Invalid argument to --$1: $AS_TR_SH([$1])])])
16
NightStrike748174d2010-02-24 17:55:02 +000017# 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],[],
NightStriked6b2d4b2010-03-04 16:48:56 +000036 [MW64_OPTION_ERROR([with-headers])])
NightStrike748174d2010-02-24 17:55:02 +000037AM_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],[],
NightStriked6b2d4b2010-03-04 16:48:56 +000049 [MW64_OPTION_ERROR([with-crt])])
NightStrike748174d2010-02-24 17:55:02 +000050AM_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 one of libmangle, pseh, or all])],
57 [],
58 [with_libraries=no])
59AS_CASE([$with_libraries],
60 [yes|all],[
61 with_libraries="libmangle,pseh"
62 with_libraries_mangle=yes
63 with_libraries_pseh=yes],
64 [libmangle],[
65 with_libraries="libmangle"
66 with_libraries_mangle=yes
67 with_libraries_pseh=no],
68 [pseh],[
69 with_libraries="pseh"
70 with_libraries_mangle=no
71 with_libraries_pseh=yes],
72 [no],[
73 with_libraries_mangle=no
74 with_libraries_pseh=no],
NightStriked6b2d4b2010-03-04 16:48:56 +000075 [MW64_OPTION_ERROR([with-libraries])])
NightStrike748174d2010-02-24 17:55:02 +000076AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
77AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
78AM_COND_IF([LIBRARIES_MANGLE],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/libmangle])])
79AM_COND_IF([LIBRARIES_PSEH],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/pseh])])
80AC_MSG_RESULT([$with_libraries])
81
82AC_MSG_CHECKING([whether to build the optional tools])
83AC_ARG_WITH([tools],
84 [AS_HELP_STRING([--with-tools=ARG],
NightStrikeadb344b2010-02-26 14:13:00 +000085 [Build the extra mingw-w64 tools, where ARG is one of gendef, genidl, or all])],
NightStrike748174d2010-02-24 17:55:02 +000086 [],
87 [with_tools=no])
88AS_CASE([$with_tools],
89 [yes|all],[
NightStrikeadb344b2010-02-26 14:13:00 +000090 with_tools="gendef,genidl"
91 with_tools_gendef=yes
92 with_tools_genidl=yes],
NightStrike748174d2010-02-24 17:55:02 +000093 [gendef],[
94 with_tools="gendef"
NightStrikeadb344b2010-02-26 14:13:00 +000095 with_tools_gendef=yes
96 with_tools_genidl=no],
97 [genidl],[
98 with_tools="genidl"
99 with_tools_gendef=no
100 with_tools_genidl=yes],
NightStrike748174d2010-02-24 17:55:02 +0000101 [no],[
NightStrikeadb344b2010-02-26 14:13:00 +0000102 with_tools_gendef=no
103 with_tools_genidl=no],
NightStriked6b2d4b2010-03-04 16:48:56 +0000104 [MW64_OPTION_ERROR([with-tools])])
NightStrike748174d2010-02-24 17:55:02 +0000105AM_CONDITIONAL([TOOLS_GENDEF],[test "x$with_tools_gendef" = xyes])
NightStrikeadb344b2010-02-26 14:13:00 +0000106AM_CONDITIONAL([TOOLS_GENIDL],[test "x$with_tools_genidl" = xyes])
NightStrike748174d2010-02-24 17:55:02 +0000107AM_COND_IF([TOOLS_GENDEF],[AC_CONFIG_SUBDIRS([mingw-w64-tools/gendef])])
NightStrikeadb344b2010-02-26 14:13:00 +0000108AM_COND_IF([TOOLS_GENIDL],[AC_CONFIG_SUBDIRS([mingw-w64-tools/genidl])])
NightStrike748174d2010-02-24 17:55:02 +0000109AC_MSG_RESULT([$with_tools])
110
111AC_CONFIG_FILES([Makefile])
112AC_OUTPUT
NightStrikeadb344b2010-02-26 14:13:00 +0000113