aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-04-04 16:22:54 +0100
committerRon Yorston <rmy@pobox.com>2016-04-04 16:22:54 +0100
commit253dbd612b2d2f041f4263e15a3b94df70f41e36 (patch)
treef6c6e12a0541233058a7f7ccb1251afeb457da06 /scripts
parent3cf56a021d7a62512b477640e930e1a78288075c (diff)
parentd7d4750e1e213e7448147186dddfe3bfbb47eea0 (diff)
downloadbusybox-w32-253dbd612b2d2f041f4263e15a3b94df70f41e36.tar.gz
busybox-w32-253dbd612b2d2f041f4263e15a3b94df70f41e36.tar.bz2
busybox-w32-253dbd612b2d2f041f4263e15a3b94df70f41e36.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--]scripts/kconfig/lxdialog/check-lxdialog.sh17
-rwxr-xr-xscripts/trylink2
2 files changed, 13 insertions, 6 deletions
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index d34dfd46d..5075ebf2d 100644..100755
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,7 +4,9 @@
4# What library to link 4# What library to link
5ldflags() 5ldflags()
6{ 6{
7 for ext in so a dylib ; do 7 pkg-config --libs ncursesw 2>/dev/null && exit
8 pkg-config --libs ncurses 2>/dev/null && exit
9 for ext in so a dll.a dylib ; do
8 for lib in ncursesw ncurses curses ; do 10 for lib in ncursesw ncurses curses ; do
9 $cc -print-file-name=lib${lib}.${ext} | grep -q / 11 $cc -print-file-name=lib${lib}.${ext} | grep -q /
10 if [ $? -eq 0 ]; then 12 if [ $? -eq 0 ]; then
@@ -19,14 +21,17 @@ ldflags()
19# Where is ncurses.h? 21# Where is ncurses.h?
20ccflags() 22ccflags()
21{ 23{
22 if [ -f /usr/include/ncursesw/ncurses.h ]; then 24 if pkg-config --cflags ncursesw 2>/dev/null; then
23 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"' 25 echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
26 elif pkg-config --cflags ncurses 2>/dev/null; then
27 echo '-DCURSES_LOC="<ncurses.h>"'
24 elif [ -f /usr/include/ncursesw/curses.h ]; then 28 elif [ -f /usr/include/ncursesw/curses.h ]; then
25 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' 29 echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
30 echo ' -DNCURSES_WIDECHAR=1'
26 elif [ -f /usr/include/ncurses/ncurses.h ]; then 31 elif [ -f /usr/include/ncurses/ncurses.h ]; then
27 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' 32 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
28 elif [ -f /usr/include/ncurses/curses.h ]; then 33 elif [ -f /usr/include/ncurses/curses.h ]; then
29 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' 34 echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
30 elif [ -f /usr/include/ncurses.h ]; then 35 elif [ -f /usr/include/ncurses.h ]; then
31 echo '-DCURSES_LOC="<ncurses.h>"' 36 echo '-DCURSES_LOC="<ncurses.h>"'
32 else 37 else
@@ -40,7 +45,7 @@ trap "rm -f $tmp" 0 1 2 3 15
40 45
41# Check if we can link to ncurses 46# Check if we can link to ncurses
42check() { 47check() {
43 $cc -xc - -o $tmp 2>/dev/null <<'EOF' 48 $cc -x c - -o $tmp 2>/dev/null <<'EOF'
44#include CURSES_LOC 49#include CURSES_LOC
45main() {} 50main() {}
46EOF 51EOF
diff --git a/scripts/trylink b/scripts/trylink
index 3c431edc3..15435f009 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -140,6 +140,8 @@ try $CC $CFLAGS $LDFLAGS \
140|| { 140|| {
141 echo "Failed: $l_list" 141 echo "Failed: $l_list"
142 cat $EXE.out 142 cat $EXE.out
143 echo 'Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.'
144 echo 'Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"'
143 exit 1 145 exit 1
144} 146}
145 147