Fix missing ).
[mingw-w64/xnox.git] / configure.ac
blob3a94969f5be77a37eca629f98d776c3eaaa59c8b
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.65])
5 AC_INIT([mingw-w64],[1.0b],[mingw-w64-public@lists.sourceforge.net])
6 AC_CONFIG_AUX_DIR([build-aux])
7 AC_CONFIG_SRCDIR([AUTHORS])
8 AC_CONFIG_HEADERS([config.h])
10 AM_MAINTAINER_MODE
11 AM_INIT_AUTOMAKE([foreign])
13 AC_CANONICAL_HOST
15 AC_DEFUN([MW64_OPTION_ERROR],[AC_MSG_ERROR([Invalid argument to --$1: $AS_TR_SH([$1])])])
17 # Checks for programs.
19 # Checks for libraries.
21 # Checks for header files.
23 # Checks for typedefs, structures, and compiler characteristics.
25 # Checks for library functions.
27 AC_MSG_CHECKING([whether to build the headers])
28 AC_ARG_WITH([headers],
29   [AS_HELP_STRING([--without-headers],
30     [Skip building the mingw-w64 headers])],
31   [],
32   [with_headers=yes])
33 AS_CASE([$with_headers],
34   [yes],[AC_CONFIG_SUBDIRS([mingw-w64-headers])],
35   [no],[],
36   [MW64_OPTION_ERROR([with-headers])])
37 AM_CONDITIONAL([HEADER],[test "x$with_headers" = xyes])
38 AC_MSG_RESULT([$with_headers])
40 AC_MSG_CHECKING([whether to build the crt])
41 AC_ARG_WITH([crt],
42   [AS_HELP_STRING([--without-crt],
43     [Skip building the mingw-w64 crt])],
44   [],
45   [with_crt=yes])
46 AS_CASE([$with_crt],
47   [yes],[AC_CONFIG_SUBDIRS([mingw-w64-crt])],
48   [no],[],
49   [MW64_OPTION_ERROR([with-crt])])
50 AM_CONDITIONAL([CRT],[test "x$with_crt" = xyes])
51 AC_MSG_RESULT([$with_crt])
53 AC_MSG_CHECKING([whether to build the optional libraries])
54 AC_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])
59 AS_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],
75   [MW64_OPTION_ERROR([with-libraries])])
76 AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
77 AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
78 AM_COND_IF([LIBRARIES_MANGLE],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/libmangle])])
79 AM_COND_IF([LIBRARIES_PSEH],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/pseh])])
80 AC_MSG_RESULT([$with_libraries])
82 AC_MSG_CHECKING([whether to build the optional tools])
83 AC_ARG_WITH([tools],
84   [AS_HELP_STRING([--with-tools=ARG],
85     [Build the extra mingw-w64 tools, where ARG is one of gendef, genidl, or all])],
86   [],
87   [with_tools=no])
88 AS_CASE([$with_tools],
89   [yes|all],[
90     with_tools="gendef,genidl"
91     with_tools_gendef=yes
92     with_tools_genidl=yes],
93   [gendef],[
94     with_tools="gendef"
95     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],
101   [no],[
102     with_tools_gendef=no
103     with_tools_genidl=no],
104   [MW64_OPTION_ERROR([with-tools])])
105 AM_CONDITIONAL([TOOLS_GENDEF],[test "x$with_tools_gendef" = xyes])
106 AM_CONDITIONAL([TOOLS_GENIDL],[test "x$with_tools_genidl" = xyes])
107 AM_COND_IF([TOOLS_GENDEF],[AC_CONFIG_SUBDIRS([mingw-w64-tools/gendef])])
108 AM_COND_IF([TOOLS_GENIDL],[AC_CONFIG_SUBDIRS([mingw-w64-tools/genidl])])
109 AC_MSG_RESULT([$with_tools])
111 AC_CONFIG_FILES([Makefile])
112 AC_OUTPUT