* config.in (WORDS_BIGENDIAN): Add.
* configure: Regenerated. * d10v_sim.h: #include "config.h"
This commit is contained in:
parent
520e44a15a
commit
72eeb00634
|
@ -1,3 +1,14 @@
|
|||
Mon Nov 25 19:47:40 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* config.in (WORDS_BIGENDIAN): Add.
|
||||
* configure: Regenerated.
|
||||
* d10v_sim.h: #include "config.h"
|
||||
|
||||
Sat Nov 23 09:34:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* gencode.c (write_opcodes): Eliminate warnings when generated
|
||||
table.c is compiled.
|
||||
|
||||
Wed Nov 20 19:41:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* interp.c (sim_open): Cast result of calloc, and make sure NULL
|
||||
|
|
|
@ -13,6 +13,12 @@ ac_default_prefix=/usr/local
|
|||
# Any additions from configure.in:
|
||||
ac_help="$ac_help
|
||||
--enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
|
||||
ac_help="$ac_help
|
||||
--enable-sim-debug=opts Enable debugging flags"
|
||||
ac_help="$ac_help
|
||||
--enable-sim-trace=opts Enable tracing flags"
|
||||
ac_help="$ac_help
|
||||
--enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums."
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
|
@ -515,6 +521,36 @@ fi
|
|||
|
||||
|
||||
|
||||
# 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 534 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
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
|
||||
|
||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
|
||||
|
||||
# autoconf.info says this should be called right after AC_INIT.
|
||||
|
||||
|
||||
ac_aux_dir=
|
||||
for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
|
||||
if test -f $ac_dir/install-sh; then
|
||||
|
@ -725,7 +761,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -821,32 +857,6 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
|||
|
||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
# 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 834 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
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
|
||||
|
||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
|
||||
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -854,7 +864,7 @@ else
|
|||
ac_cv_c_bigendian=unknown
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 858 "configure"
|
||||
#line 868 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -866,11 +876,11 @@ int t() {
|
|||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 874 "configure"
|
||||
#line 884 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -882,7 +892,7 @@ int t() {
|
|||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_bigendian=yes
|
||||
else
|
||||
|
@ -899,7 +909,7 @@ if test "$cross_compiling" = yes; then
|
|||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 903 "configure"
|
||||
#line 913 "configure"
|
||||
#include "confdefs.h"
|
||||
main () {
|
||||
/* Are we little or big endian? From Harbison&Steele. */
|
||||
|
@ -912,7 +922,7 @@ main () {
|
|||
exit (u.c[sizeof (long) - 1] == 1);
|
||||
}
|
||||
EOF
|
||||
{ (eval echo configure:916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_bigendian=no
|
||||
else
|
||||
|
@ -942,11 +952,11 @@ else
|
|||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 946 "configure"
|
||||
#line 956 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
|
@ -965,24 +975,6 @@ else
|
|||
CC_FOR_BUILD=gcc
|
||||
fi
|
||||
|
||||
. ${srcdir}/../../bfd/configure.host
|
||||
|
||||
# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
|
||||
if test "${enable_sim_cflags+set}" = set; then
|
||||
enableval="$enable_sim_cflags"
|
||||
case "${enableval}" in
|
||||
yes) sim_cflags="-O2";;
|
||||
trace) sim_cflags="-O2 -DDEBUG=3";;
|
||||
no) sim_cflags="";;
|
||||
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
|
||||
echo "Setting sim cflags = $sim_cflags" 6>&1
|
||||
fi
|
||||
else
|
||||
sim_cflags=""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1017,39 +1009,181 @@ else
|
|||
fi
|
||||
|
||||
|
||||
. ${srcdir}/../../bfd/configure.host
|
||||
|
||||
# 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
|
||||
|
||||
# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
|
||||
if test "${enable_sim_cflags+set}" = set; then
|
||||
enableval="$enable_sim_cflags"
|
||||
case "${enableval}" in
|
||||
yes) sim_cflags="-O2";;
|
||||
trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
|
||||
no) sim_cflags="";;
|
||||
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
|
||||
echo "Setting sim cflags = $sim_cflags" 6>&1
|
||||
fi
|
||||
else
|
||||
sim_cflags=""
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-sim-debug or --disable-sim-debug was given.
|
||||
if test "${enable_sim_debug+set}" = set; then
|
||||
enableval="$enable_sim_debug"
|
||||
case "${enableval}" in
|
||||
yes) sim_debug="-DDEBUG=7";;
|
||||
no) sim_debug="-DDEBUG=0";;
|
||||
*) sim_debug="-DDEBUG='(${enableval})'";;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
|
||||
echo "Setting sim debug = $sim_debug" 6>&1
|
||||
fi
|
||||
else
|
||||
sim_debug=""
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-sim-trace or --disable-sim-trace was given.
|
||||
if test "${enable_sim_trace+set}" = set; then
|
||||
enableval="$enable_sim_trace"
|
||||
case "${enableval}" in
|
||||
yes) sim_trace="-DTRACE=1";;
|
||||
no) sim_trace="-DTRACE=0";;
|
||||
*) sim_trace="-DTRACE='(${enableval})'";;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
|
||||
echo "Setting sim trace = $sim_trace" 6>&1
|
||||
fi
|
||||
else
|
||||
sim_trace=""
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
|
||||
if test "${enable_sim_bswap+set}" = set; then
|
||||
enableval="$enable_sim_bswap"
|
||||
case "${enableval}" in
|
||||
yes) sim_bswap="-DUSE_BSWAP";;
|
||||
no) sim_bswap="";;
|
||||
*) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
|
||||
echo "Setting bswap flags = $sim_bswap" 6>&1
|
||||
fi
|
||||
else
|
||||
sim_bswap=""
|
||||
fi
|
||||
|
||||
|
||||
sim_link_files=
|
||||
sim_link_links=
|
||||
|
||||
sim_link_links=tconfig.h
|
||||
if test -f ${srcdir}/tconfig.in
|
||||
then
|
||||
sim_link_files=tconfig.in
|
||||
else
|
||||
sim_link_files=../common/tconfig.in
|
||||
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
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_c_cross=yes
|
||||
# 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 1109 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
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 1124 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
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 unistd.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 1032 "configure"
|
||||
#line 1158 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
{ (eval echo configure:1036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
ac_cv_c_cross=yes
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
rm -fr 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 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
|
||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
CC_FOR_BUILD='$(CC)'
|
||||
else
|
||||
CC_FOR_BUILD=gcc
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
|
@ -1101,19 +1235,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}
|
||||
|
@ -1151,7 +1273,7 @@ done
|
|||
ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
@ -1204,12 +1326,16 @@ s%@HDEFINES@%$HDEFINES%g
|
|||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@sim_cflags@%$sim_cflags%g
|
||||
s%@sim_debug@%$sim_debug%g
|
||||
s%@sim_trace@%$sim_trace%g
|
||||
s%@sim_bswap@%$sim_bswap%g
|
||||
s%@CPP@%$CPP%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
@ -1265,7 +1391,164 @@ s%@INSTALL@%$INSTALL%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
|
||||
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
||||
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
||||
# The file is in a subdirectory.
|
||||
test ! -d "$ac_dir" && mkdir "$ac_dir"
|
||||
fi
|
||||
rm -f $ac_file
|
||||
mv conftest.h $ac_file
|
||||
fi
|
||||
fi; done
|
||||
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
ac_sources="$sim_link_files"
|
||||
ac_dests="$sim_link_links"
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
srcdir=$ac_given_srcdir
|
||||
while test -n "$ac_sources"; do
|
||||
set $ac_dests; ac_dest=$1; shift; ac_dests=$*
|
||||
set $ac_sources; ac_source=$1; shift; ac_sources=$*
|
||||
|
||||
echo "linking $srcdir/$ac_source to $ac_dest"
|
||||
|
||||
if test ! -r $srcdir/$ac_source; then
|
||||
{ echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
|
||||
fi
|
||||
rm -f $ac_dest
|
||||
|
||||
# Make relative symlinks.
|
||||
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||
ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
|
||||
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
|
||||
# The dest file is in a subdirectory.
|
||||
test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
|
||||
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
|
||||
# A "../" for each directory in $ac_dest_dir_suffix.
|
||||
ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
|
||||
else
|
||||
ac_dest_dir_suffix= ac_dots=
|
||||
fi
|
||||
|
||||
case "$srcdir" in
|
||||
[/$]*) ac_rel_source="$srcdir/$ac_source" ;;
|
||||
*) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
|
||||
esac
|
||||
|
||||
# Make a symlink if possible; otherwise try a hard link.
|
||||
if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
|
||||
ln $srcdir/$ac_source $ac_dest; then :
|
||||
else
|
||||
{ echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
case "x$CONFIG_FILES" in xMakefile*)
|
||||
echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
|
||||
rm -f Makesim1.tmp Makesim2.tmp Makefile
|
||||
sed -n -e '/^## Begin config/,/^## End config/ p' <Makefile.sim >Makesim1.tmp
|
||||
sed -e '/^## Begin config/,/^## End config/ d' <Makefile.sim >Makesim2.tmp
|
||||
cat Make-common.sim Makesim2.tmp | sed -e '/^## Config/ r Makesim1.tmp' >Makefile
|
||||
rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
|
||||
;;
|
||||
esac
|
||||
case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
@ -1273,3 +1556,4 @@ chmod +x $CONFIG_STATUS
|
|||
rm -fr confdefs* $ac_clean_files
|
||||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue