aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-07 15:40:33 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-07 15:40:33 +0000
commit368eded621c02995aa66418465ccc17b3d978b5a (patch)
tree6b232af179ae27e3fba6b5c5f90341934a1e044c
parentb45c2100120cd7d42228d07594cac3b88d5d1613 (diff)
downloadtor-368eded621c02995aa66418465ccc17b3d978b5a.tar.gz
tor-368eded621c02995aa66418465ccc17b3d978b5a.zip
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!) svn:r8635
-rw-r--r--configure.in48
1 files changed, 23 insertions, 25 deletions
diff --git a/configure.in b/configure.in
index 4a8cb9440d..819267292a 100644
--- a/configure.in
+++ b/configure.in
@@ -76,31 +76,6 @@ AC_PROG_CC
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_ARG_WITH(tor-group,
)
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])