diff --git a/configure.ac b/configure.ac index fda5650..3a89e7e 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,7 @@ AC_SUBST(WARN_CFLAGS) dnl ========================================================================== +AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler]) AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes") diff --git a/doc/Makefile.am b/doc/Makefile.am index ad68c09..cf1fb89 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -118,6 +118,7 @@ noinst_PROGRAMS = \ edit_sgml_SOURCES = \ edit-sgml.c \ $(NULL) +edit_sgml_CC = $(CC_FOR_BUILD) # check_SCRIPTS = \ check-missing-doc \ @@ -150,14 +151,9 @@ noinst_PROGRAMS += \ htmldoc_DATA += $(HTML_DIR)/* ## -if CROSS_COMPILING -.fncs.sgml: - @echo Warning: cannot rebuild $@ when cross-compiling -else .fncs.sgml: $(AM_V_GEN) $(RM) $@; \ $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml -endif .sgml.txt: $(AM_V_GEN) $(RM) $@; \ $(DOC2TXT) $*.sgml diff --git a/fc-case/Makefile.am b/fc-case/Makefile.am index 9bab1c7..c56e657 100644 --- a/fc-case/Makefile.am +++ b/fc-case/Makefile.am @@ -33,18 +33,13 @@ noinst_PROGRAMS=fc-case noinst_HEADERS=$(TARG) -fc_case_SOURCES= \ - fc-case.c +fc_case_CC = $(CC_FOR_BUILD) CASEFOLDING=CaseFolding.txt SCASEFOLDING=${top_srcdir}/fc-case/CaseFolding.txt EXTRA_DIST = $(TARG) $(TMPL) $(CASEFOLDING) -if CROSS_COMPILING -$(TARG): $(STMPL) fc-case.c $(SCASEFOLDING) - @echo Warning: cannot rebuild $(TARG) when cross-compiling -else ## BUILT_SOURCES doesn't effect to 'distcheck' ## so $(ALIAS_FILES) has to be appeared prior to fc-case$(EXEEXT) ## to make sure availability. @@ -52,7 +47,6 @@ $(TARG): $(STMPL) $(ALIAS_FILES) fc-case$(EXEEXT) $(SCASEFOLDING) $(AM_V_GEN) $(RM) $(TARG); \ ./fc-case$(EXEEXT) $(SCASEFOLDING) < $(STMPL) > $(TARG).tmp && \ mv $(TARG).tmp $(TARG) -endif ALIAS_FILES = fcalias.h fcaliastail.h diff --git a/fc-glyphname/Makefile.am b/fc-glyphname/Makefile.am index f6aeea7..3ddd53a 100644 --- a/fc-glyphname/Makefile.am +++ b/fc-glyphname/Makefile.am @@ -31,15 +31,15 @@ TARG=fcglyphname.h noinst_PROGRAMS=fc-glyphname +noinst_HEADERS=$(TARG) + +fc_glyphname_CC = $(CC_FOR_BUILD) + GLYPHNAME=zapfdingbats.txt SGLYPHNAME=${top_srcdir}/fc-glyphname/zapfdingbats.txt EXTRA_DIST = $(TARG) $(TMPL) $(GLYPHNAME) -if CROSS_COMPILING -$(TARG): $(STMPL) fc-glyphname.c $(SGLYPHNAME) - @echo Warning: cannot rebuild $(TARG) when cross-compiling -else ## BUILT_SOURCES doesn't effect to 'distcheck' ## so $(ALIAS_FILES) has to be appeared prior to fc-glyphname$(EXEEXT) ## to make sure availability. @@ -47,7 +47,6 @@ $(TARG): $(STMPL) $(ALIAS_FILES) fc-glyphname$(EXEEXT) $(SGLYPHNAME) $(AM_V_GEN) $(RM) $(TARG); \ ./fc-glyphname$(EXEEXT) $(SGLYPHNAME) < $(STMPL) > $(TARG).tmp && \ mv $(TARG).tmp $(TARG) -endif ALIAS_FILES = fcalias.h fcaliastail.h diff --git a/fc-lang/Makefile.am b/fc-lang/Makefile.am index 35e94e5..536cff2 100644 --- a/fc-lang/Makefile.am +++ b/fc-lang/Makefile.am @@ -31,14 +31,12 @@ TARG=fclang.h noinst_PROGRAMS=fc-lang -noinst_MANS=fc-lang.man +noinst_HEADERS=$(TARG) + +fc_lang_CC = $(CC_FOR_BUILD) EXTRA_DIST = $(TARG) $(TMPL) $(ORTH) -if CROSS_COMPILING -$(TARG):$(ORTH) fc-lang.c $(STMPL) - @echo Warning: cannot rebuild $(TARG) when cross-compiling -else ## BUILT_SOURCES doesn't effect to 'distcheck' ## so $(ALIAS_FILES) has to be appeared prior to fc-lang$(EXEEXT) ## to make sure availability. @@ -46,7 +44,6 @@ $(TARG):$(ORTH) $(ALIAS_FILES) fc-lang${EXEEXT} $(STMPL) $(AM_V_GEN) $(RM) $(TARG); \ ./fc-lang${EXEEXT} -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG).tmp && \ mv $(TARG).tmp $(TARG) -endif ALIAS_FILES = fcalias.h fcaliastail.h