2010-02-25 01:55:02 +08:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.65])
|
2014-01-25 11:09:24 +08:00
|
|
|
AC_INIT([mingw-w64],[4.0b],[mingw-w64-public@lists.sourceforge.net])
|
2010-02-25 01:55:02 +08:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
AC_CONFIG_SRCDIR([AUTHORS])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2010-03-05 00:48:56 +08:00
|
|
|
AC_DEFUN([MW64_OPTION_ERROR],[AC_MSG_ERROR([Invalid argument to --$1: $AS_TR_SH([$1])])])
|
|
|
|
|
2010-02-25 01:55:02 +08:00
|
|
|
# Checks for programs.
|
|
|
|
|
|
|
|
# Checks for libraries.
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build the headers])
|
|
|
|
AC_ARG_WITH([headers],
|
|
|
|
[AS_HELP_STRING([--without-headers],
|
|
|
|
[Skip building the mingw-w64 headers])],
|
|
|
|
[],
|
|
|
|
[with_headers=yes])
|
|
|
|
AS_CASE([$with_headers],
|
|
|
|
[yes],[AC_CONFIG_SUBDIRS([mingw-w64-headers])],
|
|
|
|
[no],[],
|
2010-03-05 00:48:56 +08:00
|
|
|
[MW64_OPTION_ERROR([with-headers])])
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_CONDITIONAL([HEADER],[test "x$with_headers" = xyes])
|
|
|
|
AC_MSG_RESULT([$with_headers])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build the crt])
|
|
|
|
AC_ARG_WITH([crt],
|
|
|
|
[AS_HELP_STRING([--without-crt],
|
|
|
|
[Skip building the mingw-w64 crt])],
|
|
|
|
[],
|
|
|
|
[with_crt=yes])
|
|
|
|
AS_CASE([$with_crt],
|
|
|
|
[yes],[AC_CONFIG_SUBDIRS([mingw-w64-crt])],
|
|
|
|
[no],[],
|
2010-03-05 00:48:56 +08:00
|
|
|
[MW64_OPTION_ERROR([with-crt])])
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_CONDITIONAL([CRT],[test "x$with_crt" = xyes])
|
|
|
|
AC_MSG_RESULT([$with_crt])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build the optional libraries])
|
|
|
|
AC_ARG_WITH([libraries],
|
|
|
|
[AS_HELP_STRING([--with-libraries=ARG],
|
2017-11-05 05:02:30 +08:00
|
|
|
[Build the extra mingw-w64 libs, where ARG is comma separated list of libmangle, pseh, winpthreads, or all])],
|
2010-02-25 01:55:02 +08:00
|
|
|
[],
|
|
|
|
[with_libraries=no])
|
2017-11-05 05:02:30 +08:00
|
|
|
libraries="winpthreads mangle"
|
|
|
|
AS_CASE([$host_cpu],
|
|
|
|
[i?86], [
|
|
|
|
libraries="$libraries pseh"
|
|
|
|
])
|
|
|
|
for l in $libraries; do
|
|
|
|
res=`echo "$with_libraries" | grep $l > /dev/null && echo yes || echo no`
|
|
|
|
AS_CASE([$with_libraries],
|
|
|
|
[all|yes],[res=yes])
|
|
|
|
AS_VAR_COPY([with_libraries_$l], [res])
|
|
|
|
done
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
|
|
|
|
AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
|
2015-05-05 01:39:52 +08:00
|
|
|
AM_CONDITIONAL([LIBRARIES_WINPTHREADS],[test "x$with_libraries_winpthreads" = xyes])
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_COND_IF([LIBRARIES_MANGLE],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/libmangle])])
|
|
|
|
AM_COND_IF([LIBRARIES_PSEH],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/pseh])])
|
2015-05-05 01:39:52 +08:00
|
|
|
AM_COND_IF([LIBRARIES_WINPTHREADS],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/winpthreads])])
|
2010-02-25 01:55:02 +08:00
|
|
|
AC_MSG_RESULT([$with_libraries])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build the optional tools])
|
|
|
|
AC_ARG_WITH([tools],
|
|
|
|
[AS_HELP_STRING([--with-tools=ARG],
|
2017-11-05 05:02:30 +08:00
|
|
|
[Build the extra mingw-w64 tools, where ARG is comma separated list of gendef, genidl, or all])],
|
2010-02-25 01:55:02 +08:00
|
|
|
[],
|
|
|
|
[with_tools=no])
|
2017-11-05 05:02:30 +08:00
|
|
|
for t in gendef genidl; do
|
|
|
|
res=`echo "${with_tools}" | grep $t > /dev/null && echo yes || echo no`
|
|
|
|
AS_CASE([$with_tools],
|
|
|
|
[all|yes],[res=yes])
|
|
|
|
AS_VAR_COPY([with_tools_$t], [res])
|
|
|
|
done
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_CONDITIONAL([TOOLS_GENDEF],[test "x$with_tools_gendef" = xyes])
|
2010-02-26 22:13:00 +08:00
|
|
|
AM_CONDITIONAL([TOOLS_GENIDL],[test "x$with_tools_genidl" = xyes])
|
2010-02-25 01:55:02 +08:00
|
|
|
AM_COND_IF([TOOLS_GENDEF],[AC_CONFIG_SUBDIRS([mingw-w64-tools/gendef])])
|
2010-02-26 22:13:00 +08:00
|
|
|
AM_COND_IF([TOOLS_GENIDL],[AC_CONFIG_SUBDIRS([mingw-w64-tools/genidl])])
|
2010-02-25 01:55:02 +08:00
|
|
|
AC_MSG_RESULT([$with_tools])
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_OUTPUT
|
2010-02-26 22:13:00 +08:00
|
|
|
|