You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.2 KiB

  1. From 9da66f0925818ddb12127bfcb46acf79e354cabc Mon Sep 17 00:00:00 2001
  2. From: Toni Uhlig <matzeton@googlemail.com>
  3. Date: Mon, 18 May 2020 11:36:56 +0200
  4. Subject: [PATCH] configure script honors (C|LD)FLAGS
  5. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
  6. ---
  7. configure | 32 ++++++++++++++++----------------
  8. 1 file changed, 16 insertions(+), 16 deletions(-)
  9. --- a/configure
  10. +++ b/configure
  11. @@ -221,8 +221,8 @@ EOF
  12. NACL_LIB="nacl"
  13. fi
  14. - LDFLAGS="-L $NACL_LIB_DIR"
  15. - CFLAGS="-I $NACL_INC_DIR"
  16. + LDFLAGS="$LDFLAGS -L $NACL_LIB_DIR"
  17. + CFLAGS="$CFLAGS -I $NACL_INC_DIR"
  18. $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest $TMPDIR/nacltest.c >> config.log 2>&1
  19. if [ ! -x $TMPDIR/nacltest ] ; then
  20. @@ -268,7 +268,7 @@ int main(void)
  21. }
  22. EOF
  23. - $CC \
  24. + $CC $CFLAGS $LDFLAGS \
  25. $($PKG_CONFIG --cflags libnl-3.0 2>> config.log) \
  26. $($PKG_CONFIG --cflags libnl-genl-3.0 2>> config.log) \
  27. -o $TMPDIR/libnltest \
  28. @@ -315,7 +315,7 @@ int main(void)
  29. }
  30. EOF
  31. - $CC \
  32. + $CC $CFLAGS $LDFLAGS \
  33. $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \
  34. -o $TMPDIR/libnlroutetest \
  35. $TMPDIR/libnlroutetest.c \
  36. @@ -350,7 +350,7 @@ int main(void)
  37. }
  38. EOF
  39. - $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
  40. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
  41. if [ ! -x $TMPDIR/tpacketv3test ] ; then
  42. echo "[NO]"
  43. MISSING_DEFS=1
  44. @@ -383,7 +383,7 @@ int main(void)
  45. }
  46. EOF
  47. - $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
  48. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
  49. if [ ! -x $TMPDIR/tpacketv2test ] ; then
  50. echo "[NO]"
  51. MISSING_DEFS=1
  52. @@ -410,7 +410,7 @@ int main(void)
  53. }
  54. EOF
  55. - $CC -o $TMPDIR/fopencookietest $TMPDIR/fopencookietest.c >> config.log 2>&1
  56. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/fopencookietest $TMPDIR/fopencookietest.c >> config.log 2>&1
  57. if [ ! -x $TMPDIR/fopencookietest ] ; then
  58. echo "[NO]"
  59. MISSING_DEFS=1
  60. @@ -433,7 +433,7 @@ int main(void)
  61. }
  62. EOF
  63. - $CC \
  64. + $CC $CFLAGS $LDFLAGS \
  65. $($PKG_CONFIG --cflags ncurses 2>> config.log) \
  66. -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \
  67. $($PKG_CONFIG --libs ncurses 2>> config.log \
  68. @@ -476,7 +476,7 @@ int main(void)
  69. }
  70. EOF
  71. - $CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
  72. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
  73. if [ ! -x $TMPDIR/geoiptest ] ; then
  74. echo "[NO]"
  75. MISSING_DEFS=1
  76. @@ -503,7 +503,7 @@ int main(void)
  77. }
  78. EOF
  79. - $CC \
  80. + $CC $CFLAGS $LDFLAGS \
  81. $($PKG_CONFIG --cflags libnetfilter_conntrack 2>> config.log) \
  82. -o $TMPDIR/nfcttest \
  83. $TMPDIR/nfcttest.c \
  84. @@ -536,7 +536,7 @@ int main(void)
  85. }
  86. EOF
  87. - $CC -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
  88. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
  89. if [ ! -x $TMPDIR/ztest ] ; then
  90. echo "[NO]"
  91. echo "CONFIG_LIBZ=0" >> Config
  92. @@ -564,7 +564,7 @@ int main(void)
  93. }
  94. EOF
  95. - $CC -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
  96. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
  97. if [ ! -x $TMPDIR/urcutest ] ; then
  98. echo "[NO]"
  99. MISSING_DEFS=1
  100. @@ -588,7 +588,7 @@ int main(void)
  101. }
  102. EOF
  103. - $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
  104. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
  105. if [ ! -x $TMPDIR/pcaptest ] ; then
  106. echo "[NO]"
  107. echo "CONFIG_LIBPCAP=0" >> Config
  108. @@ -638,7 +638,7 @@ int main(void)
  109. }
  110. EOF
  111. - $CC -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
  112. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
  113. if [ ! -x $TMPDIR/hwtstest ] ; then
  114. echo "[NO]"
  115. echo "CONFIG_HWTSTAMP=0" >> Config
  116. @@ -663,7 +663,7 @@ int main(void)
  117. }
  118. EOF
  119. - $CC -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
  120. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
  121. if [ ! -x $TMPDIR/clitest ] ; then
  122. echo "[NO]"
  123. MISSING_DEFS=1
  124. @@ -687,7 +687,7 @@ int main(void)
  125. }
  126. EOF
  127. - $CC -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
  128. + $CC $CFLAGS $LDFLAGS -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
  129. if [ ! -x $TMPDIR/nettest ] ; then
  130. echo "[NO]"
  131. MISSING_DEFS=1