From: Alexandre Oliva Date: Fri, 26 May 2000 05:43:06 +0000 (+0000) Subject: * configure.in (GCJ): Check. X-Git-Tag: multi-language-merge-point~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a054f0b15d5939a3bdfd2888d51595552d2b8b9;p=thirdparty%2Flibtool.git * configure.in (GCJ): Check. * Makefile.am (CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS, LIBS): Let automake define them implicitly. (EXTRA_DIST, pkgdata_DATA): Added ltcf-gcj.sh. (LIBTOOL_DEPS, LIBTOOL_CXX_DEPS, LIBTOOL_GCJ_DEPS): Define. (libtool): Depend on LIBTOOL_DEPS. Add GCJ tag. (libtool, clibtool): Pass host_triplet to ltconfig. --- diff --git a/ChangeLog b/ChangeLog index 7c686806f..9a015061a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2000-05-26 Alexandre Oliva + * configure.in (GCJ): Check. + * Makefile.am (CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS, LIBS): Let + automake define them implicitly. + (EXTRA_DIST, pkgdata_DATA): Added ltcf-gcj.sh. + (LIBTOOL_DEPS, LIBTOOL_CXX_DEPS, LIBTOOL_GCJ_DEPS): Define. + (libtool): Depend on LIBTOOL_DEPS. Add GCJ tag. + (libtool, clibtool): Pass host_triplet to ltconfig. + * libtool.m4 (_AC_PROG_LIBTOOL): Run before AC_LIBTOOL_GCJ. Add ltcf-c.sh to LIBTOOL_DEPS. Run AC_LIBTOOL_CXX and AC_LIBTOOL_GCJ on demand. diff --git a/Makefile.am b/Makefile.am index 8f7a37b60..9a3740ff6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,23 +6,16 @@ BUILD_SUBDIRS = . libltdl doc tests SUBDIRS = $(BUILD_SUBDIRS) DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS) -# We need to export these variables when we run ltconfig. -CFLAGS = @CFLAGS@ -CPPLAGS = @CPPFLAGS@ -CXXFLAGS = @CXXFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS= @LIBS@ - aclocal_macros = libtool.m4 ltdl.m4 EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \ - ltcf-c.sh ltcf-cxx.sh \ + ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh \ mkstamp ChangeLog.0 ChangeLog.1 CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT # These are required by libtoolize. pkgdata_SCRIPTS = config.guess config.sub ltconfig -pkgdata_DATA = ltmain.sh ltcf-c.sh ltcf-cxx.sh +pkgdata_DATA = ltmain.sh ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh # This macro file should be visible to Automake's aclocal. aclocal_DATA = $(aclocal_macros) @@ -30,7 +23,19 @@ aclocal_DATA = $(aclocal_macros) # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize -libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig +# We have to define these explicitly because we do not use the +# libtool macros that would define them. +if HAVE_CXX +LIBTOOL_CXX_DEPS = $(srcdir)/ltcf-cxx.sh +endif +if HAVE_GCJ +LIBTOOL_GCJ_DEPS = $(srcdir)/ltcf-gcj.sh +endif +LIBTOOL_DEPS = $(srcdir)/ltmain.sh $(srcdir)/ltconfig \ + $(srcdir)/ltcf-c.sh $(LIBTOOL_CXX_DEPS) $(LIBTOOL_GCJ_DEPS) + +libtool: $(LIBTOOL_DEPS) + -rm -f $@T AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ LTCC="$(CC)" FILE="$(FILE)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ @@ -41,7 +46,7 @@ libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig deplibs_check_method="$(deplibs_check_method)" \ file_magic_cmd="$(file_magic_cmd)" \ $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ - --output=$@T $(srcdir)/ltmain.sh + --output=$@T $(srcdir)/ltmain.sh $(host_triplet) if HAVE_CXX AR="$(AR)" CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ LTCC="$(CC)" FILE="$(FILE)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ @@ -53,7 +58,20 @@ if HAVE_CXX deplibs_check_method="$(deplibs_check_method)" \ file_magic_cmd="$(file_magic_cmd)" \ $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ - --output=$@ $(srcdir)/ltmain.sh + --add-tag=CXX --output=$@T $(srcdir)/ltcf-cxx.sh $(host_triplet) +endif +if HAVE_GCJ + AR="$(AR)" CC="$(GCJ)" CFLAGS="$(GCJFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + LTCC="$(CC)" 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)" \ + deplibs_check_method="$(deplibs_check_method)" \ + file_magic_cmd="$(file_magic_cmd)" \ + $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ + --add-tag=GCJ --output=$@T $(srcdir)/ltcf-gcj.sh $(host_triplet) endif -rm -f $@ mv $@T $@ @@ -68,7 +86,7 @@ clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig objext="$(objext)" exeext="$(exeext)" reload_flag="$(reload_flag)" \ deplibs_check_method="$(deplibs_check_method)" file_magic_cmd="$(file_magic_cmd)" \ $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ - --output=$@ $(srcdir)/ltmain.c + --output=$@ $(srcdir)/ltmain.c $(host_triplet) libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status diff --git a/configure.in b/configure.in index 8800372f4..85f53d75c 100644 --- a/configure.in +++ b/configure.in @@ -58,6 +58,11 @@ AC_PROG_CXX popdef([AC_MSG_ERROR]) AM_CONDITIONAL(HAVE_CXX, [test "x$CXX" != xno]) +pushdef([AC_MSG_ERROR], [GCJ=no]) +AM_PROG_GCJ +popdef([AC_MSG_ERROR]) +AM_CONDITIONAL(HAVE_GCJ, [test "x$GCJ" != xno]) + AC_ARG_ENABLE(ltdl-install, [ --disable-ltdl-install do not install libltdl]) if test x"${enable_ltdl_install+set}" != xset; then