#ifdef HAVE_SOCKETS
#define LIBS_SYSTEM -lsocket
-/* configure can't get this right since it comes from -lsocket
- and configure doesn't know to look there. */
-#undef HAVE_XSCREENNUMBEROFSCREEN
-#define HAVE_XSCREENNUMBEROFSCREEN
-#endif
-
/* SCO has gettimeofday in socket library */
/* Autoconf should determine this, but for now,
play safe to avoid error rather than deleting this
#endif
#endif
+#ifdef HAVE_X11R5
+/* configure can't get this right linking fails unless -lsocket is used. */
+#undef HAVE_XSCREENNUMBEROFSCREEN
+#define HAVE_XSCREENNUMBEROFSCREEN
+#endif
+
/* We don't have -loldX, and we don't need it. */
#define LIB_XMENU_LIB