summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcore/src/xmake/xmake.sh1
-rwxr-xr-xcore/xmake.sh10
2 files changed, 8 insertions, 3 deletions
diff --git a/core/src/xmake/xmake.sh b/core/src/xmake/xmake.sh
index 62af5b2fa..d6bd0c2c4 100755
--- a/core/src/xmake/xmake.sh
+++ b/core/src/xmake/xmake.sh
@@ -72,6 +72,7 @@ target "xmake"
add_files "string/*.c"
add_files "tty/*.c"
if is_plat "mingw"; then
+ add_defines "UNICODE" "_UNICODE"
add_files "winos/*.c"
fi
diff --git a/core/xmake.sh b/core/xmake.sh
index 1abf0dcfc..531b34202 100755
--- a/core/xmake.sh
+++ b/core/xmake.sh
@@ -38,7 +38,7 @@ option "external" "Always use external dependencies" false
# the readline option
option "readline"
add_links "readline"
- add_cincludes "readline/readline.h"
+ add_cincludes "stdio.h" "readline/readline.h"
add_cfuncs "readline"
add_defines "XM_CONFIG_API_HAVE_READLINE"
option_end
@@ -52,11 +52,15 @@ option "curses"
option_end
option_find_curses() {
+ local ncurses="ncurses"
+ if is_plat "mingw"; then
+ ncurses="ncursesw"
+ fi
local ncurses_ldflags=""
- ncurses_ldflags=$(pkg-config --libs ncurses 2>/dev/null)
+ ncurses_ldflags=$(pkg-config --libs ${ncurses} 2>/dev/null)
option "curses"
if test_nz "${ncurses_ldflags}"; then
- add_cflags `pkg-config --cflags ncurses 2>/dev/null`
+ add_cflags `pkg-config --cflags ${ncurses} 2>/dev/null`
add_ldflags "${ncurses_ldflags}"
else
add_links "curses"