Autoconf tests for Solaris compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Files Affected
configure.ac
dlls/kernel/device.c
dlls/iphlpapi/iphlpapi_main.c



Changelog:
Autoconf: added argument checks for strip program
Autoconf: Added portability macros for INADDR_NONE

Notes: Need to re-run autoheader
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.223
diff -u -3 -p -r1.223 configure.ac
--- configure.ac	6 Jan 2004 21:37:44 -0000	1.223
+++ configure.ac	8 Jan 2004 04:27:46 -0000
@@ -81,7 +81,21 @@ AC_CHECK_TOOLS(AS,[gas as],as)
 AC_CHECK_TOOL(LD,ld,ld)
 AC_CHECK_TOOL(AR,ar,ar)
 AC_PROG_RANLIB
-AC_CHECK_TOOL(STRIP,strip,strip)
+AC_CHECK_TOOLS(STRIP,[ strip,gstrip],strip)
+echo Checking if strip is GNU strip 
+if $STRIP -V | grep GNU > /dev/null
+then
+    AC_SUBST(STRIPALL," -s")
+    AC_SUBST(STRIPUNNEEDED, "--strip-unneeded")
+    echo "strip is GNU strip ($STRIP)"
+else
+    AC_SUBST(STRIPALL, "")
+    AC_SUBST(STRIPUNNEEDED,"-x")
+    echo "strip is not GNU Strip ($STRIP)"
+fi
+
+				
+
 AC_CHECK_TOOL(WINDRES,windres,false)
 AC_PROG_LN_S
 WINE_PROG_LN
@@ -119,6 +133,7 @@ dnl Check for db2txt
 AC_CHECK_PROGS(DB2TXT, docbook2txt db2txt, false)
 AC_SUBST(DB2TXT)
 
+
 dnl **** Check for some libraries ****
 
 dnl Check for -lm
@@ -1147,6 +1162,41 @@ AC_CHECK_HEADERS(\
 	valgrind/memcheck.h
 )
 AC_HEADER_STAT()
+
+dnl **** Check if INADDR_NONE is defined  (Should be in netinet/in.h) if not use INADDR_BROADCAST or 0xffffffffu as a last resort
+echo "checking for definition of INADDR_NONE"
+ AC_TRY_COMPILE(
+   [
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif],
+   [char *x= (char *) INADDR_NONE],
+   [ac_cv_c_inaddrnone="yes"],
+   [ac_cv_c_inaddrnone="no"])
+ 
+if test "$ac_cv_c_inaddrnone" = "no"
+then
+   AC_TRY_COMPILE(
+   [
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif],
+   [char *x= (char *) INADDR_BROADCAST],
+   [ac_cv_c_inaddrbroadcast="yes"],
+   [ac_cv_c_inaddrbroadcast="no"])
+ 
+if test "$ac_cv_c_inaddrbroadcast" = "yes"
+then
+     AC_DEFINE(INADDR_NONE_EQUIVALENT, INADDR_BROADCAST, [Define INADDR_NONE Equivalent for your OS])
+     else 
+     AC_DEFINE(INADDR_NONE_EQUIVALENT, 0xffffffffu, [Define INADDR_NONE Equivalent for your OS])
+fi
+else
+          AC_DEFINE(HAVE_INADDR_NONE, 1, [Define if we can use INADDR_NONE])
+     AC_DEFINE(INADDR_NONE_EQUIVALENT, INADDR_NONE, [Define INADDR_NONE Equivalent for your OS])
+fi
+
+
 
 dnl **** Checks for headers that depend on other ones ****
 
Index: programs/winetest/Makefile.in
===================================================================
RCS file: /home/wine/wine/programs/winetest/Makefile.in,v
retrieving revision 1.18
diff -u -3 -p -b -r1.18 Makefile.in
--- programs/winetest/Makefile.in	4 Dec 2003 02:01:39 -0000	1.18
+++ programs/winetest/Makefile.in	8 Jan 2004 04:39:53 -0000
@@ -51,38 +51,38 @@ depend: winetest.rc
 # rules for stripping the test executables
 
 advapi32_test.exe$(DLLEXT): $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 comctl32_test.exe$(DLLEXT): $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 gdi32_test.exe$(DLLEXT): $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 kernel32_test.exe$(DLLEXT): $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 msvcrt_test.exe$(DLLEXT): $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT)
-	cp $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 netapi32_test.exe$(DLLEXT): $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 ntdll_test.exe$(DLLEXT): $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT)
-	cp $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 oleaut32_test.exe$(DLLEXT): $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 rpcrt4_test.exe$(DLLEXT): $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT)
-	cp $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 shell32_test.exe$(DLLEXT): $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 shlwapi_test.exe$(DLLEXT): $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT)
-	cp $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 urlmon_test.exe$(DLLEXT): $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT)
-	cp $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 user32_test.exe$(DLLEXT): $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 wininet_test.exe$(DLLEXT): $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
-	cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 winmm_test.exe$(DLLEXT): $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT)
-	cp $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 winspool.drv_test.exe$(DLLEXT): $(DLLDIR)/winspool/tests/winspool.drv_test.exe$(DLLEXT)
-	cp $(DLLDIR)/winspool/tests/winspool.drv_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/winspool/tests/winspool.drv_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 ws2_32_test.exe$(DLLEXT): $(DLLDIR)/winsock/tests/ws2_32_test.exe$(DLLEXT)
-	cp $(DLLDIR)/winsock/tests/ws2_32_test.exe$(DLLEXT) $@ && $(STRIP) -s $@
+	cp $(DLLDIR)/winsock/tests/ws2_32_test.exe$(DLLEXT) $@ && $(STRIP) $(STRIPALL) $@
 
 ### Dependencies:
Index: dlls/iphlpapi/iphlpapi_main.c
===================================================================
RCS file: /home/wine/wine/dlls/iphlpapi/iphlpapi_main.c,v
retrieving revision 1.10
diff -u -3 -p -b -r1.10 iphlpapi_main.c
--- dlls/iphlpapi/iphlpapi_main.c	2 Jan 2004 03:55:05 -0000	1.10
+++ dlls/iphlpapi/iphlpapi_main.c	8 Jan 2004 04:58:14 -0000
@@ -610,13 +610,13 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER
               RegQueryValueExA(hKey, "WinsServer", NULL, NULL,
                primaryWINS.String, &size);
               addr = inet_addr(primaryWINS.String);
-              if (addr != INADDR_NONE && addr != INADDR_ANY)
+              if (addr != INADDR_NONE_EQUIVALENT && addr != INADDR_ANY)
                 winsEnabled = TRUE;
               size = sizeof(secondaryWINS.String);
               RegQueryValueExA(hKey, "BackupWinsServer", NULL, NULL,
                secondaryWINS.String, &size);
               addr = inet_addr(secondaryWINS.String);
-              if (addr != INADDR_NONE && addr != INADDR_ANY)
+              if (addr != INADDR_NONE_EQUIVALENT&& addr != INADDR_ANY)
                 winsEnabled = TRUE;
               RegCloseKey(hKey);
             }
Index: dlls/kernel/device.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/device.c,v
retrieving revision 1.7
diff -u -3 -p -b -r1.7 device.c
--- dlls/kernel/device.c	2 Jan 2004 03:55:35 -0000	1.7
+++ dlls/kernel/device.c	8 Jan 2004 04:55:48 -0000
@@ -1003,17 +1003,17 @@ static BOOL DeviceIo_VNB(DWORD dwIoContr
 
                                 addr = inet_addr(
                                  ptr->IpAddressList.IpAddress.String);
-                                if (addr != 0 && addr != INADDR_NONE)
+                                if (addr != 0 && addr != INADDR_NONE_EQUIVALENT)
                                     info->table[info->numEntries].ip =
                                      ntohl(addr);
                                 addr = inet_addr(
                                  ptr->PrimaryWinsServer.IpAddress.String);
-                                if (addr != 0 && addr != INADDR_NONE)
+                                if (addr != 0 && addr != INADDR_NONE_EQUIVALENT)
                                     info->table[info->numEntries].winsPrimary
                                      = ntohl(addr);
                                 addr = inet_addr(
                                  ptr->SecondaryWinsServer.IpAddress.String);
-                                if (addr != 0 && addr != INADDR_NONE)
+                                if (addr != 0 && addr != INADDR_NONE_EQUIVALENT)
                                     info->table[info->numEntries].winsSecondary
                                      = ntohl(addr);
                                 info->numEntries++;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux