summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Donnelly <mingw.android@gmail.com>2015-11-06 00:20:16 (GMT)
committerRay Donnelly <mingw.android@gmail.com>2015-11-13 02:17:43 (GMT)
commit2cf7a83fded92821a59279cf566fe85fafc35fc8 (patch)
tree1ae532250416de506df6edf79658f056106438a8
parentada8ae30a89eb395e51d6f423c65a57a7dcbfb1b (diff)
Cygwin: Link to libintl for gettext
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
-rwxr-xr-x[-rw-r--r--]Makefile.in1
-rwxr-xr-x[-rw-r--r--]configure.ac6
-rwxr-xr-x[-rw-r--r--]kconfig/Makefile9
3 files changed, 7 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 895983b..59d8e54 100644..100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -75,6 +75,7 @@ export CPPFLAGS := @CPPFLAGS@
export CFLAGS := @CFLAGS@
export LDFLAGS := @LDFLAGS@
export LIBS := @LIBS@
+export INTL_LIBS := @INTL_LIBS@
export curses_hdr := @ac_ct_curses_hdr@
export gettext := @gettext@
diff --git a/configure.ac b/configure.ac
index a4a9cb9..b922482 100644..100755
--- a/configure.ac
+++ b/configure.ac
@@ -321,7 +321,7 @@ AC_FUNC_REALLOC
AC_FUNC_ALLOCA
#----------------------------------------
-# Check for gettext, for the kconfig frontends
+# Check for gettext and libintl for the kconfig frontends
AC_SUBST([gettext])
AC_CHECK_HEADERS(
[libintl.h],
@@ -333,6 +333,10 @@ AS_IF(
[gettext=y],,
[AC_INCLUDES_DEFAULT()
#include <$ac_ct_gettext_hdr>])])
+SAVE_LIBS=$LIBS
+AC_SEARCH_LIBS(bindtextdomain, intl, [test "$ac_res" = "none required" || INTL_LIBS="${ac_res}"])
+LIBS=$SAVE_LIBS
+AC_SUBST([INTL_LIBS])
#----------------------------------------
# Check for ncurses, for the kconfig frontends
diff --git a/kconfig/Makefile b/kconfig/Makefile
index b18ddc0..27482af 100644..100755
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -7,7 +7,7 @@ all: conf mconf nconf
# Build flags
CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\""
-LDFLAGS =
+LDFLAGS = $(INTL_LIBS)
# Compiler flags to use gettext
ifeq ($(gettext),)
@@ -50,13 +50,6 @@ nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses
nconf: LDFLAGS += -lmenu -lpanel -lncurses
-# Under Cygwin, we need to auto-import some libs (which ones, exactly?)
-# for mconf and nconf to lin properly.
-ifeq ($(shell uname -o 2>/dev/null || echo unknown),Cygwin)
-mconf: LDFLAGS += -Wl,--enable-auto-import
-nconf: LDFLAGS += -Wl,--enable-auto-import
-endif
-
# These are generated files:
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ))
ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP))