Fixed support for cross-compilation.

This commit is contained in:
gilles.chanteperdrix 2005-03-25 17:57:32 +11:00 committed by Herbert Xu
parent 6c38af156c
commit abbb74506f
3 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2005-03-25 Gilles Chanteperdrix <gilles.chanteperdrix@laposte.net>
* Fixed support for cross-compilation.
2005-03-03 Herbert Xu <herbert@gondor.apana.org.au>
* Removed qflag.

View File

@ -1,6 +1,6 @@
dnl $Id$
AC_INIT(dash, 0.5.2)
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS(config.h)
@ -10,6 +10,15 @@ AC_PROG_CC
AC_GNU_SOURCE
AC_PROG_YACC
AC_MSG_CHECKING([for build system compiler])
if test "$cross_compiling" = yes; then
CC_FOR_BUILD=${CC_FOR_BUILD-cc}
else
CC_FOR_BUILD=${CC}
fi
AC_MSG_RESULT(${CC_FOR_BUILD})
AC_SUBST(CC_FOR_BUILD)
dnl Checks for libraries.
dnl Checks for header files.

View File

@ -3,7 +3,7 @@
AM_CPPFLAGS = -include $(top_builddir)/config.h
AM_YFLAGS = -d
CFLAGS = -g -O2 -Wall
AM_CFLAGS = -g -O2 -Wall
DEFS = \
-DBSD=1 -DSMALL -DSHELL \
-DGLOB_BROKEN -DFNMATCH_BROKEN -DIFS_BROKEN \
@ -24,6 +24,8 @@ dash_SOURCES = \
show.h system.h trap.h var.h
dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o
HELPERS = mkinit mksyntax mknodes mksignames
BUILT_SOURCES = arith.h builtins.h nodes.h syntax.h token.h
CLEANFILES = \
$(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \
@ -52,3 +54,6 @@ syntax.c syntax.h: mksyntax
signames.c: mksignames
./$^
$(HELPERS): %: %.c
$(CC_FOR_BUILD) -o $@ $<