1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4AC_PREREQ([2.69]) 5AC_INIT([mingw-w64-headers],[4.0b],[mingw-w64-public@lists.sourceforge.net]) 6AC_CONFIG_SRCDIR([crt/_mingw.h.in]) 7AC_CONFIG_AUX_DIR([build-aux]) 8AC_CONFIG_HEADERS([config.h]) 9 10AM_INIT_AUTOMAKE([foreign]) 11AM_MAINTAINER_MODE 12 13AC_CANONICAL_HOST 14 15# Checks for programs. 16AC_PROG_SED 17 18# Search for a usable widl. If PATH is given, search there. Otherwise, search 19# in $PATH. In all cases, search for a canonicalized name first ($host-widl), 20# followed by a non-canonicalized name (widl). If these fail, error out. 21# NB: $host from this perspective is the same as $target while building widl. 22AC_MSG_CHECKING([whether to rebuild headers with widl]) 23AC_ARG_WITH([widl], 24 AS_HELP_STRING([--with-widl=PATH], 25 [use widl to update idl-based headers. Optionally search for a compatible widl in PATH]), 26 [AS_VAR_IF([with_widl],[yes],[AS_VAR_SET([with_widl],["$PATH"])])], 27 [AS_VAR_SET([with_widl],[no])]) 28AC_MSG_RESULT([$with_widl]) 29 30AS_VAR_IF([with_widl],[no],[],[ 31 AS_VAR_IF([srcdir],[.],[], 32 [AC_MSG_WARN([--with-widl used in out of the tree compilation. Existing generated files will not be modified.])]) 33 AC_PATH_PROGS([WIDL], [$host-widl widl], [], [$with_widl]) 34 AS_VAR_IF([WIDL],[],[AC_MSG_ERROR([--with-widl is specified, but widl installation could not be found.])])]) 35 36AM_CONDITIONAL([HAVE_WIDL],[AS_VAR_TEST_SET([WIDL])]) 37 38# Checks for libraries. 39 40# Checks for header files. 41 42BASEHEAD_LIST="crt/_bsd_types.h crt/_cygwin.h crt/_mingw.h crt/_mingw_mac.h crt/_mingw_secapi.h crt/_mingw_unicode.h crt/_timeval.h crt/crtdefs.h crt/corecrt.h crt/excpt.h crt/intrin.h crt/vadefs.h crt/tchar.h "$srcdir/include/*.h 43SECHEAD_LIST="$srcdir/crt/sec_api/stralign_s.h" 44for i in c dlg h16 hxx rh ver; do 45 BASEHEAD_LIST="$BASEHEAD_LIST "$srcdir/include/*.$i 46done 47#FIXME: Add in base directx 48 49AC_MSG_CHECKING([whether to build a w32api package for Cygwin]) 50AC_ARG_ENABLE([w32api], 51 [AS_HELP_STRING([--enable-w32api], 52 [Enable building a w32api package for Cygwin (shorthand for --includedir=PREFIX/include/w32api --disable-crt)])], 53 [], 54 [AS_VAR_SET([enable_w32api],[no])]) 55AC_MSG_RESULT([$enable_w32api]) 56AS_CASE([$enable_w32api], 57 [no],[], 58 [yes],[AS_VAR_SET([W32API]) 59 AS_VAR_SET([enable_crt],[no]) 60 AS_VAR_SET([includedir],[${prefix}/include/w32api])], 61 [AC_MSG_ERROR([invalid argument. Must be either yes or no.])]) 62AM_CONDITIONAL([W32API], [AS_VAR_TEST_SET([W32API])]) 63 64AC_MSG_CHECKING([for c-runtime headers]) 65AC_ARG_ENABLE([crt], 66 [AS_HELP_STRING([--disable-crt], 67 [Do not use the default crt headers])], 68 [], 69 [enable_crt=yes]) 70AM_CONDITIONAL([ENABLE_CRT],[test x$enable_crt=xyes]) 71AC_MSG_RESULT([$enable_crt]) 72AS_VAR_IF([enable_crt],[yes],[ 73 BASEHEAD_LIST="$BASEHEAD_LIST "$srcdir/crt/*.h" "$srcdir/crt/*.inl 74 SYSHEAD_LIST=$srcdir/crt/sys/*.h 75 SECHEAD_LIST=$srcdir/crt/sec_api/*.h 76 SECSYSHEAD_LIST=$srcdir/crt/sec_api/sys/*.h 77]) 78GDIPLUSHEAD_LIST=$srcdir/include/gdiplus/*.h 79WRLHEAD_LIST=$srcdir/include/wrl/*.h 80WRLWRAPPERSHEAD_LIST=$srcdir/include/wrl/wrappers/*.h 81GLHEAD_LIST=$srcdir/include/GL/*.h 82KHRHEAD_LIST=$srcdir/include/KHR/*.h 83MINGWHELPERHEAD_LIST=$srcdir/include/psdk_inc/*.h 84AC_SUBST([BASEHEAD_LIST]) 85AC_SUBST([GDIPLUSHEAD_LIST]) 86AC_SUBST([WRLHEAD_LIST]) 87AC_SUBST([WRLWRAPPERSHEAD_LIST]) 88AC_SUBST([GLHEAD_LIST]) 89AC_SUBST([KHRHEAD_LIST]) 90AC_SUBST([MINGWHELPERHEAD_LIST]) 91AC_SUBST([SYSHEAD_LIST]) 92AC_SUBST([SECHEAD_LIST]) 93AC_SUBST([SECSYSHEAD_LIST]) 94 95AC_MSG_CHECKING([for optional sdk headers]) 96AC_ARG_ENABLE([sdk], 97 [AS_HELP_STRING([--enable-sdk=ARG], 98 [Add the desired SDK, where ARG can be one of ddk, directx, no or all. Default is all.])], 99 [], 100 [AS_VAR_SET([enable_sdk],[all])]) 101 102AS_CASE([$enable_sdk], 103 [all|yes],[ 104 AS_VAR_SET([enable_sdk],[ddk,directx]) 105 AS_VAR_SET([enable_ddk],[yes]) 106 AS_VAR_SET([enable_directx],[yes])], 107 [ddk],[ 108 AS_VAR_SET([enable_ddk],[yes])], 109 [directx],[ 110 AS_VAR_SET([enable_directx],[yes])], 111 [no],[], 112 [AC_MSG_ERROR([Invalid option: $enable_sdk. Please choose one of ddk, directx, no or all.])]) 113AC_MSG_RESULT([$enable_sdk]) 114 115AS_VAR_IF([enable_directx],[yes],[ 116 DXHEAD_LIST=$srcdir/direct-x/include/*.[[hi]]* 117 MINGW_HAS_DX=1 118 ],[ 119 MINGW_HAS_DX=0 120 ]) 121AC_SUBST([DXHEAD_LIST]) 122AC_SUBST([MINGW_HAS_DX]) 123 124AS_VAR_IF([enable_ddk],[yes],[ 125 DDKHEAD_LIST=$srcdir/ddk/include/ddk/*.h 126 MINGW_HAS_DDK=1 127 ],[ 128 MINGW_HAS_DDK=0 129 ]) 130AC_SUBST([DDKHEAD_LIST]) 131AC_SUBST([MINGW_HAS_DDK]) 132 133AC_MSG_CHECKING([if installing idl files is enabled]) 134AC_ARG_ENABLE([idl], 135 [AS_HELP_STRING([--enable-idl], 136 [Enable installing idl files])], 137 [], 138 [enable_idl=no]) 139AC_MSG_RESULT([$enable_idl]) 140AS_VAR_IF([enable_idl],[yes], 141 [IDLHEAD_LIST=$srcdir/include/*.idl" "$srcdir/tlb/*.tlb], 142 [IDLHEAD_LIST=""]) 143AC_SUBST([IDLHEAD_LIST]) 144 145AC_MSG_CHECKING([default _WIN32_WINNT version]) 146AC_ARG_WITH([default-win32-winnt], 147 [AS_HELP_STRING([--with-default-win32-winnt=VER], 148 [Default value of _WIN32_WINNT (default: 0x502)])], 149 [], 150 [with_default_win32_winnt=0x502]) 151AC_MSG_RESULT([$with_default_win32_winnt]) 152AS_VAR_SET([DEFAULT_WIN32_WINNT],[$with_default_win32_winnt]) 153AC_SUBST([DEFAULT_WIN32_WINNT]) 154 155AC_MSG_CHECKING([default msvcrt]) 156AC_ARG_WITH([default-msvcrt], 157 [AS_HELP_STRING([--with-default-msvcrt=LIB], 158 [Default msvcrt to target (default: msvcrt)])], 159 [], 160 [with_default_msvcrt=msvcrt]) 161case $with_default_msvcrt in 162msvcr80*) 163 default_msvcrt_version=0x800 164 ;; 165msvcr90*) 166 default_msvcrt_version=0x900 167 ;; 168msvcr100*) 169 default_msvcrt_version=0xA00 170 ;; 171msvcr110*) 172 default_msvcrt_version=0xB00 173 ;; 174msvcr120*) 175 default_msvcrt_version=0xC00 176 ;; 177ucrt*) 178 default_msvcrt_version=0xE00 179 ;; 180msvcrt|*) 181 default_msvcrt_version=0x700 182 ;; 183esac 184AC_MSG_RESULT([$with_default_msvcrt ($default_msvcrt_version)]) 185AS_VAR_SET([DEFAULT_MSVCRT_VERSION],[$default_msvcrt_version]) 186AC_SUBST([DEFAULT_MSVCRT_VERSION]) 187 188# Checks for typedefs, structures, and compiler characteristics. 189 190# Checks for library functions. 191 192AC_CONFIG_FILES([ 193 Makefile 194 crt/_mingw.h 195]) 196AC_OUTPUT 197 198