1
0

patch-configure 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. - use the compiler passed in $CC
  2. - predefine iptables modules dir, since the check would
  3. always fail (cause of absolute search paths) and OpenADK
  4. (for now) doesn't compile iptables with shared objects
  5. - do not discard compiler output from tests, they're useful
  6. for debugging
  7. - additionally output the full compiler command before running
  8. it
  9. --- iproute2-2.6.37.orig/configure 2011-01-07 18:54:30.000000000 +0100
  10. +++ iproute2-2.6.37/configure 2011-02-25 21:01:53.000000000 +0100
  11. @@ -1,4 +1,5 @@
  12. #! /bin/bash
  13. +set -x
  14. # This is not an autconf generated configure
  15. #
  16. INCLUDE=${1:-"$PWD/include"}
  17. @@ -15,7 +16,8 @@ int main(int argc, char **argv) {
  18. return 0;
  19. }
  20. EOF
  21. -gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
  22. +echo "$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm"
  23. +$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm
  24. if [ $? -eq 0 ]
  25. then
  26. echo "TC_CONFIG_ATM:=y" >>Config
  27. @@ -49,7 +51,8 @@ int main(int argc, char **argv)
  28. EOF
  29. -if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
  30. +echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables"
  31. +if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables
  32. then
  33. echo "TC_CONFIG_XT:=y" >>Config
  34. echo "using xtables"
  35. @@ -86,7 +89,8 @@ int main(int argc, char **argv) {
  36. }
  37. EOF
  38. -gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
  39. +echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl"
  40. +$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl
  41. if [ $? -eq 0 ]
  42. then
  43. @@ -126,7 +130,8 @@ int main(int argc, char **argv) {
  44. }
  45. EOF
  46. -gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
  47. +echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl"
  48. +$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl
  49. if [ $? -eq 0 ]
  50. then
  51. @@ -149,18 +154,8 @@ check_ipt()
  52. check_ipt_lib_dir()
  53. {
  54. - IPT_LIB_DIR=""
  55. - for dir in /lib /usr/lib /usr/local/lib
  56. - do
  57. - for file in $dir/$TABLES/lib*t_*so ; do
  58. - if [ -f $file ]; then
  59. - echo $dir/$TABLES
  60. - echo "IPT_LIB_DIR:=$dir/$TABLES" >> Config
  61. - return
  62. - fi
  63. - done
  64. - done
  65. - echo "not found!"
  66. + echo "/usr/lib/$TABLES"
  67. + echo "IPT_LIB_DIR:=/usr/lib/$TABLES" >> Config
  68. }
  69. echo "# Generated config based on" $INCLUDE >Config