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.

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