@@ -19,11 +19,19 @@ fi ], [ TCC4TCL_TARGET=shared ]) +dnl Configure TCC build options +AC_SUBST(TCC_CONFIGURE_OPTS) TCC_CONFIGURE_OPTS="" + +dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU +if test "${host}" != "${build}"; then + TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${host_alias}- --cpu=${host_cpu} --os=${host_os}" +fi + if test "${TCC4TCL_TARGET}" = "shared"; then dnl Determine how to make shared objects DC_GET_SHOBJFLAGS dnl Only export symbols we wish to expose @@ -34,11 +42,10 @@ else TARGET="tcltcc-static.a" fi AC_SUBST(TARGET) AC_SUBST(TCC4TCL_TARGET) -AC_SUBST(TCC_CONFIGURE_OPTS) dnl Find out if we have the functions needed to open shared objects AC_SEARCH_LIBS(dlopen, dl,, [ AC_SEARCH_LIBS(shl_load, dld dl) ])