one in AC_PROG_LIBTOOL. This adds some ILD related flags to the
invocation, in addition to providing the $libtool_flags to
ltconfig that was previously in AC_PROG_LIBTOOL (via
AC_LIBTOOL_SETUP). This fixes an ILD related bug with the C++
support, and also fixes a problem where both the static and shared
libraries were being built even if one of them was explicitly
disabled.
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
-LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh || AC_MSG_ERROR([libtool tag configuration failed])
+deplibs_check_method="$deplibs_check_method" \
+file_magic_cmd="$file_magic_cmd" \
+LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
+--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh \
+|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
])