diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-09-27 12:20:18 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-09-27 12:20:18 +0000 |
commit | ce0513f81f252026fb705a2bea63cbe1bd10359a (patch) | |
tree | 37ce9febe648fc89f87e8ab5f01c55e3b62af5f0 | |
parent | 4eaa7ce446ce373d58588e7f6c6489201b16d571 (diff) | |
download | master-187ad058-ce0513f81f252026fb705a2bea63cbe1bd10359a.tar.gz master-187ad058-ce0513f81f252026fb705a2bea63cbe1bd10359a.tar.bz2 master-187ad058-ce0513f81f252026fb705a2bea63cbe1bd10359a.zip |
fix lxdialog cc/ldflags check script for darwin/osx
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4864 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | scripts/config/lxdialog/check-lxdialog.sh | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/scripts/config/lxdialog/check-lxdialog.sh b/scripts/config/lxdialog/check-lxdialog.sh index df81c44558..275e395422 100644 --- a/scripts/config/lxdialog/check-lxdialog.sh +++ b/scripts/config/lxdialog/check-lxdialog.sh @@ -4,21 +4,25 @@ # What library to link ldflags() { - $cc -print-file-name=libncursesw.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lncursesw' - exit - fi - $cc -print-file-name=libncurses.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lncurses' - exit - fi - $cc -print-file-name=libcurses.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lcurses' - exit - fi + for ext in so dylib; do + for dir in "" /usr/local/lib /opt/local/lib; do + $cc ${dir:+-L$dir} -print-file-name=libncursesw.$ext | grep -q / + if [ $? -eq 0 ]; then + echo $dir '-lncursesw' + exit + fi + $cc ${dir:+-L$dir} -print-file-name=libncurses.$ext | grep -q / + if [ $? -eq 0 ]; then + echo $dir '-lncurses' + exit + fi + $cc ${dir:+-L$dir} -print-file-name=libcurses.$ext | grep -q / + if [ $? -eq 0 ]; then + echo $dir '-lcurses' + exit + fi + done + done exit 1 } @@ -29,6 +33,8 @@ ccflags() echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' + elif [ -f /opt/local/include/ncurses/ncurses.h ]; then + echo '-I/opt/local/include/ncurses -DCURSES_LOC="<ncurses/ncurses.h>"' elif [ -f /usr/include/ncurses.h ]; then echo '-DCURSES_LOC="<ncurses.h>"' else |