Upstream-Status: Inappropriate [embedded specific] Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure it can't be confused with the host libtool. Originally by: RP Updated: Date: 2010/06/28 Nitin A Kamble It also adjusts libtool so that the header at the script is used for script execution and not thevalue of $SHELL. This is because many Makefiles change $SHELL so dash can get used to execute what is otherwise configured as a bash shell script. Since we don't need to execute scipts this way on any system I'm aware of us building upon, the simplest fix is just to remove $SHELL. Updated: Date: 2011/11/09 RP Index: libtool-2.4.2/libltdl/m4/libtool.m4 =================================================================== --- libtool-2.4.2.orig/libltdl/m4/libtool.m4 +++ libtool-2.4.2/libltdl/m4/libtool.m4 @@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) LIBTOOL_DEPS="$ltmain" # Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIBTOOL='$(top_builddir)' +LIBTOOL="$LIBTOOL/${host_alias}-libtool" AC_SUBST(LIBTOOL)dnl _LT_SETUP @@ -206,7 +207,7 @@ aix3*) esac # Global variables: -ofile=libtool +ofile=${host_alias}-libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, Index: libtool-2.4.2/Makefile.am =================================================================== --- libtool-2.4.2.orig/Makefile.am +++ libtool-2.4.2/Makefile.am @@ -31,7 +31,7 @@ AM_LDFLAGS = DIST_SUBDIRS = . EXTRA_DIST = -BUILT_SOURCES = libtool libtoolize +BUILT_SOURCES = $(host_alias)-libtool libtoolize CLEANFILES = MOSTLYCLEANFILES = @@ -72,7 +72,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \ ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \ ChangeLog.2008 ChangeLog.2009 ChangeLog.2010 -CLEANFILES += libtool libtoolize libtoolize.tmp \ +CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \ $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp ## These are the replacements that need to be made at bootstrap time, @@ -231,7 +231,7 @@ configure_edit = sed \ -e 's,@SED\@,$(SED),g' # The libtool distributor and the standalone libtool script. -bin_SCRIPTS = libtoolize libtool +bin_SCRIPTS = libtoolize $(host_alias)-libtool libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status rm -f libtoolize.tmp libtoolize @@ -244,8 +244,8 @@ libtoolize: $(srcdir)/libtoolize.in $(to # We used to do this with a 'stamp-vcl' file, but non-gmake builds # would rerun configure on every invocation, so now we manually # check the version numbers from the build rule when necessary. -libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog - @target=libtool; $(rebuild); \ +$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog + @target=$(host_alias)-libtool; $(rebuild); \ if test -f "$$target"; then \ set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ test "$$actualver" = "$$correctver" && rebuild=false; \ @@ -254,8 +254,8 @@ libtool: $(top_builddir)/config.status $ case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ done; \ if $$rebuild; then \ - echo $(SHELL) ./config.status $$target; \ - cd $(top_builddir) && $(SHELL) ./config.status $$target; \ + echo $(SHELL) ./config.status libtool; \ + cd $(top_builddir) && $(SHELL) ./config.status libtool; \ fi .PHONY: configure-subdirs @@ -535,12 +535,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$ BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ - LIBTOOL="$(abs_top_builddir)/libtool" \ + LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \ tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4" INSTALLCHECK_ENVIRONMENT = \ LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \ - LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \ + LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \ LTDLINCL="-I$(includedir)" \ LIBLTDL="$(libdir)/libltdl.la" \ tst_aclocaldir="$(aclocaldir)"