patch-configure_in 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --- socat-1.7.2.4.orig/configure.in 2014-03-09 09:51:39.000000000 -0500
  2. +++ socat-1.7.2.4/configure.in 2014-12-27 10:03:10.147596595 -0600
  3. @@ -41,17 +41,7 @@ AC_CHECK_PROG(AR, ar, ar, gar)
  4. # fail
  5. AC_LANG_COMPILER_REQUIRE()
  6. -if test "$CC" = "gcc"; then
  7. - CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
  8. - ERRONWARN="-Werror -O0"
  9. -elif test "$CC" = "clang"; then
  10. - CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
  11. - ERRONWARN="-Werror -O0"
  12. -#elif Sun Studio
  13. -# ERRONWARN="-errwarn"
  14. -else
  15. - ERRONWARN=
  16. -fi
  17. +CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
  18. export CFLAGS
  19. @@ -79,8 +69,7 @@ AC_HEADER_RESOLV()
  20. AC_CHECK_HEADERS(termios.h linux/if_tun.h)
  21. AC_CHECK_HEADERS(net/if_dl.h)
  22. -AC_CHECK_HEADERS(linux/types.h)
  23. -AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
  24. +AC_CHECK_HEADERS(linux/types.h linux/errqueue.h)
  25. AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
  26. AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
  27. AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
  28. @@ -106,7 +95,7 @@ dnl arg2: required include files beyond
  29. define(AC_CHECK_PROTOTYPE_LIB,[
  30. AC_MSG_CHECKING(for $1 prototype)
  31. AC_CACHE_VAL(sc_cv_have_prototype_lib_$1,
  32. -[CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN -Wall $CFLAGS1";
  33. +[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -Wall $CFLAGS1";
  34. AC_TRY_LINK([#include "sysincludes.h"
  35. $2],[return(&$1==(void *)&$1);],
  36. [sc_cv_have_prototype_lib_$1=yes],
  37. @@ -122,7 +111,7 @@ AC_MSG_RESULT($sc_cv_have_prototype_lib_
  38. dnl Check for hstrerror prototype
  39. AC_MSG_CHECKING(for hstrerror prototype)
  40. AC_CACHE_VAL(sc_cv_have_prototype_hstrerror,
  41. -[CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')";
  42. +[CFLAGS1="$CFLAGS"; CFLAGS="-Werror $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')";
  43. AC_TRY_COMPILE([#include <netdb.h>],[hstrerror();],
  44. [sc_cv_have_prototype_hstrerror=no],
  45. [sc_cv_have_prototype_hstrerror=yes]);
  46. @@ -1432,7 +1421,7 @@ dnl length and signedness of the type.
  47. dnl do we have a -Werror option?
  48. dnl Does the test code compile with -Werror when types fit?
  49. CHANCE_TO_TYPECHECK=1
  50. -CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  51. +CFLAGS1="$CFLAGS"; CFLAGS="-Werror $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  52. AC_TRY_COMPILE([#include <stdlib.h>],[int u; int v; exit(&u==&v);],,CHANCE_TO_TYPECHECK=0)
  53. CFLAGS="$CFLAGS1"
  54. @@ -1443,7 +1432,7 @@ fi
  55. dnl Does the test code fail to compile with -Werror when types do not fit?
  56. if test "$CHANCE_TO_TYPECHECK" -ne 0; then
  57. - CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  58. + CFLAGS1="$CFLAGS"; CFLAGS="-Werror $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  59. AC_TRY_COMPILE([#include <stdlib.h>],[int u; unsigned int v; exit(&u==&v);],CHANCE_TO_TYPECHECK=0,)
  60. CFLAGS="$CFLAGS1"
  61. fi
  62. @@ -1458,7 +1447,7 @@ fi
  63. dnl see AC_BASIC_TYPE
  64. define(AC_BASIC_TYPE_GCC,[
  65. AC_CACHE_CHECK(for equivalent simple type of $2, $4,
  66. -[CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  67. +[CFLAGS1="$CFLAGS"; CFLAGS="-Werror $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  68. dnl echo "echo: trying short for $2" >&2
  69. AC_TRY_COMPILE([$1],[$2 u; short v; return(&u==&v);],
  70. [$4="1 /* short */"],
  71. @@ -1553,7 +1542,7 @@ dnl See AC_TYPEOF_COMPONENT
  72. dnl This version is for compilers with -Werror or so: gcc, clang, Sun Studio?
  73. define(AC_TYPEOF_COMPONENT_GCC,[
  74. AC_CACHE_CHECK(for basic type of $2.$3, $5,
  75. -[CFLAGS1="$CFLAGS"; CFLAGS="$ERRONWARN $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  76. +[CFLAGS1="$CFLAGS"; CFLAGS="-Werror $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
  77. AC_TRY_COMPILE([$1],[$2 u;short v; return(&u.$3==&v);],
  78. [$5="1 /* short */"],
  79. [AC_TRY_COMPILE([$1],[$2 u; unsigned short v; return(&u.$3==&v);],