2 # Process this file with autoconf to produce a configure script.
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])
11 AM_INIT_AUTOMAKE([foreign])
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])],
33 AS_CASE([$with_headers],
34 [yes],[AC_CONFIG_SUBDIRS([mingw-w64-headers])],
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])
42 [AS_HELP_STRING([--without-crt],
43 [Skip building the mingw-w64 crt])],
47 [yes],[AC_CONFIG_SUBDIRS([mingw-w64-crt])],
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])],
59 AS_CASE([$with_libraries],
61 with_libraries="libmangle,pseh"
62 with_libraries_mangle=yes
63 with_libraries_pseh=yes],
65 with_libraries="libmangle"
66 with_libraries_mangle=yes
67 with_libraries_pseh=no],
70 with_libraries_mangle=no
71 with_libraries_pseh=yes],
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])
84 [AS_HELP_STRING([--with-tools=ARG],
85 [Build the extra mingw-w64 tools, where ARG is one of gendef, genidl, or all])],
88 AS_CASE([$with_tools],
90 with_tools="gendef,genidl"
92 with_tools_genidl=yes],
96 with_tools_genidl=no],
100 with_tools_genidl=yes],
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])