+2015-07-16 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Overhaul and streamline build system configuration.
+
+ * configure.in: Delete obsolete file; replace with...
+ * configure.ac: New file; rewritten per current autoconf conventions.
+
+ * Makefile.in: Rewritten; adapted from current mingwrt configuration,
+ it now processes the entire build without using separate sub-makes.
+
+ * lib/Makefile.in: Sub-make configuration not required now; delete it.
+ * lib/ddk/Makefile.in lib/directx/Makefile.in: Likewise; delete them.
+
2015-07-14 Keith Marshall <keithmarshall@users.sourceforge.net>
Remove unused aclocal.m4 configuration file.
--- /dev/null
+# @configure_input@
+# $Id$
+#
+# Makefile template for MinGW.org MS-Windows API Package
+
+PACKAGE_TARNAME := @PACKAGE_TARNAME@
+PACKAGE_VERSION := @PACKAGE_VERSION@
+
+# Written by Keith Marshall <keithmarshall@users.sourceforge.net>
+# Copyright (C) 2014, 2015, MinGW.org Project
+#
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+
+# The default target is "all"; declare it early, to avoid any possible
+# inadvertent override from any included file.
+#
+all:
+PACKAGE_RELEASE :=
+PACKAGE_RELEASE_TAG := $(PACKAGE_VERSION)$(PACKAGE_RELEASE:%=-%)-mingw32
+
+# Establish the minimum version of Windows which this build is required
+# to support; note that we fix the default as WinNT4, but we define it in
+# a manner which will allow a command line override, and may be adapted,
+# ultimately, to support a configure time assignment.
+#
+NTDDI_VERSION := NTDDI_WINNT4
+NTDDI_VERSION_SPEC := $(NTDDI_VERSION:%=-D NTDDI_VERSION=%)
+
+# Build paths and macros.
+#
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+mingwrt_srcdir = @mingwrt_srcdir@
+w32api_srcdir = @srcdir@
+abs_builddir = @abs_builddir@
+
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+AS = @AS@
+
+OBJEXT = @OBJEXT@
+
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RANLIB = @RANLIB@
+
+DLLTOOL = @DLLTOOL@
+STRIP = @STRIP@
+
+# Installation paths and macros.
+#
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+includedir = ${DESTDIR}@includedir@
+libdir = ${DESTDIR}@libdir@
+
+mkinstalldirs = @MKDIR_P@ $(addprefix $1,$2)
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@ $1 $2
+
+# Keep the configuration in a consistent state. Note that we assume
+# that configure has been run initially, (otherwise we wouldn't have
+# a Makefile to begin with); since this also creates config.status,
+# we may normally assume that it is already available ...
+#
+vpath configure ${top_srcdir}
+config.status: configure
+ $(SHELL) config.status --recheck
+
+# ... in which case, updating Makefile should be a simple matter of
+# running config.status ...
+#
+vpath Makefile.in ${top_srcdir}
+requires_existing = $(if $(wildcard $1),$1,$1.missing)
+Makefile: Makefile.in configure $(call requires_existing,config.status)
+ $(SHELL) config.status
+
+.PHONY: config.status.missing
+# ... but, in the event that this may be missing, (e.g. because it
+# has been manually removed, or removed by "make distclean"), suggest
+# running configure, and bail out.
+#
+config.status.missing:
+ $(warning *** cannot execute config.status)
+ $(error please run ${top_srcdir}/configure to regenerate it.)
+
+# If configure itself needs to be updated, we must run autoconf in the
+# top level source directory.
+#
+vpath %.m4 ${top_srcdir}
+vpath configure.ac ${top_srcdir}
+configure: configure.ac aclocal.m4
+ cd ${top_srcdir}; autoconf
+
+# Capture dependencies conveyed within source files, ensuring that
+# header files are taken from our working source tree, and not from
+# the build-time compiler's installation path. (Note: we use -MD,
+# and not -MMD in DEPFLAGS; since this package furnishes system
+# headers, we need changes therein to trigger a rebuild).
+#
+sinclude *.d
+DEPFLAGS = -MD -MP
+INCLUDES = -nostdinc -I . -I ${top_srcdir}/include -I ${mingwrt_srcdir}/include \
+ -I ${top_srcdir} -I ${top_srcdir}/profile -iwithprefixbefore include
+
+ALL_CFLAGS = $(CFLAGS) $(DEPFLAGS) $(INCLUDES) $(NTDDI_VERSION_SPEC)
+
+# The general case, for compiling object files from C source,
+# requires a small adjustment to the default implicit rule.
+#
+%.$(OBJEXT): %.c
+ $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
+deffiles = $(eval vpath %.def $1)$(notdir $(wildcard $1/*.def))
+implibfiles = $(addprefix lib,$(subst .def,.a,$(call deffiles,$1)))
+
+all: all-w32api-libs
+all-w32api-libs install-w32api-libs: $(call implibfiles,${srcdir}/lib)
+all-w32api-libs install-w32api-libs: $(call implibfiles,${srcdir}/lib/directx)
+all-w32api-libs install-w32api-libs: $(call implibfiles,${srcdir}/lib/ddk)
+all-w32api-libs install-w32api-libs: liblargeint.a libstrmiids.a libuuid.a
+all-w32api-libs install-w32api-libs: libdxerr8.a libdxerr9.a libdxguid.a
+all-w32api-libs install-w32api-libs: libscrnsave.a libscrnsavw.a
+all-w32api-libs install-w32api-libs: libdmoguids.a libvfw32.a
+
+lib%.a: %.def
+ $(DLLTOOL) --as=$(AS) -k --output-lib $@ --def $<
+ $(if $(filter-out $<,$^),$(AR) $(ARFLAGS) $@ $(filter-out $<,$^))
+
+vpath %.c ${srcdir}/lib
+libuuid.a: ativscp-uuid.$(OBJEXT) cguid-uuid.$(OBJEXT)
+libuuid.a: comcat-uuid.$(OBJEXT) devguid.$(OBJEXT) docobj-uuid.$(OBJEXT)
+libuuid.a: exdisp-uuid.$(OBJEXT) extras-uuid.$(OBJEXT) hlguids-uuid.$(OBJEXT)
+libuuid.a: hlink-uuid.$(OBJEXT) mlang-uuid.$(OBJEXT) mshtml-uuid.$(OBJEXT)
+libuuid.a: msxml-uuid.$(OBJEXT) oaidl-uuid.$(OBJEXT) objidl-uuid.$(OBJEXT)
+libuuid.a: objsafe-uuid.$(OBJEXT) ocidl-uuid.$(OBJEXT) oleacc-uuid.$(OBJEXT)
+libuuid.a: olectlid-uuid.$(OBJEXT) oleidl-uuid.$(OBJEXT) power-uuid.$(OBJEXT)
+libuuid.a: servprov-uuid.$(OBJEXT) unknwn-uuid.$(OBJEXT) urlmon-uuid.$(OBJEXT)
+
+scrnsavw.$(OBJEXT): scrnsave.c
+ $(CC) -c -D UNICODE $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) $(INCLUDES) -o $@ $^
+
+libshell32.a: shell32.$(OBJEXT)
+libgdiplus.a: gdiplus.$(OBJEXT)
+libws2_32.a: ws2_32.$(OBJEXT)
+
+libdmoguids.a libdxguid.a \
+liblargeint.a libscrnsave.a libscrnsavw.a libstrmiids.a: lib%.a: %.$(OBJEXT)
+ $(AR) $(ARFLAGS) $@ $<
+
+libuuid.a libdxerr8.a libdxerr9.a:
+ $(AR) $(ARFLAGS) $@ $^
+
+vpath %.mri ${srcdir}/lib
+libvfw32.a: lib%.a: %.mri libmsvfw32.a libavifil32.a libavicap32.a
+ rm -f $@ && $(AR) -M < $< && $(RANLIB) $@
+
+vpath %.c ${srcdir}/lib/directx
+libdinput.a libdinput8.a: dinput_joy.$(OBJEXT) dinput_joy2.$(OBJEXT) \
+ dinput_kbd.$(OBJEXT) dinput_mouse.$(OBJEXT) dinput_mouse2.$(OBJEXT)
+
+libdxerr8.a: dxerr8.$(OBJEXT) dxerr8w.$(OBJEXT)
+libdxerr9.a: dxerr9.$(OBJEXT) dxerr9w.$(OBJEXT)
+
+# Installation Rules
+# ------------------
+#
+# Users may expect to be able to specify DESTDIR, to stage the
+# following stock installation directories outside of the regular
+# "as configured" installation tree; unfortunately, this expectation
+# MUST fail, when the stock path is in MS-Windows absolute format, so
+# we provide an exception mechanism to forbid such usage, and we
+# proceed to create the directories only when the exception is
+# NOT triggered.
+#
+.PHONY: DESTDIR-UNSUPPORTED
+bindir docdir includedir libdir mandir htmldir pdfdir:
+ @test -z "$(strip ${DESTDIR})" || case $($@) in ${DESTDIR}?:*) \
+ $(MAKE) --no-print-directory reject=$@ DESTDIR-UNSUPPORTED;; \
+ esac
+ $(call mkinstalldirs,,$($@))
+
+# Note: we MUST use a recursive make invocation here, as the
+# "error" function within the accompanying diagnostics would be
+# triggered, irrespective of its placement in an unexecuted
+# branch of the above exception trapping shell code.
+#
+DESTDIR-UNSUPPORTED:
+ $(call MSG_DESTDIR_FORBIDDEN,$(reject),$($(reject):${DESTDIR}%=%))
+
+# The following macros, which rely heavily on GNU make's "call"
+# function, define the diagnostics to be emitted, when the DESTDIR
+# exception is triggered.
+#
+QUOTE = `$1'#'`
+MSG_DESTDIR_FORBIDDEN = \
+ $(warning *** $(call MSG_DESTDIR_PATH_CONFLICT,$1,Win32,$2);) \
+ $(error try $(call QUOTE,$(call MSG_DESTDIR_ALTERNATIVE,$1,$2)) instead)
+MSG_DESTDIR_BAD_PATH = DESTDIR is not supported when $1 contains $2 path $3
+MSG_DESTDIR_PATH_CONFLICT = $(call MSG_DESTDIR_BAD_PATH,$1,$2,$(call QUOTE,$3))
+MSG_DESTDIR_ALTERNATIVE = make install $1="$(call MSG_DESTDIR_TRANSFORM,$2)"
+MSG_DESTDIR_TRANSFORM = ${DESTDIR}$(shell echo $1 | sed 's/^.://')
+
+install: install-w32api
+install-strip: install-strip-w32api
+
+installdirs: w32api-include-dirs w32api-lib-dirs
+install-strip-w32api: install-w32api-headers install-strip-w32api-libs
+install-w32api: install-w32api-headers install-w32api-libs
+
+w32api_extra_include_dirs = directx
+w32api_include_subdirs = GL ddk gdiplus
+
+w32api-include-dirs: includedir
+ $(call mkinstalldirs,${includedir}/,$(w32api_include_subdirs))
+
+w32api-lib-dirs: libdir
+
+install-w32api-headers: w32api-include-dirs
+ $(call INSTALL_DATA,${srcdir}/include/*.h,${includedir})
+ for dir in $(w32api_extra_include_dirs); do \
+ $(call INSTALL_DATA,${srcdir}/include/$$dir/*.h,${includedir}); \
+ done
+ for dir in $(w32api_include_subdirs); do \
+ $(call INSTALL_DATA,${srcdir}/include/$$dir/*.h,${includedir}/$$dir); \
+ done
+
+w32api-lib-reqs: all-w32api-libs w32api-lib-dirs
+
+install-w32api-libs: w32api-lib-reqs
+ $(call INSTALL_DATA,$(filter-out w32api-lib-reqs,$^),${libdir})
+ $(if $(STRIP_LIBS),$(call STRIP_LIBS,$(filter-out w32api-lib-reqs,$^)))
+
+install-strip-w32api-libs:
+ $(MAKE) --no-print-directory $(MAKEFLAGS) \
+ STRIP_LIBS='cd ${libdir}; $(STRIP) --strip-unneeded $$1' \
+ install-w32api-libs
+
+uninstall: uninstall-w32api-headers uninstall-w32api-libs
+
+uninstall-w32api-headers:
+ cd ${includedir} && rm -f $(notdir $(wildcard ${srcdir}/include/*.h))
+ for dir in $(w32api_extra_include_dirs); do \
+ files=`cd ${srcdir}/include/$$dir && echo *.h`; \
+ (cd ${includedir} && rm -f $$files); \
+ done
+ for dir in $(w32api_include_subdirs); do \
+ files=`cd ${srcdir}/include/$$dir && echo *.h`; \
+ (cd ${includedir}/$$dir && rm -f $$files); \
+ done
+
+uninstall-w32api-libs: un%:
+ $(MAKE) --no-print-directory $(MAKEFLAGS) mkinstalldirs= \
+ INSTALL_DATA='cd $$2 && rm -f $$1' $*
+
+# Distribution
+# ------------
+#
+.PHONY: dist
+dist: bindist devdist dlldist licdist mandist srcdist
+ $(RM) -r dist/mingwrt dist/w32api
+
+.PHONY: bindist devdist dlldist licdist mandist srcdist
+bindist devdist dlldist licdist mandist srcdist: %dist: w32api-%dist
+
+.PHONY: $(foreach tag,bin dev dll lic man src,mingwrt-$(tag)dist)
+$(foreach tag,bin dev dll lic man src,mingwrt-$(tag)dist):
+
+.PHONY: $(foreach tag,bin dev dll lic man src,w32api-$(tag)dist)
+$(foreach tag,bin dev dll lic man src,w32api-$(tag)dist):
+
+staged_prefix = $(addsuffix =`pwd`/dist/$1,prefix exec_prefix)
+staged_install = $(call staged_prefix,$1) install-strip-$1
+
+mingwrt-dist-staged w32api-dist-staged: %-dist-staged:
+ $(RM) -r dist/$*
+ $(MAKE) --no-print-directory $(call staged_install,$*)
+
+mingwrt-srcdist w32api-srcdist: %-srcdist: %-srcdist-dir %-srcdist-files
+ cd dist && tar chf - $*-$(PACKAGE_VERSION) | \
+ xz -c > $*-$(PACKAGE_RELEASE_TAG)-src.tar.xz
+ $(RM) -r dist/$*-$(PACKAGE_VERSION)
+
+mingwrt-srcdist-dir w32api-srcdist-dir: %-srcdist-dir:
+ $(RM) -r dist/$*-$(PACKAGE_VERSION)
+ $(call mkinstalldirs,,dist/$*-$(PACKAGE_VERSION))
+
+mingwrt-srcdist-files w32api-srcdist-files: %-srcdist-files:
+ (cd ${$*_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \
+ (cd dist/$*-$(PACKAGE_VERSION) && tar xf -)
+
+mingwrt-devdist w32api-devdist: %-devdist: %-dist-staged
+ cd dist/$* && tar chf - --hard-dereference include lib | \
+ xz -c > ../$*-$(PACKAGE_RELEASE_TAG)-dev.tar.xz
+
+SRCDIST_ADD = $1-srcdist-files: $(addprefix ${$1_srcdir}/,$2)
+
+$(call SRCDIST_ADD,w32api,ChangeLog CONTRIBUTIONS README.w32api TODO)
+$(call SRCDIST_ADD,w32api,configure configure.ac aclocal.m4 Makefile.in)
+$(call SRCDIST_ADD,w32api,config.guess config.sub install-sh)
+$(call SRCDIST_ADD,w32api,include lib)
+
+
+# Clean-up Rules
+# --------------
+#
+clean-local: mostlyclean-local
+ $(RM) lib*.a
+
+mostlyclean-local:
+ $(RM) *.d *.$(OBJEXT)
+
+distclean-local: clean-local
+ $(RM) config.log config.status
+
+maintainer-clean-warning:
+ $(warning $(MAKE) $(@:%-warning=%))
+ $(warning This command should be used by package maintainers only;)
+ $(warning it deletes files which may require special tools to rebuild.)
+
+maintainer-clean-local: maintainer-clean-warning distclean-local
+ $(RM) -r ${srcdir}/configure ${srcdir}/autom4te.cache
+
+clean mostlyclean distclean maintainer-clean: %clean: %clean-local
+
+# $RCSfile$: end of file
--- /dev/null
+## aclocal.m4 -*- Autoconf -*- vim: filetype=config
+##
+## Autoconf macros for MinGW.org Runtime Library Package
+##
+## $Id$
+##
+## Written by Keith Marshall <keithmarshall@users.sourceforge.net>
+## Copyright (C) 2014, MinGW.org Project
+##
+##
+## Permission is hereby granted, free of charge, to any person obtaining a
+## copy of this software and associated documentation files (the "Software"),
+## to deal in the Software without restriction, including without limitation
+## the rights to use, copy, modify, merge, publish, distribute, sublicense,
+## and/or sell copies of the Software, and to permit persons to whom the
+## Software is furnished to do so, subject to the following conditions:
+##
+## The above copyright notice and this permission notice (including the next
+## paragraph) shall be included in all copies or substantial portions of the
+## Software.
+##
+## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+## AUTHORS OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+## DEALINGS IN THE SOFTWARE.
+##
+
+# MINGW_AC_CONFIG_EXTRA_SRCDIR( PACKAGE, WITNESS_FILE )
+# -----------------------------------------------------
+# Identify the top source directory for a sibling PACKAGE, which
+# provides WITNESS_FILE, and set AC_SUBST variable PACKAGE_srcdir
+# to its path relative to the build directory. Prefers a sibling
+# directory of ${srcdir} named exactly PACKAGE, but falls back to
+# PACKAGE*, and then to *PACKAGE*, if necessary.
+#
+AC_DEFUN_ONCE([MINGW_AC_CONFIG_EXTRA_SRCDIR],
+[AC_MSG_CHECKING([location of $1 source files])
+ for ac_dir in ${srcdir}/../$1 ${srcdir}/../$1* ${srcdir}/../*$1*
+ do test -f $ac_dir/$2 && { $1_srcdir=$ac_dir; break; }; done
+ AC_MSG_RESULT([$$1_srcdir])
+ AC_SUBST([$1_srcdir])dnl
+])
+
+# MINGW_AC_NO_EXECUTABLES
+# -----------------------
+# When building the runtime and W32 API libraries with only
+# a partially installed compiler, as we will be required to do
+# between the stage-1 and stage-2 phases of building GCC itself,
+# autoconf's _AC_COMPILER_EXEEXT may choke because the runtime
+# library itself is not yet available; here, we have provided
+# a redefined "do-nothing" version, which will avoid this mode
+# of failure, while retaining the original test for subsequent
+# use, after verifying that it should not fail.
+#
+AC_DEFUN_ONCE([MINGW_AC_NO_EXECUTABLES],
+[AC_BEFORE([$0],[AC_PROG_CC])dnl cannot let this use...
+ m4_rename([_AC_COMPILER_EXEEXT],[_MINGW_AC_COMPILER_EXEEXT])dnl so...
+ m4_define([_AC_COMPILER_EXEEXT])dnl move it away quickly!
+])
+
+# MINGW_AC_PROG_CC_COMPILE_ONLY
+# -----------------------------
+# A wrapper for AC_PROG_CC, ensuring that it will not succumb to
+# the failure mode described above, while still running the checks
+# provided by the original _AC_COMPILER_EXEEXT macro, when the
+# circumstances of failure do not prevail.
+#
+AC_DEFUN_ONCE([MINGW_AC_PROG_CC_COMPILE_ONLY],
+[AC_REQUIRE([MINGW_AC_NO_EXECUTABLES])dnl no need for linking
+ AC_LINK_IFELSE([AC_LANG_PROGRAM],dnl minimal 'int main(){return 0;}'
+ [_MINGW_AC_COMPILER_EXEEXT],dnl can create executables anyway!
+ [_MINGW_AC_COMPILER_NO_EXECUTABLES])dnl
+])
+
+# _MINGW_AC_COMPILER_NO_EXECUTABLES
+# ---------------------------------
+# Package specific diagnostics for the case where the compiler
+# really does succumb to the _AC_COMPILER_EXEEXT failure mode; in
+# this case, we allow the build to proceed, but we disallow the
+# building of executables and shared libraries by default.
+#
+AC_DEFUN([_MINGW_AC_COMPILER_NO_EXECUTABLES],
+[AC_MSG_CHECKING([whether the C compiler can create executables])
+ AC_MSG_RESULT([${may_enable_stage_2=no}])
+ AC_MSG_WARN([$CC compiler cannot create executables!])
+ AC_MSG_WARN([build will proceed to completion of stage-1 only;])
+ AC_MSG_WARN([no executables or shared libraries will be built.])
+])
+
+# MINGW_AC_DISABLE_STAGE_2
+# ------------------------
+# Implement the '--disable-stage-2' configure option, such that
+# it activates the non-failing _AC_COMPILER_EXEEXT behaviour, as
+# described above; default is to proceed with the stage-2 build,
+# provided the compiler is determined to be able to support it.
+#
+AC_DEFUN_ONCE([MINGW_AC_DISABLE_STAGE_2],
+[AC_ARG_ENABLE([stage-2],
+ [AS_HELP_STRING([--disable-stage-2],
+ [disable building of DLL components which require a fully installed compiler;
+ this option may be used during the compiler build process, to permit building
+ of the libraries required before commencing stage-2 of the compiler build.
+ ])dnl
+ ],[],dnl
+ [enable_stage_2=auto])dnl let compiler capability govern
+])
+
+# MINGW_AC_MAKE_COMMAND_GOALS
+# ---------------------------
+# Resolve choice of whether stage-2 should be built or not, in
+# favour of user's preference, if supported by the compiler; by
+# default prefer to build, if possible. Propagate the resolved
+# choice as a default make command goal, by assignment to the
+# AC_SUBST variable, DEFAULT_MAKECMDGOALS.
+#
+AC_DEFUN_ONCE([MINGW_AC_MAKE_COMMAND_GOALS],
+[AC_REQUIRE([MINGW_AC_DISABLE_STAGE_2])dnl
+ AC_REQUIRE([MINGW_AC_PROG_CC_COMPILE_ONLY])dnl
+ AC_MSG_CHECKING([whether to complete stage-2 build])
+ ac_val="user's choice"
+ AS_CASE([$enable_stage_2],dnl
+ [auto],[enable_stage_2=${may_enable_stage_2-yes};dnl
+ test x$enable_stage_2 = xyes && ac_val="default choice" dnl
+ || ac_val="compiler override"],dnl
+ [yes],[enable_stage_2=${may_enable_stage_2-yes};dnl
+ test x$enable_stage_2 = xyes || ac_val="compiler override"dnl
+ ])
+ AC_MSG_RESULT([$enable_stage_2 ($ac_val)])
+ test "x$enable_stage_2" = xno dnl
+ && DEFAULT_MAKECMDGOALS=all-stage-1-only dnl
+ || DEFAULT_MAKECMDGOALS=all-stage-1-and-2
+ AC_SUBST([DEFAULT_MAKECMDGOALS])
+])
+
+# MINGW_AC_PROG_COMPILE_SX
+# ------------------------
+# Determine how to invoke GCC to compile *.sx asssembly language
+# files, and provide a suitable derivative of GNU make's COMPILE.S
+# rule in AC_SUBST variable 'COMPILE_SX'. Note that GCC itself has
+# supported direct compilation of such files from version 4.3 onward,
+# (earlier versions require the '-x assembler-with-cpp' hint), but
+# GNU make does not provide a complementary built-in rule.
+#
+AC_DEFUN([MINGW_AC_PROG_COMPILE_SX],
+[AC_REQUIRE([AC_PROG_CC])dnl
+ AC_MSG_CHECKING([for $CC option to compile .sx files])
+ rm -f conftest.sx conftest.$OBJEXT; : > conftest.sx
+ ac_compile_sx='$CC -c $ASFLAGS $CPPFLAGS $ac_val conftest.sx >&5'
+ for ac_val in "" "-x assembler-with-cpp"; do
+ (eval $ac_compile_sx) 2>&5 && test -f conftest.$OBJEXT && break
+ done
+ AC_SUBST([COMPILE_SX],[`echo '$(COMPILE.S)' $ac_val`])
+ test "x$ac_val" = x && ac_val="none needed"
+ test -f conftest.$OBJEXT || ac_val="not supported"
+ AC_MSG_RESULT([$ac_val])
+ rm -f conftest.sx conftest.$OBJEXT
+ test "x$ac_val" = "xnot supported" && {
+ AC_MSG_FAILURE([$CC cannot compile .sx files])
+ }dnl
+])
+
+# $RCSfile$: end of file
--- /dev/null
+# configure.ac -*- Autoconf -*- vim: filetype=config
+#
+# Process this file with autoconf, to create a configure script for
+# the MinGW.org 32-bit MS-Windows API package.
+#
+# $Id$
+#
+# Written by Keith Marshall <keithmarshall@users.sourceforge.net>
+# Copyright (C) 2015, MinGW.org Project
+#
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+ AC_PREREQ([2.64])
+ AC_INIT([Win32 API],[3.18],[http://mingw.org/Reporting_Bugs],[w32api])
+
+ AC_PREFIX_DEFAULT([/mingw])
+ AC_CONFIG_SRCDIR([include/w32api.h])
+ MINGW_AC_CONFIG_EXTRA_SRCDIR([mingwrt],[include/_mingw.h])
+
+ AC_PROG_CC
+
+ AC_CHECK_TOOL([AS],[as],[as])
+ AC_CHECK_TOOL([DLLTOOL],[dlltool],[dlltool])
+ AC_CHECK_TOOL([STRIP],[strip],[strip])
+
+ AC_CHECK_TOOL([AR],[ar],[ar])
+ AC_ARG_VAR([ARFLAGS],[ar mode flags for creation of archive libraries [rcs]])
+ AC_SUBST([ARFLAGS],[${ARFLAGS-"rcs"}])
+ AC_PROG_RANLIB
+
+ AC_PROG_INSTALL
+ AC_PROG_MKDIR_P
+
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+#
+# $RCSfile$: end of file
+++ /dev/null
-dnl Process this file with autoconf to produce a configure script.
-
-dnl This file is part of a free win32 library
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-
-AC_PREREQ(2.59)
-AC_INIT(lib/scrnsave.c)
-
-AC_CANONICAL_SYSTEM
-
-dnl Find install command
-AC_PROG_INSTALL
-
-dnl check for cc and CFLAGS
-CFLAGS=${CFLAGS-"-O2 -g"}
-AC_CHECK_TOOL(CC, gcc, gcc)
-AC_SUBST(CC)
-AC_SUBST(CFLAGS)
-AC_SUBST(with_cross_host)
-
-dnl check for various tools
-AC_CHECK_TOOL(AR, ar, ar)
-AC_SUBST(AR)
-AC_CHECK_TOOL(AS, as, as)
-AC_SUBST(AS)
-AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
-AC_SUBST(RANLIB)
-AC_CHECK_TOOL(LD, ld, ld)
-AC_SUBST(LD)
-AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
-AC_SUBST(DLLTOOL)
-AC_CHECK_TOOL(WINDRES, windres, windres)
-AC_SUBST(WINDRES)
-
-AC_MSG_CHECKING([for build environment])
-case "$build_alias" in
-*-mingw*) BUILDENV=mingw;;
-*-cygwin*) BUILDENV=cygwin;;
-esac
-if test -z "$BUILDENV"; then
- AC_MSG_RESULT(standard)
-else
- AC_MSG_RESULT($BUILDENV)
-fi
-AC_SUBST(BUILDENV)
-
-AC_OUTPUT(Makefile lib/Makefile lib/ddk/Makefile lib/directx/Makefile)
+++ /dev/null
-#
-# Makefile.in
-#
-# This file is part of a free library for the Win32 API.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-SUBDIRS := ddk directx
-subdirs := ddk directx
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-FLAGS_TO_PASS = \
- AS="$(AS)" \
- CC="$(CC)" \
- CPPFLAGS="$(CPPFLAGS)" \
- CFLAGS="$(CFLAGS)" \
- CXXFLAGS="$(CXXFLAGS)" \
- AR="$(AR)" \
- RANLIB="$(RANLIB)" \
- LD="$(LD)" \
- DLLTOOL="$(DLLTOOL)" \
- TAR="$(TAR)" \
- TARFLAGS="$(TARFLAGS)" \
- TARFILEEXT="$(TARFILEEXT)" \
- WINDRES="$(WINDRES)"
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../include/*.h))
-GL_HEADERS = $(notdir $(wildcard $(srcdir)/../include/GL/*.h))
-GDIPLUS_HEADERS = $(notdir $(wildcard $(srcdir)/../include/gdiplus/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-MRI_FILES = $(notdir $(wildcard $(srcdir)/*.mri))
-IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
-MIMPLIBS = $(addprefix lib,$(subst .mri,.a,$(MRI_FILES)))
-EXTRA_LIBS=libuuid.a libscrnsave.a libscrnsavw.a liblargeint.a
-LIBS = $(IMPLIBS) $(MIMPLIBS) $(EXTRA_LIBS)
-UUID_OBJS = mshtml-uuid.o msxml-uuid.o unknwn-uuid.o \
- servprov-uuid.o oleidl-uuid.o oleacc-uuid.o ocidl-uuid.o \
- objsafe-uuid.o oaidl-uuid.o docobj-uuid.o comcat-uuid.o \
- exdisp-uuid.o mlang-uuid.o objidl-uuid.o cguid-uuid.o \
- olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \
- hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o
-EXTRA_OBJS = shell32.o scrnsave.o scrnsavw.o largeint.o gdiplus.o \
- $(UUID_OBJS) ws2_32.o
-UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \
- servprov-uuid.c oleidl-uuid.c oleacc-uuid.c ocidl-uuid.c \
- objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \
- exdisp-uuid.c mlang-uuid.c objidl-uuid.c cguid-uuid.c \
- olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \
- hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c
-SOURCES = scrnsave.c shell32.c largeint.c gdiplus.c $(UUID_SOURCES) \
-res.rc test.c ws2_32.c
-
-DISTFILES = Makefile.in $(DEF_FILES) $(MRI_FILES) $(SOURCES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(EXTRA_OBJS) $(LIBS) ddk directx
-
-%-subdirs:
- for i in $(SUBDIRS); do \
- $(MAKE) $(FLAGS_TO_PASS) -C $$i $*; \
- done
-
-ddk:
- $(MAKE) $(FLAGS_TO_PASS) -C $@
-
-directx:
- $(MAKE) $(FLAGS_TO_PASS) -C $@
-
-TEST_OPTIONS = $(ALL_CFLAGS) -DWINVER=0x0666 \
- -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test ddk directx
-test:
- @echo "Testing w32api..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-scrnsavw.o: scrnsave.c
- $(CC) -c $(ALL_CFLAGS) -DUNICODE -o $@ $<
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-libuuid.a : $(UUID_OBJS)
- $(AR) rc $@ $(UUID_OBJS)
- $(RANLIB) $@
-
-# libvfw32.a contains import stubs for 3 dll's. Using an MRI script
-# seems to be the simplest way to combine them into one archive.
-# NB: With older dlltool, the object file members will not have unique
-# names.
-libvfw32.a : vfw32.mri libmsvfw32.a libavifil32.a libavicap32.a
- rm -f $@
- $(AR) -M < ${word 1,$^}
- $(RANLIB) $@
-
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
-.PHONY: install install-libraries install-headers install-ddk
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers install-ddk install-directx
-
-install-libraries: all $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
- done
-
-install-headers: $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
- done
- $(mkinstalldirs) $(DESTDIR)$(inst_includedir)/GL
- for i in $(GL_HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/GL/$$i $(DESTDIR)$(inst_includedir)/GL/$$i ; \
- done
- $(mkinstalldirs) $(DESTDIR)$(inst_includedir)/gdiplus
- for i in $(GDIPLUS_HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/gdiplus/$$i $(DESTDIR)$(inst_includedir)/gdiplus/$$i ; \
- done
-
-install-ddk: install-libraries install-headers
- cd ddk && $(MAKE) install $(FLAGS_TO_PASS)
-
-install-directx: install-libraries install-headers
- cd directx && $(MAKE) install $(FLAGS_TO_PASS)
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-ddk uninstall-directx uninstall-libraries uninstall-headers
-
-uninstall-libraries: $(need-DESTDIR-compatibility)
- @for i in $(LIBS); do \
- rm -f $(DESTDIR)$(inst_libdir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_libdir)
-
-uninstall-headers: $(need-DESTDIR-compatibility)
- @for i in $(HEADERS); do \
- rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_includedir)
-
-uninstall-ddk:
- cd ddk && $(MAKE) -C uninstall $(FLAGS_TO_PASS)
-
-uninstall-directx:
- cd directx && $(MAKE) -C uninstall $(FLAGS_TO_PASS)
-
-dist:
- mkdir $(distdir)/include
- chmod 755 $(distdir)/include
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../include/$$i $(distdir)/include/$$i ; \
- done
- mkdir $(distdir)/include/GL
- @for i in $(GL_HEADERS); do \
- cp -p $(srcdir)/../include/GL/$$i $(distdir)/include/GL/$$i ; \
- done
- mkdir $(distdir)/include/gdiplus
- @for i in $(GDIPLUS_HEADERS); do \
- cp -p $(srcdir)/../include/gdiplus/$$i $(distdir)/include/gdiplus/$$i ; \
- done
- mkdir $(distdir)/lib
- chmod 755 $(distdir)/lib
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/$$i ; \
- done
- for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
- done
-
-Makefile: Makefile.in ../config.status ../configure
- cd ..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
-
+++ /dev/null
-# Makefile.in
-#
-# This file is part of a free library building Windows NT drivers.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api/ddk
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api/ddk
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)/ddk
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../../include/ddk/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
-LIBS = $(IMPLIBS)
-
-DISTFILES = Makefile.in $(DEF_FILES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(LIBS)
-
-TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test
-test:
- @echo "Testing ddk..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers
-
-install-libraries: all $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
- done
-
-install-headers: $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
- done
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-libraries uninstall-headers
-
-uninstall-libraries: $(need-DESTDIR-compatibility)
- @for i in $(LIBS); do \
- rm -f $(DESTDIR)$(inst_libdir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_libdir)
-
-uninstall-headers: $(need-DESTDIR-compatibility)
- @for i in $(HEADERS); do \
- rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_includedir)
-
-
-dist:
- mkdir $(distdir)/include/ddk
- chmod 755 $(distdir)/include/ddk
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../../include/ddk/$$i $(distdir)/include/ddk/$$i ; \
- done
- mkdir $(distdir)/lib/ddk
- chmod 755 $(distdir)/lib/ddk
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/ddk/$$i ; \
- done
-
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
+++ /dev/null
-# Makefile.in
-#
-# This file is part of a free library building Windows NT drivers.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../../include/directx/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-DIST_C_FILES = $(notdir $(wildcard $(srcdir)/*.c))
-DIST_H_FILES = $(notdir $(wildcard $(srcdir)/*.h))
-LIBS = libd3d8.a libd3d9.a libd3dim.a libd3drm.a libd3dx8d.a libd3dx9d.a \
- libd3dxof.a libddraw.a libdinput.a libdinput8.a libdmoguids.a \
- libdplayx.a libdpnaddr.a libdpnet.a libdpnlobby.a libdpvoice.a \
- libdsetup.a libdsound.a libdxerr8.a libdxerr9.a libdxguid.a \
- libksproxy.a libksuser.a libmsdmo.a libstrmiids.a
-DINPUT_OBJS = dinput_joy.o dinput_joy2.o dinput_kbd.o dinput_mouse.o \
- dinput_mouse2.o
-
-DISTFILES = Makefile.in $(DEF_FILES) $(DIST_C_FILES) $(DIST_H_FILES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(LIBS)
-
-TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test
-test:
- @echo "Testing directx..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-libdxerr8.a: dxerr8.o dxerr8w.o
- $(AR) r $@ dxerr8.o dxerr8w.o
- $(RANLIB) $@
-
-libdxerr9.a: dxerr9.o dxerr9w.o
- $(AR) r $@ dxerr9.o dxerr9w.o
- $(RANLIB) $@
-
-libdinput.a: dinput.def $(DINPUT_OBJS)
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput.def
- $(AR) r $@ $(DINPUT_OBJS)
- $(RANLIB) $@
-
-libdinput8.a: dinput8.def $(DINPUT_OBJS)
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput8.def
- $(AR) r $@ $(DINPUT_OBJS)
- $(RANLIB) $@
-
-lib%.a: %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers
-
-install-libraries: all $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
- done
-
-install-headers: $(need-DESTDIR-compatibility)
- $(mkinstalldirs) $(DESTDIR)$(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
- done
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-libraries uninstall-headers
-
-uninstall-libraries: $(need-DESTDIR-compatibility)
- @for i in $(LIBS); do \
- rm -f $(DESTDIR)$(inst_libdir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_libdir)
-
-uninstall-headers: $(need-DESTDIR-compatibility)
- @for i in $(HEADERS); do \
- rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
- done
- rmdir $(DESTDIR)$(inst_includedir)
-
-
-dist:
- mkdir $(distdir)/include/directx
- chmod 755 $(distdir)/include/directx
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../../include/directx/$$i $(distdir)/include/directx/$$i ; \
- done
- mkdir $(distdir)/lib/directx
- chmod 755 $(distdir)/lib/directx
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/directx/$$i ; \
- done
-
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean