From: Ossama Othman Date: Sun, 5 Dec 1999 22:41:28 +0000 (+0000) Subject: Make sure AC_LIBTOOL_SETUP is called before any macros that set X-Git-Tag: multi-language-merge-point~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d572782dda55169a2a0e678ce092126ef617ad94;p=thirdparty%2Flibtool.git Make sure AC_LIBTOOL_SETUP is called before any macros that set the autoconf test language (e.g. AC_LANG_CPLUSPLUS). Autoconf's AC_EXEEXT macro only works for C compilers. AC_EXEEXT gets confused and thinks that an extension such as the C++ source file extenstion ".C" is an executable file extension, which screws up the libtool configuration. Pass the same autoconf variables used in the main ltconfig run to the ltconfig configuration tag run (with the exception of a few). This probably isn't necessary but I think it is a good idea to do so. --- diff --git a/libtool.m4 b/libtool.m4 index 527f096da..e46ec05c1 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -29,8 +29,8 @@ AC_DEFUN(AC_PROG_LIBTOOL, AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. -AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -FILE="$FILE" LTCC="$CC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ @@ -56,6 +56,13 @@ exec 5>>./config.log AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl +# Autoconf's AC_EXEEXT macro only works for C compilers. AC_EXEEXT +# gets confused and thinks that an extension such as the C++ source +# file extenstion ".C" is an executable file extension, which screws +# up the libtool configuration. +AC_BEFORE([AC_LIBTOOL_SETUP],[AC_LANG_CPLUSPLUS]) +AC_BEFORE([AC_LIBTOOL_SETUP],[AC_LANG_FORTRAN77]) +# AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl @@ -678,9 +685,13 @@ lt_save_CC="$CC" 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. +AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ +FILE="$FILE" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" \ 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])