+2014-03-11 Daiki Ueno <ueno@gnu.org>
+
+ * init-env.in (top_builddir): Don't set $LIBTOOL.
+ * lang-c: Explicitly call $top_builddir/libtool script with
+ $CONFIG_SHELL; also separate compilation/link into two phase as
+ lang-c++.
+ * lang-c++: Likewise.
+ * lang-objc: Likewise.
+
2014-03-10 Daiki Ueno <ueno@gnu.org>
php: Recognize single and double quotes around heredoc label
-# Variable needed by LIBTOOL and LTLIBINTL.
+# Variable needed by LTLIBINTL.
top_builddir=../..
OBJEXT="@OBJEXT@"
CXXFLAGS="@CXXFLAGS@"
CPPFLAGS="@CPPFLAGS@"
LDFLAGS="@LDFLAGS@"
-LIBTOOL="@LIBTOOL@"
LTLIBINTL="@LTLIBINTL@"
JAVA_CHOICE="@JAVA_CHOICE@"
BUILDJAVA="@BUILDJAVA@"
# Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h
# is found in the build directory, regardless of -I options present in
# ${CFLAGS} or ${CPPFLAGS}.
-: ${LIBTOOL=/bin/sh ../../libtool}
-${LIBTOOL} --quiet --tag=CC --mode=link ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-c-prog prog.c ${LTLIBINTL} \
- || exit 1
+${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \
+ ${CPPFLAGS} -c prog.c || exit 1
+
+: ${CONFIG_SHELL=${SHELL-/bin/sh}}
+${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \
+ ${CC} -o l-c-prog prog.${OBJEXT} \
+ ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
+ || exit 1
: ${XGETTEXT=xgettext}
${XGETTEXT} -o l-c-prog.tmp --omit-header --no-location -k_ prog.c || exit 1
# Remove the -Wl,--disable-auto-import option here that is added by
# woe32-dll.m4. Cygwin 1.7.2 does not support it in C++ mode: It gives
# a link error about 'std::cout'.
-: ${LIBTOOL=/bin/sh ../../libtool}
-${LIBTOOL} --quiet --tag=CXX --mode=link --tag=CXX ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o l-c++-prog l-c++-prog.${OBJEXT} ../../../gettext-runtime/libasprintf/libasprintf.la ../../gnulib-lib/libgettextlib.la ${LTLIBINTL} \
- || exit 1
+: ${CONFIG_SHELL=${SHELL-/bin/sh}}
+${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CXX --mode=link \
+ ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o l-c++-prog l-c++-prog.${OBJEXT} \
+ ../../../gettext-runtime/libasprintf/libasprintf.la \
+ ../../gnulib-lib/libgettextlib.la ${LTLIBINTL} \
+ || exit 1
: ${XGETTEXT=xgettext}
${XGETTEXT} -o l-c++-prog.tmp --omit-header --no-location -k_ l-c++-prog.cc || exit 1
# Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h
# is found in the build directory, regardless of -I options present in
# ${CFLAGS} or ${CPPFLAGS}.
-: ${LIBTOOL=/bin/sh ../../libtool}
-${LIBTOOL} --quiet --tag=CC --mode=link ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-prog prog.m ${LTLIBINTL} \
- || exit 1
+${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \
+ ${CPPFLAGS} -c prog.m || exit 1
+
+: ${CONFIG_SHELL=${SHELL-/bin/sh}}
+${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \
+ ${CC} -o l-objc-prog prog.${OBJEXT} \
+ ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
+ || exit 1
: ${XGETTEXT=xgettext}
${XGETTEXT} -o l-objc-prog.tmp --omit-header --no-location -k_ prog.m || exit 1