]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - scripts/kconfig/lxdialog/check-lxdialog.sh
Merge branch 'linus' into stackprotector
[karo-tx-linux.git] / scripts / kconfig / lxdialog / check-lxdialog.sh
index 9681476b96e7fcf371840d78e17aa85657d327a1..fcef0f59d5539c61499e70d2566ccc0c492da90a 100644 (file)
@@ -36,19 +36,23 @@ trap "rm -f $tmp" 0 1 2 3 15
 
 # Check if we can link to ncurses
 check() {
-       echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
+        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
+#include CURSES_LOC
+main() {}
+EOF
        if [ $? != 0 ]; then
-               echo " *** Unable to find the ncurses libraries."          1>&2
-               echo " *** make menuconfig require the ncurses libraries"  1>&2
-               echo " *** "                                               1>&2
-               echo " *** Install ncurses (ncurses-devel) and try again"  1>&2
-               echo " *** "                                               1>&2
-               exit 1
+           echo " *** Unable to find the ncurses libraries or the"       1>&2
+           echo " *** required header files."                            1>&2
+           echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
+           echo " *** "                                                  1>&2
+           echo " *** Install ncurses (ncurses-devel) and try again."    1>&2
+           echo " *** "                                                  1>&2
+           exit 1
        fi
 }
 
 usage() {
-       printf "Usage: $0 [-check compiler options|-header|-library]\n"
+       printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n"
 }
 
 if [ $# -eq 0 ]; then