diff options
Diffstat (limited to 'sim/ppc/configure')
-rwxr-xr-x | sim/ppc/configure | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sim/ppc/configure b/sim/ppc/configure index abdfdb2..f2f0be8 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -5867,6 +5867,32 @@ $as_echo "no" >&6; } sim_fpu= fi +# Since we run commands on the build system, we have to create a +# separate config header for the build system if build != host. +if test x$host = x$build; then + ac_config_commands="$ac_config_commands build-config.h" + +else + tempdir=build.$$ + rm -rf $tempdir + mkdir $tempdir + cd $tempdir + case ${srcdir} in + /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; + *) realsrcdir=../${srcdir};; + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + LDFLAGS="${LDFLAGS_FOR_BUILD}" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}" + mv config.h ../build-config.h + cd .. + rm -rf $tempdir +fi + @@ -6701,6 +6727,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "build-config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -7247,6 +7274,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "build-config.h":C) cp config.h build-config.h ;; "default":C) case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac ;; esac |