]> granicus.if.org Git - esp-idf/commitdiff
check-lxdialog.sh: Support libintl on FreeBSD
authorConrad Meyer <cem@FreeBSD.org>
Tue, 12 Mar 2019 16:40:18 +0000 (09:40 -0700)
committerIvan Grokhotkov <ivan@espressif.com>
Thu, 21 Mar 2019 07:06:24 +0000 (15:06 +0800)
To unbreak "make menuconfig."

Merges https://github.com/espressif/esp-idf/pull/3168

tools/kconfig/lxdialog/check-lxdialog.sh

index 9e98145983fdf92856234443eb109628447d34d2..e9daa6270c239b6281176c44554f70eb782a67ea 100755 (executable)
@@ -7,6 +7,10 @@ ldflags()
        if [ $(uname -s) == "Darwin" ]; then 
                #OSX seems to need ncurses too
                echo -n "-lncurses "
+       elif [ $(uname -s) == "FreeBSD" ]; then
+               # On FreeBSD, the linker needs to know to search port libs for
+               # libintl
+               echo -n "-L/usr/local/lib -lintl "
        fi
        pkg-config --libs ncursesw 2>/dev/null && exit
        pkg-config --libs ncurses 2>/dev/null && exit
@@ -44,6 +48,10 @@ ccflags()
        if [ $(uname -s) == "Darwin" ]; then
                #OSX doesn't have libintl
                echo -n "-DKBUILD_NO_NLS -Wno-format-security "
+       elif [ $(uname -s) == "FreeBSD" ]; then
+               # FreeBSD gettext port has libintl.h, but the compiler needs
+               # to know to search port includes
+               echo -n "-I/usr/local/include "
        fi
 }