Add various switches to control how the simulator is built
This commit is contained in:
parent
0e3dd9a071
commit
4b935ed4a4
3 changed files with 546 additions and 26 deletions
|
@ -1,3 +1,17 @@
|
|||
Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* configure.in: Add support for --enable-sim-inline,
|
||||
--enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
|
||||
--enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
|
||||
and --enable-sim-endian switch to control various Makefile
|
||||
variables.
|
||||
* configure: Regenerate from configure.in.
|
||||
* Makefile: Add various Make variables that the various switches
|
||||
alter.
|
||||
|
||||
* std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
|
||||
and optimizing by default.
|
||||
|
||||
Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@cagney@highland.com.au>
|
||||
|
||||
* bits.h (ROTL32, ROTL64): Were functions, made them macros, now
|
||||
|
|
457
sim/ppc/configure
vendored
457
sim/ppc/configure
vendored
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.3
|
||||
# Generated automatically using autoconf version 2.4
|
||||
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
|
@ -216,7 +216,7 @@ EOF
|
|||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.3"
|
||||
echo "configure generated by autoconf version 2.4"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
|
@ -399,6 +399,8 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_aux_dir=
|
||||
for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
|
||||
if test -f $ac_dir/install-sh; then
|
||||
|
@ -524,19 +526,236 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
|||
|
||||
. ${srcdir}/../../bfd/configure.host
|
||||
|
||||
if test -f ${srcdir}/../../bfd/config/${my_host}.mh; then
|
||||
host_makefile_frag=../../bfd/config/${my_host}.mh
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
host_makefile_frag=/dev/null
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
frags=
|
||||
if test $host_makefile_frag != /dev/null; then
|
||||
frags="$frags $host_makefile_frag"
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
if test "${CFLAGS+set}" != set; then
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo 'void f(){}' > conftest.c
|
||||
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
|
||||
ac_cv_prog_gcc_g=yes
|
||||
else
|
||||
ac_cv_prog_gcc_g=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
|
||||
if test $ac_cv_prog_gcc_g = yes; then
|
||||
CFLAGS="-g -O"
|
||||
else
|
||||
CFLAGS="-O"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
AR=${AR-ar}
|
||||
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$RANLIB"; then
|
||||
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_RANLIB="ranlib"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
|
||||
fi
|
||||
fi
|
||||
RANLIB="$ac_cv_prog_RANLIB"
|
||||
if test -n "$RANLIB"; then
|
||||
echo "$ac_t""$RANLIB" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
# Put a plausible default for CC_FOR_BUILD in Makefile.
|
||||
# If we cannot run a trivial program, we must be cross compiling.
|
||||
echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 646 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
eval $ac_link
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
ac_cv_c_cross=yes
|
||||
fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
CC_FOR_BUILD='$(CC)'
|
||||
else
|
||||
CC_FOR_BUILD=gcc
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
# This must be in double quotes, not single quotes, because CPP may get
|
||||
# substituted into the Makefile and "${CC-cc}" will confuse make.
|
||||
CPP="${CC-cc} -E"
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 684 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 698 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
CPP=/lib/cpp
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
rm -f conftest*
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
CPP="$ac_cv_prog_CPP"
|
||||
else
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
for ac_hdr in string.h strings.h stdlib.h time.h sys/times.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 731 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -586,19 +805,7 @@ fi
|
|||
|
||||
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||
|
||||
# Transform confdefs.h into DEFS.
|
||||
# Protect against shell expansion while executing Makefile rules.
|
||||
# Protect against Makefile macro expansion.
|
||||
cat > conftest.defs <<\EOF
|
||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
|
||||
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
||||
s%\[%\\&%g
|
||||
s%\]%\\&%g
|
||||
s%\$%$$%g
|
||||
EOF
|
||||
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
|
||||
rm -f conftest.defs
|
||||
|
||||
DEFS=-DHAVE_CONFIG_H
|
||||
|
||||
# Without the "./", some shells look in PATH for config.status.
|
||||
: ${CONFIG_STATUS=./config.status}
|
||||
|
@ -625,7 +832,7 @@ do
|
|||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.3"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.4"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
|
@ -635,7 +842,7 @@ done
|
|||
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
|
||||
|
@ -666,9 +873,12 @@ s%@build_alias@%$build_alias%g
|
|||
s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
/@host_makefile_frag@/r $host_makefile_frag
|
||||
s%@host_makefile_frag@%%g
|
||||
s%@frags@%$frags%g
|
||||
s%@CC@%$CC%g
|
||||
s%@HDEFINES@%$HDEFINES%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
|
||||
s%@CPP@%$CPP%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
@ -725,11 +935,206 @@ s%@top_srcdir@%$top_srcdir%g
|
|||
fi; done
|
||||
rm -f conftest.subs
|
||||
|
||||
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
|
||||
# NAME is the cpp macro being defined and VALUE is the value it is being given.
|
||||
#
|
||||
# ac_d sets the value in "#define NAME VALUE" lines.
|
||||
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
|
||||
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
|
||||
ac_dC='\3'
|
||||
ac_dD='%g'
|
||||
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
|
||||
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
||||
ac_uB='\([ ]\)%\1#\2define\3'
|
||||
ac_uC=' '
|
||||
ac_uD='\4%g'
|
||||
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
|
||||
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
||||
ac_eB='$%\1#\2define\3'
|
||||
ac_eC=' '
|
||||
ac_eD='%g'
|
||||
|
||||
CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
|
||||
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
|
||||
# Support "outfile[:infile]", defaulting infile="outfile.in".
|
||||
case "$ac_file" in
|
||||
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
|
||||
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
*) ac_file_in="${ac_file}.in" ;;
|
||||
esac
|
||||
|
||||
echo creating $ac_file
|
||||
|
||||
rm -f conftest.frag conftest.in conftest.out
|
||||
cp $ac_given_srcdir/$ac_file_in conftest.in
|
||||
|
||||
EOF
|
||||
|
||||
# Transform confdefs.h into a sed script conftest.vals that substitutes
|
||||
# the proper values into config.h.in to produce config.h. And first:
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
# Protect against being in an unquoted here document in config.status.
|
||||
rm -f conftest.vals
|
||||
cat > conftest.hdr <<\EOF
|
||||
s/[\\&%]/\\&/g
|
||||
s%[\\$`]%\\&%g
|
||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
|
||||
s%ac_d%ac_u%gp
|
||||
s%ac_u%ac_e%gp
|
||||
EOF
|
||||
sed -n -f conftest.hdr confdefs.h > conftest.vals
|
||||
rm -f conftest.hdr
|
||||
|
||||
# This sed command replaces #undef with comments. This is necessary, for
|
||||
# example, in the case of _POSIX_SOURCE, which is predefined and required
|
||||
# on some systems where configure will not decide to define it.
|
||||
cat >> conftest.vals <<\EOF
|
||||
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
|
||||
EOF
|
||||
|
||||
# Break up conftest.vals because some shells have a limit on
|
||||
# the size of here documents, and old seds have small limits too.
|
||||
# Maximum number of lines to put in a single here document.
|
||||
ac_max_here_lines=12
|
||||
|
||||
rm -f conftest.tail
|
||||
while :
|
||||
do
|
||||
ac_lines=`grep -c . conftest.vals`
|
||||
# grep -c gives empty output for an empty file on some AIX systems.
|
||||
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
|
||||
# Write a limited-size here document to conftest.frag.
|
||||
echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
|
||||
sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
|
||||
echo 'CEOF
|
||||
sed -f conftest.frag conftest.in > conftest.out
|
||||
rm -f conftest.in
|
||||
mv conftest.out conftest.in
|
||||
' >> $CONFIG_STATUS
|
||||
sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
|
||||
rm -f conftest.vals
|
||||
mv conftest.tail conftest.vals
|
||||
done
|
||||
rm -f conftest.vals
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
rm -f conftest.frag conftest.h
|
||||
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
|
||||
cat conftest.in >> conftest.h
|
||||
rm -f conftest.in
|
||||
if cmp -s $ac_file conftest.h 2>/dev/null; then
|
||||
echo "$ac_file is unchanged"
|
||||
rm -f conftest.h
|
||||
else
|
||||
rm -f $ac_file
|
||||
mv conftest.h $ac_file
|
||||
fi
|
||||
fi; done
|
||||
|
||||
|
||||
case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x $CONFIG_STATUS
|
||||
rm -fr confdefs* $ac_clean_files
|
||||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
||||
|
||||
if test x"$enable_sim_inline" != x"" -a x"$enable_sim_inline" != x"no"; then
|
||||
flags=""
|
||||
case "$enable_sim_inline" in
|
||||
yes | 2) flags="-DDEFAULT_INLINE=2";;
|
||||
1) flags="-DDEFAULT_INLINE=1";;
|
||||
*) for x in `echo "$enable_sim_inline" | sed -e "s/,/ /g"`; do
|
||||
case "$x" in
|
||||
*_INLINE=*) flags="$flags -D$x";;
|
||||
*_INLINE) flags="$flags -D$x=2";;
|
||||
*=*) x=`sed -e "s/=/_INLINE=/"`; flags="$flags -D$x";;
|
||||
*) flags="$flags -D$x""_INLINE=2";;
|
||||
esac
|
||||
done;;
|
||||
esac
|
||||
if test x"$flags" != x""; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting INLINE_CFLAGS=$flags" 1>&6
|
||||
sed -e "s/^INLINE_CFLAGS.*=.*\$/INLINE_CFLAGS = $flags/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_bswap" != x"" -a x"$enable_sim_bswap" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting BSWAP_CFLAGS=-DWITH_BSWAP=1" 1>&6
|
||||
sed -e "s/^BSWAP_CFLAGS.*=.*\$/BSWAP_CFLAGS = -DWITH_BSWAP=1/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_cflags" != x"" -a x"$enable_sim_cflags" != x"no"; then
|
||||
if test "$enable_sim_cflags" = "yes"; then
|
||||
enable_sim_cflags="-fomit-frame-pointer -O2"
|
||||
fi
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting SIM_CFLAGS=$enable_sim_cflags"
|
||||
sed -e "s/^SIM_CFLAGS.*=.*\$/SIM_CFLAGS = $enable_sim_cflags/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_complex" != x"" -a x"$enable_sim_complex" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_OPCODE_RULES=ppc-opcode-complex" 1>&6
|
||||
sed -e "s/^IGEN_OPCODE_RULES.*=.*\$/IGEN_OPCODE_RULES = ppc-opcode-complex/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_switch" != x"" -a x"$enable_sim_switch" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting DGEN_FLAGS=-s" 1>&6
|
||||
sed -e "s/^DGEN_FLAGS.*=.*\$/DGEN_FLAGS = -s/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_duplicate" != x"" -a x"$enable_sim_duplicate" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_DUPLICATE=-e" 1>&6
|
||||
sed -e "s/^IGEN_DUPLICATE.*=.*\$/IGEN_DUPLICATE = -e/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_filter" = x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_FILTER=" 1>&6
|
||||
sed -e "s/^IGEN_FILTER.*=.*\$/IGEN_FILTER =/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
|
||||
else
|
||||
if test x"$enable_sim_filter" != x"yes"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_FILTER= -f $enable_sim_filter" 1>&6
|
||||
sed -e "s/^IGEN_FILTER.*=.*\$/IGEN_FILTER = -f $enable_sim_filter/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
fi
|
||||
|
||||
endian=""
|
||||
case x"$enable_sim_endian" in
|
||||
xb* | xB*) endian="BIG_ENDIAN";;
|
||||
xl* | xL*) endian="LITTLE_ENDIAN";;
|
||||
xyes) case "$target" in
|
||||
*powerpc-*) endian="BIG_ENDIAN";;
|
||||
*powerpcle-*) endian="LITTLE_ENDIAN";;
|
||||
*) echo "Unknown $target" 1>&6;;
|
||||
esac;;
|
||||
esac
|
||||
if test x"$endian" != x""; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting SIM_ENDIAN=-DWITH_TARGET_BYTE_ORDER=$endian"
|
||||
sed -e "s/^SIM_ENDIAN.*=.*\$/SIM_ENDIAN = -DWITH_TARGET_BYTE_ORDER=$endian/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
|
|
|
@ -30,3 +30,104 @@ AC_CHECK_HEADERS(string.h strings.h stdlib.h time.h sys/times.h)
|
|||
|
||||
AC_OUTPUT(Makefile,
|
||||
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
|
||||
|
||||
if test x"$enable_sim_inline" != x""; then
|
||||
flags=""
|
||||
case "$enable_sim_inline" in
|
||||
no) flags="";;
|
||||
0) flags="-DDEFAULT_INLINE=0";;
|
||||
yes | 2) flags="-DDEFAULT_INLINE=2";;
|
||||
1) flags="-DDEFAULT_INLINE=1";;
|
||||
*) for x in `echo "$enable_sim_inline" | sed -e "s/,/ /g"`; do
|
||||
case "$x" in
|
||||
*_INLINE=*) flags="$flags -D$x";;
|
||||
*_INLINE) flags="$flags -D$x=2";;
|
||||
*=*) x=`sed -e "s/=/_INLINE=/"`; flags="$flags -D$x";;
|
||||
*) flags="$flags -D$x""_INLINE=2";;
|
||||
esac
|
||||
done;;
|
||||
esac
|
||||
if test x"$flags" != x""; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting INLINE_CFLAGS=$flags" 1>&6
|
||||
sed -e "s/^INLINE_CFLAGS.*=.*\$/INLINE_CFLAGS =$flags/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_bswap" != x"" -a x"$enable_sim_bswap" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting BSWAP_CFLAGS=-DWITH_BSWAP=1" 1>&6
|
||||
sed -e "s/^BSWAP_CFLAGS.*=.*\$/BSWAP_CFLAGS = -DWITH_BSWAP=1/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_cflags" != x"" -a x"$enable_sim_cflags" != x"no"; then
|
||||
if test "$enable_sim_cflags" = "yes"; then
|
||||
enable_sim_cflags="-fomit-frame-pointer -O2"
|
||||
fi
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting SIM_CFLAGS=$enable_sim_cflags"
|
||||
sed -e "s/^SIM_CFLAGS.*=.*\$/SIM_CFLAGS = $enable_sim_cflags/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_complex" != x"" -a x"$enable_sim_complex" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_OPCODE_RULES=ppc-opcode-complex" 1>&6
|
||||
sed -e "s/^IGEN_OPCODE_RULES.*=.*\$/IGEN_OPCODE_RULES = ppc-opcode-complex/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_switch" != x"" -a x"$enable_sim_switch" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting DGEN_FLAGS=-s" 1>&6
|
||||
sed -e "s/^DGEN_FLAGS.*=.*\$/DGEN_FLAGS = -s/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_duplicate" != x"" -a x"$enable_sim_duplicate" != x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_DUPLICATE=-e" 1>&6
|
||||
sed -e "s/^IGEN_DUPLICATE.*=.*\$/IGEN_DUPLICATE = -e/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
if test x"$enable_sim_filter" = x"no"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_FILTER=" 1>&6
|
||||
sed -e "s/^IGEN_FILTER.*=.*\$/IGEN_FILTER =/" < Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
|
||||
else
|
||||
if test x"$enable_sim_filter" != x"yes"; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting IGEN_FILTER= -f $enable_sim_filter" 1>&6
|
||||
sed -e "s/^IGEN_FILTER.*=.*\$/IGEN_FILTER = -f $enable_sim_filter/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
fi
|
||||
|
||||
endian=""
|
||||
case x"$enable_sim_endian" in
|
||||
xb* | xB*) endian="BIG_ENDIAN";;
|
||||
xl* | xL*) endian="LITTLE_ENDIAN";;
|
||||
xyes) case "$target" in
|
||||
*powerpc-*) endian="BIG_ENDIAN";;
|
||||
*powerpcle-*) endian="LITTLE_ENDIAN";;
|
||||
*) echo "Unknown $target" 1>&6;;
|
||||
esac;;
|
||||
esac
|
||||
if test x"$endian" != x""; then
|
||||
mv Makefile Makefile.tem
|
||||
echo "Setting SIM_ENDIAN=-DWITH_TARGET_BYTE_ORDER=$endian"
|
||||
sed -e "s/^SIM_ENDIAN.*=.*\$/SIM_ENDIAN = -DWITH_TARGET_BYTE_ORDER=$endian/" \
|
||||
< Makefile.tem > Makefile
|
||||
rm -f Makefile.tem
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue