[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8635: Fix IRIX builds so that IRIX no longer self-detects as win32 (tor/trunk)
Author: nickm
Date: 2006-10-07 11:40:33 -0400 (Sat, 07 Oct 2006)
New Revision: 8635
Modified:
tor/trunk/
tor/trunk/configure.in
Log:
r8920@totoro: nickm | 2006-10-07 11:40:06 -0400
Fix IRIX builds so that IRIX no longer self-detects as win32. For once, this is not the fault of Windows: Apparently, some helpful person decided that the the MIPSpro C Compiler should give a warning on #error rather than actually failing. How... "innovative." (Bug found by pnx; thanks!)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r8920] on 96637b51-b116-0410-a10e-9941ebb49b64
Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in 2006-10-07 09:30:12 UTC (rev 8634)
+++ tor/trunk/configure.in 2006-10-07 15:40:33 UTC (rev 8635)
@@ -76,31 +76,6 @@
AC_PROG_MAKE_SET
AC_PROG_RANLIB
-# If WIN32 is defined and non-zero, we are building for win32
-AC_MSG_CHECKING([for win32])
-AC_TRY_COMPILE(,
-[
-#ifdef WIN32
-#if WIN32
-//all is well
-#else
-#error
-#endif
-#else
-#error
-#endif
-],
-bwin32=true; AC_MSG_RESULT([yes]),
-bwin32=false; AC_MSG_RESULT([no])
-)
-
-if test $bwin32 = true; then
-
-AC_DEFINE(MS_WINDOWS,1, [Define to 1 if we are building for a Windows platform.])
-
-
-fi
-
# The big search for OpenSSL
# copied from openssh's configure.ac
tryssldir=""
@@ -141,6 +116,29 @@
)
AC_SUBST(TORGROUP)
+
+dnl If WIN32 is defined and non-zero, we are building for win32
+AC_MSG_CHECKING([for win32])
+AC_TRY_RUN([int main(int c, char **v) {
+#ifdef WIN32
+#if WIN32
+ return 0;
+#else
+ return 1;
+#endif
+#else
+ return 2;
+#endif
+}],
+bwin32=true; AC_MSG_RESULT([yes]),
+bwin32=false; AC_MSG_RESULT([no])
+)
+
+if test $bwin32 = true; then
+AC_DEFINE(MS_WINDOWS, 1, [Define to 1 if we are building for Windows.])
+
+fi
+
AC_SEARCH_LIBS(socket, [socket])
AC_SEARCH_LIBS(gethostbyname, [nsl])
AC_SEARCH_LIBS(dlopen, [dl])