Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <04e301c0adfd$9b091a10$0200a8c0@lifelesswks> From: "Robert Collins" To: "Akim Demaille" Cc: , References: <3AB0C6A2 DOT 8AFE126C AT yahoo DOT com><023d01c0ad57$68af41d0$0200a8c0 AT lifelesswks><026c01c0ad5b$4a2a76e0$0200a8c0 AT lifelesswks><029701c0ad60$66becd60$0200a8c0 AT lifelesswks><02b901c0ad61$e69fd000$0200a8c0 AT lifelesswks><002401c0ad9b$e3526d60$0200a8c0 AT lifelesswks><3AB14033 DOT 1FFE5CE0 AT yahoo DOT com><027401c0ada3$bb7845f0$0200a8c0 AT lifelesswks><04b201c0adfa$6db4ab40$0200a8c0 AT lifelesswks> Subject: V4a win32 macro Date: Fri, 16 Mar 2001 20:43:32 +1100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_04E0_01C0AE59.C388AAD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 16 Mar 2001 09:37:59.0165 (UTC) FILETIME=[C993E2D0:01C0ADFC] This is a multi-part message in MIME format. ------=_NextPart_000_04E0_01C0AE59.C388AAD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit This has the AC_REQUIRE autoconf problem fixed (thanks Akim). However if the user doesn't put AC_PROG_CC in anyway, the output looks like: configure: creating cache /dev/null checking for a BSD compatible install... /bin/install -c checking whether build environment is sane... yes checking for mawk... no checking for gawk... gawk checking whether make sets ${MAKE}... yes checking how to run the C preprocessor... /lib/cpp configure: error: C preprocessor "/lib/cpp" fails sanity check So I don't know how useful the AC_REQUIRE actually ends up being ! Rob ------=_NextPart_000_04E0_01C0AE59.C388AAD0 Content-Type: application/octet-stream; name="acinclude.m4" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="acinclude.m4" dnl COMPILER WIN32 support = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= # figure out how to run CC with access to the win32 api if present=0A= # configure that as the CC program, =0A= # WIN32 may be present with WINE, under cygwin, or under mingw,=0A= # or cross compilers targeting those same three targets.=0A= # as it happens, I can only test cygwin, so extra input here will be = appreciated=0A= # send bug reports to Robert Collins =0A= #=0A= # logic: is CC already configured? if not, call AC_PROG_CC.=0A= # if so - try it. If that doesn't work ,try -mwin32. If that doesn't = work, fail=0A= #=0A= # 2001-03-15 - Changed from yes/no to true/false -suggested by Lars J = Aas=0A= # * Change true to : - suggest by Alexandre Oliva = =0A= # * changed layout on the basis of autoconf mailing list:=0A= # there are now two interfaces, a language specific one which sets=0A= # or clears WIN32 && WIN32FLAGS as appropriate=0A= # * m4 Syntax fixup: Akim Demaille =0A= #=0A= # All faults& bugs are mine - Robert=0A= =0A= AC_DEFUN([AC_PROG_CC_WIN32], [=0A= AC_REQUIRE([AC_PROG_CC])dnl=0A= AC_MSG_CHECKING([how to access the Win32 API])=0A= WIN32FLAGS=3D=0A= AC_TRY_COMPILE(,[=0A= #ifndef WIN32=0A= # ifndef _WIN32=0A= # error WIN32 or _WIN32 not defined=0A= # endif=0A= #endif], [=0A= dnl found windows.h with the current config.=0A= AC_MSG_RESULT([present by default])=0A= ], [=0A= dnl try -mwin32=0A= ac_compile_save=3D"$ac_compile"=0A= dnl we change CC so config.log looks correct=0A= save_CC=3D"$CC"=0A= ac_compile=3D"$ac_compile -mwin32"=0A= CC=3D"$CC -mwin32"=0A= AC_TRY_COMPILE(,[=0A= #ifndef WIN32=0A= # ifndef _WIN32=0A= # error WIN32 or _WIN32 not defined=0A= # endif=0A= #endif], [=0A= dnl found windows.h using -mwin32=0A= AC_MSG_RESULT([found via -mwin32])=0A= ac_compile=3D"$ac_compile_save"=0A= CC=3D"$save_CC"=0A= WIN32FLAGS=3D"-mwin32"=0A= ], [=0A= ac_compile=3D"$ac_compile_save"=0A= CC=3D"$save_CC"=0A= AC_MSG_RESULT([not found])=0A= ])=0A= ])=0A= =0A= ])=0A= =0A= =0A= # figure out how to run CXX with access to the win32 api if present=0A= # configure that as the CXX program,=0A= # WIN32 may be present with WINE, under cygwin, or under mingw,=0A= # or cross compilers targeting those same three targets.=0A= # as it happens, I can only test cygwin, so extra input here will be = appreciated=0A= # send bug reports to Robert Collins =0A= =0A= AC_DEFUN([AC_PROG_CXX_WIN32], [=0A= AC_REQUIRE([AC_PROG_CXX])dnl=0A= AC_MSG_CHECKING([how to access the Win32 API])=0A= WIN32FLAGS=3D=0A= AC_TRY_COMPILE(,[=0A= #ifndef WIN32=0A= # ifndef _WIN32=0A= # error WIN32 or _WIN32 not defined=0A= # endif=0A= #endif], [=0A= dnl found windows.h with the current config.=0A= AC_MSG_RESULT([present by default])=0A= ], [=0A= dnl try -mwin32=0A= ac_compile_save=3D"$ac_compile"=0A= dnl we change CC so config.log looks correct=0A= save_CXX=3D"$CXX"=0A= ac_compile=3D"$ac_compile -mwin32"=0A= CXX=3D"$CXX -mwin32"=0A= AC_TRY_COMPILE(,[=0A= #ifndef WIN32=0A= # ifndef _WIN32=0A= # error WIN32 or _WIN32 not defined=0A= # endif=0A= #endif], [=0A= dnl found windows.h using -mwin32=0A= AC_MSG_RESULT([found via -mwin32])=0A= ac_compile=3D"$ac_compile_save"=0A= CXX=3D"$save_CXX"=0A= WIN32FLAGS=3D"-mwin32"=0A= ], [=0A= ac_compile=3D"$ac_compile_save"=0A= CXX=3D"$save_CXX"=0A= AC_MSG_RESULT([not found])=0A= ])=0A= ])=0A= =0A= ])=0A= =0A= =0A= # high level interface for finding out compiler support for win32.=0A= AC_DEFUN([AC_API_WIN32], [=0A= =0A= AC_LANG_CASE(=0A= [C], [AC_PROG_CC_WIN32=0A= CFLAGS=3D"$WIN32FLAGS $CFLAGS"=0A= CPPFLAGS=3D"$WIN32FLAGS $CPPFLAGS"],=0A= [C++], [AC_PROG_CXX_WIN32=0A= CXXFLAGS=3D"$WIN32FLAGS $CXXFLAGS"=0A= CPPFLAGS=3D"$WIN32FLAGS $CPPFLAGS"],=0A= [AC_FATAL([No macro support for WIN32 with ] _AC_LANG) ])=0A= ])=0A= =0A= dnl end compiler WIN32 support = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= ------=_NextPart_000_04E0_01C0AE59.C388AAD0--