This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

-mwin32 test macro

I've put together a autoconf macro to configure CC to include the Win32
API, if it is available. I've only put in the methods _I know of and can
test_, more fallback tests are welcome.

Sample code to use it in, when the program _needs_ the
win32 API:


case "${host}" in
        test "$ac_cc_win32" = "no" && { echo "configure: error: Win32
API needed and no ac
ceptable cc could be found" 1>&2; exit 1; }

It sets ac_cc_win32 to yes or no as appropriate, so test writers in can do an AC_SUBST or AC_DEFINE and switch off bits of
their code, or do as above, and fail the configure script.

It's my first foray into m4 beyond being a bare bones
tweaker, so if I'm breaking coding rules etc just let me know and I'll
go fix it up.

This test should allow existing programs that build under the Cygwin net
release gcc-2.95.2-6 or before (current release) or under the new
gcc-2.95.2-9 which no longer has the Win32 API by default.

If this looks ok I'll submit it to the autoconf macro archive..



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]