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]

updated win32 macro

    version 2.. returns true/false now. I've also updated te sample code
to reflect this

... updated email ...
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
        if $ac_cc_win32; then
        dnl do nothing here - any header checks /library checks etc
later in will now pass
            echo "configure: error: Win32 API needed and no acceptable
cc could be found" 1>&2;
            exit 1;
        fi        ;;

AC_PROG_CC_WIN32  sets $ac_cc_win32 to true or false 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]