#include "debug.h"
#include "target.h"
#include "target-def.h"
+#include "integrate.h"
#ifdef __GNU_STAB__
#define STAB_CODE_TYPE enum __stab_debug_code
ITEST_MAX
};
+/* Return true if it is likely that the given mode will be accessed
+ using only a single instruction. */
+#define SINGLE_WORD_MODE_P(MODE) \
+ ((MODE) != BLKmode && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD)
+
+
+/* Classifies a non-literal integer constant.
+
+ CONSTANT_NONE
+ Not one of the constants below.
+
+ CONSTANT_GP
+ The global pointer, treated as a constant when TARGET_MIPS16.
+ The rtx has the form:
+
+ (const (reg $gp)).
+
+ CONSTANT_RELOC
+ A signed 16-bit relocation against either a symbol
+ or a symbol plus an offset. The relocation has the form:
+
+ (unspec [(SYMBOL) ...] RELOC)
+
+ Any offset is added outside the unspec, such as:
+
+ (plus (unspec [(SYMBOL) ...] RELOC) (const_int OFFSET))
+
+ In either case, the whole expression is wrapped in a (const ...).
+
+ CONSTANT_SYMBOLIC
+ A reference to a symbol, possibly with an offset. */
+enum mips_constant_type {
+ CONSTANT_NONE,
+ CONSTANT_GP,
+ CONSTANT_RELOC,
+ CONSTANT_SYMBOLIC
+};
+
+
+/* Classifies a SYMBOL_REF or LABEL_REF.
+
+ SYMBOL_GENERAL
+ Used when none of the below apply.
+
+ SYMBOL_SMALL_DATA
+ The symbol refers to something in a small data section.
+
+ SYMBOL_CONSTANT_POOL
+ The symbol refers to something in the mips16 constant pool.
+
+ SYMBOL_GOT_LOCAL
+ The symbol refers to local data that will be found using
+ the global offset table.
+
+ SYMBOL_GOT_GLOBAL
+ Likewise non-local data. */
+enum mips_symbol_type {
+ SYMBOL_GENERAL,
+ SYMBOL_SMALL_DATA,
+ SYMBOL_CONSTANT_POOL,
+ SYMBOL_GOT_LOCAL,
+ SYMBOL_GOT_GLOBAL
+};
+
+
+/* Classifies an address.
+
+ ADDRESS_INVALID
+ The address should be rejected as invalid.
+
+ ADDRESS_REG
+ A natural register + offset address. The register satisfies
+ mips_valid_base_register_p and the offset is a const_arith_operand.
+
+ ADDRESS_LO_SUM
+ A LO_SUM rtx. The first operand is a valid base register and
+ the second operand is a symbolic address.
+
+ ADDRESS_CONST_INT
+ A signed 16-bit constant address.
+
+ ADDRESS_SYMBOLIC:
+ A constant symbolic address (equivalent to CONSTANT_SYMBOLIC). */
+enum mips_address_type {
+ ADDRESS_INVALID,
+ ADDRESS_REG,
+ ADDRESS_LO_SUM,
+ ADDRESS_CONST_INT,
+ ADDRESS_SYMBOLIC
+};
+
struct constant;
struct mips_arg_info;
+struct mips_constant_info;
+struct mips_address_info;
+static enum mips_constant_type mips_classify_constant
+ PARAMS ((struct mips_constant_info *, rtx));
+static enum mips_symbol_type mips_classify_symbol
+ PARAMS ((rtx));
+static bool mips_valid_base_register_p
+ PARAMS ((rtx, enum machine_mode, int));
+static bool mips_symbolic_address_p
+ PARAMS ((rtx, HOST_WIDE_INT,
+ enum machine_mode, int));
+static enum mips_address_type mips_classify_address
+ PARAMS ((struct mips_address_info *,
+ rtx, enum machine_mode, int, int));
static enum internal_test map_test_to_internal_test PARAMS ((enum rtx_code));
static void get_float_compare_codes PARAMS ((enum rtx_code, enum rtx_code *,
enum rtx_code *));
-static int mips16_simple_memory_operand PARAMS ((rtx, rtx,
- enum machine_mode));
+static const char *mips_reloc_string PARAMS ((int));
+static bool mips_splittable_symbol_p PARAMS ((enum mips_symbol_type));
+static int mips_symbol_insns PARAMS ((enum mips_symbol_type));
+static bool mips16_unextended_reference_p
+ PARAMS ((enum machine_mode mode,
+ rtx, rtx));
+static rtx mips_force_temporary PARAMS ((rtx, rtx));
+static rtx mips_add_offset PARAMS ((rtx, HOST_WIDE_INT));
+static rtx mips_load_got PARAMS ((rtx, rtx, int));
+static rtx mips_load_got16 PARAMS ((rtx, int));
+static rtx mips_load_got32 PARAMS ((rtx, rtx, int, int));
+static rtx mips_emit_high PARAMS ((rtx, rtx));
+static bool mips_legitimize_symbol PARAMS ((rtx, rtx *, int));
+static rtx mips_reloc PARAMS ((rtx, int));
+static rtx mips_lui_reloc PARAMS ((rtx, int));
+static void mips_legitimize_const_move PARAMS ((enum machine_mode,
+ rtx, rtx));
static int m16_check_op PARAMS ((rtx, int, int, int));
+static bool mips_function_ok_for_sibcall PARAMS ((tree, tree));
static void block_move_loop PARAMS ((rtx, rtx,
unsigned int,
int,
enum machine_mode,
tree, int,
struct mips_arg_info *));
+static bool mips_get_unaligned_mem PARAMS ((rtx *, unsigned int,
+ int, rtx *, rtx *));
static rtx mips_add_large_offset_to_sp PARAMS ((HOST_WIDE_INT));
static void mips_annotate_frame_insn PARAMS ((rtx, rtx));
static rtx mips_frame_set PARAMS ((enum machine_mode,
static void mips_emit_frame_related_store PARAMS ((rtx, rtx,
HOST_WIDE_INT));
static void save_restore_insns PARAMS ((int, rtx, long));
-static void mips16_output_gp_offset PARAMS ((FILE *, rtx));
static void mips16_fp_args PARAMS ((FILE *, int, int));
static void build_mips16_function_stub PARAMS ((FILE *));
static void mips16_optimize_gp PARAMS ((rtx));
static void mips_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static int mips_use_dfa_pipeline_interface PARAMS ((void));
-static void mips_encode_section_info PARAMS ((tree, rtx, int));
static bool mips_rtx_costs PARAMS ((rtx, int, int, int *));
-static int mips_address_cost PARAMS ((rtx));
+static int mips_address_cost PARAMS ((rtx));
+static void mips_encode_section_info PARAMS ((tree, rtx, int));
/* Structure to be filled in by compute_frame_size with register
unsigned int stack_offset;
};
+
+/* Struct for recording constants. The meaning of the fields depends
+ on a mips_constant_type:
+
+ CONSTANT_NONE
+ CONSTANT_GP
+ No fields are valid.
+
+ CONSTANT_RELOC
+ SYMBOL is the relocation UNSPEC and OFFSET is the offset applied
+ to the symbol.
+
+ CONSTANT_SYMBOLIC
+ SYMBOL is the referenced symbol and OFFSET is the constant offset. */
+struct mips_constant_info
+{
+ rtx symbol;
+ HOST_WIDE_INT offset;
+};
+
+
+/* Information about an address described by mips_address_type.
+
+ ADDRESS_INVALID
+ ADDRESS_CONST_INT
+ No fields are used.
+
+ ADDRESS_REG
+ REG is the base register and OFFSET is the constant offset.
+
+ ADDRESS_LO_SUM
+ REG is the register that contains the high part of the address,
+ OFFSET is the symbolic address being referenced, and C contains
+ the individual components of the symbolic address.
+
+ ADDRESS_SYMBOLIC
+ C contains the symbol and offset. */
+struct mips_address_info
+{
+ rtx reg;
+ rtx offset;
+ struct mips_constant_info c;
+};
+
+
/* Global variables for machine-dependent things. */
/* Threshold for data being put into the small data/bss area, instead
turn on .set volatile. */
static char volatile_buffer[60];
+/* An alias set for the GOT. */
+static int mips_got_alias_set;
+
+static GTY (()) int mips_output_filename_first_time = 1;
+
/* Hardware names for the registers. If -mrnames is used, this
will be overwritten with mips_sw_reg_names. */
"$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",
"$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31",
"hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4",
- "$fcc5","$fcc6","$fcc7","$rap", "", "", "", "",
+ "$fcc5","$fcc6","$fcc7","", "", "", "", "",
"$c0r0", "$c0r1", "$c0r2", "$c0r3", "$c0r4", "$c0r5", "$c0r6", "$c0r7",
"$c0r8", "$c0r9", "$c0r10","$c0r11","$c0r12","$c0r13","$c0r14","$c0r15",
"$c0r16","$c0r17","$c0r18","$c0r19","$c0r20","$c0r21","$c0r22","$c0r23",
/* Map hard register number to register class */
const enum reg_class mips_regno_to_class[] =
{
- GR_REGS, GR_REGS, M16_NA_REGS, M16_NA_REGS,
+ LEA_REGS, LEA_REGS, M16_NA_REGS, M16_NA_REGS,
M16_REGS, M16_REGS, M16_REGS, M16_REGS,
- GR_REGS, GR_REGS, GR_REGS, GR_REGS,
- GR_REGS, GR_REGS, GR_REGS, GR_REGS,
- M16_NA_REGS, M16_NA_REGS, GR_REGS, GR_REGS,
- GR_REGS, GR_REGS, GR_REGS, GR_REGS,
- T_REG, GR_REGS, GR_REGS, GR_REGS,
- GR_REGS, GR_REGS, GR_REGS, GR_REGS,
+ LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS,
+ LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS,
+ M16_NA_REGS, M16_NA_REGS, LEA_REGS, LEA_REGS,
+ LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS,
+ T_REG, PIC_FN_ADDR_REG, LEA_REGS, LEA_REGS,
+ LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS,
FP_REGS, FP_REGS, FP_REGS, FP_REGS,
FP_REGS, FP_REGS, FP_REGS, FP_REGS,
FP_REGS, FP_REGS, FP_REGS, FP_REGS,
FP_REGS, FP_REGS, FP_REGS, FP_REGS,
HI_REG, LO_REG, HILO_REG, ST_REGS,
ST_REGS, ST_REGS, ST_REGS, ST_REGS,
- ST_REGS, ST_REGS, ST_REGS, GR_REGS,
+ ST_REGS, ST_REGS, ST_REGS, NO_REGS,
NO_REGS, NO_REGS, NO_REGS, NO_REGS,
COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS,
COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS,
#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE mips_use_dfa_pipeline_interface
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO mips_encode_section_info
+#undef TARGET_FUNCTION_OK_FOR_SIBCALL
+#define TARGET_FUNCTION_OK_FOR_SIBCALL mips_function_ok_for_sibcall
#undef TARGET_VALID_POINTER_MODE
#define TARGET_VALID_POINTER_MODE mips_valid_pointer_mode
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST mips_address_cost
+#undef TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO mips_encode_section_info
+
struct gcc_target targetm = TARGET_INITIALIZER;
\f
-/* Return truth value of whether OP can be used as an operands
- where a register or 16 bit unsigned integer is needed. */
+/* If X is one of the constants described by mips_constant_type,
+ store its components in INFO and return its type. */
-int
-uns_arith_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+static enum mips_constant_type
+mips_classify_constant (info, x)
+ struct mips_constant_info *info;
+ rtx x;
{
- if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (op))
- return 1;
+ info->offset = 0;
+ info->symbol = x;
+ if (GET_CODE (x) == CONST)
+ {
+ x = XEXP (x, 0);
- return register_operand (op, mode);
+ if (GET_CODE (x) == REG && REGNO (x) == GP_REG_FIRST + 28)
+ return CONSTANT_GP;
+
+ while (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT)
+ {
+ info->offset += INTVAL (XEXP (x, 1));
+ x = XEXP (x, 0);
+ }
+ info->symbol = x;
+ if (GET_CODE (x) == UNSPEC)
+ switch (XINT (x, 1))
+ {
+ case RELOC_GPREL16:
+ case RELOC_GOT_PAGE:
+ /* These relocations can be applied to symbols with offsets. */
+ return CONSTANT_RELOC;
+
+ case RELOC_GOT_HI:
+ case RELOC_GOT_LO:
+ case RELOC_GOT_DISP:
+ case RELOC_CALL16:
+ case RELOC_CALL_HI:
+ case RELOC_CALL_LO:
+ /* These relocations should be applied to bare symbols only. */
+ return (info->offset == 0 ? CONSTANT_RELOC : CONSTANT_NONE);
+ }
+ }
+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
+ return CONSTANT_SYMBOLIC;
+ return CONSTANT_NONE;
}
-/* Return truth value of whether OP can be used as an operands
- where a 16 bit integer is needed */
-int
-arith_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+/* Classify symbol X, which must be a SYMBOL_REF or a LABEL_REF. */
+
+static enum mips_symbol_type
+mips_classify_symbol (x)
+ rtx x;
{
- if (GET_CODE (op) == CONST_INT && SMALL_INT (op))
- return 1;
+ if (GET_CODE (x) == LABEL_REF)
+ return (TARGET_ABICALLS ? SYMBOL_GOT_LOCAL : SYMBOL_GENERAL);
- /* On the mips16, a GP relative value is a signed 16 bit offset. */
- if (TARGET_MIPS16 && GET_CODE (op) == CONST && mips16_gp_offset_p (op))
- return 1;
+ if (GET_CODE (x) != SYMBOL_REF)
+ abort ();
- return register_operand (op, mode);
-}
+ if (CONSTANT_POOL_ADDRESS_P (x))
+ {
+ if (TARGET_MIPS16)
+ return SYMBOL_CONSTANT_POOL;
-/* Return truth value of whether OP can be used as an operand in a two
- address arithmetic insn (such as set 123456,%o4) of mode MODE. */
+ if (TARGET_ABICALLS)
+ return SYMBOL_GOT_LOCAL;
-int
-arith32_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (GET_CODE (op) == CONST_INT)
- return 1;
+ if (GET_MODE_SIZE (get_pool_mode (x)) <= mips_section_threshold)
+ return SYMBOL_SMALL_DATA;
- return register_operand (op, mode);
+ return SYMBOL_GENERAL;
+ }
+
+ if (XSTR (x, 0)[0] == '*'
+ && strncmp (XSTR (x, 0) + 1, LOCAL_LABEL_PREFIX,
+ sizeof LOCAL_LABEL_PREFIX - 1) == 0)
+ {
+ /* The symbol is a local label. For TARGET_MIPS16, SYMBOL_REF_FLAG
+ will be set if the symbol refers to a string in the current
+ function's constant pool. */
+ if (TARGET_MIPS16 && SYMBOL_REF_FLAG (x))
+ return SYMBOL_CONSTANT_POOL;
+
+ if (TARGET_ABICALLS)
+ return SYMBOL_GOT_LOCAL;
+ }
+
+ if (TARGET_ABICALLS)
+ return (SYMBOL_REF_FLAG (x) ? SYMBOL_GOT_LOCAL : SYMBOL_GOT_GLOBAL);
+
+ return (SYMBOL_REF_FLAG (x) ? SYMBOL_SMALL_DATA : SYMBOL_GENERAL);
}
-/* Return truth value of whether OP is an integer which fits in 16 bits. */
+
+/* This function is used to implement REG_MODE_OK_FOR_BASE_P. */
int
-small_int (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+mips_reg_mode_ok_for_base_p (reg, mode, strict)
+ rtx reg;
+ enum machine_mode mode;
+ int strict;
{
- return (GET_CODE (op) == CONST_INT && SMALL_INT (op));
+ return (strict
+ ? REGNO_MODE_OK_FOR_BASE_P (REGNO (reg), mode)
+ : GP_REG_OR_PSEUDO_NONSTRICT_P (REGNO (reg), mode));
}
-/* Return truth value of whether OP is a 32 bit integer which is too big to
- be loaded with one instruction. */
-int
-large_int (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
-{
- HOST_WIDE_INT value;
+/* Return true if X is a valid base register for the given mode.
+ Allow only hard registers if STRICT. */
- if (GET_CODE (op) != CONST_INT)
- return 0;
+static bool
+mips_valid_base_register_p (x, mode, strict)
+ rtx x;
+ enum machine_mode mode;
+ int strict;
+{
+ if (!strict && GET_CODE (x) == SUBREG)
+ x = SUBREG_REG (x);
- value = INTVAL (op);
+ return (GET_CODE (x) == REG
+ && mips_reg_mode_ok_for_base_p (x, mode, strict));
+}
- /* ior reg,$r0,value */
- if ((value & ~ ((HOST_WIDE_INT) 0x0000ffff)) == 0)
- return 0;
- /* subu reg,$r0,value */
- if (((unsigned HOST_WIDE_INT) (value + 32768)) <= 32767)
- return 0;
+/* Return true if SYMBOL + OFFSET should be considered a legitimate
+ address. LEA_P is true and MODE is word_mode if the address
+ will be used in an LA or DLA macro. Otherwise MODE is the
+ mode of the value being accessed.
- /* lui reg,value>>16 */
- if ((value & 0x0000ffff) == 0)
- return 0;
+ Some guiding principles:
- return 1;
-}
+ - Allow a nonzero offset when it takes no additional instructions.
+ Ask for other offsets to be added separately.
-/* Return truth value of whether OP is a register or the constant 0.
- In mips16 mode, we only accept a register, since the mips16 does
- not have $0. */
+ - Only allow multi-instruction load or store macros when MODE is
+ word-sized or smaller. For other modes (including BLKmode)
+ it is better to move the address into a register first. */
-int
-reg_or_0_operand (op, mode)
- rtx op;
+static bool
+mips_symbolic_address_p (symbol, offset, mode, lea_p)
+ rtx symbol;
+ HOST_WIDE_INT offset;
enum machine_mode mode;
+ int lea_p;
{
- switch (GET_CODE (op))
- {
- case CONST_INT:
- if (TARGET_MIPS16)
- return 0;
- return INTVAL (op) == 0;
-
- case CONST_DOUBLE:
- if (TARGET_MIPS16)
- return 0;
- return op == CONST0_RTX (mode);
+ if (TARGET_EXPLICIT_RELOCS)
+ return false;
- default:
- return register_operand (op, mode);
+ switch (mips_classify_symbol (symbol))
+ {
+ case SYMBOL_GENERAL:
+ /* General symbols aren't valid addresses in mips16 code:
+ they have to go into the constant pool. */
+ return (!TARGET_MIPS16
+ && !mips_split_addresses
+ && SINGLE_WORD_MODE_P (mode));
+
+ case SYMBOL_SMALL_DATA:
+ /* Small data references are normally OK for any address.
+ But for mips16 code, we need to use a pseudo register
+ instead of $gp as the base register. */
+ return !TARGET_MIPS16;
+
+ case SYMBOL_CONSTANT_POOL:
+ /* PC-relative addressing is only available for lw, sw, ld and sd.
+ There's also a PC-relative add instruction. */
+ return lea_p || GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8;
+
+ case SYMBOL_GOT_GLOBAL:
+ /* The address of the symbol is stored in the GOT. We can load
+ it using an LA or DLA instruction, but any offset is added
+ afterwards. */
+ return lea_p && offset == 0;
+
+ case SYMBOL_GOT_LOCAL:
+ /* The symbol is part of a block of local memory. We fetch the
+ address of the local memory from the GOT and then add the
+ offset for this symbol. This addition can take the form of an
+ offset(base) address, so the symbol is a legitimate address. */
+ return SINGLE_WORD_MODE_P (mode);
}
+ abort ();
}
-/* Return truth value of whether OP is a register or the constant 0,
- even in mips16 mode. */
-int
-true_reg_or_0_operand (op, mode)
- rtx op;
+/* If X is a valid address, describe it in INFO and return its type.
+ STRICT says to only allow hard registers. MODE and LEA_P are
+ the same as for mips_symbolic_address_p. */
+
+static enum mips_address_type
+mips_classify_address (info, x, mode, strict, lea_p)
+ struct mips_address_info *info;
+ rtx x;
enum machine_mode mode;
+ int strict, lea_p;
{
- switch (GET_CODE (op))
+ switch (GET_CODE (x))
{
+ case REG:
+ case SUBREG:
+ if (mips_valid_base_register_p (x, mode, strict))
+ {
+ info->reg = x;
+ info->offset = const0_rtx;
+ return ADDRESS_REG;
+ }
+ return ADDRESS_INVALID;
+
+ case PLUS:
+ if (mips_valid_base_register_p (XEXP (x, 0), mode, strict)
+ && const_arith_operand (XEXP (x, 1), VOIDmode))
+ {
+ info->reg = XEXP (x, 0);
+ info->offset = XEXP (x, 1);
+ return ADDRESS_REG;
+ }
+ return ADDRESS_INVALID;
+
+ case LO_SUM:
+ if (SINGLE_WORD_MODE_P (mode)
+ && mips_valid_base_register_p (XEXP (x, 0), mode, strict)
+ && (mips_classify_constant (&info->c, XEXP (x, 1))
+ == CONSTANT_SYMBOLIC)
+ && mips_splittable_symbol_p (mips_classify_symbol (info->c.symbol)))
+ {
+ info->reg = XEXP (x, 0);
+ info->offset = XEXP (x, 1);
+ return ADDRESS_LO_SUM;
+ }
+ return ADDRESS_INVALID;
+
case CONST_INT:
- return INTVAL (op) == 0;
+ /* Small-integer addressses don't occur very often, but they
+ are legitimate if $0 is a valid base register. */
+ if (!TARGET_MIPS16 && SMALL_INT (x))
+ return ADDRESS_CONST_INT;
+ return ADDRESS_INVALID;
- case CONST_DOUBLE:
- return op == CONST0_RTX (mode);
+ case CONST:
+ case LABEL_REF:
+ case SYMBOL_REF:
+ if (mips_classify_constant (&info->c, x) == CONSTANT_SYMBOLIC
+ && mips_symbolic_address_p (info->c.symbol, info->c.offset,
+ mode, lea_p))
+ return ADDRESS_SYMBOLIC;
+ return ADDRESS_INVALID;
default:
- return register_operand (op, mode);
+ return ADDRESS_INVALID;
}
}
+\f
+/* Return true if symbols of the given type can be split into a
+ HIGH/LO_SUM pair. */
-/* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */
-
-int
-mips_const_double_ok (op, mode)
- rtx op;
- enum machine_mode mode;
+static bool
+mips_splittable_symbol_p (type)
+ enum mips_symbol_type type;
{
- if (GET_CODE (op) != CONST_DOUBLE)
- return 0;
+ if (TARGET_EXPLICIT_RELOCS)
+ return (type == SYMBOL_GENERAL || type == SYMBOL_GOT_LOCAL);
+ if (mips_split_addresses)
+ return (type == SYMBOL_GENERAL);
+ return false;
+}
- if (mode == VOIDmode)
- return 1;
- /* We've no zero register in mips16 mode. */
- if (TARGET_MIPS16)
- return 0;
+/* Return the number of instructions needed to load a symbol of the
+ given type into a register. If valid in an address, the same number
+ of instructions are needed for loads and stores. Treat extended
+ mips16 instructions as two instructions. */
- if (mode != SFmode && mode != DFmode)
- return 0;
+static int
+mips_symbol_insns (type)
+ enum mips_symbol_type type;
+{
+ switch (type)
+ {
+ case SYMBOL_GENERAL:
+ /* When using 64-bit symbols, we need 5 preparatory instructions,
+ such as:
- if (op == CONST0_RTX (mode))
- return 1;
+ lui $at,%highest(symbol)
+ daddiu $at,$at,%higher(symbol)
+ dsll $at,$at,16
+ daddiu $at,$at,%hi(symbol)
+ dsll $at,$at,16
- return 0;
-}
+ The final address is then $at + %lo(symbol). With 32-bit
+ symbols we just need a preparatory lui. */
+ return (ABI_HAS_64BIT_SYMBOLS ? 6 : 2);
-/* Accept the floating point constant 1 in the appropriate mode. */
+ case SYMBOL_SMALL_DATA:
+ return 1;
-int
-const_float_1_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- REAL_VALUE_TYPE d;
+ case SYMBOL_CONSTANT_POOL:
+ /* This case is for mips16 only. Assume we'll need an
+ extended instruction. */
+ return 2;
- if (GET_CODE (op) != CONST_DOUBLE
- || mode != GET_MODE (op)
- || (mode != DFmode && mode != SFmode))
- return 0;
+ case SYMBOL_GOT_GLOBAL:
+ /* When using a small GOT, we just fetch the address using
+ a gp-relative load. For a big GOT, we need a sequence
+ such as:
- REAL_VALUE_FROM_CONST_DOUBLE (d, op);
+ lui $at,%got_hi(symbol)
+ daddu $at,$at,$gp
- return REAL_VALUES_EQUAL (d, dconst1);
-}
+ and the final address is $at + %got_lo(symbol). */
+ return (flag_pic == 1 ? 1 : 3);
-/* Return true if a memory load or store of REG plus OFFSET in MODE
- can be represented in a single word on the mips16. */
+ case SYMBOL_GOT_LOCAL:
+ /* For o32 and o64, the sequence is:
-static int
-mips16_simple_memory_operand (reg, offset, mode)
- rtx reg;
- rtx offset;
- enum machine_mode mode;
-{
- unsigned int size;
- int off;
+ lw $at,%got(symbol)
+ nop
- if (mode == BLKmode)
- {
- /* We can't tell, because we don't know how the value will
- eventually be accessed. Returning 0 here does no great
- harm; it just prevents some possible instruction scheduling. */
- return 0;
+ and the final address is $at + %lo(symbol). A load/add
+ sequence is also needed for n32 and n64. Some versions
+ of GAS insert a nop in the n32/n64 sequences too so, for
+ simplicity, use the worst case of 3 instructions. */
+ return 3;
}
+ abort ();
+}
- size = GET_MODE_SIZE (mode);
- if (INTVAL (offset) % size != 0)
- return 0;
- if (REGNO (reg) == STACK_POINTER_REGNUM && GET_MODE_SIZE (mode) == 4)
- off = 0x100;
- else
- off = 0x20;
- if (INTVAL (offset) >= 0 && INTVAL (offset) < (HOST_WIDE_INT)(off * size))
- return 1;
- return 0;
-}
+/* Return true if a value at OFFSET bytes from BASE can be accessed
+ using an unextended mips16 instruction. MODE is the mode of the
+ value.
-/* Return truth value if a memory operand fits in a single instruction
- (ie, register + small offset). */
+ Usually the offset in an unextended instruction is a 5-bit field.
+ The offset is unsigned and shifted left once for HIs, twice
+ for SIs, and so on. An exception is SImode accesses off the
+ stack pointer, which have an 8-bit immediate field. */
-int
-simple_memory_operand (op, mode)
- rtx op;
+static bool
+mips16_unextended_reference_p (mode, base, offset)
enum machine_mode mode;
+ rtx base, offset;
{
- rtx addr, plus0, plus1;
+ if (TARGET_MIPS16
+ && GET_CODE (offset) == CONST_INT
+ && INTVAL (offset) >= 0
+ && (INTVAL (offset) & (GET_MODE_SIZE (mode) - 1)) == 0)
+ {
+ if (GET_MODE_SIZE (mode) == 4 && base == stack_pointer_rtx)
+ return INTVAL (offset) < 256 * GET_MODE_SIZE (mode);
+ return INTVAL (offset) < 32 * GET_MODE_SIZE (mode);
+ }
+ return false;
+}
- /* Eliminate non-memory operations */
- if (GET_CODE (op) != MEM)
- return 0;
- /* dword operations really put out 2 instructions, so eliminate them. */
- /* ??? This isn't strictly correct. It is OK to accept multiword modes
- here, since the length attributes are being set correctly, but only
- if the address is offsettable. LO_SUM is not offsettable. */
- if (GET_MODE_SIZE (GET_MODE (op)) > (unsigned) UNITS_PER_WORD)
- return 0;
+/* Return the number of instructions needed to load or store a value
+ of mode MODE at X. Return 0 if X isn't valid for MODE.
+
+ For mips16 code, count extended instructions as two instructions. */
- /* Decode the address now. */
- addr = XEXP (op, 0);
- switch (GET_CODE (addr))
+int
+mips_address_insns (x, mode)
+ rtx x;
+ enum machine_mode mode;
+{
+ struct mips_address_info addr;
+ int factor;
+
+ /* Each word of a multi-word value will be accessed individually. */
+ factor = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
+ switch (mips_classify_address (&addr, x, mode, 0, 0))
{
- case REG:
- case LO_SUM:
+ case ADDRESS_INVALID:
+ return 0;
+
+ case ADDRESS_REG:
+ if (TARGET_MIPS16
+ && !mips16_unextended_reference_p (mode, addr.reg, addr.offset))
+ return factor * 2;
+ return factor;
+
+ case ADDRESS_LO_SUM:
+ case ADDRESS_CONST_INT:
+ return factor;
+
+ case ADDRESS_SYMBOLIC:
+ return factor * mips_symbol_insns (mips_classify_symbol (addr.c.symbol));
+ }
+ abort ();
+}
+
+
+/* Likewise for constant X. */
+
+int
+mips_const_insns (x)
+ rtx x;
+{
+ struct mips_constant_info c;
+
+ switch (GET_CODE (x))
+ {
+ case CONSTANT_P_RTX:
+ case HIGH:
return 1;
case CONST_INT:
if (TARGET_MIPS16)
- return 0;
- return SMALL_INT (addr);
+ /* Unsigned 8-bit constants can be loaded using an unextended
+ LI instruction. Unsigned 16-bit constants can be loaded
+ using an extended LI. Negative constants must be loaded
+ using LI and then negated. */
+ return (INTVAL (x) >= 0 && INTVAL (x) < 256 ? 1
+ : SMALL_OPERAND_UNSIGNED (INTVAL (x)) ? 2
+ : INTVAL (x) > -256 && INTVAL (x) < 0 ? 2
+ : SMALL_OPERAND_UNSIGNED (-INTVAL (x)) ? 3
+ : 0);
+
+ /* Return 1 for constants that can be loaded using ORI, ADDIU,
+ or LUI. Return 2 for constants that can be loaded using
+ LUI followed by ORI. Assume the worst case for all others.
+ (The worst case is: LUI, ORI, SLL, ORI, SLL, ORI.) */
+ return (SMALL_OPERAND (INTVAL (x)) ? 1
+ : SMALL_OPERAND_UNSIGNED (INTVAL (x)) ? 1
+ : LUI_OPERAND (INTVAL (x)) ? 1
+ : LUI_OPERAND (INTVAL (x) & ~(unsigned HOST_WIDE_INT) 0xffff) ? 2
+ : 6);
- case PLUS:
- plus0 = XEXP (addr, 0);
- plus1 = XEXP (addr, 1);
- if (GET_CODE (plus0) == REG
- && GET_CODE (plus1) == CONST_INT && SMALL_INT (plus1)
- && (! TARGET_MIPS16
- || mips16_simple_memory_operand (plus0, plus1, mode)))
- return 1;
-
- else if (GET_CODE (plus1) == REG
- && GET_CODE (plus0) == CONST_INT && SMALL_INT (plus0)
- && (! TARGET_MIPS16
- || mips16_simple_memory_operand (plus1, plus0, mode)))
- return 1;
+ case CONST_DOUBLE:
+ return (!TARGET_MIPS16 && x == CONST0_RTX (GET_MODE (x)) ? 1 : 0);
- else
- return 0;
+ default:
+ switch (mips_classify_constant (&c, x))
+ {
+ case CONSTANT_NONE:
+ return 0;
-#if 0
- /* We used to allow small symbol refs here (ie, stuff in .sdata
- or .sbss), but this causes some bugs in G++. Also, it won't
- interfere if the MIPS linker rewrites the store instruction
- because the function is PIC. */
+ case CONSTANT_GP:
+ return 1;
- case LABEL_REF: /* never gp relative */
- break;
+ case CONSTANT_RELOC:
+ /* When generating mips16 code, we need to set the destination to
+ $0 and then add in the signed offset. See mips_move_1word. */
+ return (TARGET_MIPS16 ? 3 : 1);
- case CONST:
- /* If -G 0, we can never have a GP relative memory operation.
- Also, save some time if not optimizing. */
- if (!TARGET_GP_OPT)
- return 0;
+ case CONSTANT_SYMBOLIC:
+ return mips_symbol_insns (mips_classify_symbol (c.symbol));
+ }
+ abort ();
+ }
+}
- {
- rtx offset = const0_rtx;
- addr = eliminate_constant_term (XEXP (addr, 0), &offset);
- if (GET_CODE (op) != SYMBOL_REF)
- return 0;
- /* let's be paranoid.... */
- if (! SMALL_INT (offset))
- return 0;
- }
+/* Return the number of instructions needed for memory reference X.
+ Count extended mips16 instructions as two instructions. */
- /* fall through */
+int
+mips_fetch_insns (x)
+ rtx x;
+{
+ if (GET_CODE (x) != MEM)
+ abort ();
- case SYMBOL_REF:
- return SYMBOL_REF_FLAG (addr);
-#endif
+ return mips_address_insns (XEXP (x, 0), GET_MODE (x));
+}
- /* This SYMBOL_REF case is for the mips16. If the above case is
- reenabled, this one should be merged in. */
- case SYMBOL_REF:
- /* References to the constant pool on the mips16 use a small
- offset if the function is small. The only time we care about
- getting this right is during delayed branch scheduling, so
- don't need to check until then. The machine_dependent_reorg
- function will set the total length of the instructions used
- in the function (cfun->machine->insns_len). If that is small
- enough, we know for sure that this is a small offset. It
- would be better if we could take into account the location of
- the instruction within the function, but we can't, because we
- don't know where we are. */
- if (TARGET_MIPS16
- && CONSTANT_POOL_ADDRESS_P (addr)
- && cfun->machine->insns_len > 0)
- {
- long size;
- size = cfun->machine->insns_len + get_pool_size ();
- if (GET_MODE_SIZE (mode) == 4)
- return size < 4 * 0x100;
- else if (GET_MODE_SIZE (mode) == 8)
- return size < 8 * 0x20;
- else
- return 0;
- }
+/* Return true if OP is a symbolic constant that refers to a
+ global PIC symbol. */
- return 0;
+bool
+mips_global_pic_constant_p (op)
+ rtx op;
+{
+ struct mips_constant_info c;
- default:
- break;
- }
+ return (mips_classify_constant (&c, op) == CONSTANT_SYMBOLIC
+ && mips_classify_symbol (c.symbol) == SYMBOL_GOT_GLOBAL);
+}
- return 0;
+
+/* Return truth value of whether OP can be used as an operands
+ where a register or 16 bit unsigned integer is needed. */
+
+int
+uns_arith_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (op))
+ return 1;
+
+ return register_operand (op, mode);
+}
+
+
+/* True if OP can be treated as a signed 16-bit constant. */
+
+int
+const_arith_operand (op, mode)
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ struct mips_constant_info c;
+
+ return ((GET_CODE (op) == CONST_INT && SMALL_INT (op))
+ || mips_classify_constant (&c, op) == CONSTANT_RELOC);
+}
+
+
+/* Return truth value of whether OP can be used as an operands
+ where a 16 bit integer is needed */
+
+int
+arith_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ return const_arith_operand (op, mode) || register_operand (op, mode);
}
-/* Return nonzero for a memory address that can be used to load or store
- a doubleword. */
+/* Return truth value of whether OP can be used as an operand in a two
+ address arithmetic insn (such as set 123456,%o4) of mode MODE. */
int
-double_memory_operand (op, mode)
+arith32_operand (op, mode)
rtx op;
enum machine_mode mode;
{
- if (GET_CODE (op) != MEM
- || ! memory_operand (op, mode))
- {
- /* During reload, we accept a pseudo register if it has an
- appropriate memory address. If we don't do this, we will
- wind up reloading into a register, and then reloading that
- register from memory, when we could just reload directly from
- memory. */
- if (reload_in_progress
- && GET_CODE (op) == REG
- && REGNO (op) >= FIRST_PSEUDO_REGISTER
- && reg_renumber[REGNO (op)] < 0
- && reg_equiv_mem[REGNO (op)] != 0
- && double_memory_operand (reg_equiv_mem[REGNO (op)], mode))
- return 1;
-
- /* All reloaded addresses are valid in TARGET_64BIT mode. This is
- the same test performed for 'm' in find_reloads. */
-
- if (reload_in_progress
- && TARGET_64BIT
- && (GET_CODE (op) == MEM
- || (GET_CODE (op) == REG
- && REGNO (op) >= FIRST_PSEUDO_REGISTER
- && reg_renumber[REGNO (op)] < 0)))
- return 1;
-
- if (reload_in_progress
- && TARGET_MIPS16
- && GET_CODE (op) == MEM)
- {
- rtx addr;
-
- addr = XEXP (op, 0);
-
- /* During reload on the mips16, we accept a large offset
- from the frame pointer or the stack pointer. This large
- address will get reloaded anyhow. */
- if (GET_CODE (addr) == PLUS
- && GET_CODE (XEXP (addr, 0)) == REG
- && (REGNO (XEXP (addr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
- || REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
- && ((GET_CODE (XEXP (addr, 1)) == CONST_INT
- && ! SMALL_INT (XEXP (addr, 1)))
- || (GET_CODE (XEXP (addr, 1)) == SYMBOL_REF
- && CONSTANT_POOL_ADDRESS_P (XEXP (addr, 1)))))
- return 1;
-
- /* Similarly, we accept a case where the memory address is
- itself on the stack, and will be reloaded. */
- if (GET_CODE (addr) == MEM)
- {
- rtx maddr;
-
- maddr = XEXP (addr, 0);
- if (GET_CODE (maddr) == PLUS
- && GET_CODE (XEXP (maddr, 0)) == REG
- && (REGNO (XEXP (maddr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
- || REGNO (XEXP (maddr, 0)) == STACK_POINTER_REGNUM)
- && ((GET_CODE (XEXP (maddr, 1)) == CONST_INT
- && ! SMALL_INT (XEXP (maddr, 1)))
- || (GET_CODE (XEXP (maddr, 1)) == SYMBOL_REF
- && CONSTANT_POOL_ADDRESS_P (XEXP (maddr, 1)))))
- return 1;
- }
+ if (GET_CODE (op) == CONST_INT)
+ return 1;
- /* We also accept the same case when we have a 16 bit signed
- offset mixed in as well. The large address will get
- reloaded, and the 16 bit offset will be OK. */
- if (GET_CODE (addr) == PLUS
- && GET_CODE (XEXP (addr, 0)) == MEM
- && GET_CODE (XEXP (addr, 1)) == CONST_INT
- && SMALL_INT (XEXP (addr, 1)))
- {
- addr = XEXP (XEXP (addr, 0), 0);
- if (GET_CODE (addr) == PLUS
- && GET_CODE (XEXP (addr, 0)) == REG
- && (REGNO (XEXP (addr, 0)) == (unsigned) HARD_FRAME_POINTER_REGNUM
- || REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
- && ((GET_CODE (XEXP (addr, 1)) == CONST_INT
- && ! SMALL_INT (XEXP (addr, 1)))
- || (GET_CODE (XEXP (addr, 1)) == SYMBOL_REF
- && CONSTANT_POOL_ADDRESS_P (XEXP (addr, 1)))))
- return 1;
- }
- }
+ return register_operand (op, mode);
+}
- return 0;
+/* Return truth value of whether OP is an integer which fits in 16 bits. */
+
+int
+small_int (op, mode)
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ return (GET_CODE (op) == CONST_INT && SMALL_INT (op));
+}
+
+/* Return truth value of whether OP is a 32 bit integer which is too big to
+ be loaded with one instruction. */
+
+int
+large_int (op, mode)
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ HOST_WIDE_INT value;
+
+ if (GET_CODE (op) != CONST_INT)
+ return 0;
+
+ value = INTVAL (op);
+
+ /* ior reg,$r0,value */
+ if ((value & ~ ((HOST_WIDE_INT) 0x0000ffff)) == 0)
+ return 0;
+
+ /* subu reg,$r0,value */
+ if (((unsigned HOST_WIDE_INT) (value + 32768)) <= 32767)
+ return 0;
+
+ /* lui reg,value>>16 */
+ if ((value & 0x0000ffff) == 0)
+ return 0;
+
+ return 1;
+}
+
+/* Return truth value of whether OP is a register or the constant 0.
+ In mips16 mode, we only accept a register, since the mips16 does
+ not have $0. */
+
+int
+reg_or_0_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ switch (GET_CODE (op))
+ {
+ case CONST_INT:
+ if (TARGET_MIPS16)
+ return 0;
+ return INTVAL (op) == 0;
+
+ case CONST_DOUBLE:
+ if (TARGET_MIPS16)
+ return 0;
+ return op == CONST0_RTX (mode);
+
+ default:
+ return register_operand (op, mode);
}
+}
- if (TARGET_64BIT)
+/* Return truth value of whether OP is a register or the constant 0,
+ even in mips16 mode. */
+
+int
+true_reg_or_0_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ switch (GET_CODE (op))
{
- /* In this case we can use an instruction like sd. */
- return 1;
+ case CONST_INT:
+ return INTVAL (op) == 0;
+
+ case CONST_DOUBLE:
+ return op == CONST0_RTX (mode);
+
+ default:
+ return register_operand (op, mode);
}
+}
- /* Make sure that 4 added to the address is a valid memory address.
- This essentially just checks for overflow in an added constant. */
+/* Accept the floating point constant 1 in the appropriate mode. */
- if (CONSTANT_ADDRESS_P (XEXP (op, 0)))
- return 1;
+int
+const_float_1_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ REAL_VALUE_TYPE d;
+
+ if (GET_CODE (op) != CONST_DOUBLE
+ || mode != GET_MODE (op)
+ || (mode != DFmode && mode != SFmode))
+ return 0;
- op = adjust_address_nv (op, GET_MODE_CLASS (mode) == MODE_INT
- ? SImode : SFmode, 4);
- return memory_address_p (GET_MODE (op), XEXP (op, 0));
+ REAL_VALUE_FROM_CONST_DOUBLE (d, op);
+
+ return REAL_VALUES_EQUAL (d, dconst1);
}
/* Return nonzero if the code of this rtx pattern is EQ or NE. */
return 0;
}
-/* Test for a valid operand for a call instruction.
- Don't allow the arg pointer register or virtual regs
- since they may change into reg + const, which the patterns
- can't handle yet. */
+/* Test for a valid call address. */
int
call_insn_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
-{
- return (CONSTANT_ADDRESS_P (op)
- || (GET_CODE (op) == REG && op != arg_pointer_rtx
- && ! (REGNO (op) >= FIRST_PSEUDO_REGISTER
- && REGNO (op) <= LAST_VIRTUAL_REGISTER)));
-}
-
-/* Return nonzero if OPERAND is valid as a source operand for a move
- instruction. */
-
-int
-move_operand (op, mode)
rtx op;
enum machine_mode mode;
{
- /* Accept any general operand after reload has started; doing so
- avoids losing if reload does an in-place replacement of a register
- with a SYMBOL_REF or CONST. */
- return (general_operand (op, mode)
- && (! (mips_split_addresses && mips_check_split (op, mode))
- || reload_in_progress || reload_completed)
- && ! (TARGET_MIPS16
- && GET_CODE (op) == SYMBOL_REF
- && ! mips16_constant (op, mode, 1, 0)));
-}
-
-/* Return nonzero if OPERAND is valid as a source operand for movdi.
- This accepts not only general_operand, but also sign extended
- move_operands. Note that we need to accept sign extended constants
- in case a sign extended register which is used in an expression,
- and is equivalent to a constant, is spilled. We need to accept
- sign-extended memory in order to reload registers from stack slots,
- and so that we generate efficient code for extendsidi2. */
+ struct mips_constant_info c;
-int
-movdi_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && move_operand (XEXP (op, 0), SImode))
- return 1;
-
- return (general_operand (op, mode)
- && ! (TARGET_MIPS16
- && GET_CODE (op) == SYMBOL_REF
- && ! mips16_constant (op, mode, 1, 0)));
-}
-
-/* Like register_operand, but when in 64 bit mode also accept a sign
- extend of a 32 bit register, since the value is known to be already
- sign extended. */
-
-int
-se_register_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && GET_MODE (XEXP (op, 0)) == SImode
- && register_operand (XEXP (op, 0), SImode))
- return 1;
+ if (mips_classify_constant (&c, op) == CONSTANT_SYMBOLIC)
+ switch (mips_classify_symbol (c.symbol))
+ {
+ case SYMBOL_GENERAL:
+ /* If -mlong-calls, force all calls to use register addressing. */
+ return !TARGET_LONG_CALLS;
+
+ case SYMBOL_GOT_GLOBAL:
+ /* Without explicit relocs, there is no special syntax for
+ loading the address of a call destination into a register.
+ Using "la $25,foo; jal $25" would prevent the lazy binding
+ of "foo", so keep the address of global symbols with the
+ jal macro. */
+ return c.offset == 0 && !TARGET_EXPLICIT_RELOCS;
+ default:
+ return false;
+ }
return register_operand (op, mode);
}
-/* Like reg_or_0_operand, but when in 64 bit mode also accept a sign
- extend of a 32 bit register, since the value is known to be already
- sign extended. */
-
-int
-se_reg_or_0_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && GET_MODE (XEXP (op, 0)) == SImode
- && register_operand (XEXP (op, 0), SImode))
- return 1;
-
- return reg_or_0_operand (op, mode);
-}
-
-/* Like uns_arith_operand, but when in 64 bit mode also accept a sign
- extend of a 32 bit register, since the value is known to be already
- sign extended. */
-
-int
-se_uns_arith_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && GET_MODE (XEXP (op, 0)) == SImode
- && register_operand (XEXP (op, 0), SImode))
- return 1;
- return uns_arith_operand (op, mode);
-}
-
-/* Like arith_operand, but when in 64 bit mode also accept a sign
- extend of a 32 bit register, since the value is known to be already
- sign extended. */
+/* Return nonzero if OP is valid as a source operand for a move
+ instruction. */
int
-se_arith_operand (op, mode)
+move_operand (op, mode)
rtx op;
enum machine_mode mode;
{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && GET_MODE (XEXP (op, 0)) == SImode
- && register_operand (XEXP (op, 0), SImode))
- return 1;
+ struct mips_constant_info c;
- return arith_operand (op, mode);
+ if (GET_CODE (op) == HIGH && TARGET_ABICALLS)
+ return false;
+ if (mips_classify_constant (&c, op) == CONSTANT_SYMBOLIC)
+ return mips_symbolic_address_p (c.symbol, c.offset, word_mode, 1);
+ return general_operand (op, mode);
}
-/* Like nonmemory_operand, but when in 64 bit mode also accept a sign
- extend of a 32 bit register, since the value is known to be already
- sign extended. */
-
-int
-se_nonmemory_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- if (TARGET_64BIT
- && mode == DImode
- && GET_CODE (op) == SIGN_EXTEND
- && GET_MODE (op) == DImode
- && GET_MODE (XEXP (op, 0)) == SImode
- && register_operand (XEXP (op, 0), SImode))
- return 1;
-
- return nonmemory_operand (op, mode);
-}
/* Accept any operand that can appear in a mips16 constant table
instruction. We can't use any of the standard operand functions
int
symbolic_operand (op, mode)
- register rtx op;
- enum machine_mode mode;
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
- if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
- return 0;
- if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF)
- return 1;
- if (GET_CODE (op) == CONST
- && GET_CODE (XEXP (op,0)) == PLUS
- && GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF
- && GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT)
- return 1;
- return 0;
+ struct mips_constant_info c;
+
+ return mips_classify_constant (&c, op) == CONSTANT_SYMBOLIC;
}
-/* Return nonzero if we split the address into high and low parts. */
-/* ??? We should also handle reg+array somewhere. We get four
- instructions currently, lui %hi/addui %lo/addui reg/lw. Better is
- lui %hi/addui reg/lw %lo. Fixing GO_IF_LEGITIMATE_ADDRESS to accept
- (plus (reg) (symbol_ref)) doesn't work because the SYMBOL_REF is broken
- out of the address, then we have 4 instructions to combine. Perhaps
- add a 3->2 define_split for combine. */
+/* This function is used to implement GO_IF_LEGITIMATE_ADDRESS. It
+ returns a nonzero value if X is a legitimate address for a memory
+ operand of the indicated MODE. STRICT is nonzero if this function
+ is called during reload. */
+
+bool
+mips_legitimate_address_p (mode, x, strict)
+ enum machine_mode mode;
+ rtx x;
+ int strict;
+{
+ struct mips_address_info addr;
+
+ return mips_classify_address (&addr, x, mode, strict, 0) != ADDRESS_INVALID;
+}
+
+
+/* Return an rtx that represents the effect of applying relocation
+ RELOC to symbolic address ADDR. */
+
+static rtx
+mips_reloc (addr, reloc)
+ rtx addr;
+ int reloc;
+{
+ struct mips_constant_info c;
+ rtx x;
+
+ if (mips_classify_constant (&c, addr) != CONSTANT_SYMBOLIC)
+ abort ();
+
+ x = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, c.symbol), reloc);
+ return plus_constant (gen_rtx_CONST (VOIDmode, x), c.offset);
+}
+
+
+/* Likewise, but shift the result left 16 bits. The expression can be
+ used as the right hand side of an LUISI or LUIDI pattern. */
+
+static rtx
+mips_lui_reloc (addr, reloc)
+ rtx addr;
+ int reloc;
+{
+ return gen_rtx_UNSPEC (Pmode,
+ gen_rtvec (1, mips_reloc (addr, reloc)),
+ UNSPEC_HIGH);
+}
+
+/* Copy VALUE to a register and return that register. Use DEST as the
+ register if non-null, otherwise create a new one.
+
+ VALUE must be valid on the right hand side of a simple SET pattern.
+ The operation happens in Pmode. */
+
+static rtx
+mips_force_temporary (dest, value)
+ rtx dest, value;
+{
+ if (dest == 0)
+ return force_reg (Pmode, value);
+ else
+ {
+ if (!rtx_equal_p (dest, value))
+ emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (dest), value));
+ return dest;
+ }
+}
+
+
+/* Return a legitimate address for REG + OFFSET. This function will
+ create a temporary register if OFFSET is not a SMALL_OPERAND. */
+
+static rtx
+mips_add_offset (reg, offset)
+ rtx reg;
+ HOST_WIDE_INT offset;
+{
+ if (!SMALL_OPERAND (offset))
+ reg = expand_simple_binop (GET_MODE (reg), PLUS,
+ GEN_INT (CONST_HIGH_PART (offset)),
+ reg, NULL, 0, OPTAB_WIDEN);
+
+ return plus_constant (reg, CONST_LOW_PART (offset));
+}
+
+
+/* Return the GOT entry whose address is given by %RELOC(ADDR)(BASE).
+ BASE is a base register (such as $gp), ADDR is addresses being
+ sought and RELOC is the relocation that should be used. */
+
+static rtx
+mips_load_got (base, addr, reloc)
+ rtx base, addr;
+ int reloc;
+{
+ rtx mem;
+
+ mem = gen_rtx_MEM (ptr_mode,
+ gen_rtx_PLUS (Pmode, base, mips_reloc (addr, reloc)));
+ set_mem_alias_set (mem, mips_got_alias_set);
+
+ /* If we allow a function's address to be lazily bound, its entry
+ may change after the first call. Other entries are constant. */
+ if (reloc != RELOC_CALL16 && reloc != RELOC_CALL_LO)
+ RTX_UNCHANGING_P (mem) = 1;
+
+ if (Pmode != ptr_mode)
+ mem = gen_rtx_SIGN_EXTEND (Pmode, mem);
+
+ return mem;
+}
+
+
+/* Obtain the address of ADDR from the GOT using relocation RELOC.
+ The returned address may be used on the right hand side of a SET. */
+
+static rtx
+mips_load_got16 (addr, reloc)
+ rtx addr;
+ int reloc;
+{
+ return mips_load_got (pic_offset_table_rtx, addr, reloc);
+}
+
+
+/* Like mips_load_got16, but for 32-bit offsets. HIGH_RELOC is the
+ relocation that gives the high 16 bits of the offset and LOW_RELOC is
+ the relocation that gives the low 16 bits. TEMP is a Pmode register
+ to use a temporary, or null if new registers can be created at will. */
+
+static rtx
+mips_load_got32 (temp, addr, high_reloc, low_reloc)
+ rtx temp, addr;
+ int high_reloc, low_reloc;
+{
+ rtx x;
+
+ x = mips_force_temporary (temp, mips_lui_reloc (addr, high_reloc));
+ x = mips_force_temporary (temp,
+ gen_rtx_PLUS (Pmode, pic_offset_table_rtx, x));
+ return mips_load_got (x, addr, low_reloc);
+}
+
+
+/* Copy the high part of ADDR into a register and return the register.
+ Use DEST as the register if non-null. */
+
+static rtx
+mips_emit_high (dest, addr)
+ rtx dest, addr;
+{
+ rtx high, x;
+
+ high = gen_rtx_HIGH (Pmode, addr);
+ if (TARGET_ABICALLS)
+ {
+ x = mips_load_got16 (copy_rtx (addr), RELOC_GOT_PAGE);
+ x = mips_force_temporary (dest, x);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, high);
+ }
+ else
+ x = mips_force_temporary (dest, high);
+
+ return x;
+}
+
+/* See if *XLOC is a symbolic constant that can be reduced in some way.
+ If it is, set *XLOC to the reduced expression and return true.
+ The new expression will be both a legitimate address and a legitimate
+ source operand for a mips.md SET pattern. If OFFSETABLE_P, the
+ address will be offsetable.
+
+ DEST is a register to use a temporary, or null if new registers
+ can be created at will. */
+
+static bool
+mips_legitimize_symbol (dest, xloc, offsetable_p)
+ rtx dest, *xloc;
+ int offsetable_p;
+{
+ struct mips_constant_info c;
+ enum mips_symbol_type symbol_type;
+ rtx x;
+
+ if (mips_classify_constant (&c, *xloc) != CONSTANT_SYMBOLIC)
+ return false;
+
+ symbol_type = mips_classify_symbol (c.symbol);
+
+ /* Convert a mips16 reference to the small data section into
+ an address of the form:
+
+ (plus BASE (const (plus (unspec [SYMBOL] UNSPEC_GPREL) OFFSET)))
+
+ BASE is the pseudo created by mips16_gp_pseudo_reg.
+ The (const ...) may include an offset. */
+ if (TARGET_MIPS16
+ && symbol_type == SYMBOL_SMALL_DATA
+ && !no_new_pseudos)
+ {
+ *xloc = gen_rtx_PLUS (Pmode, mips16_gp_pseudo_reg (),
+ mips_reloc (*xloc, RELOC_GPREL16));
+ return true;
+ }
+
+ /* Likewise for normal-mode code. In this case we can use $gp
+ as a base register. */
+ if (!TARGET_MIPS16
+ && TARGET_EXPLICIT_RELOCS
+ && symbol_type == SYMBOL_SMALL_DATA)
+ {
+ *xloc = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
+ mips_reloc (*xloc, RELOC_GPREL16));
+ return true;
+ }
+
+ /* If a non-offsetable address is OK, convert general symbols into
+ a HIGH/LO_SUM pair. */
+ if (!offsetable_p && mips_splittable_symbol_p (symbol_type))
+ {
+ x = mips_emit_high (dest, *xloc);
+ *xloc = gen_rtx_LO_SUM (Pmode, x, copy_rtx (*xloc));
+ return true;
+ }
+
+ /* If generating PIC, and ADDR is a global symbol with an offset,
+ load the symbol into a register and apply the offset separately.
+ We need a temporary when adding large offsets. */
+ if (symbol_type == SYMBOL_GOT_GLOBAL
+ && c.offset != 0
+ && (SMALL_OPERAND (c.offset) || dest == 0))
+ {
+ x = (dest == 0 ? gen_reg_rtx (Pmode) : dest);
+ emit_move_insn (copy_rtx (x), c.symbol);
+ *xloc = mips_add_offset (x, c.offset);
+ return true;
+ }
+
+ return false;
+}
+
-/* ??? We could also split a CONST_INT here if it is a large_int().
- However, it doesn't seem to be very useful to have %hi(constant).
- We would be better off by doing the masking ourselves and then putting
- the explicit high part of the constant in the RTL. This will give better
- optimization. Also, %hi(constant) needs assembler changes to work.
- There is already a define_split that does this. */
+/* This function is used to implement LEGITIMIZE_ADDRESS. If *XLOC can
+ be legitimized in a way that the generic machinery might not expect,
+ put the new address in *XLOC and return true. MODE is the mode of
+ the memory being accessed. */
-int
-mips_check_split (address, mode)
- rtx address;
+bool
+mips_legitimize_address (xloc, mode)
+ rtx *xloc;
enum machine_mode mode;
{
- /* ??? This is the same check used in simple_memory_operand.
- We use it here because LO_SUM is not offsettable. */
- if (GET_MODE_SIZE (mode) > (unsigned) UNITS_PER_WORD)
- return 0;
+ if (mips_legitimize_symbol (0, xloc, !SINGLE_WORD_MODE_P (mode)))
+ return true;
- if ((GET_CODE (address) == SYMBOL_REF && ! SYMBOL_REF_FLAG (address))
- || (GET_CODE (address) == CONST
- && GET_CODE (XEXP (XEXP (address, 0), 0)) == SYMBOL_REF
- && ! SYMBOL_REF_FLAG (XEXP (XEXP (address, 0), 0)))
- || GET_CODE (address) == LABEL_REF)
- return 1;
+ if (GET_CODE (*xloc) == PLUS && GET_CODE (XEXP (*xloc, 1)) == CONST_INT)
+ {
+ /* Handle REG + CONSTANT using mips_add_offset. */
+ rtx reg;
- return 0;
+ reg = XEXP (*xloc, 0);
+ if (!mips_valid_base_register_p (reg, mode, 0))
+ reg = copy_to_mode_reg (Pmode, reg);
+ *xloc = mips_add_offset (reg, INTVAL (XEXP (*xloc, 1)));
+ return true;
+ }
+
+ return false;
}
-/* This function is used to implement REG_MODE_OK_FOR_BASE_P. */
-int
-mips_reg_mode_ok_for_base_p (reg, mode, strict)
- rtx reg;
+/* Subroutine of mips_legitimize_move. Move constant SRC into register
+ DEST given that SRC satisfies immediate_operand but doesn't satisfy
+ move_operand. */
+
+static void
+mips_legitimize_const_move (mode, dest, src)
enum machine_mode mode;
- int strict;
+ rtx dest, src;
{
- return (strict
- ? REGNO_MODE_OK_FOR_BASE_P (REGNO (reg), mode)
- : GP_REG_OR_PSEUDO_NONSTRICT_P (REGNO (reg), mode));
+ rtx temp;
+
+ temp = no_new_pseudos ? dest : 0;
+
+ /* If generating PIC, the high part of an address is loaded from the GOT. */
+ if (GET_CODE (src) == HIGH)
+ {
+ mips_emit_high (dest, XEXP (src, 0));
+ return;
+ }
+
+ /* Fetch global symbols from the GOT. */
+ if (TARGET_EXPLICIT_RELOCS
+ && GET_CODE (src) == SYMBOL_REF
+ && mips_classify_symbol (src) == SYMBOL_GOT_GLOBAL)
+ {
+ if (flag_pic == 1)
+ src = mips_load_got16 (src, RELOC_GOT_DISP);
+ else
+ src = mips_load_got32 (temp, src, RELOC_GOT_HI, RELOC_GOT_LO);
+ emit_insn (gen_rtx_SET (VOIDmode, dest, src));
+ return;
+ }
+
+ /* Try handling the source operand as a symbolic address. */
+ if (mips_legitimize_symbol (temp, &src, false))
+ {
+ emit_insn (gen_rtx_SET (VOIDmode, dest, src));
+ return;
+ }
+
+ src = force_const_mem (mode, src);
+
+ /* When using explicit relocs, constant pool references are sometimes
+ not legitimate addresses. mips_legitimize_symbol must be able to
+ deal with all such cases. */
+ if (GET_CODE (src) == MEM && !memory_operand (src, VOIDmode))
+ {
+ src = copy_rtx (src);
+ if (!mips_legitimize_symbol (temp, &XEXP (src, 0), false))
+ abort ();
+ }
+ emit_move_insn (dest, src);
}
-/* This function is used to implement GO_IF_LEGITIMATE_ADDRESS. It
- returns a nonzero value if XINSN is a legitimate address for a
- memory operand of the indicated MODE. STRICT is nonzero if this
- function is called during reload. */
-int
-mips_legitimate_address_p (mode, xinsn, strict)
+/* If (set DEST SRC) is not a valid instruction, emit an equivalent
+ sequence that is valid. */
+
+bool
+mips_legitimize_move (mode, dest, src)
enum machine_mode mode;
- rtx xinsn;
- int strict;
+ rtx dest, src;
{
- if (TARGET_DEBUG_B_MODE)
+ if (!register_operand (dest, mode) && !reg_or_0_operand (src, mode))
{
- GO_PRINTF2 ("\n========== GO_IF_LEGITIMATE_ADDRESS, %sstrict\n",
- strict ? "" : "not ");
- GO_DEBUG_RTX (xinsn);
+ emit_move_insn (dest, force_reg (mode, src));
+ return true;
}
- /* Check for constant before stripping off SUBREG, so that we don't
- accept (subreg (const_int)) which will fail to reload. */
- if (CONSTANT_ADDRESS_P (xinsn)
- && ! (mips_split_addresses && mips_check_split (xinsn, mode))
- && (! TARGET_MIPS16 || mips16_constant (xinsn, mode, 1, 0)))
- return 1;
+ if (CONSTANT_P (src) && !move_operand (src, mode))
+ {
+ mips_legitimize_const_move (mode, dest, src);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, copy_rtx (src));
+ return true;
+ }
+ return false;
+}
- while (GET_CODE (xinsn) == SUBREG)
- xinsn = SUBREG_REG (xinsn);
- /* The mips16 can only use the stack pointer as a base register when
- loading SImode or DImode values. */
- if (GET_CODE (xinsn) == REG
- && mips_reg_mode_ok_for_base_p (xinsn, mode, strict))
- return 1;
+/* Simplify an address for dwarf debugging info. The main purpose of
+ this function is to convert GOT references back into symbolic form.
- if (GET_CODE (xinsn) == LO_SUM && mips_split_addresses)
- {
- register rtx xlow0 = XEXP (xinsn, 0);
- register rtx xlow1 = XEXP (xinsn, 1);
-
- while (GET_CODE (xlow0) == SUBREG)
- xlow0 = SUBREG_REG (xlow0);
- if (GET_CODE (xlow0) == REG
- && mips_reg_mode_ok_for_base_p (xlow0, mode, strict)
- && mips_check_split (xlow1, mode))
- return 1;
- }
-
- if (GET_CODE (xinsn) == PLUS)
- {
- register rtx xplus0 = XEXP (xinsn, 0);
- register rtx xplus1 = XEXP (xinsn, 1);
- register enum rtx_code code0;
- register enum rtx_code code1;
-
- while (GET_CODE (xplus0) == SUBREG)
- xplus0 = SUBREG_REG (xplus0);
- code0 = GET_CODE (xplus0);
-
- while (GET_CODE (xplus1) == SUBREG)
- xplus1 = SUBREG_REG (xplus1);
- code1 = GET_CODE (xplus1);
-
- /* The mips16 can only use the stack pointer as a base register
- when loading SImode or DImode values. */
- if (code0 == REG
- && mips_reg_mode_ok_for_base_p (xplus0, mode, strict))
- {
- if (code1 == CONST_INT && SMALL_INT (xplus1))
- return 1;
-
- /* On the mips16, we represent GP relative offsets in RTL.
- These are 16 bit signed values, and can serve as register
- offsets. */
- if (TARGET_MIPS16
- && mips16_gp_offset_p (xplus1))
- return 1;
-
- /* For some code sequences, you actually get better code by
- pretending that the MIPS supports an address mode of a
- constant address + a register, even though the real
- machine doesn't support it. This is because the
- assembler can use $r1 to load just the high 16 bits, add
- in the register, and fold the low 16 bits into the memory
- reference, whereas the compiler generates a 4 instruction
- sequence. On the other hand, CSE is not as effective.
- It would be a win to generate the lui directly, but the
- MIPS assembler does not have syntax to generate the
- appropriate relocation. */
-
- /* Also accept CONST_INT addresses here, so no else. */
- /* Reject combining an embedded PIC text segment reference
- with a register. That requires an additional
- instruction. */
- /* ??? Reject combining an address with a register for the MIPS
- 64 bit ABI, because the SGI assembler can not handle this. */
- if (!TARGET_DEBUG_A_MODE
- && (mips_abi == ABI_32
- || mips_abi == ABI_O64
- || mips_abi == ABI_EABI)
- && CONSTANT_ADDRESS_P (xplus1)
- && ! mips_split_addresses
- && (!TARGET_EMBEDDED_PIC
- || code1 != CONST
- || GET_CODE (XEXP (xplus1, 0)) != MINUS)
- /* When assembling for machines with 64 bit registers,
- the assembler will sign-extend the constant "foo"
- in "la x, foo(x)" yielding the wrong result for:
- (set (blah:DI) (plus x y)). */
- && (!TARGET_64BIT
- || (code1 == CONST_INT
- && trunc_int_for_mode (INTVAL (xplus1),
- SImode) == INTVAL (xplus1)))
- && !TARGET_MIPS16)
- return 1;
- }
- }
+ For example, suppose a pseudo register R is found to be equivalent
+ to a GOT reference. This reference would be stored in reg_equiv_mem[R].
+ The dwarf code may try to use this reference as the location of the
+ variable associated with R. Normally, an address like:
- if (TARGET_DEBUG_B_MODE)
- GO_PRINTF ("Not a legitimate address\n");
+ (plus $gp (unspec [FOO] RELOC))
- /* The address was not legitimate. */
- return 0;
-}
+ would be converted into individual components, but we can't emit
+ (unspec [FOO] RELOC) in .word directives. We avoid this problem
+ (and generate better debug information) by converting the reference
+ back into its original form. */
+
+rtx
+mips_simplify_dwarf_addr (x)
+ rtx x;
+{
+ struct mips_constant_info c;
+ if (GET_CODE (x) == MEM
+ && GET_CODE (XEXP (x, 0)) == PLUS
+ && mips_classify_constant (&c, XEXP (XEXP (x, 0), 1)) == CONSTANT_RELOC
+ && mips_classify_symbol (XVECEXP (c.symbol, 0, 0)) == SYMBOL_GOT_GLOBAL)
+ return XVECEXP (c.symbol, 0, 0);
+ return x;
+}
\f
/* We need a lot of little routines to check constant values on the
mips16. These are used to figure out how long the instruction will
}
/* References to the string table on the mips16 only use a small
- offset if the function is small. See the comment in the SYMBOL_REF
- case in simple_memory_operand. We can't check for LABEL_REF here,
+ offset if the function is small. We can't check for LABEL_REF here,
because the offset is always large if the label is before the
referencing instruction. */
}
\f
+static bool
+mips_rtx_costs (x, code, outer_code, total)
+ rtx x;
+ int code, outer_code;
+ int *total;
+{
+ enum machine_mode mode = GET_MODE (x);
+
+ switch (code)
+ {
+ case CONST_INT:
+ if (!TARGET_MIPS16)
+ {
+ /* Always return 0, since we don't have different sized
+ instructions, hence different costs according to Richard
+ Kenner */
+ *total = 0;
+ return true;
+ }
+
+ /* A number between 1 and 8 inclusive is efficient for a shift.
+ Otherwise, we will need an extended instruction. */
+ if ((outer_code) == ASHIFT || (outer_code) == ASHIFTRT
+ || (outer_code) == LSHIFTRT)
+ {
+ if (INTVAL (x) >= 1 && INTVAL (x) <= 8)
+ *total = 0;
+ else
+ *total = COSTS_N_INSNS (1);
+ return true;
+ }
+ /* We can use cmpi for an xor with an unsigned 16 bit value. */
+
+ if ((outer_code) == XOR
+ && INTVAL (x) >= 0 && INTVAL (x) < 0x10000)
+ {
+ *total = 0;
+ return true;
+ }
+
+ /* We may be able to use slt or sltu for a comparison with a
+ signed 16 bit value. (The boundary conditions aren't quite
+ right, but this is just a heuristic anyhow.) */
+ if (((outer_code) == LT || (outer_code) == LE
+ || (outer_code) == GE || (outer_code) == GT
+ || (outer_code) == LTU || (outer_code) == LEU
+ || (outer_code) == GEU || (outer_code) == GTU)
+ && INTVAL (x) >= -0x8000 && INTVAL (x) < 0x8000)
+ {
+ *total = 0;
+ return true;
+ }
+
+ /* Equality comparisons with 0 are cheap. */
+ if (((outer_code) == EQ || (outer_code) == NE)
+ && INTVAL (x) == 0)
+ {
+ *total = 0;
+ return true;
+ }
+
+ /* Otherwise fall through to the handling below. */
+
+ case CONST:
+ case SYMBOL_REF:
+ case LABEL_REF:
+ case CONST_DOUBLE:
+ if (((outer_code) == PLUS || (outer_code) == MINUS)
+ && const_arith_operand (x, VOIDmode))
+ {
+ *total = 0;
+ return true;
+ }
+ else
+ {
+ int n = mips_const_insns (x);
+ return (n == 0 ? CONSTANT_POOL_COST : COSTS_N_INSNS (n));
+ }
+
+ case MEM:
+ {
+ /* If the address is legitimate, return the number of
+ instructions it needs, otherwise use the default handling. */
+ int n = mips_address_insns (XEXP (x, 0), GET_MODE (x));
+ if (n > 0)
+ {
+ *total = COSTS_N_INSNS (1 + n);
+ return true;
+ }
+ return false;
+ }
+
+ case FFS:
+ *total = COSTS_N_INSNS (6);
+ return true;
+
+ case NOT:
+ *total = COSTS_N_INSNS ((mode == DImode && !TARGET_64BIT) ? 2 : 1);
+ return true;
+
+ case AND:
+ case IOR:
+ case XOR:
+ if (mode == DImode && !TARGET_64BIT)
+ {
+ *total = COSTS_N_INSNS (2);
+ return true;
+ }
+ return false;
+
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ if (mode == DImode && !TARGET_64BIT)
+ {
+ *total = COSTS_N_INSNS ((GET_CODE (XEXP (x, 1)) == CONST_INT)
+ ? 4 : 12);
+ return true;
+ }
+ return false;
+
+ case ABS:
+ if (mode == SFmode || mode == DFmode)
+ *total = COSTS_N_INSNS (1);
+ else
+ *total = COSTS_N_INSNS (4);
+ return true;
+
+ case LO_SUM:
+ *total = COSTS_N_INSNS (1);
+ return true;
+
+ case PLUS:
+ case MINUS:
+ if (mode == SFmode || mode == DFmode)
+ {
+ if (TUNE_MIPS3000 || TUNE_MIPS3900)
+ *total = COSTS_N_INSNS (2);
+ else if (TUNE_MIPS6000)
+ *total = COSTS_N_INSNS (3);
+ else
+ *total = COSTS_N_INSNS (6);
+ return true;
+ }
+ if (mode == DImode && !TARGET_64BIT)
+ {
+ *total = COSTS_N_INSNS (4);
+ return true;
+ }
+ return false;
+
+ case NEG:
+ if (mode == DImode && !TARGET_64BIT)
+ {
+ *total = 4;
+ return true;
+ }
+ return false;
+
+ case MULT:
+ if (mode == SFmode)
+ {
+ if (TUNE_MIPS3000
+ || TUNE_MIPS3900
+ || TUNE_MIPS5000)
+ *total = COSTS_N_INSNS (4);
+ else if (TUNE_MIPS6000
+ || TUNE_MIPS5400
+ || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS (5);
+ else
+ *total = COSTS_N_INSNS (7);
+ return true;
+ }
+
+ if (mode == DFmode)
+ {
+ if (TUNE_MIPS3000
+ || TUNE_MIPS3900
+ || TUNE_MIPS5000)
+ *total = COSTS_N_INSNS (5);
+ else if (TUNE_MIPS6000
+ || TUNE_MIPS5400
+ || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS (6);
+ else
+ *total = COSTS_N_INSNS (8);
+ return true;
+ }
+
+ if (TUNE_MIPS3000)
+ *total = COSTS_N_INSNS (12);
+ else if (TUNE_MIPS3900)
+ *total = COSTS_N_INSNS (2);
+ else if (TUNE_MIPS5400 || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS ((mode == DImode) ? 4 : 3);
+ else if (TUNE_MIPS6000)
+ *total = COSTS_N_INSNS (17);
+ else if (TUNE_MIPS5000)
+ *total = COSTS_N_INSNS (5);
+ else
+ *total = COSTS_N_INSNS (10);
+ return true;
+
+ case DIV:
+ case MOD:
+ if (mode == SFmode)
+ {
+ if (TUNE_MIPS3000
+ || TUNE_MIPS3900)
+ *total = COSTS_N_INSNS (12);
+ else if (TUNE_MIPS6000)
+ *total = COSTS_N_INSNS (15);
+ else if (TUNE_MIPS5400 || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS (30);
+ else
+ *total = COSTS_N_INSNS (23);
+ return true;
+ }
+
+ if (mode == DFmode)
+ {
+ if (TUNE_MIPS3000
+ || TUNE_MIPS3900)
+ *total = COSTS_N_INSNS (19);
+ else if (TUNE_MIPS5400 || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS (59);
+ else if (TUNE_MIPS6000)
+ *total = COSTS_N_INSNS (16);
+ else
+ *total = COSTS_N_INSNS (36);
+ return true;
+ }
+ /* FALLTHRU */
+
+ case UDIV:
+ case UMOD:
+ if (TUNE_MIPS3000
+ || TUNE_MIPS3900)
+ *total = COSTS_N_INSNS (35);
+ else if (TUNE_MIPS6000)
+ *total = COSTS_N_INSNS (38);
+ else if (TUNE_MIPS5000)
+ *total = COSTS_N_INSNS (36);
+ else if (TUNE_MIPS5400 || TUNE_MIPS5500)
+ *total = COSTS_N_INSNS ((mode == SImode) ? 42 : 74);
+ else
+ *total = COSTS_N_INSNS (69);
+ return true;
+
+ case SIGN_EXTEND:
+ /* A sign extend from SImode to DImode in 64 bit mode is often
+ zero instructions, because the result can often be used
+ directly by another instruction; we'll call it one. */
+ if (TARGET_64BIT && mode == DImode
+ && GET_MODE (XEXP (x, 0)) == SImode)
+ *total = COSTS_N_INSNS (1);
+ else
+ *total = COSTS_N_INSNS (2);
+ return true;
+
+ case ZERO_EXTEND:
+ if (TARGET_64BIT && mode == DImode
+ && GET_MODE (XEXP (x, 0)) == SImode)
+ *total = COSTS_N_INSNS (2);
+ else
+ *total = COSTS_N_INSNS (1);
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/* Provide the costs of an addressing mode that contains ADDR.
+ If ADDR is not a valid address, its cost is irrelevant. */
+
+static int
+mips_address_cost (addr)
+ rtx addr;
+{
+ return mips_address_insns (addr, SImode);
+}
+
/* Determine whether a memory reference takes one (based off of the GP
pointer), two (normal), or three (label + reg) instructions, and bump the
appropriate counter for -mstats. */
int subreg_offset0 = 0;
int subreg_offset1 = 0;
enum delay_type delay = DELAY_NONE;
+ struct mips_constant_info c;
while (code0 == SUBREG)
{
}
else if (FP_REG_P (regno0) && (mode == SImode || mode == SFmode))
- ret = "l.s\t%0,%1";
+ ret = "lwc1\t%0,%1";
else if (ALL_COP_REG_P (regno0))
{
}
}
- else if (code1 == LABEL_REF)
- {
- if (TARGET_STATS)
- mips_count_memory_refs (op1, 1);
-
- ret = "la\t%0,%a1";
- }
-
- else if (code1 == SYMBOL_REF || code1 == CONST)
- {
- if (TARGET_MIPS16
- && code1 == CONST
- && GET_CODE (XEXP (op1, 0)) == REG
- && REGNO (XEXP (op1, 0)) == GP_REG_FIRST + 28)
- {
- /* This case arises on the mips16; see
- mips16_gp_pseudo_reg. */
- ret = "move\t%0,%+";
- }
- else if (TARGET_MIPS16
- && code1 == SYMBOL_REF
- && SYMBOL_REF_FLAG (op1)
- && (XSTR (op1, 0)[0] != '*'
- || strncmp (XSTR (op1, 0) + 1,
- LOCAL_LABEL_PREFIX,
- sizeof LOCAL_LABEL_PREFIX - 1) != 0))
- {
- /* This can occur when reloading the address of a GP
- relative symbol on the mips16. */
- ret = "move\t%0,%+\n\taddu\t%0,%%gprel(%a1)";
- }
- else
- {
- if (TARGET_STATS)
- mips_count_memory_refs (op1, 1);
-
- ret = "la\t%0,%a1";
- }
- }
-
else if (code1 == PLUS)
{
rtx add_op0 = XEXP (op1, 0);
operands[1] = XEXP (op1, 0);
ret = "lui\t%0,%%hi(%1)";
}
+
+ else
+ switch (mips_classify_constant (&c, op1))
+ {
+ case CONSTANT_NONE:
+ break;
+
+ case CONSTANT_GP:
+ ret = "move\t%0,%1";
+ break;
+
+ case CONSTANT_RELOC:
+ ret = (TARGET_MIPS16 ? "li\t%0,0\n\taddiu\t%0,%1" : "li\t%0,%1");
+ break;
+
+ case CONSTANT_SYMBOLIC:
+ if (TARGET_STATS)
+ mips_count_memory_refs (op1, 1);
+ ret = "la\t%0,%a1";
+ break;
+ }
}
else if (code0 == MEM)
}
else if (FP_REG_P (regno1) && (mode == SImode || mode == SFmode))
- ret = "s.s\t%1,%0";
+ ret = "swc1\t%1,%0";
else if (ALL_COP_REG_P (regno1))
{
static char retval[] = "swc_\t%1,%0";
else
loc = stack_pointer_rtx;
loc = plus_constant (loc, cfun->machine->frame.args_size);
- operands[1] = gen_rtx_MEM (Pmode, loc);
+ operands[1] = gen_rtx_MEM (ptr_mode, loc);
return mips_move_1word (operands, insn, 0);
}
\f
-/* Return an instruction to sign-extend SImode value SRC and store it
- in DImode value DEST. INSN is the original extendsidi2-type insn. */
-
-const char *
-mips_sign_extend (insn, dest, src)
- rtx insn, dest, src;
-{
- rtx operands[MAX_RECOG_OPERANDS];
-
- if ((register_operand (src, SImode) && FP_REG_P (true_regnum (src)))
- || memory_operand (src, SImode))
- {
- /* If the source is a floating-point register, we need to use a
- 32-bit move, since the float register is not kept sign-extended.
- If the source is in memory, we need a 32-bit load. */
- operands[0] = gen_lowpart_SUBREG (SImode, dest);
- operands[1] = src;
- return mips_move_1word (operands, insn, false);
- }
- else
- {
- operands[0] = dest;
- operands[1] = src;
- return mips_move_2words (operands, insn);
- }
-}
-\f
/* Return the appropriate instructions to move 2 words */
const char *
int subreg_offset0 = 0;
int subreg_offset1 = 0;
enum delay_type delay = DELAY_NONE;
-
- if (code1 == SIGN_EXTEND)
- return mips_sign_extend (insn, op0, XEXP (op1, 0));
+ struct mips_constant_info c;
while (code0 == SUBREG)
{
mips_count_memory_refs (op1, 2);
if (FP_REG_P (regno0))
- ret = "l.d\t%0,%1";
+ ret = (TARGET_64BIT ? "ldc1\t%0,%1" : "l.d\t%0,%1");
else if (ALL_COP_REG_P (regno0) && TARGET_64BIT)
{
#ifdef TARGET_FP_CALL_32
if (FP_CALL_GP_REG_P (regno0))
- ret = (double_memory_operand (op1, GET_MODE (op1))
- ? "lwu\t%0,%1\n\tlwu\t%D0,4+%1"
- : "ld\t%0,%1\n\tdsll\t%D0,%0,32\n\tdsrl\t%D0,32\n\tdsrl\t%0,32");
+ ret = "lwu\t%0,%1\n\tlwu\t%D0,4+%1";
else
#endif
ret = "ld\t%0,%1";
}
- else if (double_memory_operand (op1, GET_MODE (op1)))
+ else
ret = (reg_mentioned_p (op0, op1)
? "lw\t%D0,%D1\n\tlw\t%0,%1"
: "lw\t%0,%1\n\tlw\t%D0,%D1");
ret = volatile_buffer;
}
}
-
- else if (code1 == LABEL_REF)
- {
- if (TARGET_STATS)
- mips_count_memory_refs (op1, 2);
-
- if (GET_CODE (operands[1]) == SIGN_EXTEND)
- /* We deliberately remove the 'a' from '%1', so that we don't
- have to add SIGN_EXTEND support to print_operand_address.
- print_operand will just call print_operand_address in this
- case, so there is no problem. */
- ret = "la\t%0,%1";
- else
- ret = "dla\t%0,%a1";
- }
- else if (code1 == SYMBOL_REF || code1 == CONST)
+ else if (code1 == HIGH)
{
- if (TARGET_MIPS16
- && code1 == CONST
- && GET_CODE (XEXP (op1, 0)) == REG
- && REGNO (XEXP (op1, 0)) == GP_REG_FIRST + 28)
- {
- /* This case arises on the mips16; see
- mips16_gp_pseudo_reg. */
- ret = "move\t%0,%+";
- }
- else if (TARGET_MIPS16
- && code1 == SYMBOL_REF
- && SYMBOL_REF_FLAG (op1)
- && (XSTR (op1, 0)[0] != '*'
- || strncmp (XSTR (op1, 0) + 1,
- LOCAL_LABEL_PREFIX,
- sizeof LOCAL_LABEL_PREFIX - 1) != 0))
- {
- /* This can occur when reloading the address of a GP
- relative symbol on the mips16. */
- ret = "move\t%0,%+\n\taddu\t%0,%%gprel(%a1)";
- }
- else
- {
- if (TARGET_STATS)
- mips_count_memory_refs (op1, 2);
-
- if (GET_CODE (operands[1]) == SIGN_EXTEND)
- /* We deliberately remove the 'a' from '%1', so that we don't
- have to add SIGN_EXTEND support to print_operand_address.
- print_operand will just call print_operand_address in this
- case, so there is no problem. */
- ret = "la\t%0,%1";
- else
- ret = "dla\t%0,%a1";
- }
+ operands[1] = XEXP (op1, 0);
+ ret = "lui\t%0,%%hi(%1)";
}
+ else
+ switch (mips_classify_constant (&c, op1))
+ {
+ case CONSTANT_NONE:
+ break;
+
+ case CONSTANT_GP:
+ ret = "move\t%0,%1";
+ break;
+
+ case CONSTANT_RELOC:
+ ret = (TARGET_MIPS16 ? "li\t%0,0\n\taddiu\t%0,%1" : "li\t%0,%1");
+ break;
+
+ case CONSTANT_SYMBOLIC:
+ if (TARGET_STATS)
+ mips_count_memory_refs (op1, 2);
+ ret = "dla\t%0,%a1";
+ break;
+ }
}
else if (code0 == MEM)
int regno1 = REGNO (op1) + subreg_offset1;
if (FP_REG_P (regno1))
- ret = "s.d\t%1,%0";
+ ret = (TARGET_64BIT ? "sdc1\t%1,%0" : "s.d\t%1,%0");
else if (ALL_COP_REG_P (regno1) && TARGET_64BIT)
{
ret = "sd\t%1,%0";
}
- else if (double_memory_operand (op0, GET_MODE (op0)))
+ else
ret = "sw\t%1,%0\n\tsw\t%D1,%D0";
}
else if (((code1 == CONST_INT && INTVAL (op1) == 0)
|| (code1 == CONST_DOUBLE
- && op1 == CONST0_RTX (GET_MODE (op1))))
- && (TARGET_64BIT
- || double_memory_operand (op0, GET_MODE (op0))))
+ && op1 == CONST0_RTX (GET_MODE (op1)))))
{
if (TARGET_64BIT)
ret = "sd\t%.,%0";
return ret;
}
\f
-static bool
-mips_rtx_costs (x, code, outer_code, total)
- rtx x;
- int code, outer_code;
- int *total;
-{
- enum machine_mode mode = GET_MODE (x);
-
- switch (code)
- {
- case CONST_INT:
- if (! TARGET_MIPS16)
- {
- /* Always return 0, since we don't have different sized insns,
- hence different costs according to Richard Kenner. */
- *total = 0;
- return true;
- }
-
- if (outer_code == SET)
- {
- if (INTVAL (x) >= 0 && INTVAL (x) < 0x100)
- *total = 0;
- else if ((INTVAL (x) >= 0 && INTVAL (x) < 0x10000)
- || (INTVAL (x) < 0 && INTVAL (x) > -0x100))
- *total = COSTS_N_INSNS (1);
- else
- *total = COSTS_N_INSNS (2);
- return true;
- }
-
- /* A PLUS could be an address. We don't want to force an address
- to use a register, so accept any signed 16 bit value without
- complaint. */
- if (outer_code == PLUS
- && INTVAL (x) >= -0x8000 && INTVAL (x) < 0x8000)
- {
- *total = 0;
- return true;
- }
-
- /* A number between 1 and 8 inclusive is efficient for a shift.
- Otherwise, we will need an extended instruction. */
- if (outer_code == ASHIFT || outer_code == ASHIFTRT
- || outer_code == LSHIFTRT)
- {
- if (INTVAL (x) >= 1 && INTVAL (x) <= 8)
- *total = 0;
- else
- *total = COSTS_N_INSNS (1);
- return true;
- }
-
- /* We can use cmpi for an xor with an unsigned 16 bit value. */
- if (outer_code == XOR
- && INTVAL (x) >= 0 && INTVAL (x) < 0x10000)
- {
- *total = 0;
- return true;
- }
-
- /* We may be able to use slt or sltu for a comparison with a
- signed 16 bit value. (The boundary conditions aren't quite
- right, but this is just a heuristic anyhow.) */
- if ((outer_code == LT || outer_code == LE
- || outer_code == GE || outer_code == GT
- || outer_code == LTU || outer_code == LEU
- || outer_code == GEU || outer_code == GTU)
- && INTVAL (x) >= -0x8000 && INTVAL (x) < 0x8000)
- {
- *total = 0;
- return true;
- }
-
- /* Equality comparisons with 0 are cheap. */
- if ((outer_code == EQ || outer_code == NE)
- && INTVAL (x) == 0)
- return 0;
-
- /* Otherwise, work out the cost to load the value into a
- register. */
- if (INTVAL (x) >= 0 && INTVAL (x) < 0x100)
- *total = COSTS_N_INSNS (1);
- else if ((INTVAL (x) >= 0 && INTVAL (x) < 0x10000)
- || (INTVAL (x) < 0 && INTVAL (x) > -0x100))
- *total = COSTS_N_INSNS (2);
- else
- *total = COSTS_N_INSNS (3);
- return true;
-
- case LABEL_REF:
- *total = COSTS_N_INSNS (2);
- return true;
-
- case CONST:
- {
- rtx offset = const0_rtx;
- rtx symref = eliminate_constant_term (XEXP (x, 0), &offset);
-
- if (TARGET_MIPS16 && mips16_gp_offset_p (x))
- {
- /* Treat this like a signed 16 bit CONST_INT. */
- if (outer_code == PLUS)
- *total = 0;
- else if (outer_code == SET)
- *total = COSTS_N_INSNS (1);
- else
- *total = COSTS_N_INSNS (2);
- return true;
- }
-
- if (GET_CODE (symref) == LABEL_REF)
- *total = COSTS_N_INSNS (2);
- else if (GET_CODE (symref) != SYMBOL_REF)
- *total = COSTS_N_INSNS (4);
- else if (INTVAL (offset) < -32768 || INTVAL (offset) > 32767)
- *total = COSTS_N_INSNS (2);
- else
- *total = COSTS_N_INSNS (SYMBOL_REF_FLAG (symref) ? 1 : 2);
-
- return true;
- }
-
- case SYMBOL_REF:
- *total = COSTS_N_INSNS (SYMBOL_REF_FLAG (x) ? 1 : 2);
- return true;
-
- case CONST_DOUBLE:
- {
- rtx high, low;
- if (TARGET_MIPS16)
- {
- *total = COSTS_N_INSNS (4);
- return true;
- }
-
- split_double (x, &high, &low);
- *total = COSTS_N_INSNS ((high == CONST0_RTX (GET_MODE (high))
- || low == CONST0_RTX (GET_MODE (low)))
- ? 2 : 4);
- return true;
- }
-
- case MEM:
- {
- int num_words = (GET_MODE_SIZE (mode) > UNITS_PER_WORD) ? 2 : 1;
- if (simple_memory_operand (x, mode))
- *total = COSTS_N_INSNS (num_words);
- else
- *total = COSTS_N_INSNS (2*num_words);
- return true;
- }
-
- case FFS:
- *total = COSTS_N_INSNS (6);
- return true;
-
- case NOT:
- *total = COSTS_N_INSNS ((mode == DImode && !TARGET_64BIT) ? 2 : 1);
- return true;
-
- case AND:
- case IOR:
- case XOR:
- if (mode == DImode && !TARGET_64BIT)
- {
- *total = COSTS_N_INSNS (2);
- return true;
- }
- return false;
-
- case ASHIFT:
- case ASHIFTRT:
- case LSHIFTRT:
- if (mode == DImode && !TARGET_64BIT)
- {
- *total = COSTS_N_INSNS ((GET_CODE (XEXP (x, 1)) == CONST_INT)
- ? 4 : 12);
- return true;
- }
- return false;
-
- case ABS:
- if (mode == SFmode || mode == DFmode)
- *total = COSTS_N_INSNS (1);
- else
- *total = COSTS_N_INSNS (4);
- return true;
-
- case PLUS:
- case MINUS:
- if (mode == SFmode || mode == DFmode)
- {
- if (TUNE_MIPS3000 || TUNE_MIPS3900)
- *total = COSTS_N_INSNS (2);
- else if (TUNE_MIPS6000)
- *total = COSTS_N_INSNS (3);
- else
- *total = COSTS_N_INSNS (6);
- return true;
- }
- if (mode == DImode && !TARGET_64BIT)
- {
- *total = COSTS_N_INSNS (4);
- return true;
- }
- return false;
-
- case NEG:
- if (mode == DImode && !TARGET_64BIT)
- {
- *total = 4;
- return true;
- }
- return false;
-
- case MULT:
- if (mode == SFmode)
- {
- if (TUNE_MIPS3000
- || TUNE_MIPS3900
- || TUNE_MIPS5000)
- *total = COSTS_N_INSNS (4);
- else if (TUNE_MIPS6000
- || TUNE_MIPS5400
- || TUNE_MIPS5500)
- *total = COSTS_N_INSNS (5);
- else
- *total = COSTS_N_INSNS (7);
- return true;
- }
-
- if (mode == DFmode)
- {
- if (TUNE_MIPS3000
- || TUNE_MIPS3900
- || TUNE_MIPS5000)
- *total = COSTS_N_INSNS (5);
- else if (TUNE_MIPS6000
- || TUNE_MIPS5400
- || TUNE_MIPS5500)
- *total = COSTS_N_INSNS (6);
- else
- *total = COSTS_N_INSNS (8);
- return true;
- }
-
- if (TUNE_MIPS3000)
- *total = COSTS_N_INSNS (12);
- else if (TUNE_MIPS3900)
- *total = COSTS_N_INSNS (2);
- else if (TUNE_MIPS5400 || TUNE_MIPS5500)
- *total = COSTS_N_INSNS ((mode == DImode) ? 4 : 3);
- else if (TUNE_MIPS6000)
- *total = COSTS_N_INSNS (17);
- else if (TUNE_MIPS5000)
- *total = COSTS_N_INSNS (5);
- else
- *total = COSTS_N_INSNS (10);
- return true;
-
- case DIV:
- case MOD:
- if (mode == SFmode)
- {
- if (TUNE_MIPS3000
- || TUNE_MIPS3900)
- *total = COSTS_N_INSNS (12);
- else if (TUNE_MIPS6000)
- *total = COSTS_N_INSNS (15);
- else if (TUNE_MIPS5400 || TUNE_MIPS5500)
- *total = COSTS_N_INSNS (30);
- else
- *total = COSTS_N_INSNS (23);
- return true;
- }
-
- if (mode == DFmode)
- {
- if (TUNE_MIPS3000
- || TUNE_MIPS3900)
- *total = COSTS_N_INSNS (19);
- else if (TUNE_MIPS5400 || TUNE_MIPS5500)
- *total = COSTS_N_INSNS (59);
- else if (TUNE_MIPS6000)
- *total = COSTS_N_INSNS (16);
- else
- *total = COSTS_N_INSNS (36);
- return true;
- }
- /* FALLTHRU */
-
- case UDIV:
- case UMOD:
- if (TUNE_MIPS3000
- || TUNE_MIPS3900)
- *total = COSTS_N_INSNS (35);
- else if (TUNE_MIPS6000)
- *total = COSTS_N_INSNS (38);
- else if (TUNE_MIPS5000)
- *total = COSTS_N_INSNS (36);
- else if (TUNE_MIPS5400 || TUNE_MIPS5500)
- *total = COSTS_N_INSNS ((mode == SImode) ? 42 : 74);
- else
- *total = COSTS_N_INSNS (69);
- return true;
-
- case SIGN_EXTEND:
- /* A sign extend from SImode to DImode in 64 bit mode is often
- zero instructions, because the result can often be used
- directly by another instruction; we'll call it one. */
- if (TARGET_64BIT && mode == DImode
- && GET_MODE (XEXP (x, 0)) == SImode)
- *total = COSTS_N_INSNS (1);
- else
- *total = COSTS_N_INSNS (2);
- return true;
-
- case ZERO_EXTEND:
- if (TARGET_64BIT && mode == DImode
- && GET_MODE (XEXP (x, 0)) == SImode)
- *total = COSTS_N_INSNS (2);
- else
- *total = COSTS_N_INSNS (1);
- return true;
-
- default:
- return false;
- }
-}
-
-/* Provide the costs of an addressing mode that contains ADDR.
- If ADDR is not a valid address, its cost is irrelevant. */
-
-static int
-mips_address_cost (addr)
- rtx addr;
-{
- switch (GET_CODE (addr))
- {
- case REG:
- return 1;
-
- case LO_SUM:
- return 1;
-
- case LABEL_REF:
- return 2;
-
- case CONST:
- {
- rtx offset = const0_rtx;
- addr = eliminate_constant_term (XEXP (addr, 0), &offset);
- if (GET_CODE (addr) == LABEL_REF)
- return 2;
-
- if (GET_CODE (addr) != SYMBOL_REF)
- return 4;
-
- if (! SMALL_INT (offset))
- return 2;
- }
-
- /* ... fall through ... */
-
- case SYMBOL_REF:
- return SYMBOL_REF_FLAG (addr) ? 1 : 2;
-
- case PLUS:
- {
- register rtx plus0 = XEXP (addr, 0);
- register rtx plus1 = XEXP (addr, 1);
-
- if (GET_CODE (plus0) != REG && GET_CODE (plus1) == REG)
- plus0 = XEXP (addr, 1), plus1 = XEXP (addr, 0);
-
- if (GET_CODE (plus0) != REG)
- break;
-
- switch (GET_CODE (plus1))
- {
- case CONST_INT:
- return SMALL_INT (plus1) ? 1 : 2;
-
- case CONST:
- case SYMBOL_REF:
- case LABEL_REF:
- case HIGH:
- case LO_SUM:
- return mips_address_cost (plus1) + 1;
-
- default:
- break;
- }
- }
-
- default:
- break;
- }
-
- return 4;
-}
-
-/* Return nonzero if X is an address which needs a temporary register when
- reloaded while generating PIC code. */
-
-int
-pic_address_needs_scratch (x)
- rtx x;
-{
- /* An address which is a symbolic plus a non SMALL_INT needs a temp reg. */
- if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
- && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
- && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
- && ! SMALL_INT (XEXP (XEXP (x, 0), 1)))
- return 1;
-
- return 0;
-}
-\f
/* Make normal rtx_code into something we can index from an array */
static enum internal_test
operands[1]));
}
\f
+/* Expand a call or call_value instruction. RESULT is where the
+ result will go (null for calls), ADDR is the address of the
+ function, ARGS_SIZE is the size of the arguments and AUX is
+ the value passed to us by mips_function_arg. SIBCALL_P is true
+ if we are expanding a sibling call, false if we're expanding
+ normal call. */
+
+void
+mips_expand_call (result, addr, args_size, aux, sibcall_p)
+ rtx result, addr, args_size, aux;
+ int sibcall_p;
+{
+ int i;
+
+ if (!call_insn_operand (addr, VOIDmode))
+ {
+ /* When generating PIC, try to allow global functions to be
+ lazily bound. */
+ if (TARGET_EXPLICIT_RELOCS
+ && GET_CODE (addr) == SYMBOL_REF
+ && mips_classify_symbol (addr) == SYMBOL_GOT_GLOBAL)
+ {
+ if (flag_pic == 1)
+ addr = mips_load_got16 (addr, RELOC_CALL16);
+ else
+ addr = mips_load_got32 (0, addr, RELOC_CALL_HI, RELOC_CALL_LO);
+ }
+ addr = force_reg (Pmode, addr);
+ }
+
+ /* In order to pass small structures by value in registers
+ compatibly with the MIPS compiler, we need to shift the value
+ into the high part of the register. Function_arg has encoded
+ a PARALLEL rtx, holding a vector of adjustments to be made
+ as the next_arg_reg variable, so we split up the insns,
+ and emit them separately. */
+ if (aux != 0 && GET_CODE (aux) == PARALLEL)
+ for (i = 0; i < XVECLEN (aux, 0); i++)
+ emit_insn (XVECEXP (aux, 0, i));
+
+ if (TARGET_MIPS16
+ && mips16_hard_float
+ && build_mips16_call_stub (result, addr, args_size,
+ aux == 0 ? 0 : (int) GET_MODE (aux)))
+ /* Nothing more to do */;
+ else if (result == 0)
+ emit_call_insn (sibcall_p
+ ? gen_sibcall_internal (addr, args_size)
+ : gen_call_internal (addr, args_size));
+ else if (GET_CODE (result) == PARALLEL && XVECLEN (result, 0) == 2)
+ {
+ rtx reg1, reg2;
+
+ reg1 = XEXP (XVECEXP (result, 0, 0), 0);
+ reg2 = XEXP (XVECEXP (result, 0, 1), 0);
+ emit_call_insn
+ (sibcall_p
+ ? gen_sibcall_value_multiple_internal (reg1, addr, args_size, reg2)
+ : gen_call_value_multiple_internal (reg1, addr, args_size, reg2));
+ }
+ else
+ emit_call_insn (sibcall_p
+ ? gen_sibcall_value_internal (result, addr, args_size)
+ : gen_call_value_internal (result, addr, args_size));
+}
+
+
+/* We can handle any sibcall when TARGET_SIBCALLS is true. */
+
+static bool
+mips_function_ok_for_sibcall (decl, exp)
+ tree decl ATTRIBUTE_UNUSED;
+ tree exp ATTRIBUTE_UNUSED;
+{
+ return TARGET_SIBCALLS;
+}
+\f
/* Return true if operand OP is a condition code register.
Only for use during or after reload. */
constant addresses into registers when generating N32/N64 code, just
in case we might emit an unaligned load instruction. */
if (num_regs > 2 && (bytes > 2 * align || move_type != BLOCK_MOVE_NORMAL
- || mips_abi == ABI_MEABI
|| mips_abi == ABI_N32
|| mips_abi == ABI_64))
{
info->fpr_p = true;
break;
- case ABI_MEABI:
- /* The MIPS eabi says only structures containing doubles get
- passed in a fp register, so force a structure containing
- a float to be passed in the integer registers. */
- info->fpr_p = (named && !(mode == SFmode && info->struct_p));
- break;
-
default:
info->fpr_p = named;
break;
&& info.reg_words == 1
&& info.num_bytes < UNITS_PER_WORD
&& !TARGET_64BIT
- && mips_abi != ABI_EABI
- && mips_abi != ABI_MEABI)
+ && mips_abi != ABI_EABI)
{
rtx amount = GEN_INT (BITS_PER_WORD - info.num_bytes * BITS_PER_UNIT);
rtx reg = gen_rtx_REG (word_mode, GP_ARG_FIRST + info.reg_offset);
}
}
- if (mips_abi == ABI_MEABI && info.fpr_p && !cum->prototype)
- {
- /* To make K&R varargs work we need to pass floating
- point arguments in both integer and FP registers. */
- return gen_rtx_PARALLEL
- (mode,
- gen_rtvec (2,
- gen_rtx_EXPR_LIST (VOIDmode,
- gen_rtx_REG (mode,
- GP_ARG_FIRST
- + info.reg_offset),
- const0_rtx),
- gen_rtx_EXPR_LIST (VOIDmode,
- gen_rtx_REG (mode,
- FP_ARG_FIRST
- + info.reg_offset),
- const0_rtx)));
- }
-
if (info.fpr_p)
return gen_rtx_REG (mode, FP_ARG_FIRST + info.reg_offset);
else
else
std_expand_builtin_va_start (valist, nextarg);
}
+\f
+/* Return true if it is possible to use left/right accesses for a
+ bitfield of WIDTH bits starting BITPOS bits into *OP. When
+ returning true, update *OP, *LEFT and *RIGHT as follows:
+
+ *OP is a BLKmode reference to the whole field.
+
+ *LEFT is a QImode reference to the first byte if big endian or
+ the last byte if little endian. This address can be used in the
+ left-side instructions (lwl, swl, ldl, sdl).
+
+ *RIGHT is a QImode reference to the opposite end of the field and
+ can be used in the parterning right-side instruction. */
+
+static bool
+mips_get_unaligned_mem (op, width, bitpos, left, right)
+ rtx *op, *left, *right;
+ unsigned int width;
+ int bitpos;
+{
+ rtx first, last;
+
+ /* Check that the operand really is a MEM. Not all the extv and
+ extzv predicates are checked. */
+ if (GET_CODE (*op) != MEM)
+ return false;
+
+ /* Check that the size is valid. */
+ if (width != 32 && (!TARGET_64BIT || width != 64))
+ return false;
+
+ /* We can only access byte-aligned values. Since we are always passed
+ a reference to the first byte of the field, it is not necessary to
+ do anything with BITPOS after this check. */
+ if (bitpos % BITS_PER_UNIT != 0)
+ return false;
+
+ /* Reject aligned bitfields: we want to use a normal load or store
+ instead of a left/right pair. */
+ if (MEM_ALIGN (*op) >= width)
+ return false;
+
+ /* Adjust *OP to refer to the whole field. This also has the effect
+ of legitimizing *OP's address for BLKmode, possibly simplifying it. */
+ *op = adjust_address (*op, BLKmode, 0);
+ set_mem_size (*op, GEN_INT (width / BITS_PER_UNIT));
+
+ /* Get references to both ends of the field. We deliberately don't
+ use the original QImode *OP for FIRST since the new BLKmode one
+ might have a simpler address. */
+ first = adjust_address (*op, QImode, 0);
+ last = adjust_address (*op, QImode, width / BITS_PER_UNIT - 1);
+
+ /* Allocate to LEFT and RIGHT according to endiannes. LEFT should
+ be the upper word and RIGHT the lower word. */
+ if (TARGET_BIG_ENDIAN)
+ *left = first, *right = last;
+ else
+ *left = last, *right = first;
+
+ return true;
+}
+
+
+/* Try to emit the equivalent of (set DEST (zero_extract SRC WIDTH BITPOS)).
+ Return true on success. We only handle cases where zero_extract is
+ equivalent to sign_extract. */
+
+bool
+mips_expand_unaligned_load (dest, src, width, bitpos)
+ rtx dest, src;
+ unsigned int width;
+ int bitpos;
+{
+ rtx left, right;
+
+ /* If TARGET_64BIT, the destination of a 32-bit load will be a
+ paradoxical word_mode subreg. This is the only case in which
+ we allow the destination to be larger than the source. */
+ if (GET_CODE (dest) == SUBREG
+ && GET_MODE (dest) == DImode
+ && SUBREG_BYTE (dest) == 0
+ && GET_MODE (SUBREG_REG (dest)) == SImode)
+ dest = SUBREG_REG (dest);
+
+ /* After the above adjustment, the destination must be the same
+ width as the source. */
+ if (GET_MODE_BITSIZE (GET_MODE (dest)) != width)
+ return false;
+
+ if (!mips_get_unaligned_mem (&src, width, bitpos, &left, &right))
+ return false;
+
+ if (GET_MODE (dest) == DImode)
+ {
+ emit_insn (gen_mov_ldl (dest, src, left));
+ emit_insn (gen_mov_ldr (copy_rtx (dest), copy_rtx (src),
+ right, copy_rtx (dest)));
+ }
+ else
+ {
+ emit_insn (gen_mov_lwl (dest, src, left));
+ emit_insn (gen_mov_lwr (copy_rtx (dest), copy_rtx (src),
+ right, copy_rtx (dest)));
+ }
+ return true;
+}
+
+
+/* Try to expand (set (zero_extract DEST WIDTH BITPOS) SRC). Return
+ true on success. */
+
+bool
+mips_expand_unaligned_store (dest, src, width, bitpos)
+ rtx dest, src;
+ unsigned int width;
+ int bitpos;
+{
+ rtx left, right;
+
+ if (!mips_get_unaligned_mem (&dest, width, bitpos, &left, &right))
+ return false;
+
+ src = gen_lowpart (mode_for_size (width, MODE_INT, 0), src);
+ if (GET_MODE (src) == DImode)
+ {
+ emit_insn (gen_mov_sdl (dest, src, left));
+ emit_insn (gen_mov_sdr (copy_rtx (dest), copy_rtx (src), right));
+ }
+ else
+ {
+ emit_insn (gen_mov_swl (dest, src, left));
+ emit_insn (gen_mov_swr (copy_rtx (dest), copy_rtx (src), right));
+ }
+ return true;
+}
+\f
/* Implement va_arg. */
rtx
else if (optimize)
target_flags |= MASK_GPOPT;
- /* If both single-float and soft-float are set, then clear the one that
- was set by TARGET_DEFAULT, leaving the one that was set by the
- user. We assume here that the specs prevent both being set by the
- user. */
-#ifdef TARGET_DEFAULT
- if (TARGET_SINGLE_FLOAT && TARGET_SOFT_FLOAT)
- target_flags &= ~((TARGET_DEFAULT) & (MASK_SOFT_FLOAT | MASK_SINGLE_FLOAT));
-#endif
-
/* Interpret -mabi. */
mips_abi = MIPS_ABI_DEFAULT;
if (mips_abi_string != 0)
mips_abi = ABI_64;
else if (strcmp (mips_abi_string, "eabi") == 0)
mips_abi = ABI_EABI;
- else if (strcmp (mips_abi_string, "meabi") == 0)
- mips_abi = ABI_MEABI;
else
fatal_error ("bad value (%s) for -mabi= switch", mips_abi_string);
}
if (TARGET_ABICALLS)
{
mips_abicalls = MIPS_ABICALLS_YES;
- flag_pic = 1;
+ if (flag_pic == 0)
+ flag_pic = 1;
if (mips_section_threshold > 0)
warning ("-G is incompatible with PIC code which is the default");
}
mips_section_threshold = 0x7fffffff;
}
- /* This optimization requires a linker that can support a R_MIPS_LO16
- relocation which is not immediately preceded by a R_MIPS_HI16 relocation.
- GNU ld has this support, but not all other MIPS linkers do, so we enable
- this optimization only if the user requests it, or if GNU ld is the
- standard linker for this configuration. */
- /* ??? This does not work when target addresses are DImode.
- This is because we are missing DImode high/lo_sum patterns. */
- if (TARGET_GAS && ! TARGET_MIPS16 && TARGET_SPLIT_ADDRESSES && optimize && ! flag_pic
- && Pmode == SImode)
+ /* mips_split_addresses is a half-way house between explicit
+ relocations and the traditional assembler macros. It can
+ split absolute 32-bit symbolic constants into a high/lo_sum
+ pair but uses macros for other sorts of access.
+
+ Like explicit relocation support for REL targets, it relies
+ on GNU extensions in the assembler and the linker.
+
+ Although this code should work for -O0, it has traditionally
+ been treated as an optimization. */
+ if (TARGET_GAS && !TARGET_MIPS16 && TARGET_SPLIT_ADDRESSES
+ && optimize && !flag_pic
+ && !ABI_HAS_64BIT_SYMBOLS)
mips_split_addresses = 1;
else
mips_split_addresses = 0;
+ /* -mexplicit-relocs doesn't yet support non-PIC n64. We don't know
+ how to generate %highest/%higher/%hi/%lo sequences. */
+ if (mips_abi == ABI_64 && !TARGET_ABICALLS)
+ {
+ if ((target_flags_explicit & target_flags & MASK_EXPLICIT_RELOCS) != 0)
+ sorry ("non-PIC n64 with explicit relocations");
+ target_flags &= ~MASK_EXPLICIT_RELOCS;
+ }
+
/* -mrnames says to use the MIPS software convention for register
names instead of the hardware names (ie, $a0 instead of $4).
We do this by switching the names in mips_reg_names, which the
/* Don't run the scheduler before reload, since it tends to
increase register pressure. */
flag_schedule_insns = 0;
+
+ /* Silently disable -mexplicit-relocs since it doesn't apply
+ to mips16 code. Even so, it would overly pedantic to warn
+ about "-mips16 -mexplicit-relocs", especially given that
+ we use a %gprel() operator. */
+ target_flags &= ~MASK_EXPLICIT_RELOCS;
}
/* We put -mentry in TARGET_OPTIONS rather than TARGET_SWITCHES only
#else
real_format_for_mode[TFmode - QFmode] = &mips_quad_format;
#endif
-
+
mips_print_operand_punct['?'] = 1;
mips_print_operand_punct['#'] = 1;
mips_print_operand_punct['&'] = 1;
mips_char_to_class['a'] = HILO_REG;
mips_char_to_class['x'] = MD_REGS;
mips_char_to_class['b'] = ALL_REGS;
+ mips_char_to_class['c'] = (TARGET_ABICALLS ? PIC_FN_ADDR_REG :
+ TARGET_MIPS16 ? M16_NA_REGS :
+ GR_REGS);
+ mips_char_to_class['e'] = LEA_REGS;
+ mips_char_to_class['j'] = PIC_FN_ADDR_REG;
mips_char_to_class['y'] = GR_REGS;
mips_char_to_class['z'] = ST_REGS;
mips_char_to_class['B'] = COP0_REGS;
temp = ((regno & 1) == 0 || size <= UNITS_PER_WORD);
else if (FP_REG_P (regno))
- temp = (((regno % FP_INC) == 0
- /* I think this change is OK regardless of abi, but
- I'm being cautions untill I can test this more.
- HARD_REGNO_MODE_OK is about whether or not you
- can move to and from a register without changing
- the value, not about whether math works on the
- register. */
- || (mips_abi == ABI_MEABI && size <= 4))
+ temp = ((regno % FP_INC) == 0)
&& (((class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT)
&& size <= UNITS_PER_FPVALUE)
/* Allow integer modes that fit into a single
when using instructions like cvt and trunc. */
|| (class == MODE_INT && size <= UNITS_PER_FPREG)
/* Allow TFmode for CCmode reloads. */
- || (ISA_HAS_8CC && mode == TFmode)));
+ || (ISA_HAS_8CC && mode == TFmode));
else if (MD_REG_P (regno))
temp = (class == MODE_INT
/* Function to allocate machine-dependent function status. */
init_machine_status = &mips_init_machine_status;
+
+ /* Create a unique alias set for GOT references. */
+ mips_got_alias_set = new_alias_set ();
}
/* Implement CONDITIONAL_REGISTER_USAGE. */
call_really_used_regs[regno] = call_used_regs[regno] = 1;
}
/* odd registers from fp21 to fp31 are now caller saved. */
- if (mips_abi == ABI_N32 || mips_abi == ABI_MEABI)
+ if (mips_abi == ABI_N32)
{
int regno;
for (regno = FP_REG_FIRST + 21; regno <= FP_REG_FIRST + 31; regno+=2)
'T' print 'f' for EQ, 't' for NE
't' print 't' for EQ, 'f' for NE
'Z' print register and a comma, but print nothing for $fcc0
+ 'R' print the reloc associated with LO_SUM
'(' Turn on .set noreorder
')' Turn on .set reorder
'[' Turn on .set noat
int letter; /* %<letter> or 0 */
{
register enum rtx_code code;
+ struct mips_constant_info c;
if (PRINT_OPERAND_PUNCT_VALID_P (letter))
{
if (code == SIGN_EXTEND)
op = XEXP (op, 0), code = GET_CODE (op);
- if (letter == 'C')
+ if (letter == 'R')
+ {
+ if (TARGET_ABICALLS && TARGET_NEWABI)
+ fputs ("%got_ofst(", file);
+ else
+ fputs ("%lo(", file);
+ output_addr_const (file, op);
+ fputc (')', file);
+ }
+
+ else if (letter == 'C')
switch (code)
{
case EQ: fputs ("eq", file); break;
else if (letter == 't')
fputs (code == EQ ? "t" : "f", file);
- else if (code == CONST && GET_CODE (XEXP (op, 0)) == REG)
- {
- /* This case arises on the mips16; see mips16_gp_pseudo_reg. */
- print_operand (file, XEXP (op, 0), letter);
- }
-
- else if (TARGET_MIPS16 && code == CONST && mips16_gp_offset_p (op))
- {
- fputs ("%gprel(", file);
- mips16_output_gp_offset (file, op);
- fputs (")", file);
- }
-
else
- output_addr_const (file, op);
-}
-\f
-/* A C compound statement to output to stdio stream STREAM the
- assembler syntax for an instruction operand that is a memory
- reference whose address is ADDR. ADDR is an RTL expression. */
-
-void
-print_operand_address (file, addr)
- FILE *file;
- rtx addr;
-{
- if (!addr)
- error ("PRINT_OPERAND_ADDRESS, null pointer");
-
- else
- switch (GET_CODE (addr))
+ switch (mips_classify_constant (&c, op))
{
- case REG:
- if (! TARGET_MIPS16 && REGNO (addr) == ARG_POINTER_REGNUM)
- abort_with_insn (addr, "arg pointer not eliminated");
-
- fprintf (file, "0(%s)", reg_names [REGNO (addr)]);
+ case CONSTANT_NONE:
+ case CONSTANT_SYMBOLIC:
+ output_addr_const (file, op);
break;
- case LO_SUM:
- {
- register rtx arg0 = XEXP (addr, 0);
- register rtx arg1 = XEXP (addr, 1);
-
- if (! mips_split_addresses)
- abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, Spurious LO_SUM");
-
- if (GET_CODE (arg0) != REG)
- abort_with_insn (addr,
- "PRINT_OPERAND_ADDRESS, LO_SUM with #1 not REG");
-
- fprintf (file, "%%lo(");
- print_operand_address (file, arg1);
- fprintf (file, ")(%s)", reg_names [REGNO (arg0)]);
- }
+ case CONSTANT_GP:
+ fputs (reg_names[GP_REG_FIRST + 28], file);
break;
- case PLUS:
- {
- register rtx reg = 0;
- register rtx offset = 0;
- register rtx arg0 = XEXP (addr, 0);
- register rtx arg1 = XEXP (addr, 1);
+ case CONSTANT_RELOC:
+ fputs (mips_reloc_string (XINT (c.symbol, 1)), file);
+ output_addr_const (file, plus_constant (XVECEXP (c.symbol, 0, 0),
+ c.offset));
+ fputc (')', file);
+ break;
+ }
+}
+\f
+/* Return the assembly operator used for the given type of relocation. */
- if (GET_CODE (arg0) == REG)
- {
- reg = arg0;
- offset = arg1;
- if (GET_CODE (offset) == REG)
- abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, 2 regs");
- }
+static const char *
+mips_reloc_string (reloc)
+ int reloc;
+{
+ switch (reloc)
+ {
+ case RELOC_GPREL16: return (TARGET_MIPS16 ? "%gprel(" : "%gp_rel(");
+ case RELOC_GOT_HI: return "%got_hi(";
+ case RELOC_GOT_LO: return "%got_lo(";
+ case RELOC_GOT_PAGE: return (TARGET_NEWABI ? "%got_page(" : "%got(");
+ case RELOC_GOT_DISP: return (TARGET_NEWABI ? "%got_disp(" : "%got(");
+ case RELOC_CALL16: return "%call16(";
+ case RELOC_CALL_HI: return "%call_hi(";
+ case RELOC_CALL_LO: return "%call_lo(";
+ }
+ abort ();
+}
- else if (GET_CODE (arg1) == REG)
- reg = arg1, offset = arg0;
- else if (CONSTANT_P (arg0) && CONSTANT_P (arg1))
- {
- output_addr_const (file, addr);
- break;
- }
- else
- abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, no regs");
+/* Output address operand X to FILE. */
- if (! CONSTANT_P (offset))
- abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, invalid insn #2");
+void
+print_operand_address (file, x)
+ FILE *file;
+ rtx x;
+{
+ struct mips_address_info addr;
- if (REGNO (reg) == ARG_POINTER_REGNUM)
- abort_with_insn (addr, "arg pointer not eliminated");
+ switch (mips_classify_address (&addr, x, word_mode, 1, 1))
+ {
+ case ADDRESS_INVALID:
+ abort ();
- if (TARGET_MIPS16
- && GET_CODE (offset) == CONST
- && mips16_gp_offset_p (offset))
- {
- fputs ("%gprel(", file);
- mips16_output_gp_offset (file, offset);
- fputs (")", file);
- }
- else
- output_addr_const (file, offset);
- fprintf (file, "(%s)", reg_names [REGNO (reg)]);
- }
- break;
+ case ADDRESS_REG:
+ print_operand (file, addr.offset, 0);
+ fprintf (file, "(%s)", reg_names[REGNO (addr.reg)]);
+ return;
- case LABEL_REF:
- case SYMBOL_REF:
- case CONST_INT:
- case CONST:
- output_addr_const (file, addr);
- break;
+ case ADDRESS_LO_SUM:
+ print_operand (file, addr.offset, 'R');
+ fprintf (file, "(%s)", reg_names[REGNO (addr.reg)]);
+ return;
- default:
- abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, invalid insn #1");
- break;
+ case ADDRESS_CONST_INT:
+ case ADDRESS_SYMBOLIC:
+ output_addr_const (file, x);
+ return;
}
+ abort ();
}
\f
/* Target hook for assembling integer objects. It appears that the Irix
FILE *stream;
const char *name;
{
- static int first_time = 1;
char ltext_label_name[100];
/* If we are emitting DWARF-2, let dwarf2out handle the ".file"
directives. */
if (write_symbols == DWARF2_DEBUG)
return;
- else if (first_time)
+ else if (mips_output_filename_first_time)
{
- first_time = 0;
+ mips_output_filename_first_time = 0;
SET_FILE_NUMBER ();
current_function_file = name;
ASM_OUTPUT_FILENAME (stream, num_source_filenames, name);
case ABI_64: abi_string = "abi64"; break;
case ABI_O64: abi_string = "abiO64"; break;
case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break;
- case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break;
default:
abort ();
}
case ARG_POINTER_REGNUM:
compute_frame_size (get_frame_size ());
offset = cfun->machine->frame.total_size;
- if (mips_abi == ABI_N32 || mips_abi == ABI_64 || mips_abi == ABI_MEABI)
+ if (mips_abi == ABI_N32 || mips_abi == ABI_64)
offset -= current_function_pretend_args_size;
break;
- case RETURN_ADDRESS_POINTER_REGNUM:
- compute_frame_size (get_frame_size ());
- offset = cfun->machine->frame.gp_sp_offset;
- if (BYTES_BIG_ENDIAN)
- offset += UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT);
- break;
-
default:
abort ();
}
#define BITSET_P(VALUE,BIT) (((VALUE) & (1L << (BIT))) != 0)
+/* Implement RETURN_ADDR_RTX. Note, we do not support moving
+ back to a previous frame. */
+rtx
+mips_return_addr (count, frame)
+ int count;
+ rtx frame ATTRIBUTE_UNUSED;
+{
+ if (count != 0)
+ return const0_rtx;
+
+ return get_hard_reg_initial_val (Pmode, GP_REG_FIRST + 31);
+}
+
+
/* Emit instructions to load the value (SP + OFFSET) into MIPS_TEMP2_REGNUM
and return an rtl expression for the register.
if (tsize > 0)
{
fprintf (file, "\t%s\t%s,%s,%ld\n",
- (Pmode == DImode ? "dsubu" : "subu"),
+ (ptr_mode == DImode ? "dsubu" : "subu"),
sp_str, sp_str, (long) tsize);
fprintf (file, "\t.cprestore %ld\n", cfun->machine->frame.args_size);
}
}
}
\f
-/* Expand the epilogue into a bunch of separate insns. */
+/* Expand the epilogue into a bunch of separate insns. SIBCALL_P is true
+ if this epilogue precedes a sibling call, false if it is for a normal
+ "epilogue" pattern. */
void
-mips_expand_epilogue ()
+mips_expand_epilogue (sibcall_p)
+ int sibcall_p;
{
HOST_WIDE_INT tsize = cfun->machine->frame.total_size;
rtx tsize_rtx = GEN_INT (tsize);
rtx tmp_rtx = (rtx)0;
- if (mips_can_use_return_insn ())
+ if (!sibcall_p && mips_can_use_return_insn ())
{
emit_jump_insn (gen_return ());
return;
if (tsize != 0 || current_function_calls_eh_return)
{
- if (!TARGET_MIPS16)
+ if (!TARGET_MIPS16 || !current_function_calls_eh_return)
{
if (Pmode == DImode)
emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
}
}
-
- /* The mips16 loads the return address into $7, not $31. */
- if (TARGET_MIPS16 && (cfun->machine->frame.mask & RA_MASK) != 0)
- emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode,
- GP_REG_FIRST + 7)));
- else
- emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode,
- GP_REG_FIRST + 31)));
+ if (!sibcall_p)
+ {
+ /* The mips16 loads the return address into $7, not $31. */
+ if (TARGET_MIPS16 && (cfun->machine->frame.mask & RA_MASK) != 0)
+ emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode,
+ GP_REG_FIRST + 7)));
+ else
+ emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode,
+ GP_REG_FIRST + 31)));
+ }
}
\f
/* Return nonzero if this function is known to have a null epilogue.
/* Choose the section to use for DECL. RELOC is true if its value contains
any relocatable expression.
- Some of the logic used here needs to be replicated in
- mips_encode_section_info so that references to these symbols are
- done correctly. Specifically, at least all symbols assigned here
- to rom (.text and/or .rodata) must not be referenced via
- mips_encode_section_info with %gprel, as the rom might be too far
- away.
-
- If you need to make a change here, you probably should check
- mips_encode_section_info to see if it needs a similar change.
-
??? This would be fixed by implementing targetm.is_small_data_p. */
static void
rtx rtl;
int first;
{
+ rtx symbol;
+
+ if (GET_CODE (rtl) != MEM)
+ return;
+
+ symbol = XEXP (rtl, 0);
+
+ if (GET_CODE (symbol) != SYMBOL_REF)
+ return;
+
if (TARGET_MIPS16)
{
if (first && TREE_CODE (decl) == STRING_CST
- && ! flag_writable_strings
- /* If this string is from a function, and the function will
- go in a gnu linkonce section, then we can't directly
- access the string. This gets an assembler error
- "unsupported PC relative reference to different section".
- If we modify SELECT_SECTION to put it in function_section
- instead of text_section, it still fails because
- DECL_SECTION_NAME isn't set until assemble_start_function.
- If we fix that, it still fails because strings are shared
- among multiple functions, and we have cross section
- references again. We force it to work by putting string
- addresses in the constant pool and indirecting. */
- && (! current_function_decl
- || ! DECL_ONE_ONLY (current_function_decl)))
- {
- rtx symref;
-
- symref = XEXP (rtl, 0);
- mips16_strings = alloc_EXPR_LIST (0, symref, mips16_strings);
- SYMBOL_REF_FLAG (symref) = 1;
- mips_string_length += TREE_STRING_LENGTH (decl);
- }
+ && ! flag_writable_strings
+ /* If this string is from a function, and the function will
+ go in a gnu linkonce section, then we can't directly
+ access the string. This gets an assembler error
+ "unsupported PC relative reference to different section".
+ If we modify SELECT_SECTION to put it in function_section
+ instead of text_section, it still fails because
+ DECL_SECTION_NAME isn't set until assemble_start_function.
+ If we fix that, it still fails because strings are shared
+ among multiple functions, and we have cross section
+ references again. We force it to work by putting string
+ addresses in the constant pool and indirecting. */
+ && (! current_function_decl
+ || ! DECL_ONE_ONLY (current_function_decl)))
+ {
+ mips16_strings = alloc_EXPR_LIST (0, symbol, mips16_strings);
+ SYMBOL_REF_FLAG (symbol) = 1;
+ mips_string_length += TREE_STRING_LENGTH (decl);
+ }
}
if (TARGET_EMBEDDED_DATA
&& (TREE_CODE (decl) == VAR_DECL
- && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl))
+ && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl))
&& (!DECL_INITIAL (decl)
- || TREE_CONSTANT (DECL_INITIAL (decl))))
+ || TREE_CONSTANT (DECL_INITIAL (decl))))
{
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 0;
+ SYMBOL_REF_FLAG (symbol) = 0;
}
else if (TARGET_EMBEDDED_PIC)
{
if (TREE_CODE (decl) == VAR_DECL)
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;
+ SYMBOL_REF_FLAG (symbol) = 1;
else if (TREE_CODE (decl) == FUNCTION_DECL)
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 0;
+ SYMBOL_REF_FLAG (symbol) = 0;
else if (TREE_CODE (decl) == STRING_CST
- && ! flag_writable_strings)
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 0;
+ && ! flag_writable_strings)
+ SYMBOL_REF_FLAG (symbol) = 0;
+ else
+ SYMBOL_REF_FLAG (symbol) = 1;
+ }
+
+ else if (TARGET_ABICALLS)
+ {
+ /* Mark the symbol if we should treat it as SYMBOL_GOT_LOCAL.
+ There are three cases to consider:
+
+ - o32 PIC (either with or without explicit relocs)
+ - n32/n64 PIC without explict relocs
+ - n32/n64 PIC with explicit relocs
+
+ In the first case, both local and global accesses will use an
+ R_MIPS_GOT16 relocation. We must correctly predict which of
+ the two semantics (local or global) the assembler and linker
+ will apply. The choice doesn't depend on the symbol's
+ visibility, so we deliberately ignore decl_visiblity and
+ binds_local_p here.
+
+ In the second case, the assembler will not use R_MIPS_GOT16
+ relocations, but it chooses between local and global accessees
+ in the same way as for o32 PIC.
+
+ In the third case we have more freedom since both forms of
+ access will work for any kind of symbol. However, there seems
+ little point in doing things differently. */
+ if (DECL_P (decl) && TREE_PUBLIC (decl))
+ SYMBOL_REF_FLAG (symbol) = 0;
else
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;
+ SYMBOL_REF_FLAG (symbol) = 1;
}
else if (TREE_CODE (decl) == VAR_DECL
- && DECL_SECTION_NAME (decl) != NULL_TREE
- && (0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
- ".sdata")
- || 0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
- ".sbss")))
+ && DECL_SECTION_NAME (decl) != NULL_TREE
+ && (0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
+ ".sdata")
+ || 0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
+ ".sbss")))
{
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;
+ SYMBOL_REF_FLAG (symbol) = 1;
}
/* We can not perform GP optimizations on variables which are in
specific sections, except for .sdata and .sbss which are
handled above. */
else if (TARGET_GP_OPT && TREE_CODE (decl) == VAR_DECL
- && DECL_SECTION_NAME (decl) == NULL_TREE
- && ! (TARGET_MIPS16 && TREE_PUBLIC (decl)
- && (DECL_COMMON (decl)
- || DECL_ONE_ONLY (decl)
- || DECL_WEAK (decl))))
+ && DECL_SECTION_NAME (decl) == NULL_TREE
+ && ! (TARGET_MIPS16 && TREE_PUBLIC (decl)
+ && (DECL_COMMON (decl)
+ || DECL_ONE_ONLY (decl)
+ || DECL_WEAK (decl))))
{
int size = int_size_in_bytes (TREE_TYPE (decl));
if (size > 0 && size <= mips_section_threshold)
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;
+ SYMBOL_REF_FLAG (symbol) = 1;
}
}
+
+
\f
/* Return register to use for a function return value with VALTYPE for
function FUNC. MODE is used instead of VALTYPE for LIBCALLs. */
gen_rtx_EXPR_LIST (VOIDmode,
gen_rtx_REG (DImode, FP_RETURN + 2),
GEN_INT (GET_MODE_SIZE (mode) / 2))));
-
+
else if (mclass == MODE_COMPLEX_FLOAT
&& GET_MODE_SIZE (mode) <= UNITS_PER_HWFPVALUE * 2)
/* ??? cum can be NULL when called from mips_va_arg. The problem handled
here hopefully is not relevant to mips_va_arg. */
if (cum && MUST_PASS_IN_STACK (mode, type)
- && mips_abi != ABI_MEABI
&& FUNCTION_ARG (*cum, mode, type, named) != 0)
return 1;
gp_reg_p = TARGET_MIPS16 ? M16_REG_P (regno) : GP_REG_P (regno);
+ if (TEST_HARD_REG_BIT (reg_class_contents[(int) class], 25)
+ && DANGEROUS_FOR_LA25_P (x))
+ return LEA_REGS;
+
/* We always require a general register when copying anything to
HILO_REGNUM, except when copying an SImode value from HILO_REGNUM
to a general register, or when copying from register 0. */
return cfun->machine->mips16_gp_pseudo_rtx;
}
-/* Return an RTX which represents the signed 16 bit offset from the
- $gp register for the given symbol. This is only used on the
- mips16. */
-
-rtx
-mips16_gp_offset (sym)
- rtx sym;
-{
- tree gp;
-
- if (GET_CODE (sym) != SYMBOL_REF
- || ! SYMBOL_REF_FLAG (sym))
- abort ();
-
- /* We use a special identifier to represent the value of the gp
- register. */
- gp = get_identifier ("__mips16_gp_value");
-
- return gen_rtx (CONST, Pmode,
- gen_rtx (MINUS, Pmode, sym,
- gen_rtx (SYMBOL_REF, Pmode,
- IDENTIFIER_POINTER (gp))));
-}
-
-/* Return nonzero if the given RTX represents a signed 16 bit offset
- from the $gp register. */
-
-int
-mips16_gp_offset_p (x)
- rtx x;
-{
- if (GET_CODE (x) == CONST)
- x = XEXP (x, 0);
-
- /* It's OK to add a small integer value to a gp offset. */
- if (GET_CODE (x) == PLUS)
- {
- if (GET_CODE (XEXP (x, 1)) == CONST_INT
- && SMALL_INT (XEXP (x, 1)))
- return mips16_gp_offset_p (XEXP (x, 0));
- if (GET_CODE (XEXP (x, 0)) == CONST_INT
- && SMALL_INT (XEXP (x, 0)))
- return mips16_gp_offset_p (XEXP (x, 1));
- return 0;
- }
-
- /* Make sure it is in the form SYM - __mips16_gp_value. */
- return (GET_CODE (x) == MINUS
- && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
- && SYMBOL_REF_FLAG (XEXP (x, 0))
- && GET_CODE (XEXP (x, 1)) == SYMBOL_REF
- && strcmp (XSTR (XEXP (x, 1), 0), "__mips16_gp_value") == 0);
-}
-
-/* Output a GP offset. We don't want to print the subtraction of
- __mips16_gp_value; it is implicitly represented by the %gprel which
- should have been printed by the caller. */
-
-static void
-mips16_output_gp_offset (file, x)
- FILE *file;
- rtx x;
-{
- if (GET_CODE (x) == CONST)
- x = XEXP (x, 0);
-
- if (GET_CODE (x) == PLUS)
- {
- mips16_output_gp_offset (file, XEXP (x, 0));
- fputs ("+", file);
- mips16_output_gp_offset (file, XEXP (x, 1));
- return;
- }
-
- if (GET_CODE (x) == MINUS
- && GET_CODE (XEXP (x, 1)) == SYMBOL_REF
- && strcmp (XSTR (XEXP (x, 1), 0), "__mips16_gp_value") == 0)
- {
- mips16_output_gp_offset (file, XEXP (x, 0));
- return;
- }
-
- output_addr_const (file, x);
-}
-
-/* Validate a constant for the mips16. This rejects general symbolic
- addresses, which must be loaded from memory. If ADDR is nonzero,
- this should reject anything which is not a legal address. If
- ADDEND is nonzero, this is being added to something else. */
-
-int
-mips16_constant (x, mode, addr, addend)
- rtx x;
- enum machine_mode mode;
- int addr;
- int addend;
-{
- while (GET_CODE (x) == CONST)
- x = XEXP (x, 0);
-
- switch (GET_CODE (x))
- {
- default:
- return 0;
-
- case PLUS:
- return (mips16_constant (XEXP (x, 0), mode, addr, 1)
- && mips16_constant (XEXP (x, 1), mode, addr, 1));
-
- case SYMBOL_REF:
- if (addr && GET_MODE_SIZE (mode) != 4 && GET_MODE_SIZE (mode) != 8)
- return 0;
- if (CONSTANT_POOL_ADDRESS_P (x))
- return 1;
-
- /* If we aren't looking for a memory address, we can accept a GP
- relative symbol, which will have SYMBOL_REF_FLAG set; movsi
- knows how to handle this. We can always accept a string
- constant, which is the other case in which SYMBOL_REF_FLAG
- will be set. */
- if (! addr
- && ! addend
- && SYMBOL_REF_FLAG (x)
- && mode == (enum machine_mode) Pmode)
- return 1;
-
- /* We can accept a string constant, which will have
- SYMBOL_REF_FLAG set but must be recognized by name to
- distinguish from a GP accessible symbol. The name of a
- string constant will have been generated by
- ASM_GENERATE_INTERNAL_LABEL as called by output_constant_def. */
- if (SYMBOL_REF_FLAG (x))
- {
- const char *name = XSTR (x, 0);
-
- return (name[0] == '*'
- && strncmp (name + 1, LOCAL_LABEL_PREFIX,
- sizeof LOCAL_LABEL_PREFIX - 1) == 0);
- }
-
- return 0;
-
- case LABEL_REF:
- if (addr && GET_MODE_SIZE (mode) != 4 && GET_MODE_SIZE (mode) != 8)
- return 0;
- return 1;
-
- case CONST_INT:
- if (addr && ! addend)
- return 0;
- return INTVAL (x) > - 0x10000 && INTVAL (x) <= 0xffff;
-
- case REG:
- /* We need to treat $gp as a legitimate constant, because
- mips16_gp_pseudo_reg assumes that. */
- return REGNO (x) == GP_REG_FIRST + 28;
- }
-}
-
/* Write out code to move floating point arguments in or out of
general registers. Output the instructions to FILE. FP_CODE is
the code describing which arguments are present (see the comment at
Similarly, we need a stub if the return value might come back in a
floating point register.
- RETVAL, FNMEM, and ARG_SIZE are the values passed to the call insn
- (RETVAL is NULL if this is call rather than call_value). FP_CODE
+ RETVAL is the location of the return value, or null if this is
+ a call rather than a call_value. FN is the address of the
+ function and ARG_SIZE is the size of the arguments. FP_CODE
is the code built by function_arg. This function returns a nonzero
value if it builds the call instruction itself. */
int
-build_mips16_call_stub (retval, fnmem, arg_size, fp_code)
+build_mips16_call_stub (retval, fn, arg_size, fp_code)
rtx retval;
- rtx fnmem;
+ rtx fn;
rtx arg_size;
int fp_code;
{
int fpret;
- rtx fn;
const char *fnname;
char *secname, *stubname;
struct mips16_stub *l;
if (fp_code == 0 && ! fpret)
return 0;
- if (GET_CODE (fnmem) != MEM)
- abort ();
- fn = XEXP (fnmem, 0);
-
/* We don't need to do anything if this is a call to a special
mips16 support function. */
if (GET_CODE (fn) == SYMBOL_REF
{
char buf[30];
tree id;
- rtx stub_fn, stub_mem, insn;
+ rtx stub_fn, insn;
/* ??? If this code is modified to support other ABI's, we need
to handle PARALLEL return values here. */
fp_code);
id = get_identifier (buf);
stub_fn = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (id));
- stub_mem = gen_rtx (MEM, Pmode, stub_fn);
emit_move_insn (gen_rtx (REG, Pmode, 2), fn);
if (retval == NULL_RTX)
- insn = gen_call_internal0 (stub_mem, arg_size,
- gen_rtx (REG, SImode,
- GP_REG_FIRST + 31));
+ insn = gen_call_internal (stub_fn, arg_size);
else
- insn = gen_call_value_internal0 (retval, stub_mem, arg_size,
- gen_rtx (REG, SImode,
- GP_REG_FIRST + 31));
+ insn = gen_call_value_internal (retval, stub_fn, arg_size);
insn = emit_call_insn (insn);
/* Put the register usage information on the CALL. */
rtx insn;
if (retval == NULL_RTX)
- insn = gen_call_internal0 (fnmem, arg_size,
- gen_rtx (REG, SImode,
- GP_REG_FIRST + 31));
+ insn = gen_call_internal (fn, arg_size);
else
- insn = gen_call_value_internal0 (retval, fnmem, arg_size,
- gen_rtx (REG, SImode,
- GP_REG_FIRST + 31));
+ insn = gen_call_value_internal (retval, fn, arg_size);
insn = emit_call_insn (insn);
if (GET_CODE (insn) != CALL_INSN)
&& GET_CODE (SET_SRC (set)) == CONST
&& GET_CODE (XEXP (SET_SRC (set), 0)) == REG
&& REGNO (XEXP (SET_SRC (set), 0)) == GP_REG_FIRST + 28
- && GET_CODE (SET_DEST (set)) == REG
- && GET_MODE (SET_DEST (set)) == (unsigned) Pmode)
+ && GET_CODE (SET_DEST (set)) == REG)
gpcopy = SET_DEST (set);
else if (slot == NULL_RTX
&& gpcopy != NULL_RTX
&& GET_CODE (SET_DEST (set)) == MEM
&& GET_CODE (SET_SRC (set)) == REG
- && REGNO (SET_SRC (set)) == REGNO (gpcopy)
- && GET_MODE (SET_DEST (set)) == (unsigned) Pmode)
+ && REGNO (SET_SRC (set)) == REGNO (gpcopy))
{
rtx base, offset;
&& reg_overlap_mentioned_p (SET_DEST (set), gpcopy)
&& (GET_CODE (SET_DEST (set)) != REG
|| REGNO (SET_DEST (set)) != REGNO (gpcopy)
- || GET_MODE (SET_DEST (set)) != (unsigned) Pmode
|| ((GET_CODE (SET_SRC (set)) != CONST
|| GET_CODE (XEXP (SET_SRC (set), 0)) != REG
|| (REGNO (XEXP (SET_SRC (set), 0))
if (insn != NULL_RTX || gpcopy == NULL_RTX || slot == NULL_RTX)
{
+#if 0
+ /* Used below in #if 0 area. */
rtx next;
-
+#endif
/* This optimization is only reasonable if the constant table
entries are only 4 bytes. */
if (Pmode != SImode)
return;
+#if 0
+ /* ??? FIXME. Rewrite for new UNSPEC_RELOC stuff. */
for (insn = first; insn != NULL_RTX; insn = next)
{
rtx set1, set2;
NOTE_SOURCE_FILE (next) = 0;
}
}
+#endif
return;
}
-
/* We can safely remove all assignments to SLOT from GPCOPY, and
replace all assignments from SLOT to GPCOPY with assignments from
$28. */
continue;
set = PATTERN (insn);
- if (GET_CODE (set) != SET
- || GET_MODE (SET_DEST (set)) != (unsigned) Pmode)
+ if (GET_CODE (set) != SET)
continue;
if (GET_CODE (SET_DEST (set)) == MEM
&& GET_CODE (SET_SRC (set)) == MEM
&& rtx_equal_p (SET_SRC (set), slot))
{
- emit_insn_after (gen_rtx (SET, Pmode, SET_DEST (set),
- gen_rtx (CONST, Pmode,
- gen_rtx (REG, Pmode,
+ enum machine_mode mode;
+
+ mode = GET_MODE (SET_DEST (set));
+ emit_insn_after (gen_rtx (SET, VOIDmode, SET_DEST (set),
+ gen_rtx (CONST, mode,
+ gen_rtx (REG, mode,
GP_REG_FIRST + 28))),
insn);
PUT_CODE (insn, NOTE);
constant table, but we have no way to prevent that. */
}
-/* Return nonzero if X is a SIGN or ZERO extend operator. */
-int
-extend_operator (x, mode)
- rtx x;
- enum machine_mode mode ATTRIBUTE_UNUSED;
-{
- enum rtx_code code = GET_CODE (x);
- return code == SIGN_EXTEND || code == ZERO_EXTEND;
-}
-
-/* Accept any operator that can be used to shift the high half of the
- input value to the lower half, suitable for truncation. The
- remainder (the lower half of the input, and the upper half of the
- output) will be discarded. */
-int
-highpart_shift_operator (x, mode)
- rtx x;
- enum machine_mode mode ATTRIBUTE_UNUSED;
-{
- enum rtx_code code = GET_CODE (x);
- return (code == LSHIFTRT
- || code == ASHIFTRT
- || code == ROTATERT
- || code == ROTATE);
-}
-
/* Return a number assessing the cost of moving a register in class
FROM to class TO. The classes are expressed using the enumeration
values such as `GENERAL_REGS'. A value of 2 is the default; other
l:
.set macro
.set reorder
-
+
When generating non-embedded PIC, instead of:
j target
/* In addition to emitting a .align directive, record the maximum
alignment requested for the current section. */
-struct iris_section_align_entry
+struct GTY (()) iris_section_align_entry
{
const char *name;
unsigned int log;
;; Must include new entries for fmadd in addition to existing entries.
(define_constants
- [(UNSPEC_ULW 0)
- (UNSPEC_USW 1)
- (UNSPEC_ULD 2)
- (UNSPEC_USD 3)
- (UNSPEC_GET_FNADDR 4)
+ [(UNSPEC_GET_FNADDR 4)
(UNSPEC_HILO_DELAY 5)
(UNSPEC_BLOCKAGE 6)
(UNSPEC_LOADGP 7)
(UNSPEC_CONSTTABLE_DF 17)
(UNSPEC_ALIGN_2 18)
(UNSPEC_ALIGN_4 19)
- (UNSPEC_ALIGN_8 20)])
+ (UNSPEC_ALIGN_8 20)
+ (UNSPEC_HIGH 22)
+ (UNSPEC_LWL 23)
+ (UNSPEC_LWR 24)
+ (UNSPEC_SWL 25)
+ (UNSPEC_SWR 26)
+ (UNSPEC_LDL 27)
+ (UNSPEC_LDR 28)
+ (UNSPEC_SDL 29)
+ (UNSPEC_SDR 30)
+
+ ;; Constants used in relocation unspecs. RELOC_GOT_PAGE and RELOC_GOT_DISP
+ ;; are really only available for n32 and n64. However, it is convenient
+ ;; to reuse them for SVR4 PIC, where they represent the local and global
+ ;; forms of R_MIPS_GOT16.
+ (RELOC_GPREL16 100)
+ (RELOC_GOT_HI 101)
+ (RELOC_GOT_LO 102)
+ (RELOC_GOT_PAGE 103)
+ (RELOC_GOT_DISP 104)
+ (RELOC_CALL16 105)
+ (RELOC_CALL_HI 106)
+ (RELOC_CALL_LO 107)])
\f
;; ....................
;;
;; ....................
+;; For jal instructions, this attribute is DIRECT when the target address
+;; is symbolic and INDIRECT when it is a register.
+(define_attr "jal" "unset,direct,indirect"
+ (const_string "unset"))
+
+;; True for multi-instruction jal macros. jal is always a macro
+;; in SVR4 PIC since it includes an instruction to restore $gp.
+;; Direct jals are also macros in NewABI PIC since they load the
+;; target address into $25.
+(define_attr "jal_macro" "no,yes"
+ (cond [(eq_attr "jal" "direct")
+ (symbol_ref "TARGET_ABICALLS != 0")
+ (eq_attr "jal" "indirect")
+ (symbol_ref "(TARGET_ABICALLS && !TARGET_NEWABI) != 0")]
+ (const_string "no")))
+
;; Classification of each insn.
;; branch conditional branch
;; jump unconditional jump
;; call unconditional call
;; load load instruction(s)
;; store store instruction(s)
+;; prefetch memory prefetch
;; move data movement within same register set
;; xfer transfer to/from coprocessor
;; hilo transfer of hi/lo registers
;; arith integer arithmetic instruction
;; darith double precision integer arithmetic instructions
+;; const load constant
;; imul integer multiply
;; imadd integer multiply-add
;; idiv integer divide
;; frsqrt floating point reciprocal square root
;; multi multiword sequence (or user asm statements)
;; nop no operation
-
(define_attr "type"
- "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop"
- (const_string "unknown"))
+ "unknown,branch,jump,call,load,store,prefetch,move,xfer,hilo,const,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop"
+ (cond [(eq_attr "jal" "!unset")
+ (const_string "call")]
+ (const_string "unknown")))
;; Main data type used by the insn
(define_attr "mode" "unknown,none,QI,HI,SI,DI,SF,DF,FPSW" (const_string "unknown"))
+;; Is this an extended instruction in mips16 mode?
+(define_attr "extended_mips16" "no,yes"
+ (const_string "no"))
+
;; Length (in # of bytes). A conditional branch is allowed only to a
;; location within a signed 18-bit offset of the delay slot. If that
;; provides too smal a range, we use the `j' instruction. This
(const_int 0))
(const_int 24)
] (const_int 12))
+ (eq_attr "type" "const")
+ (symbol_ref "mips_const_insns (operands[1]) * 4")
+ (eq_attr "type" "load")
+ (symbol_ref "mips_fetch_insns (operands[1]) * 4")
+ (eq_attr "type" "store")
+ (symbol_ref "mips_fetch_insns (operands[0]) * 4")
+ ;; In the worst case, a call macro will take 8 instructions:
+ ;;
+ ;; lui $25,%call_hi(FOO)
+ ;; addu $25,$25,$28
+ ;; lw $25,%call_lo(FOO)($25)
+ ;; nop
+ ;; jalr $25
+ ;; nop
+ ;; lw $gp,X($sp)
+ ;; nop
+ (eq_attr "jal_macro" "yes")
+ (const_int 32)
+ (and (eq_attr "extended_mips16" "yes")
+ (ne (symbol_ref "TARGET_MIPS16") (const_int 0)))
+ (const_int 8)
] (const_int 4)))
;; Attribute describing the processor. This attribute must match exactly
(const_string "yes")
(const_string "no")))
+;; Is it a single instruction?
+(define_attr "single_insn" "no,yes"
+ (symbol_ref "get_attr_length (insn) == (TARGET_MIPS16 ? 2 : 4)"))
+
;; Can the instruction be put into a delay slot?
(define_attr "can_delay" "no,yes"
(if_then_else (and (eq_attr "dslot" "no")
- ; ADJUST_INSN_LENGTH divides length by 2 on mips16,
- ; so cope with it here.
- (ior (and (eq (symbol_ref "mips16") (const_int 0))
- (eq_attr "length" "4"))
- (and (ne (symbol_ref "mips16") (const_int 0))
- (eq_attr "length" "2"))))
+ (eq_attr "single_insn" "yes"))
(const_string "yes")
(const_string "no")))
(define_asm_attributes
[(set_attr "type" "multi")])
-;; whether or not generating calls to position independent functions
-(define_attr "abicalls" "no,yes"
- (const (symbol_ref "mips_abicalls_attr")))
-
\f
;; .........................
[(eq_attr "can_delay" "yes")
(nil)
(and (eq_attr "branch_likely" "yes")
- (and (eq_attr "dslot" "no")
- (eq_attr "length" "4")))])
+ (eq_attr "can_delay" "yes"))])
(define_delay (eq_attr "type" "jump")
[(eq_attr "can_delay" "yes")
(nil)
(nil)])
-(define_delay (and (eq_attr "type" "call") (eq_attr "abicalls" "no"))
+(define_delay (and (eq_attr "type" "call")
+ (eq_attr "jal_macro" "no"))
[(eq_attr "can_delay" "yes")
(nil)
(nil)])
(set_attr "mode" "SF")])
(define_expand "addsi3"
- [(set (match_operand:SI 0 "register_operand" "=d")
- (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
- (match_operand:SI 2 "arith_operand" "dI")))]
+ [(set (match_operand:SI 0 "register_operand" "")
+ (plus:SI (match_operand:SI 1 "reg_or_0_operand" "")
+ (match_operand:SI 2 "arith_operand" "")))]
""
"
{
}")
(define_insn "addsi3_internal"
- [(set (match_operand:SI 0 "register_operand" "=d")
- (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
- (match_operand:SI 2 "arith_operand" "dI")))]
+ [(set (match_operand:SI 0 "register_operand" "=d,d")
+ (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")
+ (match_operand:SI 2 "arith_operand" "d,Q")))]
"! TARGET_MIPS16
&& (TARGET_GAS
|| GET_CODE (operands[2]) != CONST_INT
|| INTVAL (operands[2]) != -32768)"
- "addu\\t%0,%z1,%2"
+ "@
+ addu\\t%0,%z1,%2
+ addiu\\t%0,%z1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d,d,d")
(plus:SI (match_operand:SI 1 "register_operand" "0,d,d")
- (match_operand:SI 2 "arith_operand" "IQ,O,d")))]
+ (match_operand:SI 2 "arith_operand" "Q,O,d")))]
"TARGET_MIPS16
&& (GET_CODE (operands[1]) != REG
|| REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER
(define_expand "adddi3"
[(parallel [(set (match_operand:DI 0 "register_operand" "")
- (plus:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_arith_operand" "")))
+ (plus:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "arith_operand" "")))
(clobber (match_dup 3))])]
"TARGET_64BIT || (!TARGET_DEBUG_G_MODE && !TARGET_MIPS16)"
"
"")
(define_insn "adddi3_internal_3"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (plus:DI (match_operand:DI 1 "se_reg_or_0_operand" "dJ")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (plus:DI (match_operand:DI 1 "reg_or_0_operand" "dJ,dJ")
+ (match_operand:DI 2 "arith_operand" "d,Q")))]
"TARGET_64BIT
&& !TARGET_MIPS16
&& (TARGET_GAS
|| GET_CODE (operands[2]) != CONST_INT
|| INTVAL (operands[2]) != -32768)"
- "*
-{
- return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
- ? \"dsubu\\t%0,%z1,%n2\"
- : \"daddu\\t%0,%z1,%2\";
-}"
+ "@
+ daddu\\t%0,%z1,%2
+ daddiu\\t%0,%z1,%2"
[(set_attr "type" "darith")
(set_attr "mode" "DI")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,d,d")
(plus:DI (match_operand:DI 1 "register_operand" "0,d,d")
- (match_operand:DI 2 "arith_operand" "IQ,O,d")))]
+ (match_operand:DI 2 "arith_operand" "Q,O,d")))]
"TARGET_MIPS16 && TARGET_64BIT
&& (GET_CODE (operands[1]) != REG
|| REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER
}")
(define_insn "addsi3_internal_2"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (sign_extend:DI (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
- (match_operand:SI 2 "arith_operand" "dI"))))]
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (sign_extend:DI (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")
+ (match_operand:SI 2 "arith_operand" "d,Q"))))]
"TARGET_64BIT
&& !TARGET_MIPS16
&& (TARGET_GAS
|| GET_CODE (operands[2]) != CONST_INT
|| INTVAL (operands[2]) != -32768)"
- "*
-{
- return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
- ? \"subu\\t%0,%z1,%n2\"
- : \"addu\\t%0,%z1,%2\";
-}"
+ "@
+ addu\\t%0,%z1,%2
+ addiu\\t%0,%z1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,d,d")
(sign_extend:DI (plus:SI (match_operand:SI 1 "register_operand" "0,d,d")
- (match_operand:SI 2 "arith_operand" "I,O,d"))))]
+ (match_operand:SI 2 "arith_operand" "Q,O,d"))))]
"TARGET_MIPS16 && TARGET_64BIT"
"*
{
(define_expand "subdi3"
[(parallel [(set (match_operand:DI 0 "register_operand" "=d")
- (minus:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (minus:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(clobber (match_dup 3))])]
"TARGET_64BIT || (!TARGET_DEBUG_G_MODE && !TARGET_MIPS16)"
"
(define_insn "subdi3_internal_3"
[(set (match_operand:DI 0 "register_operand" "=d")
- (minus:DI (match_operand:DI 1 "se_reg_or_0_operand" "dJ")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ (minus:DI (match_operand:DI 1 "reg_or_0_operand" "dJ")
+ (match_operand:DI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16
&& (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != -32768)"
"*
[(set_attr "type" "imul")
(set_attr "mode" "SI")])
+;; If a register gets allocated to LO, and we spill to memory, the reload
+;; will include a move from LO to a GPR. Merge it into the multiplication
+;; if it can set the GPR directly.
+;;
+;; Operand 0: LO
+;; Operand 1: GPR (1st multiplication operand)
+;; Operand 2: GPR (2nd multiplication operand)
+;; Operand 3: HI
+;; Operand 4: HILO
+;; Operand 5: GPR (destination)
+(define_peephole2
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "")
+ (mult:SI (match_operand:SI 1 "register_operand" "")
+ (match_operand:SI 2 "register_operand" "")))
+ (clobber (match_operand:SI 3 "register_operand" ""))
+ (clobber (scratch:SI))
+ (clobber (match_operand:SI 4 "register_operand" ""))])
+ (set (match_operand:SI 5 "register_operand" "")
+ (match_dup 0))]
+ "GENERATE_MULT3_SI
+ && true_regnum (operands[0]) == LO_REGNUM
+ && GP_REG_P (true_regnum (operands[5]))
+ && peep2_reg_dead_p (2, operands[0])"
+ [(parallel
+ [(set (match_dup 5)
+ (mult:SI (match_dup 1)
+ (match_dup 2)))
+ (clobber (match_dup 3))
+ (clobber (match_dup 0))
+ (clobber (match_dup 4))])])
+
(define_insn "mulsi3_internal"
[(set (match_operand:SI 0 "register_operand" "=l")
(mult:SI (match_operand:SI 1 "register_operand" "d")
(clobber (match_scratch:SI 6 "=a,a,a"))
(clobber (match_scratch:SI 7 "=X,X,d"))]
"(TARGET_MIPS3900
- || TARGET_MIPS5400
- || TARGET_MIPS5500
|| ISA_HAS_MADD_MSUB)
&& !TARGET_MIPS16"
"*
{
static const char *const madd[] = { \"madd\\t%1,%2\", \"madd\\t%0,%1,%2\" };
- static const char *const macc[] = { \"macc\\t$0,%1,%2\", \"macc\\t%0,%1,%2\" };
if (which_alternative == 2)
return \"#\";
if (ISA_HAS_MADD_MSUB && which_alternative != 0)
return \"#\";
-
- if (TARGET_MIPS5400)
- return macc[which_alternative];
-
- if (TARGET_MIPS5500)
- {
- if (which_alternative == 0)
- return madd[0];
- else
- return macc[which_alternative];
- }
-
return madd[which_alternative];
}"
[(set_attr "type" "imadd,imadd,multi")
(set (match_dup 0) (match_dup 3))]
"")
+(define_insn "*macc"
+ [(set (match_operand:SI 0 "register_operand" "=l,d")
+ (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d,d")
+ (match_operand:SI 2 "register_operand" "d,d"))
+ (match_operand:SI 3 "register_operand" "0,l")))
+ (clobber (match_scratch:SI 4 "=h,h"))
+ (clobber (match_scratch:SI 5 "=X,3"))
+ (clobber (match_scratch:SI 6 "=a,a"))]
+ "ISA_HAS_MACC"
+ "*
+{
+ if (which_alternative == 1)
+ return \"macc\\t%0,%1,%2\";
+ else if (TARGET_MIPS5500)
+ return \"madd\\t%1,%2\";
+ else
+ return \"macc\\t%.,%1,%2\";
+}"
+ [(set_attr "type" "imadd")
+ (set_attr "mode" "SI")])
+
+;; Pattern generated by define_peephole2 below
+(define_insn "*macc2"
+ [(set (match_operand:SI 0 "register_operand" "=l")
+ (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d")
+ (match_operand:SI 2 "register_operand" "d"))
+ (match_dup 0)))
+ (set (match_operand:SI 3 "register_operand" "=d")
+ (plus:SI (mult:SI (match_dup 1)
+ (match_dup 2))
+ (match_dup 0)))
+ (clobber (match_scratch:SI 4 "=h"))
+ (clobber (match_scratch:SI 5 "=a"))]
+ "ISA_HAS_MACC && reload_completed"
+ "macc\\t%3,%1,%2"
+ [(set_attr "type" "imadd")
+ (set_attr "mode" "SI")])
+
+;; Convert macc $0,<r1>,<r2> & mflo <r3> into macc <r3>,<r1>,<r2>
+;;
+;; Operand 0: LO
+;; Operand 1: GPR (1st multiplication operand)
+;; Operand 2: GPR (2nd multiplication operand)
+;; Operand 3: HI
+;; Operand 4: HILO
+;; Operand 5: GPR (destination)
+(define_peephole2
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "")
+ (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "")
+ (match_operand:SI 2 "register_operand" ""))
+ (match_dup 0)))
+ (clobber (match_operand:SI 3 "register_operand" ""))
+ (clobber (scratch:SI))
+ (clobber (match_operand:SI 4 "register_operand" ""))])
+ (set (match_operand:SI 5 "register_operand" "")
+ (match_dup 0))]
+ "ISA_HAS_MACC
+ && true_regnum (operands[0]) == LO_REGNUM
+ && GP_REG_P (true_regnum (operands[5]))"
+ [(parallel [(set (match_dup 0)
+ (plus:SI (mult:SI (match_dup 1)
+ (match_dup 2))
+ (match_dup 0)))
+ (set (match_dup 5)
+ (plus:SI (mult:SI (match_dup 1)
+ (match_dup 2))
+ (match_dup 0)))
+ (clobber (match_dup 3))
+ (clobber (match_dup 4))])]
+ "")
+
+;; When we have a three-address multiplication instruction, it should
+;; be faster to do a separate multiply and add, rather than moving
+;; something into LO in order to use a macc instruction.
+;;
+;; This peephole needs a scratch register to cater for the case when one
+;; of the multiplication operands is the same as the destination.
+;;
+;; Operand 0: GPR (scratch)
+;; Operand 1: LO
+;; Operand 2: GPR (addend)
+;; Operand 3: GPR (destination)
+;; Operand 4: GPR (1st multiplication operand)
+;; Operand 5: GPR (2nd multiplication operand)
+;; Operand 6: HI
+;; Operand 7: HILO
+(define_peephole2
+ [(match_scratch:SI 0 "d")
+ (set (match_operand:SI 1 "register_operand" "")
+ (match_operand:SI 2 "register_operand" ""))
+ (match_dup 0)
+ (parallel
+ [(set (match_operand:SI 3 "register_operand" "")
+ (plus:SI (mult:SI (match_operand:SI 4 "register_operand" "")
+ (match_operand:SI 5 "register_operand" ""))
+ (match_dup 1)))
+ (clobber (match_operand:SI 6 "register_operand" ""))
+ (clobber (match_dup 1))
+ (clobber (match_operand:SI 7 "register_operand" ""))])]
+ "ISA_HAS_MACC && GENERATE_MULT3_SI
+ && true_regnum (operands[1]) == LO_REGNUM
+ && peep2_reg_dead_p (2, operands[1])
+ && GP_REG_P (true_regnum (operands[3]))"
+ [(parallel [(set (match_dup 0)
+ (mult:SI (match_dup 4)
+ (match_dup 5)))
+ (clobber (match_dup 6))
+ (clobber (match_dup 1))
+ (clobber (match_dup 7))])
+ (set (match_dup 3)
+ (plus:SI (match_dup 0)
+ (match_dup 2)))]
+ "")
+
+;; Same as above, except LO is the initial target of the macc.
+;;
+;; Operand 0: GPR (scratch)
+;; Operand 1: LO
+;; Operand 2: GPR (addend)
+;; Operand 3: GPR (1st multiplication operand)
+;; Operand 4: GPR (2nd multiplication operand)
+;; Operand 5: HI
+;; Operand 6: HILO
+;; Operand 7: GPR (destination)
+(define_peephole2
+ [(match_scratch:SI 0 "d")
+ (set (match_operand:SI 1 "register_operand" "")
+ (match_operand:SI 2 "register_operand" ""))
+ (match_dup 0)
+ (parallel
+ [(set (match_dup 1)
+ (plus:SI (mult:SI (match_operand:SI 3 "register_operand" "")
+ (match_operand:SI 4 "register_operand" ""))
+ (match_dup 1)))
+ (clobber (match_operand:SI 5 "register_operand" ""))
+ (clobber (scratch:SI))
+ (clobber (match_operand:SI 6 "register_operand" ""))])
+ (match_dup 0)
+ (set (match_operand:SI 7 "register_operand" "")
+ (match_dup 1))]
+ "ISA_HAS_MACC && GENERATE_MULT3_SI
+ && true_regnum (operands[1]) == LO_REGNUM
+ && peep2_reg_dead_p (3, operands[1])
+ && GP_REG_P (true_regnum (operands[7]))"
+ [(parallel [(set (match_dup 0)
+ (mult:SI (match_dup 3)
+ (match_dup 4)))
+ (clobber (match_dup 5))
+ (clobber (match_dup 1))
+ (clobber (match_dup 6))])
+ (set (match_dup 7)
+ (plus:SI (match_dup 0)
+ (match_dup 2)))]
+ "")
+
(define_insn "*mul_sub_si"
[(set (match_operand:SI 0 "register_operand" "=l,*d,*d")
(minus:SI (match_operand:SI 1 "register_operand" "0,l,*d")
(mult:SI (match_operand:SI 2 "register_operand" "d,d,d")
(match_operand:SI 3 "register_operand" "d,d,d"))))
(clobber (match_scratch:SI 4 "=h,h,h"))
- (clobber (match_scratch:SI 5 "=X,3,l"))
+ (clobber (match_scratch:SI 5 "=X,1,l"))
(clobber (match_scratch:SI 6 "=a,a,a"))
(clobber (match_scratch:SI 7 "=X,X,d"))]
"ISA_HAS_MADD_MSUB"
(clobber (match_scratch:SI 3 "=h,h"))
(clobber (match_scratch:SI 4 "=a,a"))
(clobber (match_scratch:SI 5 "=X,l"))]
- "ISA_HAS_MULS && TARGET_64BIT"
+ "ISA_HAS_MULS"
"@
muls\\t$0,%1,%2
muls\\t%0,%1,%2"
[(set_attr "type" "imul")
(set_attr "mode" "SI")])
-;; See comments above for mul_acc_si.
(define_insn "*msac"
- [(set (match_operand:SI 0 "register_operand" "=l,*d,*d")
- (minus:SI (match_operand:SI 1 "register_operand" "0,l,*d")
- (mult:SI (match_operand:SI 2 "register_operand" "d,d,d")
- (match_operand:SI 3 "register_operand" "d,d,d"))))
- (clobber (match_scratch:SI 4 "=h,h,h"))
- (clobber (match_scratch:SI 5 "=X,1,l"))
- (clobber (match_scratch:SI 6 "=a,a,a"))
- (clobber (match_scratch:SI 7 "=X,X,d"))]
- "ISA_HAS_MSAC && TARGET_64BIT"
- "@
- msac\\t$0,%2,%3
- msac\\t%0,%2,%3
- #"
- [(set_attr "type" "imadd,imadd,multi")
- (set_attr "mode" "SI")
- (set_attr "length" "4,4,8")])
-
-(define_split
- [(set (match_operand:SI 0 "register_operand" "")
- (minus:SI (match_operand:SI 1 "register_operand" "")
- (mult:SI (match_operand:SI 2 "register_operand" "")
- (match_operand:SI 3 "register_operand" ""))))
- (clobber (match_scratch:SI 4 ""))
- (clobber (match_scratch:SI 5 ""))
- (clobber (match_scratch:SI 6 ""))
- (clobber (match_scratch:SI 7 ""))]
- "reload_completed && !TARGET_DEBUG_D_MODE
- && GP_REG_P (true_regnum (operands[0]))
- && GP_REG_P (true_regnum (operands[1]))"
- [(parallel [(set (match_dup 7)
- (mult:SI (match_dup 2) (match_dup 3)))
- (clobber (match_dup 4))
- (clobber (match_dup 5))
- (clobber (match_dup 6))])
- (set (match_dup 0) (minus:SI (match_dup 1) (match_dup 7)))]
- "")
+ [(set (match_operand:SI 0 "register_operand" "=l,d")
+ (minus:SI (match_operand:SI 1 "register_operand" "0,l")
+ (mult:SI (match_operand:SI 2 "register_operand" "d,d")
+ (match_operand:SI 3 "register_operand" "d,d"))))
+ (clobber (match_scratch:SI 4 "=h,h"))
+ (clobber (match_scratch:SI 5 "=X,1"))
+ (clobber (match_scratch:SI 6 "=a,a"))]
+ "ISA_HAS_MSAC"
+ "*
+{
+ if (which_alternative == 1)
+ return \"msac\\t%0,%2,%3\";
+ else if (TARGET_MIPS5500)
+ return \"msub\\t%2,%3\";
+ else
+ return \"msac\\t$0,%2,%3\";
+}"
+ [(set_attr "type" "imadd")
+ (set_attr "mode" "SI")])
(define_expand "muldi3"
[(set (match_operand:DI 0 "register_operand" "=l")
- (mult:DI (match_operand:DI 1 "se_register_operand" "d")
+ (mult:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=a"))]
DONE;
}")
-;; Don't accept both operands using se_register_operand, because if
-;; both operands are sign extended we would prefer to use mult in the
-;; mulsidi3 pattern. Commutativity should permit either operand to be
-;; sign extended.
-
(define_insn "muldi3_internal"
[(set (match_operand:DI 0 "register_operand" "=l")
- (mult:DI (match_operand:DI 1 "se_register_operand" "d")
+ (mult:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=a"))]
(define_insn "muldi3_internal2"
[(set (match_operand:DI 0 "register_operand" "=d")
- (mult:DI (match_operand:DI 1 "se_register_operand" "d")
+ (mult:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=l"))
""
"
{
- rtx dummy = gen_rtx (SIGN_EXTEND, DImode, const0_rtx);
if (TARGET_64BIT)
- emit_insn (gen_mulsidi3_64bit (operands[0], operands[1], operands[2],
- dummy, dummy));
+ emit_insn (gen_mulsidi3_64bit (operands[0], operands[1], operands[2]));
else
- emit_insn (gen_mulsidi3_internal (operands[0], operands[1], operands[2],
- dummy, dummy));
+ emit_insn (gen_mulsidi3_internal (operands[0], operands[1], operands[2]));
DONE;
}")
+(define_insn "mulsidi3_internal"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))))
+ (clobber (match_scratch:SI 3 "=a"))]
+ "!TARGET_64BIT"
+ "mult\\t%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")])
+
+(define_insn "mulsidi3_64bit"
+ [(set (match_operand:DI 0 "register_operand" "=a")
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))))
+ (clobber (match_scratch:DI 3 "=l"))
+ (clobber (match_scratch:DI 4 "=h"))]
+ "TARGET_64BIT"
+ "mult\\t%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")])
+
(define_expand "umulsidi3"
[(set (match_operand:DI 0 "register_operand" "=x")
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
""
"
{
- rtx dummy = gen_rtx (ZERO_EXTEND, DImode, const0_rtx);
if (TARGET_64BIT)
- emit_insn (gen_mulsidi3_64bit (operands[0], operands[1], operands[2],
- dummy, dummy));
+ emit_insn (gen_umulsidi3_64bit (operands[0], operands[1], operands[2]));
else
- emit_insn (gen_mulsidi3_internal (operands[0], operands[1], operands[2],
- dummy, dummy));
+ emit_insn (gen_umulsidi3_internal (operands[0], operands[1], operands[2]));
+
DONE;
}")
-(define_insn "mulsidi3_internal"
+
+(define_insn "umulsidi3_internal"
[(set (match_operand:DI 0 "register_operand" "=x")
- (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")])))
- (clobber (match_scratch:SI 5 "=a"))]
- "!TARGET_64BIT && GET_CODE (operands[3]) == GET_CODE (operands[4])"
- "*
-{
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"mult\\t%1,%2\";
- return \"multu\\t%1,%2\";
-}"
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))))
+ (clobber (match_scratch:SI 3 "=a"))]
+ "!TARGET_64BIT"
+ "multu\\t%1,%2"
[(set_attr "type" "imul")
(set_attr "mode" "SI")])
-(define_insn "mulsidi3_64bit"
+(define_insn "umulsidi3_64bit"
[(set (match_operand:DI 0 "register_operand" "=a")
- (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")])))
- (clobber (match_scratch:DI 5 "=l"))
- (clobber (match_scratch:DI 6 "=h"))]
- "TARGET_64BIT && GET_CODE (operands[3]) == GET_CODE (operands[4])"
- "*
-{
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"mult\\t%1,%2\";
- return \"multu\\t%1,%2\";
-}"
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))))
+ (clobber (match_scratch:DI 3 "=l"))
+ (clobber (match_scratch:DI 4 "=h"))]
+ "TARGET_64BIT"
+ "multu\\t%1,%2"
[(set_attr "type" "imul")
(set_attr "mode" "SI")])
-;; widening multiply with accumulator and/or negation
-;; These don't match yet for zero-extending; too complex for combine?
-;; Possible additions we should have:
-;; "=x" variants for when !TARGET_64BIT ?
-;; all-d alternatives with splits like pure SImode versions
+;; Widening multiply with negation. It isn't worth using this pattern
+;; for 64-bit code since the reload sequence for HILO_REGNUM is so long.
(define_insn "*muls_di"
- [(set (match_operand:DI 0 "register_operand" "=a")
+ [(set (match_operand:DI 0 "register_operand" "=x")
(neg:DI
- (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")]))))
- (clobber (match_scratch:SI 5 "=h"))
- (clobber (match_scratch:SI 6 "=l"))]
- "TARGET_64BIT
- && ISA_HAS_MULS
- && GET_CODE (operands[3]) == GET_CODE (operands[4])"
+ (mult:DI
+ (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))))
+ (clobber (match_scratch:SI 3 "=a"))]
+ "!TARGET_64BIT && ISA_HAS_MULS"
+ "muls\\t$0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "length" "4")
+ (set_attr "mode" "SI")])
+
+(define_insn "*umuls_di"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (neg:DI
+ (mult:DI
+ (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))))
+ (clobber (match_scratch:SI 3 "=a"))]
+ "!TARGET_64BIT && ISA_HAS_MULS"
+ "mulsu\\t$0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "length" "4")
+ (set_attr "mode" "SI")])
+
+;; Not used for 64-bit code: see comment for *muls_di.
+(define_insn "*smsac_di"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (minus:DI (match_operand:DI 3 "register_operand" "0")
+ (mult:DI
+ (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "!TARGET_64BIT && ISA_HAS_MSAC"
"*
{
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"muls\\t$0,%1,%2\";
+ if (TARGET_MIPS5500)
+ return \"msub\\t%1,%2\";
else
- return \"mulsu\\t$0,%1,%2\";
+ return \"msac\\t$0,%1,%2\";
}"
- [(set_attr "type" "imul")
+ [(set_attr "type" "imadd")
(set_attr "length" "4")
(set_attr "mode" "SI")])
-(define_insn "*msac_di"
- [(set (match_operand:DI 0 "register_operand" "=a")
- (minus:DI (match_operand:DI 3 "register_operand" "0")
- (mult:DI (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 5 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")]))))
- (clobber (match_scratch:SI 6 "=h"))
- (clobber (match_scratch:SI 7 "=l"))]
- "TARGET_64BIT
- && ISA_HAS_MSAC
- && GET_CODE (operands[4]) == GET_CODE (operands[5])"
+(define_insn "*umsac_di"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (minus:DI (match_operand:DI 3 "register_operand" "0")
+ (mult:DI
+ (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "!TARGET_64BIT && ISA_HAS_MSAC"
"*
{
- if (GET_CODE (operands[4]) == SIGN_EXTEND)
- {
- if (TARGET_MIPS5500)
- return \"msub\\t%1,%2\";
- else
- return \"msac\\t$0,%1,%2\";
- }
+ if (TARGET_MIPS5500)
+ return \"msubu\\t%1,%2\";
else
- {
- if (TARGET_MIPS5500)
- return \"msubu\\t%1,%2\";
- else
return \"msacu\\t$0,%1,%2\";
- }
}"
[(set_attr "type" "imadd")
(set_attr "length" "4")
(set_attr "mode" "SI")])
;; _highpart patterns
-(define_expand "smulsi3_highpart"
+(define_expand "umulsi3_highpart"
[(set (match_operand:SI 0 "register_operand" "=h")
(truncate:SI
- (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
- (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))
- (const_int 32))))]
+ (lshiftrt:DI
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (const_int 32))))]
""
"
{
- rtx dummy = gen_rtx (SIGN_EXTEND, DImode, const0_rtx);
- rtx dummy2 = gen_rtx_LSHIFTRT (DImode, const0_rtx, const0_rtx);
-#ifndef NO_MD_PROTOTYPES
- rtx (*genfn) PARAMS ((rtx, rtx, rtx, rtx, rtx, rtx));
-#else
- rtx (*genfn) ();
-#endif
- if (ISA_HAS_MULHI && TARGET_64BIT)
- genfn = gen_xmulsi3_highpart_mulhi;
- else
- genfn = gen_xmulsi3_highpart_internal;
- emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy,
- dummy, dummy2));
+ if (ISA_HAS_MULHI)
+ emit_insn (gen_umulsi3_highpart_mulhi_internal (operands[0], operands[1],
+ operands[2]));
+ else
+ emit_insn (gen_umulsi3_highpart_internal (operands[0], operands[1],
+ operands[2]));
DONE;
}")
-(define_expand "umulsi3_highpart"
+(define_insn "umulsi3_highpart_internal"
[(set (match_operand:SI 0 "register_operand" "=h")
(truncate:SI
- (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
- (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))
- (const_int 32))))]
+ (lshiftrt:DI
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l"))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "!ISA_HAS_MULHI"
+ "multu\\t%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
+
+(define_insn "umulsi3_highpart_mulhi_internal"
+ [(set (match_operand:SI 0 "register_operand" "=h,d")
+ (truncate:SI
+ (lshiftrt:DI
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d,d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d,d")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l,l"))
+ (clobber (match_scratch:SI 4 "=a,a"))
+ (clobber (match_scratch:SI 5 "=X,h"))]
+ "ISA_HAS_MULHI"
+ "@
+ multu\\t%1,%2
+ mulhiu\\t%0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
+
+(define_insn "umulsi3_highpart_neg_mulhi_internal"
+ [(set (match_operand:SI 0 "register_operand" "=h,d")
+ (truncate:SI
+ (lshiftrt:DI
+ (neg:DI
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d,d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d,d"))))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l,l"))
+ (clobber (match_scratch:SI 4 "=a,a"))
+ (clobber (match_scratch:SI 5 "=X,h"))]
+ "ISA_HAS_MULHI"
+ "@
+ mulshiu\\t%.,%1,%2
+ mulshiu\\t%0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
+
+(define_expand "smulsi3_highpart"
+ [(set (match_operand:SI 0 "register_operand" "=h")
+ (truncate:SI
+ (lshiftrt:DI
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (const_int 32))))]
""
"
{
- rtx dummy = gen_rtx (ZERO_EXTEND, DImode, const0_rtx);
- rtx dummy2 = gen_rtx_LSHIFTRT (DImode, const0_rtx, const0_rtx);
-#ifndef NO_MD_PROTOTYPES
- rtx (*genfn) PARAMS ((rtx, rtx, rtx, rtx, rtx, rtx));
-#else
- rtx (*genfn) ();
-#endif
- if (ISA_HAS_MULHI && TARGET_64BIT)
- genfn = gen_xmulsi3_highpart_mulhi;
+ if (ISA_HAS_MULHI)
+ emit_insn (gen_smulsi3_highpart_mulhi_internal (operands[0], operands[1],
+ operands[2]));
else
- genfn = gen_xmulsi3_highpart_internal;
- emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy,
- dummy, dummy2));
+ emit_insn (gen_smulsi3_highpart_internal (operands[0], operands[1],
+ operands[2]));
DONE;
}")
-(define_insn "xmulsi3_highpart_internal"
+(define_insn "smulsi3_highpart_internal"
[(set (match_operand:SI 0 "register_operand" "=h")
(truncate:SI
- (match_operator:DI 5 "highpart_shift_operator"
- [(mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")]))
- (const_int 32)])))
- (clobber (match_scratch:SI 6 "=l"))
- (clobber (match_scratch:SI 7 "=a"))]
- "GET_CODE (operands[3]) == GET_CODE (operands[4])"
- "*
-{
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"mult\\t%1,%2\";
- else
- return \"multu\\t%1,%2\";
-}"
+ (lshiftrt:DI
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l"))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "!ISA_HAS_MULHI"
+ "mult\\t%1,%2"
[(set_attr "type" "imul")
- (set_attr "mode" "SI")])
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
-(define_insn "xmulsi3_highpart_mulhi"
+(define_insn "smulsi3_highpart_mulhi_internal"
[(set (match_operand:SI 0 "register_operand" "=h,d")
(truncate:SI
- (match_operator:DI 5 "highpart_shift_operator"
- [(mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d,d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d,d")]))
- (const_int 32)])))
- (clobber (match_scratch:SI 6 "=l,l"))
- (clobber (match_scratch:SI 7 "=a,a"))
- (clobber (match_scratch:SI 8 "=X,h"))]
- "ISA_HAS_MULHI
- && TARGET_64BIT
- && GET_CODE (operands[3]) == GET_CODE (operands[4])"
- "*
-{
- static char const *const sign[] = { \"mult\\t%1,%2\", \"mulhi\\t%0,%1,%2\" };
- static char const *const zero[] = { \"multu\\t%1,%2\", \"mulhiu\\t%0,%1,%2\" };
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return sign[which_alternative];
- else
- return zero[which_alternative];
-}"
- [(set_attr "type" "imul")
- (set_attr "mode" "SI")
- (set_attr "length" "4")])
+ (lshiftrt:DI
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d,d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d,d")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l,l"))
+ (clobber (match_scratch:SI 4 "=a,a"))
+ (clobber (match_scratch:SI 5 "=X,h"))]
+ "ISA_HAS_MULHI"
+ "@
+ mult\\t%1,%2
+ mulhi\\t%0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
-(define_insn "*xmulsi3_neg_highpart_mulhi"
+(define_insn "smulsi3_highpart_neg_mulhi_internal"
[(set (match_operand:SI 0 "register_operand" "=h,d")
(truncate:SI
- (match_operator:DI 5 "highpart_shift_operator"
- [(neg:DI
- (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d,d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d,d")])))
- (const_int 32)])))
- (clobber (match_scratch:SI 6 "=l,l"))
- (clobber (match_scratch:SI 7 "=a,a"))
- (clobber (match_scratch:SI 8 "=X,h"))]
- "ISA_HAS_MULHI
- && TARGET_64BIT
- && GET_CODE (operands[3]) == GET_CODE (operands[4])"
- "*
-{
- static char const *const sign[] = { \"mulshi\\t$0,%1,%2\", \"mulshi\\t%0,%1,%2\" };
- static char const *const zero[] = { \"mulshiu\\t$0,%1,%2\", \"mulshiu\\t%0,%1,%2\" };
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return sign[which_alternative];
- else
- return zero[which_alternative];
-}"
- [(set_attr "type" "imul")
- (set_attr "mode" "SI")
- (set_attr "length" "4")])
-
+ (lshiftrt:DI
+ (neg:DI
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d,d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d,d"))))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 "=l,l"))
+ (clobber (match_scratch:SI 4 "=a,a"))
+ (clobber (match_scratch:SI 5 "=X,h"))]
+ "ISA_HAS_MULHI"
+ "@
+ mulshi\\t%.,%1,%2
+ mulshi\\t%0,%1,%2"
+ [(set_attr "type" "imul")
+ (set_attr "mode" "SI")])
(define_insn "smuldi3_highpart"
[(set (match_operand:DI 0 "register_operand" "=h")
(truncate:DI
- (lshiftrt:TI (mult:TI (sign_extend:TI (match_operand:DI 1 "se_register_operand" "d"))
- (sign_extend:TI (match_operand:DI 2 "se_register_operand" "d")))
- (const_int 64))))
+ (lshiftrt:TI
+ (mult:TI
+ (sign_extend:TI (match_operand:DI 1 "register_operand" "d"))
+ (sign_extend:TI (match_operand:DI 2 "register_operand" "d")))
+ (const_int 64))))
(clobber (match_scratch:DI 3 "=l"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT"
(define_insn "umuldi3_highpart"
[(set (match_operand:DI 0 "register_operand" "=h")
(truncate:DI
- (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "se_register_operand" "d"))
- (zero_extend:TI (match_operand:DI 2 "se_register_operand" "d")))
- (const_int 64))))
+ (lshiftrt:TI
+ (mult:TI
+ (zero_extend:TI (match_operand:DI 1 "register_operand" "d"))
+ (zero_extend:TI (match_operand:DI 2 "register_operand" "d")))
+ (const_int 64))))
(clobber (match_scratch:DI 3 "=l"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT"
[(set_attr "type" "imul")
(set_attr "mode" "DI")])
+
;; The R4650 supports a 32 bit multiply/ 64 bit accumulate
;; instruction. The HI/LO registers are used as a 64 bit accumulator.
[(set_attr "type" "imadd")
(set_attr "mode" "SI")])
-(define_insn "*mul_acc_di"
- [(set (match_operand:DI 0 "register_operand" "+x")
- (plus:DI (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")]))
- (match_dup 0)))
- (clobber (match_scratch:SI 5 "=a"))]
- "TARGET_MAD
- && ! TARGET_64BIT
- && GET_CODE (operands[3]) == GET_CODE (operands[4])"
+;; Only use this pattern in 32-bit code: see *muls_di.
+(define_insn "*umul_acc_di"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (plus:DI
+ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (match_operand:DI 3 "register_operand" "0")))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "(TARGET_MAD || ISA_HAS_MACC)
+ && !TARGET_64BIT"
"*
{
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"mad\\t%1,%2\";
- else
+ if (TARGET_MAD)
return \"madu\\t%1,%2\";
+ else if (TARGET_MIPS5500)
+ return \"maddu\\t%1,%2\";
+ else
+ return \"maccu\\t%.,%1,%2\";
}"
- [(set_attr "type" "imadd")
- (set_attr "mode" "SI")])
+ [(set_attr "type" "imadd")
+ (set_attr "mode" "SI")])
-(define_insn "*mul_acc_64bit_di"
- [(set (match_operand:DI 0 "register_operand" "+a")
- (plus:DI (mult:DI (match_operator:DI 3 "extend_operator"
- [(match_operand:SI 1 "register_operand" "d")])
- (match_operator:DI 4 "extend_operator"
- [(match_operand:SI 2 "register_operand" "d")]))
- (match_dup 0)))
- (clobber (match_scratch:SI 5 "=h"))
- (clobber (match_scratch:SI 6 "=l"))]
- "TARGET_MAD
- && TARGET_64BIT
- && GET_CODE (operands[3]) == GET_CODE (operands[4])"
+
+(define_insn "*smul_acc_di"
+ [(set (match_operand:DI 0 "register_operand" "=x")
+ (plus:DI
+ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
+ (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))
+ (match_operand:DI 3 "register_operand" "0")))
+ (clobber (match_scratch:SI 4 "=a"))]
+ "(TARGET_MAD || ISA_HAS_MACC)
+ && !TARGET_64BIT"
"*
{
if (TARGET_MAD)
- {
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- return \"mad\\t%1,%2\";
- else
- return \"madu\\t%1,%2\";
- }
- else if (ISA_HAS_MACC)
- {
- if (GET_CODE (operands[3]) == SIGN_EXTEND)
- {
- if (TARGET_MIPS5500)
- return \"madd\\t%1,%2\";
- else
- return \"macc\\t$0,%1,%2\";
- }
- else
- {
- if (TARGET_MIPS5500)
- return \"maddu\\t%1,%2\";
- else
- return \"maccu\\t$0,%1,%2\";
- }
- }
+ return \"mad\\t%1,%2\";
+ else if (TARGET_MIPS5500)
+ return \"madd\\t%1,%2\";
else
- abort ();
-
+ return \"macc\\t%.,%1,%2\";
}"
- [(set_attr "type" "imadd")
- (set_attr "mode" "SI")])
+ [(set_attr "type" "imadd")
+ (set_attr "mode" "SI")])
;; Floating point multiply accumulate instructions.
(define_expand "divmoddi4"
[(set (match_operand:DI 0 "register_operand" "=d")
- (div:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (div:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(set (match_operand:DI 3 "register_operand" "=d")
(mod:DI (match_dup 1)
(match_dup 2)))
(define_insn "divmoddi4_internal"
[(set (match_operand:DI 0 "register_operand" "=l")
- (div:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (div:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(set (match_operand:DI 3 "register_operand" "=h")
(mod:DI (match_dup 1)
(match_dup 2)))
(define_expand "udivmoddi4"
[(set (match_operand:DI 0 "register_operand" "=d")
- (udiv:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (udiv:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(set (match_operand:DI 3 "register_operand" "=d")
(umod:DI (match_dup 1)
(match_dup 2)))
(define_insn "udivmoddi4_internal"
[(set (match_operand:DI 0 "register_operand" "=l")
- (udiv:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (udiv:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(set (match_operand:DI 3 "register_operand" "=h")
(umod:DI (match_dup 1)
(match_dup 2)))
"
{
emit_insn (gen_divsi3_internal (operands[0], operands[1], operands[2]));
+
if (!TARGET_NO_CHECK_ZERO_DIV)
{
emit_insn (gen_div_trap (operands[2],
(define_expand "divdi3"
[(set (match_operand:DI 0 "register_operand" "=l")
- (div:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (div:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_insn "divdi3_internal"
[(set (match_operand:DI 0 "register_operand" "=l")
- (div:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_nonmemory_operand" "di")))
+ (div:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "nonmemory_operand" "di")))
(clobber (match_scratch:SI 3 "=h"))
(clobber (match_scratch:SI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_expand "moddi3"
[(set (match_operand:DI 0 "register_operand" "=h")
- (mod:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ (mod:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=l"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_insn "moddi3_internal"
[(set (match_operand:DI 0 "register_operand" "=h")
- (mod:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_nonmemory_operand" "di")))
+ (mod:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "nonmemory_operand" "di")))
(clobber (match_scratch:SI 3 "=l"))
(clobber (match_scratch:SI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_expand "udivdi3"
[(set (match_operand:DI 0 "register_operand" "=l")
- (udiv:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "di")))
+ (udiv:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "di")))
(clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_insn "udivdi3_internal"
[(set (match_operand:DI 0 "register_operand" "=l")
- (udiv:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_nonmemory_operand" "di")))
+ (udiv:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "nonmemory_operand" "di")))
(clobber (match_scratch:SI 3 "=h"))
(clobber (match_scratch:SI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_expand "umoddi3"
[(set (match_operand:DI 0 "register_operand" "=h")
- (umod:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "di")))
+ (umod:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "di")))
(clobber (match_scratch:DI 3 "=l"))
(clobber (match_scratch:DI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_insn "umoddi3_internal"
[(set (match_operand:DI 0 "register_operand" "=h")
- (umod:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_nonmemory_operand" "di")))
+ (umod:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "nonmemory_operand" "di")))
(clobber (match_scratch:SI 3 "=l"))
(clobber (match_scratch:SI 4 "=a"))]
"TARGET_64BIT && !optimize"
(define_insn "absdi2"
[(set (match_operand:DI 0 "register_operand" "=d")
- (abs:DI (match_operand:DI 1 "se_register_operand" "d")))]
+ (abs:DI (match_operand:DI 1 "register_operand" "d")))]
"TARGET_64BIT && !TARGET_MIPS16"
"*
{
(define_insn "ffsdi2"
[(set (match_operand:DI 0 "register_operand" "=&d")
- (ffs:DI (match_operand:DI 1 "se_register_operand" "d")))
+ (ffs:DI (match_operand:DI 1 "register_operand" "d")))
(clobber (match_scratch:DI 2 "=&d"))
(clobber (match_scratch:DI 3 "=&d"))]
"TARGET_64BIT && !TARGET_MIPS16"
(define_expand "negdi2"
[(parallel [(set (match_operand:DI 0 "register_operand" "=d")
- (neg:DI (match_operand:DI 1 "se_register_operand" "d")))
+ (neg:DI (match_operand:DI 1 "register_operand" "d")))
(clobber (match_dup 2))])]
"(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && !TARGET_MIPS16"
"
(define_insn "negdi2_internal_2"
[(set (match_operand:DI 0 "register_operand" "=d")
- (neg:DI (match_operand:DI 1 "se_register_operand" "d")))]
+ (neg:DI (match_operand:DI 1 "register_operand" "d")))]
"TARGET_64BIT && !TARGET_MIPS16"
"*
{
(define_insn "one_cmpldi2"
[(set (match_operand:DI 0 "register_operand" "=d")
- (not:DI (match_operand:DI 1 "se_register_operand" "d")))]
- ""
+ (not:DI (match_operand:DI 1 "register_operand" "d")))]
+ "TARGET_64BIT"
"*
{
if (TARGET_MIPS16)
- {
- if (TARGET_64BIT)
- return \"not\\t%0,%1\";
- return \"not\\t%M0,%M1\;not\\t%L0,%L1\";
- }
- operands[2] = const0_rtx;
- if (TARGET_64BIT)
- return \"nor\\t%0,%z2,%1\";
- return \"nor\\t%M0,%z2,%M1\;nor\\t%L0,%z2,%L1\";
+ return \"not\\t%0,%1\";
+ return \"nor\\t%0,%.,%1\";
}"
[(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ge (symbol_ref "mips_isa") (const_int 3))
- (const_int 4)
- (const_int 8)))])
-
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (not:DI (match_operand:DI 1 "register_operand" "")))]
- "reload_completed && !TARGET_64BIT
- && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
- && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
- && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
-
- [(set (subreg:SI (match_dup 0) 0) (not:SI (subreg:SI (match_dup 1) 0)))
- (set (subreg:SI (match_dup 0) 4) (not:SI (subreg:SI (match_dup 1) 4)))]
- "")
-
+ (set_attr "mode" "DI")])
\f
;;
;; ....................
(set_attr "mode" "SI")])
(define_expand "anddi3"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (and:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "TARGET_64BIT || !TARGET_DEBUG_G_MODE"
+ [(set (match_operand:DI 0 "register_operand" "")
+ (and:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "uns_arith_operand" "")))]
+ "TARGET_64BIT"
"
{
if (TARGET_MIPS16)
}")
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d")
- (and:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && !TARGET_MIPS16"
- "*
-{
- if (TARGET_64BIT)
- return \"and\\t%0,%1,%2\";
- return \"and\\t%M0,%M1,%M2\;and\\t%L0,%L1,%L2\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ne (symbol_ref "TARGET_64BIT") (const_int 0))
- (const_int 4)
- (const_int 8)))])
-
-(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d")
- (and:DI (match_operand:DI 1 "se_register_operand" "0")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && TARGET_MIPS16"
- "*
-{
- if (TARGET_64BIT)
- return \"and\\t%0,%2\";
- return \"and\\t%M0,%M2\;and\\t%L0,%L2\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ge (symbol_ref "mips_isa") (const_int 3))
- (const_int 4)
- (const_int 8)))])
-
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (and:DI (match_operand:DI 1 "register_operand" "")
- (match_operand:DI 2 "register_operand" "")))]
- "reload_completed && !TARGET_64BIT
- && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
- && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
- && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
- && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
-
- [(set (subreg:SI (match_dup 0) 0) (and:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
- (set (subreg:SI (match_dup 0) 4) (and:SI (subreg:SI (match_dup 1) 4) (subreg:SI (match_dup 2) 4)))]
- "")
-
-(define_insn "anddi3_internal1"
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (and:DI (match_operand:DI 1 "se_register_operand" "%d,d")
- (match_operand:DI 2 "se_uns_arith_operand" "d,K")))]
+ (and:DI (match_operand:DI 1 "register_operand" "d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K")))]
"TARGET_64BIT && !TARGET_MIPS16"
"@
and\\t%0,%1,%2
andi\\t%0,%1,%x2"
- [(set_attr "type" "arith")
+ [(set_attr "type" "darith")
+ (set_attr "mode" "DI")])
+
+(define_insn ""
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (and:DI (match_operand:DI 1 "register_operand" "0")
+ (match_operand:DI 2 "register_operand" "d")))]
+ "TARGET_64BIT && TARGET_MIPS16"
+ "and\\t%0,%2"
+ [(set_attr "type" "darith")
(set_attr "mode" "DI")])
(define_expand "iorsi3"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
-;;; ??? There is no iordi3 pattern which accepts 'K' constants when
-;;; TARGET_64BIT
-
(define_expand "iordi3"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (ior:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "TARGET_64BIT || !TARGET_DEBUG_G_MODE"
- "")
+ [(set (match_operand:DI 0 "register_operand" "")
+ (ior:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "uns_arith_operand" "")))]
+ "TARGET_64BIT"
+ "
+{
+ if (TARGET_MIPS16)
+ {
+ operands[1] = force_reg (DImode, operands[1]);
+ operands[2] = force_reg (DImode, operands[2]);
+ }
+}")
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d")
- (ior:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && !TARGET_MIPS16"
- "*
-{
- if (TARGET_64BIT)
- return \"or\\t%0,%1,%2\";
- return \"or\\t%M0,%M1,%M2\;or\\t%L0,%L1,%L2\";
-}"
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (ior:DI (match_operand:DI 1 "register_operand" "d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K")))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "@
+ or\t%0,%1,%2
+ ori\t%0,%1,%x2"
[(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ne (symbol_ref "TARGET_64BIT") (const_int 0))
- (const_int 4)
- (const_int 8)))])
+ (set_attr "mode" "DI")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d")
- (ior:DI (match_operand:DI 1 "se_register_operand" "0")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && TARGET_MIPS16"
- "*
-{
- if (TARGET_64BIT)
- return \"or\\t%0,%2\";
- return \"or\\t%M0,%M2\;or\\t%L0,%L2\";
-}"
+ (ior:DI (match_operand:DI 1 "register_operand" "0")
+ (match_operand:DI 2 "register_operand" "d")))]
+ "TARGET_64BIT && TARGET_MIPS16"
+ "or\t%0,%2"
[(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ge (symbol_ref "mips_isa") (const_int 3))
- (const_int 4)
- (const_int 8)))])
-
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (ior:DI (match_operand:DI 1 "register_operand" "")
- (match_operand:DI 2 "register_operand" "")))]
- "reload_completed && !TARGET_64BIT
- && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
- && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
- && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
- && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
-
- [(set (subreg:SI (match_dup 0) 0) (ior:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
- (set (subreg:SI (match_dup 0) 4) (ior:SI (subreg:SI (match_dup 1) 4) (subreg:SI (match_dup 2) 4)))]
- "")
+ (set_attr "mode" "DI")])
(define_expand "xorsi3"
[(set (match_operand:SI 0 "register_operand" "=d,d")
(const_int 8))
(const_int 4)])])
-;; ??? If delete the 32-bit long long patterns, then could merge this with
-;; the following xordi3_internal pattern.
(define_expand "xordi3"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (xor:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "TARGET_64BIT || !TARGET_DEBUG_G_MODE"
- "")
-
-(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d")
- (xor:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "(TARGET_64BIT || !TARGET_DEBUG_G_MODE) && !TARGET_MIPS16"
- "*
+ [(set (match_operand:DI 0 "register_operand" "")
+ (xor:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "uns_arith_operand" "")))]
+ "TARGET_64BIT"
+ "
{
- if (TARGET_64BIT)
- return \"xor\\t%0,%1,%2\";
- return \"xor\\t%M0,%M1,%M2\;xor\\t%L0,%L1,%L2\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ne (symbol_ref "TARGET_64BIT") (const_int 0))
- (const_int 4)
- (const_int 8)))])
+ if (TARGET_MIPS16)
+ {
+ operands[1] = force_reg (DImode, operands[1]);
+ operands[2] = force_reg (DImode, operands[2]);
+ }
+}")
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d")
- (xor:DI (match_operand:DI 1 "se_register_operand" "0")
- (match_operand:DI 2 "se_register_operand" "d")))]
- "!TARGET_64BIT && TARGET_MIPS16"
- "xor\\t%M0,%M2\;xor\\t%L0,%L2"
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (xor:DI (match_operand:DI 1 "register_operand" "d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K")))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "@
+ xor\t%0,%1,%2
+ xori\t%0,%1,%x2"
[(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set_attr "length" "8")])
+ (set_attr "mode" "DI")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,t,t")
- (xor:DI (match_operand:DI 1 "se_register_operand" "%0,d,d")
- (match_operand:DI 2 "se_uns_arith_operand" "d,K,d")))]
+ (xor:DI (match_operand:DI 1 "register_operand" "%0,d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K,d")))]
"TARGET_64BIT && TARGET_MIPS16"
"@
xor\\t%0,%2
(const_int 8))
(const_int 4)])])
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (xor:DI (match_operand:DI 1 "register_operand" "")
- (match_operand:DI 2 "register_operand" "")))]
- "reload_completed && !TARGET_64BIT
- && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
- && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
- && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
- && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
-
- [(set (subreg:SI (match_dup 0) 0) (xor:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
- (set (subreg:SI (match_dup 0) 4) (xor:SI (subreg:SI (match_dup 1) 4) (subreg:SI (match_dup 2) 4)))]
- "")
-
-(define_insn "xordi3_immed"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (xor:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_uns_arith_operand" "K")))]
- "TARGET_64BIT && !TARGET_MIPS16"
- "xori\\t%0,%1,%x2"
- [(set_attr "type" "arith")
- (set_attr "mode" "DI")])
-
(define_insn "*norsi3"
[(set (match_operand:SI 0 "register_operand" "=d")
(and:SI (not:SI (match_operand:SI 1 "register_operand" "d"))
(define_insn "*nordi3"
[(set (match_operand:DI 0 "register_operand" "=d")
- (and:DI (not:DI (match_operand:DI 1 "se_register_operand" "d"))
- (not:DI (match_operand:DI 2 "se_register_operand" "d"))))]
- "!TARGET_MIPS16"
- "*
-{
- if (TARGET_64BIT)
- return \"nor\\t%0,%z1,%z2\";
- return \"nor\\t%M0,%M1,%M2\;nor\\t%L0,%L1,%L2\";
-}"
+ (and:DI (not:DI (match_operand:DI 1 "register_operand" "d"))
+ (not:DI (match_operand:DI 2 "register_operand" "d"))))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "nor\\t%0,%z1,%z2"
[(set_attr "type" "darith")
- (set_attr "mode" "DI")
- (set (attr "length")
- (if_then_else (ne (symbol_ref "TARGET_64BIT") (const_int 0))
- (const_int 4)
- (const_int 8)))])
-
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (and:DI (not:DI (match_operand:DI 1 "register_operand" ""))
- (not:DI (match_operand:DI 2 "register_operand" ""))))]
- "reload_completed && !TARGET_MIPS16 && !TARGET_64BIT
- && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
- && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
- && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
- && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
-
- [(set (subreg:SI (match_dup 0) 0) (and:SI (not:SI (subreg:SI (match_dup 1) 0)) (not:SI (subreg:SI (match_dup 2) 0))))
- (set (subreg:SI (match_dup 0) 4) (and:SI (not:SI (subreg:SI (match_dup 1) 4)) (not:SI (subreg:SI (match_dup 2) 4))))]
- "")
+ (set_attr "mode" "DI")])
\f
;;
;; ....................
;;
;; ....................
+
+
(define_insn "truncdfsf2"
[(set (match_operand:SF 0 "register_operand" "=f")
(float_truncate:SF (match_operand:DF 1 "register_operand" "f")))]
[(set_attr "type" "fcvt")
(set_attr "mode" "SF")])
+;; Integer truncation patterns. Truncating SImode values to smaller
+;; modes is a no-op, as it is for most other GCC ports. Truncating
+;; DImode values to SImode is not a no-op for TARGET_64BIT since we
+;; need to make sure that the lower 32 bits are properly sign-extended
+;; (see TRULY_NOOP_TRUNCATION). Truncating DImode values into modes
+;; smaller than SImode is equivalent to two separate truncations:
+;;
+;; A B
+;; DI ---> HI == DI ---> SI ---> HI
+;; DI ---> QI == DI ---> SI ---> QI
+;;
+;; Step A needs a real instruction but step B does not.
+
(define_insn "truncdisi2"
- [(set (match_operand:SI 0 "register_operand" "=d")
- (truncate:SI (match_operand:DI 1 "se_register_operand" "d")))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=d,m")
+ (truncate:SI (match_operand:DI 1 "register_operand" "d,d")))]
"TARGET_64BIT"
- "*
-{
- if (TARGET_MIPS16)
- return \"dsll\\t%0,%1,32\;dsra\\t%0,32\";
- return \"dsll\\t%0,%1,32\;dsra\\t%0,%0,32\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")
- (set (attr "length") (if_then_else (eq (symbol_ref "mips16") (const_int 0))
- (const_int 8)
- (const_int 16)))])
+ "@
+ sll\t%0,%1,0
+ sw\t%1,%0"
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")
+ (set_attr "extended_mips16" "yes,*")])
(define_insn "truncdihi2"
- [(set (match_operand:HI 0 "register_operand" "=d")
- (truncate:HI (match_operand:DI 1 "se_register_operand" "d")))]
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=d,m")
+ (truncate:HI (match_operand:DI 1 "register_operand" "d,d")))]
"TARGET_64BIT"
- "*
-{
- if (TARGET_MIPS16)
- return \"dsll\\t%0,%1,48\;dsra\\t%0,48\";
- return \"andi\\t%0,%1,0xffff\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "HI")
- (set (attr "length") (if_then_else (eq (symbol_ref "mips16") (const_int 0))
- (const_int 4)
- (const_int 16)))])
+ "@
+ sll\t%0,%1,0
+ sh\t%1,%0"
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")
+ (set_attr "extended_mips16" "yes,*")])
+
(define_insn "truncdiqi2"
- [(set (match_operand:QI 0 "register_operand" "=d")
- (truncate:QI (match_operand:DI 1 "se_register_operand" "d")))]
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m")
+ (truncate:QI (match_operand:DI 1 "register_operand" "d,d")))]
"TARGET_64BIT"
- "*
-{
- if (TARGET_MIPS16)
- return \"dsll\\t%0,%1,56\;dsra\\t%0,56\";
- return \"andi\\t%0,%1,0x00ff\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "QI")
- (set (attr "length") (if_then_else (eq (symbol_ref "mips16") (const_int 0))
- (const_int 4)
- (const_int 16)))])
+ "@
+ sll\t%0,%1,0
+ sb\t%1,%0"
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")
+ (set_attr "extended_mips16" "yes,*")])
;; Combiner patterns to optimize shift/truncate combinations.
+
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (truncate:SI (ashiftrt:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "small_int" "I"))))]
- "TARGET_64BIT && !TARGET_MIPS16"
- "*
-{
- int shift_amt = INTVAL (operands[2]) & 0x3f;
-
- if (shift_amt < 32)
- {
- operands[2] = GEN_INT (32 - shift_amt);
- return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\";
- }
- else
- {
- operands[2] = GEN_INT (shift_amt);
- return \"dsra\\t%0,%1,%2\";
- }
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")
- (set_attr "length" "8")])
+ (truncate:SI (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "small_int" "I"))))]
+ "TARGET_64BIT && !TARGET_MIPS16 && INTVAL (operands[2]) >= 32"
+ "dsra\\t%0,%1,%2"
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")])
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (truncate:SI (lshiftrt:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "small_int" "I"))))]
+ (truncate:SI (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
+ (const_int 32))))]
"TARGET_64BIT && !TARGET_MIPS16"
- "*
-{
- int shift_amt = INTVAL (operands[2]) & 0x3f;
+ "dsra\\t%0,%1,32"
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")])
- if (shift_amt < 32)
- {
- operands[2] = GEN_INT (32 - shift_amt);
- return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\";
- }
- else if (shift_amt == 32)
- return \"dsra\\t%0,%1,32\";
- else
- {
- operands[2] = GEN_INT (shift_amt);
- return \"dsrl\\t%0,%1,%2\";
- }
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")
- (set_attr "length" "8")])
-(define_insn ""
+;; Combiner patterns for truncate/sign_extend combinations. They use
+;; the shift/truncate patterns above.
+
+(define_insn_and_split ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (truncate:SI (ashift:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "small_int" "I"))))]
- "TARGET_64BIT"
- "*
-{
- int shift_amt = INTVAL (operands[2]) & 0x3f;
+ (sign_extend:SI
+ (truncate:HI (match_operand:DI 1 "register_operand" "d"))))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "#"
+ "&& reload_completed"
+ [(set (match_dup 2)
+ (ashift:DI (match_dup 1)
+ (const_int 48)))
+ (set (match_dup 0)
+ (truncate:SI (ashiftrt:DI (match_dup 2)
+ (const_int 48))))]
+ { operands[2] = gen_lowpart (DImode, operands[0]); })
+
+(define_insn_and_split ""
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (sign_extend:SI
+ (truncate:QI (match_operand:DI 1 "register_operand" "d"))))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "#"
+ "&& reload_completed"
+ [(set (match_dup 2)
+ (ashift:DI (match_dup 1)
+ (const_int 56)))
+ (set (match_dup 0)
+ (truncate:SI (ashiftrt:DI (match_dup 2)
+ (const_int 56))))]
+ { operands[2] = gen_lowpart (DImode, operands[0]); })
- if (shift_amt < 32)
- {
- operands[2] = GEN_INT (32 + shift_amt);
- if (TARGET_MIPS16)
- return \"dsll\\t%0,%1,%2\;dsra\\t%0,32\";
- return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\";
- }
- else
- return \"move\\t%0,%.\";
-}"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")
- (set_attr "length" "8")])
;; Combiner patterns to optimize truncate/zero_extend combinations.
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (zero_extend:SI (truncate:HI
- (match_operand:DI 1 "se_register_operand" "d"))))]
+ (zero_extend:SI (truncate:HI
+ (match_operand:DI 1 "register_operand" "d"))))]
"TARGET_64BIT && !TARGET_MIPS16"
"andi\\t%0,%1,0xffff"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")])
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")])
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (zero_extend:SI (truncate:QI
- (match_operand:DI 1 "se_register_operand" "d"))))]
+ (zero_extend:SI (truncate:QI
+ (match_operand:DI 1 "register_operand" "d"))))]
"TARGET_64BIT && !TARGET_MIPS16"
"andi\\t%0,%1,0xff"
- [(set_attr "type" "darith")
- (set_attr "mode" "SI")])
+ [(set_attr "type" "darith")
+ (set_attr "mode" "SI")])
(define_insn ""
[(set (match_operand:HI 0 "register_operand" "=d")
- (zero_extend:HI (truncate:QI
- (match_operand:DI 1 "se_register_operand" "d"))))]
+ (zero_extend:HI (truncate:QI
+ (match_operand:DI 1 "register_operand" "d"))))]
"TARGET_64BIT && !TARGET_MIPS16"
"andi\\t%0,%1,0xff"
- [(set_attr "type" "darith")
- (set_attr "mode" "HI")])
+ [(set_attr "type" "darith")
+ (set_attr "mode" "HI")])
+
\f
;;
;; ....................
;; Extension insns.
;; Those for integer source operand are ordered widest source type first.
-(define_expand "zero_extendsidi2"
- [(set (match_operand:DI 0 "register_operand" "")
- (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))]
+(define_insn_and_split "zero_extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (zero_extend:DI (match_operand:SI 1 "register_operand" "d")))]
"TARGET_64BIT"
- "
-{
- if ((optimize || TARGET_MIPS16) && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
-
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op1 = gen_lowpart (DImode, operands[1]);
- rtx temp = gen_reg_rtx (DImode);
- rtx shift = GEN_INT (32);
-
- emit_insn (gen_ashldi3 (temp, op1, shift));
- emit_insn (gen_lshrdi3 (operands[0], temp, shift));
- DONE;
- }
-}")
+ "#"
+ "&& reload_completed"
+ [(set (match_dup 0)
+ (ashift:DI (match_dup 1) (const_int 32)))
+ (set (match_dup 0)
+ (lshiftrt:DI (match_dup 0) (const_int 32)))]
+ "operands[1] = gen_lowpart (DImode, operands[1]);"
+ [(set_attr "type" "arith")
+ (set_attr "mode" "DI")])
-(define_insn "zero_extendsidi2_internal"
- [(set (match_operand:DI 0 "register_operand" "=d,d")
- (zero_extend:DI (match_operand:SI 1 "memory_operand" "R,m")))]
+(define_insn "*zero_extendsidi2_mem"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (zero_extend:DI (match_operand:SI 1 "memory_operand" "m")))]
"TARGET_64BIT && !TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ "lwu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
(define_expand "zero_extendhisi2"
[(set (match_operand:SI 0 "register_operand" "")
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
""
"
{
}")
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=d,d,d")
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,R,m")))]
+ [(set (match_operand:SI 0 "register_operand" "=d,d")
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,m")))]
"!TARGET_MIPS16"
- "*
-{
- if (which_alternative == 0)
- return \"andi\\t%0,%1,0xffff\";
- else
- return mips_move_1word (operands, insn, TRUE);
-}"
- [(set_attr "type" "arith,load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,4,8")])
+ "@
+ andi\t%0,%1,0xffff
+ lhu\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4,*")])
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=d,d")
- (zero_extend:SI (match_operand:HI 1 "memory_operand" "R,m")))]
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
"TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,8")])
+ "lhu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
(define_expand "zero_extendhidi2"
[(set (match_operand:DI 0 "register_operand" "")
- (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "")))]
+ (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "")))]
"TARGET_64BIT"
"
{
}")
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d,d,d")
- (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "d,R,m")))]
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "d,m")))]
"TARGET_64BIT && !TARGET_MIPS16"
- "*
-{
- if (which_alternative == 0)
- return \"andi\\t%0,%1,0xffff\";
- else
- return mips_move_1word (operands, insn, TRUE);
-}"
- [(set_attr "type" "arith,load,load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,4,8")])
+ "@
+ andi\t%0,%1,0xffff
+ lhu\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "DI")
+ (set_attr "length" "4,*")])
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d,d")
- (zero_extend:DI (match_operand:HI 1 "memory_operand" "R,m")))]
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))]
"TARGET_64BIT && TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load,load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ "lhu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
(define_expand "zero_extendqihi2"
[(set (match_operand:HI 0 "register_operand" "")
}
}")
-(define_insn ""
- [(set (match_operand:HI 0 "register_operand" "=d,d,d")
- (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
- "!TARGET_MIPS16"
- "*
-{
- if (which_alternative == 0)
- return \"andi\\t%0,%1,0x00ff\";
- else
- return mips_move_1word (operands, insn, TRUE);
-}"
- [(set_attr "type" "arith,load,load")
- (set_attr "mode" "HI")
- (set_attr "length" "4,4,8")])
-
(define_insn ""
[(set (match_operand:HI 0 "register_operand" "=d,d")
- (zero_extend:HI (match_operand:QI 1 "memory_operand" "R,m")))]
+ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "d,m")))]
+ "!TARGET_MIPS16"
+ "@
+ andi\t%0,%1,0x00ff
+ lbu\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "HI")
+ (set_attr "length" "4,*")])
+
+(define_insn ""
+ [(set (match_operand:HI 0 "register_operand" "=d")
+ (zero_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
"TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load,load")
- (set_attr "mode" "HI")
- (set_attr "length" "4,8")])
+ "lbu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "HI")])
(define_expand "zero_extendqisi2"
[(set (match_operand:SI 0 "register_operand" "")
}")
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=d,d,d")
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
+ [(set (match_operand:SI 0 "register_operand" "=d,d")
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,m")))]
"!TARGET_MIPS16"
- "*
-{
- if (which_alternative == 0)
- return \"andi\\t%0,%1,0x00ff\";
- else
- return mips_move_1word (operands, insn, TRUE);
-}"
- [(set_attr "type" "arith,load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,4,8")])
+ "@
+ andi\t%0,%1,0x00ff
+ lbu\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "SI")
+ (set_attr "length" "4,*")])
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=d,d")
- (zero_extend:SI (match_operand:QI 1 "memory_operand" "R,m")))]
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (zero_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
"TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,8")])
+ "lbu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
(define_expand "zero_extendqidi2"
[(set (match_operand:DI 0 "register_operand" "")
}")
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d,d,d")
- (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "d,m")))]
"TARGET_64BIT && !TARGET_MIPS16"
- "*
-{
- if (which_alternative == 0)
- return \"andi\\t%0,%1,0x00ff\";
- else
- return mips_move_1word (operands, insn, TRUE);
-}"
- [(set_attr "type" "arith,load,load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,4,8")])
+ "@
+ andi\t%0,%1,0x00ff
+ lbu\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "DI")
+ (set_attr "length" "4,*")])
;; These can be created when a paradoxical subreg operand with an implicit
;; sign_extend operator is reloaded. Because of the subreg, this is really
;; ??? It might be possible to eliminate the need for these patterns by adding
;; more support to reload for implicit sign_extend operators.
(define_insn "*paradoxical_extendhidi2"
- [(set (match_operand:DI 0 "register_operand" "=d,d")
+ [(set (match_operand:DI 0 "register_operand" "=d")
(sign_extend:DI
- (subreg:SI (match_operand:HI 1 "memory_operand" "R,m") 0)))]
+ (subreg:SI (match_operand:HI 1 "memory_operand" "m") 0)))]
"TARGET_64BIT"
"*
{
return mips_move_1word (operands, insn, TRUE);
}"
- [(set_attr "type" "load,load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
(define_insn ""
- [(set (match_operand:DI 0 "register_operand" "=d,d")
- (zero_extend:DI (match_operand:QI 1 "memory_operand" "R,m")))]
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (zero_extend:DI (match_operand:QI 1 "memory_operand" "m")))]
"TARGET_64BIT && TARGET_MIPS16"
- "* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "load,load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ "lbu\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
\f
;;
;; ....................
;; Extension insns.
;; Those for integer source operand are ordered widest source type first.
-;; In 64 bit mode, 32 bit values in general registers are always
-;; correctly sign extended. That means that if the target is a
-;; general register, we can sign extend from SImode to DImode just by
-;; doing a move. The matching define_insns are *movdi_internal2_extend
-;; and *movdi_internal2_mips16.
-
(define_expand "extendsidi2"
[(set (match_operand:DI 0 "register_operand" "")
- (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))]
+ (sign_extend:DI (match_operand:SI 1 "move_operand" "")))]
"TARGET_64BIT"
- "")
+ "
+{
+ if (symbolic_operand (operands[1], SImode))
+ {
+ emit_move_insn (operands[0], convert_memory_address (DImode, operands[1]));
+ DONE;
+ }
+
+}")
+
+(define_insn "*extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=d,d")
+ (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "d,m")))]
+ "TARGET_64BIT"
+ "@
+ sll\t%0,%1,0
+ lw\t%0,%1"
+ [(set_attr "type" "arith,load")
+ (set_attr "mode" "DI")
+ (set_attr "extended_mips16" "yes,*")])
;; These patterns originally accepted general_operands, however, slightly
;; better code is generated by only accepting register_operands, and then
;; letting combine generate the lh and lb insns.
+;; These expanders originally put values in registers first. We split
+;; all non-mem patterns after reload.
+
(define_expand "extendhidi2"
[(set (match_operand:DI 0 "register_operand" "")
- (sign_extend:DI (match_operand:HI 1 "nonimmediate_operand" "")))]
+ (sign_extend:DI (match_operand:HI 1 "nonimmediate_operand" "")))]
"TARGET_64BIT"
- "
-{
- if (optimize && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
+ "")
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op1 = gen_lowpart (DImode, operands[1]);
- rtx temp = gen_reg_rtx (DImode);
- rtx shift = GEN_INT (48);
+(define_insn "*extendhidi2"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (sign_extend:DI (match_operand:HI 1 "register_operand" "d")))]
+ "TARGET_64BIT"
+ "#")
- emit_insn (gen_ashldi3 (temp, op1, shift));
- emit_insn (gen_ashrdi3 (operands[0], temp, shift));
- DONE;
- }
-}")
+(define_split
+ [(set (match_operand:DI 0 "register_operand" "")
+ (sign_extend:DI (match_operand:HI 1 "register_operand" "")))]
+ "TARGET_64BIT && reload_completed"
+ [(set (match_dup 0)
+ (ashift:DI (match_dup 1) (const_int 48)))
+ (set (match_dup 0)
+ (ashiftrt:DI (match_dup 0) (const_int 48)))]
+ "operands[1] = gen_lowpart (DImode, operands[1]);")
-(define_insn "extendhidi2_internal"
- [(set (match_operand:DI 0 "register_operand" "=d,d")
- (sign_extend:DI (match_operand:HI 1 "memory_operand" "R,m")))]
+(define_insn "*extendhidi2_mem"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))]
"TARGET_64BIT"
- "* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ "lh\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
(define_expand "extendhisi2"
[(set (match_operand:SI 0 "register_operand" "")
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
""
"
-{
- if (ISA_HAS_SEB_SEH)
- {
- emit_insn (gen_extendhisi2_hw (operands[0],
- force_reg (HImode, operands[1])));
- DONE;
- }
+ if (ISA_HAS_SEB_SEH)
+ {
+ emit_insn (gen_extendhisi2_hw (operands[0],
+ force_reg (HImode, operands[1])));
+ DONE;
+ }
+")
- if (optimize && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
+(define_insn "*extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (sign_extend:SI (match_operand:HI 1 "register_operand" "d")))]
+ ""
+ "#")
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op1 = gen_lowpart (SImode, operands[1]);
- rtx temp = gen_reg_rtx (SImode);
- rtx shift = GEN_INT (16);
+(define_split
+ [(set (match_operand:SI 0 "register_operand" "")
+ (sign_extend:SI (match_operand:HI 1 "register_operand" "")))]
+ "reload_completed"
+ [(set (match_dup 0)
+ (ashift:SI (match_dup 1) (const_int 16)))
+ (set (match_dup 0)
+ (ashiftrt:SI (match_dup 0) (const_int 16)))]
+ "operands[1] = gen_lowpart (SImode, operands[1]);")
- emit_insn (gen_ashlsi3 (temp, op1, shift));
- emit_insn (gen_ashrsi3 (operands[0], temp, shift));
- DONE;
- }
-}")
+(define_insn "extendhisi2_mem"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
+ ""
+ "lh\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
-(define_insn "extendhisi2_hw"
+(define_insn "extendhisi2_hw"
[(set (match_operand:SI 0 "register_operand" "=r")
- (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
- "ISA_HAS_SEB_SEH"
+ (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
+ "ISA_HAS_SEB_SEH"
"seh\\t%0,%1"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
-(define_insn "extendhisi2_internal"
- [(set (match_operand:SI 0 "register_operand" "=d,d")
- (sign_extend:SI (match_operand:HI 1 "memory_operand" "R,m")))]
- ""
- "* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,8")])
-
(define_expand "extendqihi2"
[(set (match_operand:HI 0 "register_operand" "")
- (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
+ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
""
- "
-{
- if (optimize && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
+ "")
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op0 = gen_lowpart (SImode, operands[0]);
- rtx op1 = gen_lowpart (SImode, operands[1]);
- rtx temp = gen_reg_rtx (SImode);
- rtx shift = GEN_INT (24);
+(define_insn "*extendqihi2"
+ [(set (match_operand:HI 0 "register_operand" "=d")
+ (sign_extend:HI (match_operand:QI 1 "register_operand" "d")))]
+ ""
+ "#")
- emit_insn (gen_ashlsi3 (temp, op1, shift));
- emit_insn (gen_ashrsi3 (op0, temp, shift));
- DONE;
- }
-}")
+(define_split
+ [(set (match_operand:HI 0 "register_operand" "")
+ (sign_extend:HI (match_operand:QI 1 "register_operand" "")))]
+ "reload_completed"
+ [(set (match_dup 0)
+ (ashift:SI (match_dup 1) (const_int 24)))
+ (set (match_dup 0)
+ (ashiftrt:SI (match_dup 0) (const_int 24)))]
+ "operands[0] = gen_lowpart (SImode, operands[0]);
+ operands[1] = gen_lowpart (SImode, operands[1]);")
-(define_insn "extendqihi2_internal"
- [(set (match_operand:HI 0 "register_operand" "=d,d")
- (sign_extend:HI (match_operand:QI 1 "memory_operand" "R,m")))]
+(define_insn "*extendqihi2_internal_mem"
+ [(set (match_operand:HI 0 "register_operand" "=d")
+ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
""
- "* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,8")])
+ "lb\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
(define_expand "extendqisi2"
[(set (match_operand:SI 0 "register_operand" "")
- (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
+ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
""
"
-{
- if (ISA_HAS_SEB_SEH)
- {
- emit_insn (gen_extendqisi2_hw (operands[0],
- force_reg (QImode, operands[1])));
- DONE;
- }
- if (optimize && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
+ if (ISA_HAS_SEB_SEH)
+ {
+ emit_insn (gen_extendqisi2_hw (operands[0],
+ force_reg (QImode, operands[1])));
+ DONE;
+ }
+")
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op1 = gen_lowpart (SImode, operands[1]);
- rtx temp = gen_reg_rtx (SImode);
- rtx shift = GEN_INT (24);
+(define_insn "*extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (sign_extend:SI (match_operand:QI 1 "register_operand" "d")))]
+ ""
+ "#")
- emit_insn (gen_ashlsi3 (temp, op1, shift));
- emit_insn (gen_ashrsi3 (operands[0], temp, shift));
- DONE;
- }
-}")
+(define_split
+ [(set (match_operand:SI 0 "register_operand" "")
+ (sign_extend:SI (match_operand:QI 1 "register_operand" "")))]
+ "reload_completed"
+ [(set (match_dup 0)
+ (ashift:SI (match_dup 1) (const_int 24)))
+ (set (match_dup 0)
+ (ashiftrt:SI (match_dup 0) (const_int 24)))]
+ "operands[1] = gen_lowpart (SImode, operands[1]);")
+
+(define_insn "*extendqisi2_mem"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
+ ""
+ "lb\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
-(define_insn "extendqisi2_hw"
+(define_insn "extendqisi2_hw"
[(set (match_operand:SI 0 "register_operand" "=r")
- (sign_extend:SI (match_operand:QI 1 "register_operand" "r")))]
- "ISA_HAS_SEB_SEH"
+ (sign_extend:SI (match_operand:QI 1 "register_operand" "r")))]
+ "ISA_HAS_SEB_SEH"
"seb\\t%0,%1"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
-(define_insn "extendqisi2_insn"
- [(set (match_operand:SI 0 "register_operand" "=d,d")
- (sign_extend:SI (match_operand:QI 1 "memory_operand" "R,m")))]
- ""
- "* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "load")
- (set_attr "mode" "SI")
- (set_attr "length" "4,8")])
-
(define_expand "extendqidi2"
[(set (match_operand:DI 0 "register_operand" "")
- (sign_extend:DI (match_operand:QI 1 "nonimmediate_operand" "")))]
+ (sign_extend:DI (match_operand:QI 1 "nonimmediate_operand" "")))]
"TARGET_64BIT"
- "
-{
- if (optimize && GET_CODE (operands[1]) == MEM)
- operands[1] = force_not_mem (operands[1]);
+ "")
- if (GET_CODE (operands[1]) != MEM)
- {
- rtx op1 = gen_lowpart (DImode, operands[1]);
- rtx temp = gen_reg_rtx (DImode);
- rtx shift = GEN_INT (56);
+(define_insn "*extendqidi2"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (sign_extend:DI (match_operand:QI 1 "register_operand" "d")))]
+ "TARGET_64BIT"
+ "#")
- emit_insn (gen_ashldi3 (temp, op1, shift));
- emit_insn (gen_ashrdi3 (operands[0], temp, shift));
- DONE;
- }
-}")
+(define_split
+ [(set (match_operand:DI 0 "register_operand" "")
+ (sign_extend:DI (match_operand:QI 1 "register_operand" "")))]
+ "TARGET_64BIT && reload_completed"
+ [(set (match_dup 0)
+ (ashift:DI (match_dup 1) (const_int 56)))
+ (set (match_dup 0)
+ (ashiftrt:DI (match_dup 0) (const_int 56)))]
+ "operands[1] = gen_lowpart (DImode, operands[1]);")
-(define_insn "extendqidi2_insn"
- [(set (match_operand:DI 0 "register_operand" "=d,d")
- (sign_extend:DI (match_operand:QI 1 "memory_operand" "R,m")))]
+(define_insn "*extendqidi2_mem"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))]
"TARGET_64BIT"
- "* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "load")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
-
+ "lb\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
(define_insn "extendsfdf2"
[(set (match_operand:DF 0 "register_operand" "=f")
;;
;; ....................
-;; Bit field extract patterns which use lwl/lwr.
-
-;; ??? There could be HImode variants for the ulh/ulhu/ush macros.
-;; It isn't clear whether this will give better code.
-
-;; Only specify the mode operand 1, the rest are assumed to be word_mode.
-(define_expand "extv"
- [(set (match_operand 0 "register_operand" "")
- (sign_extract (match_operand:QI 1 "memory_operand" "")
- (match_operand 2 "immediate_operand" "")
- (match_operand 3 "immediate_operand" "")))]
- "!TARGET_MIPS16"
- "
-{
- /* If the field does not start on a byte boundary, then fail. */
- if (INTVAL (operands[3]) % 8 != 0)
- FAIL;
-
- /* MIPS I and MIPS II can only handle a 32bit field. */
- if (!TARGET_64BIT && INTVAL (operands[2]) != 32)
- FAIL;
-
- /* MIPS III and MIPS IV can handle both 32bit and 64bit fields. */
- if (TARGET_64BIT
- && INTVAL (operands[2]) != 64
- && INTVAL (operands[2]) != 32)
- FAIL;
-
- /* This can happen for a 64 bit target, when extracting a value from
- a 64 bit union member. extract_bit_field doesn't verify that our
- source matches the predicate, so we force it to be a MEM here. */
- if (GET_CODE (operands[1]) != MEM)
- FAIL;
-
- /* Change the mode to BLKmode for aliasing purposes. */
- operands[1] = adjust_address (operands[1], BLKmode, 0);
- set_mem_size (operands[1], GEN_INT (INTVAL (operands[2]) / BITS_PER_UNIT));
-
- /* Otherwise, emit a l[wd]l/l[wd]r pair to load the value. */
- if (INTVAL (operands[2]) == 64)
- emit_insn (gen_movdi_uld (operands[0], operands[1]));
- else
- {
- if (TARGET_64BIT)
- {
- operands[0] = gen_lowpart (SImode, operands[0]);
- if (operands[0] == NULL_RTX)
- FAIL;
- }
- emit_insn (gen_movsi_ulw (operands[0], operands[1]));
- }
- DONE;
-}")
-
-;; Only specify the mode operand 1, the rest are assumed to be word_mode.
-(define_expand "extzv"
- [(set (match_operand 0 "register_operand" "")
- (zero_extract (match_operand:QI 1 "memory_operand" "")
- (match_operand 2 "immediate_operand" "")
- (match_operand 3 "immediate_operand" "")))]
- "!TARGET_MIPS16"
- "
-{
- /* If the field does not start on a byte boundary, then fail. */
- if (INTVAL (operands[3]) % 8 != 0)
- FAIL;
-
- /* MIPS I and MIPS II can only handle a 32bit field. */
- if (!TARGET_64BIT && INTVAL (operands[2]) != 32)
- FAIL;
-
- /* MIPS III and MIPS IV can handle both 32bit and 64bit fields. */
- if (TARGET_64BIT
- && INTVAL (operands[2]) != 64
- && INTVAL (operands[2]) != 32)
- FAIL;
-
- /* This can happen for a 64 bit target, when extracting a value from
- a 64 bit union member. extract_bit_field doesn't verify that our
- source matches the predicate, so we force it to be a MEM here. */
- if (GET_CODE (operands[1]) != MEM)
- FAIL;
-
- /* Change the mode to BLKmode for aliasing purposes. */
- operands[1] = adjust_address (operands[1], BLKmode, 0);
- set_mem_size (operands[1], GEN_INT (INTVAL (operands[2]) / BITS_PER_UNIT));
-
- /* Otherwise, emit a lwl/lwr pair to load the value. */
- if (INTVAL (operands[2]) == 64)
- emit_insn (gen_movdi_uld (operands[0], operands[1]));
- else
- {
- if (TARGET_64BIT)
- {
- operands[0] = gen_lowpart (SImode, operands[0]);
- if (operands[0] == NULL_RTX)
- FAIL;
- }
- emit_insn (gen_movsi_ulw (operands[0], operands[1]));
- }
- DONE;
-}")
-
-;; Only specify the mode operands 0, the rest are assumed to be word_mode.
-(define_expand "insv"
- [(set (zero_extract (match_operand:QI 0 "memory_operand" "")
- (match_operand 1 "immediate_operand" "")
- (match_operand 2 "immediate_operand" ""))
- (match_operand 3 "register_operand" ""))]
- "!TARGET_MIPS16"
- "
-{
- /* If the field does not start on a byte boundary, then fail. */
- if (INTVAL (operands[2]) % 8 != 0)
- FAIL;
-
- /* MIPS I and MIPS II can only handle a 32bit field. */
- if (!TARGET_64BIT && INTVAL (operands[1]) != 32)
- FAIL;
-
- /* MIPS III and MIPS IV can handle both 32bit and 64bit fields. */
- if (TARGET_64BIT
- && INTVAL (operands[1]) != 64
- && INTVAL (operands[1]) != 32)
- FAIL;
-
- /* This can happen for a 64 bit target, when storing into a 32 bit union
- member. store_bit_field doesn't verify that our target matches the
- predicate, so we force it to be a MEM here. */
- if (GET_CODE (operands[0]) != MEM)
- FAIL;
-
- /* Change the mode to BLKmode for aliasing purposes. */
- operands[0] = adjust_address (operands[0], BLKmode, 0);
- set_mem_size (operands[0], GEN_INT (INTVAL (operands[1]) / BITS_PER_UNIT));
-
- /* Otherwise, emit a s[wd]l/s[wd]r pair to load the value. */
- if (INTVAL (operands[1]) == 64)
- emit_insn (gen_movdi_usd (operands[0], operands[3]));
- else
- {
- if (TARGET_64BIT)
- {
- operands[3] = gen_lowpart (SImode, operands[3]);
- if (operands[3] == NULL_RTX)
- FAIL;
- }
- emit_insn (gen_movsi_usw (operands[0], operands[3]));
- }
- DONE;
-}")
-
-;; unaligned word moves generated by the bit field patterns
-
-(define_insn "movsi_ulw"
- [(set (match_operand:SI 0 "register_operand" "=&d,&d")
- (unspec:SI [(match_operand:BLK 1 "general_operand" "R,o")]
- UNSPEC_ULW))]
- "!TARGET_MIPS16"
- "*
-{
- rtx offset = const0_rtx;
- rtx addr = XEXP (operands[1], 0);
- rtx mem_addr = eliminate_constant_term (addr, &offset);
- const char *ret;
-
- if (TARGET_STATS)
- mips_count_memory_refs (operands[1], 2);
-
- /* The stack/frame pointers are always aligned, so we can convert
- to the faster lw if we are referencing an aligned stack location. */
-
- if ((INTVAL (offset) & 3) == 0
- && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
- ret = \"lw\\t%0,%1\";
- else
- ret = \"ulw\\t%0,%1\";
+;; Bit field extract patterns which use lwl/lwr or ldl/ldr.
- return mips_fill_delay_slot (ret, DELAY_LOAD, operands, insn);
-}"
- [(set_attr "type" "load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "8,16")])
+(define_expand "extv"
+ [(set (match_operand 0 "register_operand" "")
+ (sign_extract (match_operand:QI 1 "memory_operand" "")
+ (match_operand 2 "immediate_operand" "")
+ (match_operand 3 "immediate_operand" "")))]
+ "!TARGET_MIPS16"
+ {
+ if (mips_expand_unaligned_load (operands[0], operands[1],
+ INTVAL (operands[2]),
+ INTVAL (operands[3])))
+ DONE;
+ else
+ FAIL;
+ })
-(define_insn "movsi_usw"
- [(set (match_operand:BLK 0 "memory_operand" "=R,o")
- (unspec:BLK [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")]
- UNSPEC_USW))]
+(define_expand "extzv"
+ [(set (match_operand 0 "register_operand" "")
+ (zero_extract (match_operand:QI 1 "memory_operand" "")
+ (match_operand 2 "immediate_operand" "")
+ (match_operand 3 "immediate_operand" "")))]
"!TARGET_MIPS16"
- "*
-{
- rtx offset = const0_rtx;
- rtx addr = XEXP (operands[0], 0);
- rtx mem_addr = eliminate_constant_term (addr, &offset);
+ {
+ if (mips_expand_unaligned_load (operands[0], operands[1],
+ INTVAL (operands[2]),
+ INTVAL (operands[3])))
+ DONE;
+ else
+ FAIL;
+ })
- if (TARGET_STATS)
- mips_count_memory_refs (operands[0], 2);
+(define_expand "insv"
+ [(set (zero_extract (match_operand:QI 0 "memory_operand" "")
+ (match_operand 1 "immediate_operand" "")
+ (match_operand 2 "immediate_operand" ""))
+ (match_operand 3 "reg_or_0_operand" ""))]
+ "!TARGET_MIPS16"
+ {
+ if (mips_expand_unaligned_store (operands[0], operands[3],
+ INTVAL (operands[1]),
+ INTVAL (operands[2])))
+ DONE;
+ else
+ FAIL;
+ })
- /* The stack/frame pointers are always aligned, so we can convert
- to the faster sw if we are referencing an aligned stack location. */
+;; Unaligned word moves generated by the bit field patterns.
+;;
+;; As far as the rtl is concerned, both the left-part and right-part
+;; instructions can access the whole field. However, the real operand
+;; refers to just the first or the last byte (depending onendianness).
+;; We therefore use two memory operands to each instruction, one to
+;; describe the rtl effect and one to use in the assembly output.
- if ((INTVAL (offset) & 3) == 0
- && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
- return \"sw\\t%z1,%0\";
+(define_insn "mov_lwl"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (unspec:SI [(match_operand:BLK 1 "general_operand" "m")
+ (match_operand:QI 2 "general_operand" "m")]
+ UNSPEC_LWL))]
+ "!TARGET_MIPS16"
+ "lwl\t%0,%2"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
- return \"usw\\t%z1,%0\";
-}"
- [(set_attr "type" "store")
- (set_attr "mode" "SI")
- (set_attr "length" "8,16")])
+(define_insn "mov_lwr"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (unspec:SI [(match_operand:BLK 1 "general_operand" "m")
+ (match_operand:QI 2 "general_operand" "m")
+ (match_operand:SI 3 "register_operand" "0")]
+ UNSPEC_LWR))]
+ "!TARGET_MIPS16"
+ "lwr\t%0,%2"
+ [(set_attr "type" "load")
+ (set_attr "mode" "SI")])
-;; Bit field extract patterns which use ldl/ldr.
-;; unaligned double word moves generated by the bit field patterns
+(define_insn "mov_swl"
+ [(set (match_operand:BLK 0 "memory_operand" "=m")
+ (unspec:BLK [(match_operand:SI 1 "reg_or_0_operand" "dJ")
+ (match_operand:QI 2 "general_operand" "m")]
+ UNSPEC_SWL))]
+ "!TARGET_MIPS16"
+ "swl\t%z1,%2"
+ [(set_attr "type" "store")
+ (set_attr "mode" "SI")])
-(define_insn "movdi_uld"
- [(set (match_operand:DI 0 "register_operand" "=&d,&d")
- (unspec:DI [(match_operand:BLK 1 "general_operand" "R,o")]
- UNSPEC_ULD))]
- ""
- "*
-{
- rtx offset = const0_rtx;
- rtx addr = XEXP (operands[1], 0);
- rtx mem_addr = eliminate_constant_term (addr, &offset);
- const char *ret;
+(define_insn "mov_swr"
+ [(set (match_operand:BLK 0 "memory_operand" "+m")
+ (unspec:BLK [(match_operand:SI 1 "reg_or_0_operand" "dJ")
+ (match_operand:QI 2 "general_operand" "m")
+ (match_dup 0)]
+ UNSPEC_SWR))]
+ "!TARGET_MIPS16"
+ "swr\t%z1,%2"
+ [(set_attr "type" "store")
+ (set_attr "mode" "SI")])
- if (TARGET_STATS)
- mips_count_memory_refs (operands[1], 2);
- /* The stack/frame pointers are always aligned, so we can convert
- to the faster lw if we are referencing an aligned stack location. */
+(define_insn "mov_ldl"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (unspec:DI [(match_operand:BLK 1 "general_operand" "m")
+ (match_operand:QI 2 "general_operand" "m")]
+ UNSPEC_LDL))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "ldl\t%0,%2"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
- if ((INTVAL (offset) & 7) == 0
- && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
- ret = \"ld\\t%0,%1\";
- else
- ret = \"uld\\t%0,%1\";
+(define_insn "mov_ldr"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (unspec:DI [(match_operand:BLK 1 "general_operand" "m")
+ (match_operand:QI 2 "general_operand" "m")
+ (match_operand:DI 3 "register_operand" "0")]
+ UNSPEC_LDR))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "ldr\t%0,%2"
+ [(set_attr "type" "load")
+ (set_attr "mode" "DI")])
- return mips_fill_delay_slot (ret, DELAY_LOAD, operands, insn);
-}"
- [(set_attr "type" "load,load")
- (set_attr "mode" "SI")
- (set_attr "length" "8,16")])
-(define_insn "movdi_usd"
- [(set (match_operand:BLK 0 "memory_operand" "=R,o")
- (unspec:BLK [(match_operand:DI 1 "reg_or_0_operand" "dJ,dJ")]
- UNSPEC_USD))]
- ""
- "*
-{
- rtx offset = const0_rtx;
- rtx addr = XEXP (operands[0], 0);
- rtx mem_addr = eliminate_constant_term (addr, &offset);
+(define_insn "mov_sdl"
+ [(set (match_operand:BLK 0 "memory_operand" "=m")
+ (unspec:BLK [(match_operand:DI 1 "reg_or_0_operand" "dJ")
+ (match_operand:QI 2 "general_operand" "m")]
+ UNSPEC_SDL))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "sdl\t%z1,%2"
+ [(set_attr "type" "store")
+ (set_attr "mode" "DI")])
- if (TARGET_STATS)
- mips_count_memory_refs (operands[0], 2);
+(define_insn "mov_sdr"
+ [(set (match_operand:BLK 0 "memory_operand" "+m")
+ (unspec:BLK [(match_operand:DI 1 "reg_or_0_operand" "dJ")
+ (match_operand:QI 2 "general_operand" "m")
+ (match_dup 0)]
+ UNSPEC_SDR))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "sdr\t%z1,%2"
+ [(set_attr "type" "store")
+ (set_attr "mode" "DI")])
- /* The stack/frame pointers are always aligned, so we can convert
- to the faster sw if we are referencing an aligned stack location. */
- if ((INTVAL (offset) & 7) == 0
- && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
- return \"sd\\t%z1,%0\";
+;; Instructions for loading a relocation expression using "lui".
- return \"usd\\t%z1,%0\";
-}"
- [(set_attr "type" "store")
- (set_attr "mode" "SI")
- (set_attr "length" "8,16")])
+(define_insn "luisi"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec:SI [(match_operand 1 "const_arith_operand" "")] UNSPEC_HIGH))]
+ ""
+ "lui\t%0,%1"
+ [(set_attr "type" "arith")])
-;; These two patterns support loading addresses with two instructions instead
-;; of using the macro instruction la.
+(define_insn "luidi"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (unspec:DI [(match_operand 1 "const_arith_operand" "")] UNSPEC_HIGH))]
+ "TARGET_64BIT"
+ "lui\t%0,%1"
+ [(set_attr "type" "arith")])
-;; ??? mips_move_1word has support for HIGH, so this pattern may be
-;; unnecessary.
-(define_insn "high"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (high:SI (match_operand:SI 1 "immediate_operand" "")))]
- "mips_split_addresses && !TARGET_MIPS16"
- "lui\\t%0,%%hi(%1) # high"
- [(set_attr "type" "move")])
+;; Instructions for adding the low 16 bits of an address to a register.
+;; Operand 2 is the address: print_operand works out which relocation
+;; should be applied.
-(define_insn "low"
+(define_insn "lowsi"
[(set (match_operand:SI 0 "register_operand" "=r")
(lo_sum:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "immediate_operand" "")))]
- "mips_split_addresses && !TARGET_MIPS16"
- "addiu\\t%0,%1,%%lo(%2) # low"
+ "!TARGET_MIPS16"
+ "addiu\\t%0,%1,%R2"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
+(define_insn "lowdi"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
+ (match_operand:DI 2 "immediate_operand" "")))]
+ "!TARGET_MIPS16 && TARGET_64BIT"
+ "daddiu\\t%0,%1,%R2"
+ [(set_attr "type" "arith")
+ (set_attr "mode" "DI")])
+
;; 64-bit integer moves
;; Unlike most other insns, the move insns can't be split with
(define_expand "movdi"
[(set (match_operand:DI 0 "nonimmediate_operand" "")
- (match_operand:DI 1 "general_operand" ""))]
+ (match_operand:DI 1 "" ""))]
""
"
{
- if (mips_split_addresses && mips_check_split (operands[1], DImode))
- {
- enum machine_mode mode = GET_MODE (operands[0]);
- rtx tem = ((reload_in_progress | reload_completed)
- ? operands[0] : gen_reg_rtx (mode));
-
- emit_insn (gen_rtx_SET (VOIDmode, tem,
- gen_rtx_HIGH (mode, operands[1])));
-
- operands[1] = gen_rtx_LO_SUM (mode, tem, operands[1]);
- }
+ if (mips_legitimize_move (DImode, operands[0], operands[1]))
+ DONE;
/* If we are generating embedded PIC code, and we are referring to a
symbol in the .text section, we must use an offset from the start
emit_move_insn (operands[0], force_reg (DImode, temp));
DONE;
}
-
- /* If operands[1] is a constant address illegal for pic, then we need to
- handle it just like LEGITIMIZE_ADDRESS does. */
- if (flag_pic && pic_address_needs_scratch (operands[1]))
- {
- rtx temp = force_reg (DImode, XEXP (XEXP (operands[1], 0), 0));
- rtx temp2 = XEXP (XEXP (operands[1], 0), 1);
-
- if (! SMALL_INT (temp2))
- temp2 = force_reg (DImode, temp2);
-
- emit_move_insn (operands[0], gen_rtx_PLUS (DImode, temp, temp2));
- DONE;
- }
-
- /* On the mips16, we can handle a GP relative reference by adding in
- $gp. We need to check the name to see whether this is a string
- constant. */
- if (TARGET_MIPS16
- && register_operand (operands[0], DImode)
- && GET_CODE (operands[1]) == SYMBOL_REF
- && SYMBOL_REF_FLAG (operands[1]))
- {
- const char *name = XSTR (operands[1], 0);
-
- if (name[0] != '*'
- || strncmp (name + 1, LOCAL_LABEL_PREFIX,
- sizeof LOCAL_LABEL_PREFIX - 1) != 0)
- {
- rtx base_reg;
-
- if (reload_in_progress || reload_completed)
- {
- /* In movsi we use the constant table here. However, in
- this case, we're better off copying $28 into a
- register and adding, because the constant table entry
- would be 8 bytes. */
- base_reg = operands[0];
- emit_move_insn (base_reg,
- gen_rtx (CONST, DImode,
- gen_rtx (REG, DImode,
- GP_REG_FIRST + 28)));
- }
- else
- {
- base_reg = gen_reg_rtx (Pmode);
- emit_move_insn (base_reg, mips16_gp_pseudo_reg ());
- }
-
- emit_move_insn (operands[0],
- gen_rtx (PLUS, Pmode, base_reg,
- mips16_gp_offset (operands[1])));
- DONE;
- }
- }
-
- if ((reload_in_progress | reload_completed) == 0
- && !register_operand (operands[0], DImode)
- && !register_operand (operands[1], DImode)
- && (TARGET_MIPS16
- || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0)
- && operands[1] != CONST0_RTX (DImode))))
- {
- rtx temp = force_reg (DImode, operands[1]);
- emit_move_insn (operands[0], temp);
- DONE;
- }
}")
;; For mips16, we need a special case to handle storing $31 into
;; instruction can be generated by save_restore_insns.
(define_insn ""
- [(set (match_operand:DI 0 "memory_operand" "=R,m")
+ [(set (match_operand:DI 0 "memory_operand" "=m")
(reg:DI 31))]
"TARGET_MIPS16 && TARGET_64BIT"
"*
return mips_move_2words (operands, insn);
}"
[(set_attr "type" "store")
- (set_attr "mode" "DI")
- (set_attr "length" "4,8")])
+ (set_attr "mode" "DI")])
(define_insn "movdi_internal"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*x,*d,*x,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R")
- (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,J,*x,*d,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))]
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,m,*x,*d,*x,*B*C*D,*B*C*D,*d,*m")
+ (match_operand:DI 1 "general_operand" "d,iF,m,d,J,*x,*d,*d,*m,*B*C*D,*B*C*D"))]
"!TARGET_64BIT && !TARGET_MIPS16
&& (register_operand (operands[0], DImode)
|| register_operand (operands[1], DImode)
|| (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0)
|| operands[1] == CONST0_RTX (DImode))"
"* return mips_move_2words (operands, insn); "
- [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo,hilo,xfer,load,load,xfer,store,store")
+ [(set_attr "type" "move,arith,load,store,hilo,hilo,hilo,xfer,load,xfer,store")
(set_attr "mode" "DI")
- (set_attr "length" "8,16,8,16,8,16,8,8,8,8,8,8,8,8,8")])
+ (set_attr "length" "8,16,*,*,8,8,8,8,*,8,*")])
(define_insn ""
- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,To,*d")
- (match_operand:DI 1 "general_operand" "d,d,y,K,N,R,To,d,d,*x"))]
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,m,*d")
+ (match_operand:DI 1 "general_operand" "d,d,y,K,N,m,d,*x"))]
"!TARGET_64BIT && TARGET_MIPS16
&& (register_operand (operands[0], DImode)
|| register_operand (operands[1], DImode))"
"* return mips_move_2words (operands, insn);"
- [(set_attr "type" "move,move,move,arith,arith,load,load,store,store,hilo")
+ [(set_attr "type" "move,move,move,arith,arith,load,store,hilo")
(set_attr "mode" "DI")
- (set_attr "length" "8,8,8,8,12,8,16,8,16,8")])
+ (set_attr "length" "8,8,8,8,12,*,*,8")])
(define_split
[(set (match_operand:DI 0 "register_operand" "")
"")
(define_insn "movdi_internal2"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*f,*f,*f,*f,*d,*R,*m,*x,*d,*x,*a,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R")
- (match_operand:DI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*R,*m,*f,*f,*f,*J,*x,*d,*J,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))]
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,e,d,m,*f,*f,*f,*d,*m,*x,*d,*x,*a,*B*C*D,*B*C*D,*d,*m")
+ (match_operand:DI 1 "move_operand" "d,U,T,m,dJ,*f,*d*J,*m,*f,*f,*J,*x,*d,*J,*d,*m,*B*C*D,*B*C*D"))]
"TARGET_64BIT && !TARGET_MIPS16
&& (register_operand (operands[0], DImode)
|| register_operand (operands[1], DImode)
|| (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0)
|| operands[1] == CONST0_RTX (DImode))"
"* return mips_move_2words (operands, insn); "
- [(set_attr "type" "move,arith,arith,load,load,store,store,move,xfer,load,load,xfer,store,store,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store")
+ [(set_attr "type" "move,const,const,load,store,move,xfer,load,xfer,store,hilo,hilo,hilo,hilo,xfer,load,xfer,store")
(set_attr "mode" "DI")
- (set_attr "length" "4,4,8,4,8,4,8,4,4,4,8,4,4,8,4,4,4,8,8,8,8,8,8,8")])
+ (set_attr "length" "4,*,*,*,*,4,4,*,4,*,4,4,4,8,8,*,8,*")])
;; Sign-extended operands are reloaded using this instruction, so the
;; constraints must handle every SImode source operand X and destination
;; This pattern is essentially a trimmed-down version of movdi_internal2.
;; The main difference is that dJ -> f and f -> d are the only constraints
;; involving float registers. See mips_secondary_reload_class for details.
-(define_insn "*movdi_internal2_extend"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*d,*f,*x,*d,*x,*a,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R")
- (sign_extend:DI (match_operand:SI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*J,*x,*d,*J,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D")))]
- "TARGET_64BIT && !TARGET_MIPS16
- && (register_operand (operands[0], DImode)
- || register_operand (operands[1], DImode)
- || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0)
- || operands[1] == CONST0_RTX (DImode))"
- "* return mips_sign_extend (insn, operands[0], operands[1]);"
- [(set_attr "type" "move,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store")
- (set_attr "mode" "DI")
- (set_attr "length" "4,4,8,4,8,4,8,4,4,4,4,4,8,8,8,8,8,8,8")])
(define_insn "*movdi_internal2_mips16"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,R,m,*d")
- (match_operand:DI 1 "movdi_operand" "d,d,y,K,N,s,R,m,d,d,*x"))]
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,m,*d")
+ (match_operand:DI 1 "move_operand" "d,d,y,K,N,U,m,d,*x"))]
"TARGET_64BIT && TARGET_MIPS16
&& (register_operand (operands[0], DImode)
- || se_register_operand (operands[1], DImode))"
+ || register_operand (operands[1], DImode))"
"* return mips_move_2words (operands, insn);"
- [(set_attr "type" "move,move,move,arith,arith,arith,load,load,store,store,hilo")
+ [(set_attr "type" "move,move,move,arith,arith,const,load,store,hilo")
(set_attr "mode" "DI")
(set_attr_alternative "length"
[(const_int 4)
(if_then_else (match_operand:VOID 1 "m16_nuimm8_1" "")
(const_int 8)
(const_int 12))
- (if_then_else (match_operand:VOID 1 "m16_usym5_4" "")
- (const_int 4)
- (const_int 8))
- (const_int 4)
- (const_int 8)
- (const_int 4)
- (const_int 8)
+ (const_string "*")
+ (const_string "*")
+ (const_string "*")
(const_int 4)])])
+
;; On the mips16, we can split ld $r,N($r) into an add and a load,
;; when the original load is a 4 byte instruction but the add and the
;; load are 2 2 byte instructions.
(define_expand "reload_outdi"
[(set (match_operand:DI 0 "general_operand" "=b")
- (match_operand:DI 1 "se_register_operand" "b"))
+ (match_operand:DI 1 "register_operand" "b"))
(clobber (match_operand:TI 2 "register_operand" "=&d"))]
"TARGET_64BIT"
"
;; 32-bit Integer moves
-(define_split
- [(set (match_operand:SI 0 "register_operand" "")
- (match_operand:SI 1 "large_int" ""))]
- "!TARGET_DEBUG_D_MODE && !TARGET_MIPS16"
- [(set (match_dup 0)
- (match_dup 2))
- (set (match_dup 0)
- (ior:SI (match_dup 0)
- (match_dup 3)))]
- "
-{
- operands[2] = GEN_INT (trunc_int_for_mode (INTVAL (operands[1])
- & BITMASK_UPPER16,
- SImode));
- operands[3] = GEN_INT (INTVAL (operands[1]) & BITMASK_LOWER16);
-}")
-
;; Unlike most other insns, the move insns can't be split with
;; different predicates, because register spilling and other parts of
;; the compiler, have memoized the insn number already.
(define_expand "movsi"
[(set (match_operand:SI 0 "nonimmediate_operand" "")
- (match_operand:SI 1 "general_operand" ""))]
+ (match_operand:SI 1 "" ""))]
""
"
{
- if (mips_split_addresses && mips_check_split (operands[1], SImode))
- {
- enum machine_mode mode = GET_MODE (operands[0]);
- rtx tem = ((reload_in_progress | reload_completed)
- ? operands[0] : gen_reg_rtx (mode));
-
- emit_insn (gen_rtx_SET (VOIDmode, tem,
- gen_rtx_HIGH (mode, operands[1])));
-
- operands[1] = gen_rtx_LO_SUM (mode, tem, operands[1]);
- }
+ if (mips_legitimize_move (SImode, operands[0], operands[1]))
+ DONE;
/* If we are generating embedded PIC code, and we are referring to a
symbol in the .text section, we must use an offset from the start
emit_move_insn (operands[0], force_reg (SImode, temp));
DONE;
}
-
- /* If operands[1] is a constant address invalid for pic, then we need to
- handle it just like LEGITIMIZE_ADDRESS does. */
- if (flag_pic && pic_address_needs_scratch (operands[1]))
- {
- rtx temp = force_reg (SImode, XEXP (XEXP (operands[1], 0), 0));
- rtx temp2 = XEXP (XEXP (operands[1], 0), 1);
-
- if (! SMALL_INT (temp2))
- temp2 = force_reg (SImode, temp2);
-
- emit_move_insn (operands[0], gen_rtx_PLUS (SImode, temp, temp2));
- DONE;
- }
-
- /* On the mips16, we can handle a GP relative reference by adding in
- $gp. We need to check the name to see whether this is a string
- constant. */
- if (TARGET_MIPS16
- && register_operand (operands[0], SImode)
- && GET_CODE (operands[1]) == SYMBOL_REF
- && SYMBOL_REF_FLAG (operands[1]))
- {
- const char *name = XSTR (operands[1], 0);
-
- if (name[0] != '*'
- || strncmp (name + 1, LOCAL_LABEL_PREFIX,
- sizeof LOCAL_LABEL_PREFIX - 1) != 0)
- {
- rtx base_reg;
-
- if (reload_in_progress || reload_completed)
- {
- /* We need to reload this address. In this case we
- aren't going to have a chance to combine loading the
- address with the load or store. That means that we
- can either generate a 2 byte move followed by a 4
- byte addition, or a 2 byte load with a 4 byte entry
- in the constant table. Since the entry in the
- constant table might be shared, we're better off, on
- average, loading the address from the constant table. */
- emit_move_insn (operands[0],
- force_const_mem (SImode, operands[1]));
- DONE;
- }
-
- base_reg = gen_reg_rtx (Pmode);
- emit_move_insn (base_reg, mips16_gp_pseudo_reg ());
-
- emit_move_insn (operands[0],
- gen_rtx (PLUS, Pmode, base_reg,
- mips16_gp_offset (operands[1])));
- DONE;
- }
- }
-
- if ((reload_in_progress | reload_completed) == 0
- && !register_operand (operands[0], SImode)
- && !register_operand (operands[1], SImode)
- && (TARGET_MIPS16
- || GET_CODE (operands[1]) != CONST_INT
- || INTVAL (operands[1]) != 0))
- {
- rtx temp = force_reg (SImode, operands[1]);
- emit_move_insn (operands[0], temp);
- DONE;
- }
}")
;; We can only store $ra directly into a small sp offset. Should the
;; in FP registers (off by default, use -mdebugh to enable).
(define_insn "movsi_internal"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*f,*f,*f,?*f,*d,*R,*m,*d,*z,*x,*d,*x,*d,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R")
- (match_operand:SI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*R,*m,*f,*f,*f,*z,*d,J,*x,*d,*a,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,e,d,m,*f,*f,*f,*d,*m,*d,*z,*x,*d,*x,*d,*B*C*D,*B*C*D,*d,*m")
+ (match_operand:SI 1 "move_operand" "d,U,T,m,dJ,*f,*d*J,*m,*f,*f,*z,*d,J,*x,*d,*a,*d,*m,*B*C*D,*B*C*D"))]
"!TARGET_MIPS16
&& (register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)
|| (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,arith,arith,load,load,store,store,move,xfer,load,load,xfer,store,store,xfer,xfer,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store")
+ [(set_attr "type" "move,const,const,load,store,move,xfer,load,xfer,store,xfer,xfer,hilo,hilo,hilo,hilo,xfer,load,xfer,store")
(set_attr "mode" "SI")
- (set_attr "length" "4,4,8,4,8,4,8,4,4,4,8,4,4,8,4,4,4,4,4,4,4,4,8,4,4,8")])
-
-;; This is the mips16 movsi instruction. We accept a small integer as
-;; the source if the destination is a GP memory reference. This is
-;; because we want the combine pass to turn adding a GP reference to a
-;; register into a direct GP reference, but the combine pass will pass
-;; in the source as a constant if it finds an equivalent one. If the
-;; instruction is recognized, reload will force the constant back out
-;; into a register.
+ (set_attr "length" "4,*,*,*,*,4,4,*,4,*,4,4,4,4,4,4,4,*,4,*")])
(define_insn ""
- [(set (match_operand:SI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,R,m,*d,*d")
- (match_operand:SI 1 "move_operand" "d,d,y,K,N,s,R,m,d,d,*x,*a"))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,m,*d,*d")
+ (match_operand:SI 1 "move_operand" "d,d,y,K,N,U,m,d,*x,*a"))]
"TARGET_MIPS16
&& (register_operand (operands[0], SImode)
- || register_operand (operands[1], SImode)
- || (GET_CODE (operands[0]) == MEM
- && GET_CODE (XEXP (operands[0], 0)) == PLUS
- && GET_CODE (XEXP (XEXP (operands[0], 0), 1)) == CONST
- && mips16_gp_offset_p (XEXP (XEXP (operands[0], 0), 1))
- && GET_CODE (operands[1]) == CONST_INT
- && (SMALL_INT (operands[1])
- || SMALL_INT_UNSIGNED (operands[1]))))"
+ || register_operand (operands[1], SImode))"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,move,move,arith,arith,arith,load,load,store,store,hilo,hilo")
+ [(set_attr "type" "move,move,move,arith,arith,const,load,store,hilo,hilo")
(set_attr "mode" "SI")
(set_attr_alternative "length"
[(const_int 4)
(if_then_else (match_operand:VOID 1 "m16_nuimm8_1" "")
(const_int 8)
(const_int 12))
- (if_then_else (match_operand:VOID 1 "m16_usym8_4" "")
- (const_int 4)
- (const_int 8))
- (const_int 4)
- (const_int 8)
- (const_int 4)
- (const_int 8)
+ (const_string "*")
+ (const_string "*")
+ (const_string "*")
(const_int 4)
(const_int 4)])])
;; between the general registers and the floating point registers.
(define_insn "movcc"
- [(set (match_operand:CC 0 "nonimmediate_operand" "=d,*d,*d,*d,*R,*m,*d,*f,*f,*f,*f,*R,*m")
- (match_operand:CC 1 "general_operand" "z,*d,*R,*m,*d,*d,*f,*d,*f,*R,*m,*f,*f"))]
+ [(set (match_operand:CC 0 "nonimmediate_operand" "=d,*d,*d,*m,*d,*f,*f,*f,*m")
+ (match_operand:CC 1 "general_operand" "z,*d,*m,*d,*f,*d,*f,*m,*f"))]
"ISA_HAS_8CC && TARGET_HARD_FLOAT"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,move,load,load,store,store,xfer,xfer,move,load,load,store,store")
+ [(set_attr "type" "move,move,load,store,xfer,xfer,move,load,store")
(set_attr "mode" "SI")
- (set_attr "length" "8,4,4,8,4,8,4,4,4,4,8,4,8")])
+ (set_attr "length" "8,4,*,*,4,4,4,*,*")])
;; Reload condition code registers. reload_incc and reload_outcc
;; both handle moves from arbitrary operands into condition code
"ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"lwxc1\\t%0,%1(%2)"
[(set_attr "type" "load")
- (set_attr "mode" "SF")])
+ (set_attr "mode" "SF")
+ (set_attr "length" "4")])
(define_insn ""
[(set (match_operand:SF 0 "register_operand" "=f")
- (mem:SF (plus:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d"))))]
+ (mem:SF (plus:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d"))))]
"ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"lwxc1\\t%0,%1(%2)"
[(set_attr "type" "load")
- (set_attr "mode" "SF")])
+ (set_attr "mode" "SF")
+ (set_attr "length" "4")])
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
"ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"ldxc1\\t%0,%1(%2)"
[(set_attr "type" "load")
- (set_attr "mode" "DF")])
+ (set_attr "mode" "DF")
+ (set_attr "length" "4")])
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
- (mem:DF (plus:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d"))))]
+ (mem:DF (plus:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d"))))]
"ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"ldxc1\\t%0,%1(%2)"
[(set_attr "type" "load")
- (set_attr "mode" "DF")])
+ (set_attr "mode" "DF")
+ (set_attr "length" "4")])
(define_insn ""
[(set (mem:SF (plus:SI (match_operand:SI 1 "register_operand" "d")
"ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"swxc1\\t%0,%1(%2)"
[(set_attr "type" "store")
- (set_attr "mode" "SF")])
+ (set_attr "mode" "SF")
+ (set_attr "length" "4")])
(define_insn ""
- [(set (mem:SF (plus:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ [(set (mem:SF (plus:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(match_operand:SF 0 "register_operand" "f"))]
"ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"swxc1\\t%0,%1(%2)"
[(set_attr "type" "store")
- (set_attr "mode" "SF")])
+ (set_attr "mode" "SF")
+ (set_attr "length" "4")])
(define_insn ""
[(set (mem:DF (plus:SI (match_operand:SI 1 "register_operand" "d")
"ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"sdxc1\\t%0,%1(%2)"
[(set_attr "type" "store")
- (set_attr "mode" "DF")])
+ (set_attr "mode" "DF")
+ (set_attr "length" "4")])
(define_insn ""
- [(set (mem:DF (plus:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))
+ [(set (mem:DF (plus:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))
(match_operand:DF 0 "register_operand" "f"))]
"ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"sdxc1\\t%0,%1(%2)"
[(set_attr "type" "store")
- (set_attr "mode" "DF")])
+ (set_attr "mode" "DF")
+ (set_attr "length" "4")])
;; 16-bit Integer moves
;; in FP registers (off by default, use -mdebugh to enable).
(define_insn "movhi_internal"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d")
- (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))]
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,m,*d,*f*z,*f,*x,*d")
+ (match_operand:HI 1 "general_operand" "d,IK,m,dJ,*f*z,*d,*f,*d,*x"))]
"!TARGET_MIPS16
&& (register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode)
|| (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
"* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
+ [(set_attr "type" "move,arith,load,store,xfer,xfer,move,hilo,hilo")
(set_attr "mode" "HI")
- (set_attr "length" "4,4,4,8,4,8,4,4,4,4,4")])
+ (set_attr "length" "4,4,*,*,4,4,4,4,4")])
(define_insn ""
- [(set (match_operand:HI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,m,*d")
- (match_operand:HI 1 "general_operand" "d,d,y,K,N,R,m,d,d,*x"))]
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=d,y,d,d,d,d,m,*d")
+ (match_operand:HI 1 "general_operand" "d,d,y,K,N,m,d,*x"))]
"TARGET_MIPS16
&& (register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
"* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "move,move,move,arith,arith,load,load,store,store,hilo")
+ [(set_attr "type" "move,move,move,arith,arith,load,store,hilo")
(set_attr "mode" "HI")
(set_attr_alternative "length"
[(const_int 4)
(if_then_else (match_operand:VOID 1 "m16_nuimm8_1" "")
(const_int 8)
(const_int 12))
- (const_int 4)
- (const_int 8)
- (const_int 4)
- (const_int 8)
+ (const_string "*")
+ (const_string "*")
(const_int 4)])])
;; in FP registers (off by default, use -mdebugh to enable).
(define_insn "movqi_internal"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d")
- (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))]
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,*d,*f*z,*f,*x,*d")
+ (match_operand:QI 1 "general_operand" "d,IK,m,dJ,*f*z,*d,*f,*d,*x"))]
"!TARGET_MIPS16
&& (register_operand (operands[0], QImode)
|| register_operand (operands[1], QImode)
|| (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
"* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
+ [(set_attr "type" "move,arith,load,store,xfer,xfer,move,hilo,hilo")
(set_attr "mode" "QI")
- (set_attr "length" "4,4,4,8,4,8,4,4,4,4,4")])
+ (set_attr "length" "4,4,*,*,4,4,4,4,4")])
(define_insn ""
- [(set (match_operand:QI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,m,*d")
- (match_operand:QI 1 "general_operand" "d,d,y,K,N,R,m,d,d,*x"))]
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=d,y,d,d,d,d,m,*d")
+ (match_operand:QI 1 "general_operand" "d,d,y,K,N,m,d,*x"))]
"TARGET_MIPS16
&& (register_operand (operands[0], QImode)
|| register_operand (operands[1], QImode))"
"* return mips_move_1word (operands, insn, TRUE);"
- [(set_attr "type" "move,move,move,arith,arith,load,load,store,store,hilo")
+ [(set_attr "type" "move,move,move,arith,arith,load,store,hilo")
(set_attr "mode" "QI")
(set_attr_alternative "length"
[(const_int 4)
(if_then_else (match_operand:VOID 1 "m16_nuimm8_1" "")
(const_int 8)
(const_int 12))
- (const_int 4)
- (const_int 8)
- (const_int 4)
- (const_int 8)
+ (const_string "*")
+ (const_string "*")
(const_int 4)])])
}")
(define_insn "movsf_internal1"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,f,R,m,*f,*d,*d,*d,*d,*R,*m")
- (match_operand:SF 1 "general_operand" "f,G,R,m,fG,fG,*d,*f,*G*d,*R,*m,*d,*d"))]
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,m,*f,*d,*d,*d,*m")
+ (match_operand:SF 1 "general_operand" "f,G,m,fG,*d,*f,*G*d,*m,*d"))]
"TARGET_HARD_FLOAT
&& (register_operand (operands[0], SFmode)
|| nonmemory_operand (operands[1], SFmode))"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,xfer,load,load,store,store,xfer,xfer,move,load,load,store,store")
+ [(set_attr "type" "move,xfer,load,store,xfer,xfer,move,load,store")
(set_attr "mode" "SF")
- (set_attr "length" "4,4,4,8,4,8,4,4,4,4,8,4,8")])
+ (set_attr "length" "4,4,*,*,4,4,4,*,*")])
(define_insn "movsf_internal2"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=d,d,d,R,m")
- (match_operand:SF 1 "general_operand" " Gd,R,m,d,d"))]
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=d,d,m")
+ (match_operand:SF 1 "general_operand" " Gd,m,d"))]
"TARGET_SOFT_FLOAT && !TARGET_MIPS16
&& (register_operand (operands[0], SFmode)
|| nonmemory_operand (operands[1], SFmode))"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,load,load,store,store")
+ [(set_attr "type" "move,load,store")
(set_attr "mode" "SF")
- (set_attr "length" "4,4,8,4,8")])
+ (set_attr "length" "4,*,*")])
(define_insn ""
- [(set (match_operand:SF 0 "nonimmediate_operand" "=d,y,d,d,d,R,m")
- (match_operand:SF 1 "nonimmediate_operand" "d,d,y,R,m,d,d"))]
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=d,y,d,d,m")
+ (match_operand:SF 1 "nonimmediate_operand" "d,d,y,m,d"))]
"TARGET_MIPS16
&& (register_operand (operands[0], SFmode)
|| register_operand (operands[1], SFmode))"
"* return mips_move_1word (operands, insn, FALSE);"
- [(set_attr "type" "move,move,move,load,load,store,store")
+ [(set_attr "type" "move,move,move,load,store")
(set_attr "mode" "SF")
- (set_attr "length" "4,4,4,4,8,4,8")])
+ (set_attr "length" "4,4,4,*,*")])
;; 64-bit floating point moves
operands[1] = force_reg (DFmode, operands[1]);
}")
-(define_insn "movdf_internal1"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,f,R,To,*f,*d,*d,*d,*d,*R,*T")
- (match_operand:DF 1 "general_operand" "f,G,R,To,fG,fG,*d,*f,*d*G,*R,*T,*d,*d"))]
- "TARGET_HARD_FLOAT && !(TARGET_FLOAT64 && !TARGET_64BIT)
- && TARGET_DOUBLE_FLOAT
+(define_insn "movdf_internal1a"
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,m,*f,*d,*d,*d,*m")
+ (match_operand:DF 1 "general_operand" "f,G,m,fG,*d,*f,*d*G,*m,*d"))]
+ "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_64BIT
&& (register_operand (operands[0], DFmode)
|| nonmemory_operand (operands[1], DFmode))"
"* return mips_move_2words (operands, insn); "
- [(set_attr "type" "move,move,load,load,store,store,xfer,xfer,move,load,load,store,store")
- (set_attr "mode" "DF")
- (set_attr "length" "4,8,8,16,8,16,8,8,8,8,16,8,16")])
+ [(set_attr "type" "move,move,load,store,xfer,xfer,move,load,store")
+ (set_attr "mode" "DF")
+ (set_attr "length" "4,8,*,*,4,4,4,*,*")])
-(define_insn "movdf_internal1a"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,R,R,To,To,*d,*d,*To,*R,*d")
- (match_operand:DF 1 "general_operand" " f,To,f,G,f,G,*To,*R,*d,*d,*d"))]
- "TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT)
- && TARGET_DOUBLE_FLOAT
+(define_insn "movdf_internal1b"
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,m,*f,*d,*d,*d,*m")
+ (match_operand:DF 1 "general_operand" "f,G,m,fG,*d,*f,*d*G,*m,*d"))]
+ "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && !TARGET_64BIT
&& (register_operand (operands[0], DFmode)
|| nonmemory_operand (operands[1], DFmode))"
"* return mips_move_2words (operands, insn); "
- [(set_attr "type" "move,load,store,store,store,store,load,load,store,store,move")
+ [(set_attr "type" "move,move,load,store,xfer,xfer,move,load,store")
(set_attr "mode" "DF")
- (set_attr "length" "4,8,4,4,8,8,8,4,8,4,4")])
+ (set_attr "length" "4,8,*,*,8,8,8,*,*")])
(define_insn "movdf_internal2"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,To,d,f,f")
- (match_operand:DF 1 "general_operand" "dG,R,To,d,d,f,d,f"))]
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,m,d,f,f")
+ (match_operand:DF 1 "general_operand" "dG,m,d,f,d,f"))]
"(TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) && !TARGET_MIPS16
&& (register_operand (operands[0], DFmode)
|| nonmemory_operand (operands[1], DFmode))"
"* return mips_move_2words (operands, insn); "
- [(set_attr "type" "move,load,load,store,store,xfer,load,move")
+ [(set_attr "type" "move,load,store,xfer,xfer,move")
(set_attr "mode" "DF")
- (set_attr "length" "8,8,16,8,16,8,8,4")])
+ (set_attr "length" "8,*,*,8,8,4")])
(define_insn ""
- [(set (match_operand:DF 0 "nonimmediate_operand" "=d,y,d,d,d,R,To")
- (match_operand:DF 1 "nonimmediate_operand" "d,d,y,R,To,d,d"))]
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=d,y,d,d,m")
+ (match_operand:DF 1 "nonimmediate_operand" "d,d,y,m,d"))]
"TARGET_MIPS16
&& (register_operand (operands[0], DFmode)
|| register_operand (operands[1], DFmode))"
"* return mips_move_2words (operands, insn);"
- [(set_attr "type" "move,move,move,load,load,store,store")
+ [(set_attr "type" "move,move,move,load,store")
(set_attr "mode" "DF")
- (set_attr "length" "8,8,8,8,16,8,16")])
+ (set_attr "length" "8,8,8,*,*")])
(define_split
[(set (match_operand:DF 0 "register_operand" "")
(define_insn "loadgp"
[(set (reg:DI 28)
- (unspec_volatile:DI [(match_operand:DI 0 "address_operand" "")
+ (unspec_volatile:DI [(match_operand 0 "immediate_operand" "")
(match_operand:DI 1 "register_operand" "")]
UNSPEC_LOADGP))
(clobber (reg:DI 1))]
""
- "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,%1%]"
+ "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%0)))\\n\\tdaddu\\t$gp,$1,%1%]"
[(set_attr "type" "move")
(set_attr "mode" "DI")
(set_attr "length" "12")])
(set_attr "length" "80")])
(define_insn "movstrsi_internal3"
- [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
- (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
+ [(set (match_operand:BLK 0 "memory_operand" "=m") ;; destination
+ (match_operand:BLK 1 "memory_operand" "m")) ;; source
(clobber (match_scratch:SI 4 "=&d")) ;; temp 1
(clobber (match_scratch:SI 5 "=&d")) ;; temp 2
(clobber (match_scratch:SI 6 "=&d")) ;; temp 3
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
+(define_insn "ashlsi3_internal1_extend"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (sign_extend:DI (ashift:SI (match_operand:SI 1 "register_operand" "d")
+ (match_operand:SI 2 "arith_operand" "dI"))))]
+ "TARGET_64BIT && !TARGET_MIPS16"
+ "*
+{
+ if (GET_CODE (operands[2]) == CONST_INT)
+ operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
+
+ return \"sll\\t%0,%1,%2\";
+}"
+ [(set_attr "type" "arith")
+ (set_attr "mode" "DI")])
+
+
(define_insn "ashlsi3_internal2"
[(set (match_operand:SI 0 "register_operand" "=d,d")
(ashift:SI (match_operand:SI 1 "register_operand" "0,d")
(define_expand "ashldi3"
[(parallel [(set (match_operand:DI 0 "register_operand" "")
- (ashift:DI (match_operand:DI 1 "se_register_operand" "")
+ (ashift:DI (match_operand:DI 1 "register_operand" "")
(match_operand:SI 2 "arith_operand" "")))
(clobber (match_dup 3))])]
"TARGET_64BIT || (!TARGET_DEBUG_G_MODE && !TARGET_MIPS16)"
(define_insn "ashldi3_internal4"
[(set (match_operand:DI 0 "register_operand" "=d")
- (ashift:DI (match_operand:DI 1 "se_register_operand" "d")
+ (ashift:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:SI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16"
"*
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (ashift:DI (match_operand:DI 1 "se_register_operand" "0,d")
+ (ashift:DI (match_operand:DI 1 "register_operand" "0,d")
(match_operand:SI 2 "arith_operand" "d,I")))]
"TARGET_64BIT && TARGET_MIPS16"
"*
(define_expand "ashrdi3"
[(parallel [(set (match_operand:DI 0 "register_operand" "")
- (ashiftrt:DI (match_operand:DI 1 "se_register_operand" "")
+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
(match_operand:SI 2 "arith_operand" "")))
(clobber (match_dup 3))])]
"TARGET_64BIT || (!TARGET_DEBUG_G_MODE && !TARGET_MIPS16)"
(define_insn "ashrdi3_internal4"
[(set (match_operand:DI 0 "register_operand" "=d")
- (ashiftrt:DI (match_operand:DI 1 "se_register_operand" "d")
+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:SI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16"
"*
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (ashiftrt:DI (match_operand:DI 1 "se_register_operand" "0,0")
+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "0,0")
(match_operand:SI 2 "arith_operand" "d,I")))]
"TARGET_64BIT && TARGET_MIPS16"
"*
;; not have and immediate). We recognize a shift of a load in order
;; to make it simple enough for combine to understand.
+;; ??? FIXME: turn into a define_insn_and_split
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=d,d")
- (lshiftrt:SI (match_operand:SI 1 "memory_operand" "R,m")
- (match_operand:SI 2 "immediate_operand" "I,I")))]
- "TARGET_MIPS16"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (lshiftrt:SI (match_operand:SI 1 "memory_operand" "m")
+ (match_operand:SI 2 "immediate_operand" "I")))]
+ "0 && TARGET_MIPS16"
"lw\\t%0,%1\;srl\\t%0,%2"
[(set_attr "type" "load")
(set_attr "mode" "SI")
(set_attr_alternative "length"
[(if_then_else (match_operand:VOID 2 "m16_uimm3_b" "")
- (const_int 8)
- (const_int 12))
- (if_then_else (match_operand:VOID 2 "m16_uimm3_b" "")
(const_int 12)
(const_int 16))])])
(define_expand "lshrdi3"
[(parallel [(set (match_operand:DI 0 "register_operand" "")
- (lshiftrt:DI (match_operand:DI 1 "se_register_operand" "")
+ (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
(match_operand:SI 2 "arith_operand" "")))
(clobber (match_dup 3))])]
"TARGET_64BIT || (!TARGET_DEBUG_G_MODE && !TARGET_MIPS16)"
(define_insn "lshrdi3_internal4"
[(set (match_operand:DI 0 "register_operand" "=d")
- (lshiftrt:DI (match_operand:DI 1 "se_register_operand" "d")
+ (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:SI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16"
"*
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (lshiftrt:DI (match_operand:DI 1 "se_register_operand" "0,0")
+ (lshiftrt:DI (match_operand:DI 1 "register_operand" "0,0")
(match_operand:SI 2 "arith_operand" "d,I")))]
"TARGET_64BIT && TARGET_MIPS16"
"*
(define_expand "cmpdi"
[(set (cc0)
- (compare:CC (match_operand:DI 0 "se_register_operand" "")
- (match_operand:DI 1 "se_arith_operand" "")))]
+ (compare:CC (match_operand:DI 0 "register_operand" "")
+ (match_operand:DI 1 "arith_operand" "")))]
"TARGET_64BIT"
"
{
(define_expand "tstdi"
[(set (cc0)
- (match_operand:DI 0 "se_register_operand" ""))]
+ (match_operand:DI 0 "register_operand" ""))]
"TARGET_64BIT"
"
{
[(set (pc)
(if_then_else
(match_operator:DI 0 "cmp_op"
- [(match_operand:DI 2 "se_register_operand" "d")
+ [(match_operand:DI 2 "register_operand" "d")
(const_int 0)])
(label_ref (match_operand 1 "" ""))
(pc)))]
[(set (pc)
(if_then_else
(match_operator:DI 0 "cmp_op"
- [(match_operand:DI 2 "se_register_operand" "d")
+ [(match_operand:DI 2 "register_operand" "d")
(const_int 0)])
(pc)
(label_ref (match_operand 1 "" ""))))]
[(set (pc)
(if_then_else
(match_operator:DI 0 "equality_op"
- [(match_operand:DI 2 "se_register_operand" "d")
- (match_operand:DI 3 "se_register_operand" "d")])
+ [(match_operand:DI 2 "register_operand" "d")
+ (match_operand:DI 3 "register_operand" "d")])
(label_ref (match_operand 1 "" ""))
(pc)))]
"!TARGET_MIPS16"
[(set (pc)
(if_then_else
(match_operator:DI 0 "equality_op"
- [(match_operand:DI 2 "se_register_operand" "d")
- (match_operand:DI 3 "se_register_operand" "d")])
+ [(match_operand:DI 2 "register_operand" "d")
+ (match_operand:DI 3 "register_operand" "d")])
(pc)
(label_ref (match_operand 1 "" ""))))]
"!TARGET_MIPS16"
(define_insn ""
[(set (pc)
(if_then_else (match_operator:DI 0 "equality_op"
- [(match_operand:DI 1 "se_register_operand" "d,t")
+ [(match_operand:DI 1 "register_operand" "d,t")
(const_int 0)])
(match_operand 2 "pc_or_label_operand" "")
(match_operand 3 "pc_or_label_operand" "")))]
(define_insn "seq_di_zero"
[(set (match_operand:DI 0 "register_operand" "=d")
- (eq:DI (match_operand:DI 1 "se_register_operand" "d")
+ (eq:DI (match_operand:DI 1 "register_operand" "d")
(const_int 0)))]
"TARGET_64BIT && !TARGET_MIPS16"
"sltu\\t%0,%1,1"
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t")
- (eq:DI (match_operand:DI 1 "se_register_operand" "d")
+ (eq:DI (match_operand:DI 1 "register_operand" "d")
(const_int 0)))]
"TARGET_64BIT && TARGET_MIPS16"
"sltu\\t%1,1"
(define_insn "seq_di"
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (eq:DI (match_operand:DI 1 "se_register_operand" "%d,d")
- (match_operand:DI 2 "se_uns_arith_operand" "d,K")))]
+ (eq:DI (match_operand:DI 1 "register_operand" "%d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"@
xor\\t%0,%1,%2\;sltu\\t%0,%0,1
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (eq:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_uns_arith_operand" "")))]
+ (eq:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "uns_arith_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16
&& (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
(define_insn "sne_di_zero"
[(set (match_operand:DI 0 "register_operand" "=d")
- (ne:DI (match_operand:DI 1 "se_register_operand" "d")
+ (ne:DI (match_operand:DI 1 "register_operand" "d")
(const_int 0)))]
"TARGET_64BIT && !TARGET_MIPS16"
"sltu\\t%0,%.,%1"
(define_insn "sne_di"
[(set (match_operand:DI 0 "register_operand" "=d,d")
- (ne:DI (match_operand:DI 1 "se_register_operand" "%d,d")
- (match_operand:DI 2 "se_uns_arith_operand" "d,K")))]
+ (ne:DI (match_operand:DI 1 "register_operand" "%d,d")
+ (match_operand:DI 2 "uns_arith_operand" "d,K")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"@
xor\\t%0,%1,%2\;sltu\\t%0,%.,%0
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (ne:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_uns_arith_operand" "")))]
+ (ne:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "uns_arith_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16
&& (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
(define_insn "sgt_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (gt:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_reg_or_0_operand" "dJ")))]
+ (gt:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "reg_or_0_operand" "dJ")))]
"TARGET_64BIT && !TARGET_MIPS16"
"slt\\t%0,%z2,%1"
[(set_attr "type" "arith")
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=d")
- (gt:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
+ (gt:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))]
"TARGET_64BIT && TARGET_MIPS16"
"slt\\t%2,%1"
[(set_attr "type" "arith")
(define_insn "sge_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (ge:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ (ge:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "arith_operand" "dI")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"slt\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
[(set_attr "type" "arith")
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (ge:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_arith_operand" "")))]
+ (ge:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "arith_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16"
[(set (match_dup 0)
(define_insn "slt_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (lt:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ (lt:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16"
"slt\\t%0,%1,%2"
[(set_attr "type" "arith")
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t,t")
- (lt:DI (match_operand:DI 1 "se_register_operand" "d,d")
- (match_operand:DI 2 "se_arith_operand" "d,I")))]
+ (lt:DI (match_operand:DI 1 "register_operand" "d,d")
+ (match_operand:DI 2 "arith_operand" "d,I")))]
"TARGET_64BIT && TARGET_MIPS16"
"slt\\t%1,%2"
[(set_attr "type" "arith")
(define_insn "sle_di_const"
[(set (match_operand:DI 0 "register_operand" "=d")
- (le:DI (match_operand:DI 1 "se_register_operand" "d")
+ (le:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "small_int" "I")))]
"TARGET_64BIT && !TARGET_MIPS16 && INTVAL (operands[2]) < 32767"
"*
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t")
- (le:DI (match_operand:DI 1 "se_register_operand" "d")
+ (le:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "small_int" "I")))]
"TARGET_64BIT && TARGET_MIPS16 && INTVAL (operands[2]) < 32767"
"*
(define_insn "sle_di_reg"
[(set (match_operand:DI 0 "register_operand" "=d")
- (le:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
+ (le:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"slt\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
[(set_attr "type" "arith")
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (le:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_register_operand" "")))]
+ (le:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "register_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16"
[(set (match_dup 0)
(define_insn "sgtu_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (gtu:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_reg_or_0_operand" "dJ")))]
+ (gtu:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "reg_or_0_operand" "dJ")))]
"TARGET_64BIT && !TARGET_MIPS16"
"sltu\\t%0,%z2,%1"
[(set_attr "type" "arith")
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t")
- (gtu:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
+ (gtu:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))]
"TARGET_64BIT && TARGET_MIPS16"
"sltu\\t%2,%1"
[(set_attr "type" "arith")
(define_insn "sgeu_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (geu:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ (geu:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "arith_operand" "dI")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"sltu\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
[(set_attr "type" "arith")
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (geu:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_arith_operand" "")))]
+ (geu:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "arith_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16"
[(set (match_dup 0)
(define_insn "sltu_di"
[(set (match_operand:DI 0 "register_operand" "=d")
- (ltu:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_arith_operand" "dI")))]
+ (ltu:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "arith_operand" "dI")))]
"TARGET_64BIT && !TARGET_MIPS16"
"sltu\\t%0,%1,%2"
[(set_attr "type" "arith")
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t,t")
- (ltu:DI (match_operand:DI 1 "se_register_operand" "d,d")
- (match_operand:DI 2 "se_arith_operand" "d,I")))]
+ (ltu:DI (match_operand:DI 1 "register_operand" "d,d")
+ (match_operand:DI 2 "arith_operand" "d,I")))]
"TARGET_64BIT && TARGET_MIPS16"
"sltu\\t%1,%2"
[(set_attr "type" "arith")
(define_insn "sleu_di_const"
[(set (match_operand:DI 0 "register_operand" "=d")
- (leu:DI (match_operand:DI 1 "se_register_operand" "d")
+ (leu:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "small_int" "I")))]
"TARGET_64BIT && !TARGET_MIPS16 && INTVAL (operands[2]) < 32767"
"*
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=t")
- (leu:DI (match_operand:DI 1 "se_register_operand" "d")
+ (leu:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "small_int" "I")))]
"TARGET_64BIT && TARGET_MIPS16 && INTVAL (operands[2]) < 32767"
"*
(define_insn "sleu_di_reg"
[(set (match_operand:DI 0 "register_operand" "=d")
- (leu:DI (match_operand:DI 1 "se_register_operand" "d")
- (match_operand:DI 2 "se_register_operand" "d")))]
+ (leu:DI (match_operand:DI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "d")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_MIPS16"
"sltu\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
[(set_attr "type" "arith")
(define_split
[(set (match_operand:DI 0 "register_operand" "")
- (leu:DI (match_operand:DI 1 "se_register_operand" "")
- (match_operand:DI 2 "se_register_operand" "")))]
+ (leu:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "register_operand" "")))]
"TARGET_64BIT && TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
&& !TARGET_MIPS16"
[(set (match_dup 0)
;; we can't use `j' when emitting non-embedded PIC, so we emit
;; branch, if it's in range, or load the address of the branch
;; target into $at in a PIC-compatible way and then jump to it.
- (if_then_else
+ (if_then_else
(ior (eq (symbol_ref "flag_pic && ! TARGET_EMBEDDED_PIC")
(const_int 0))
(lt (abs (minus (match_dup 0)
(set_attr "mode" "none")])
(define_insn "indirect_jump_internal2"
- [(set (pc) (match_operand:DI 0 "se_register_operand" "d"))]
+ [(set (pc) (match_operand:DI 0 "register_operand" "d"))]
"Pmode == DImode"
"%*j\\t%0"
[(set_attr "type" "jump")
DONE;
}
- if (GET_MODE (operands[0]) != Pmode)
+ if (GET_MODE (operands[0]) != ptr_mode)
abort ();
- if (! flag_pic)
- {
- if (!(Pmode == DImode))
- emit_jump_insn (gen_tablejump_internal1 (operands[0], operands[1]));
- else
- emit_jump_insn (gen_tablejump_internal2 (operands[0], operands[1]));
- }
- else
- {
- if (!(Pmode == DImode))
- emit_jump_insn (gen_tablejump_internal3 (operands[0], operands[1]));
- else
- emit_jump_insn (gen_tablejump_internal4 (operands[0], operands[1]));
- }
+ if (TARGET_GPWORD)
+ operands[0] = expand_binop (ptr_mode, add_optab, operands[0],
+ pic_offset_table_rtx, 0, 0, OPTAB_WIDEN);
+ if (Pmode == SImode)
+ emit_jump_insn (gen_tablejump_internal1 (operands[0], operands[1]));
+ else
+ emit_jump_insn (gen_tablejump_internal2 (operands[0], operands[1]));
DONE;
}
}")
[(set (pc)
(match_operand:SI 0 "register_operand" "d"))
(use (label_ref (match_operand 1 "" "")))]
- "!(Pmode == DImode)"
+ ""
"%*j\\t%0"
[(set_attr "type" "jump")
(set_attr "mode" "none")])
(define_insn "tablejump_internal2"
[(set (pc)
- (match_operand:DI 0 "se_register_operand" "d"))
+ (match_operand:DI 0 "register_operand" "d"))
(use (label_ref (match_operand 1 "" "")))]
- "Pmode == DImode"
+ "TARGET_64BIT"
"%*j\\t%0"
[(set_attr "type" "jump")
(set_attr "mode" "none")])
-(define_expand "tablejump_internal3"
- [(parallel [(set (pc)
- (plus:SI (match_operand:SI 0 "register_operand" "d")
- (label_ref:SI (match_operand 1 "" ""))))
- (use (label_ref:SI (match_dup 1)))])]
- ""
- "")
-
(define_expand "tablejump_mips161"
[(set (pc) (plus:SI (sign_extend:SI
(match_operand:HI 0 "register_operand" "d"))
emit_insn (gen_adddi3 (t3, t1, t2));
emit_jump_insn (gen_tablejump_internal2 (t3, operands[1]));
DONE;
- }
-}")
-
-;;; Make sure that this only matches the insn before ADDR_DIFF_VEC. Otherwise
-;;; it is not valid. ??? With the USE, the condition tests may not be required
-;;; any longer.
-
-;;; ??? The length depends on the ABI. It is two for o32, and one for n32.
-;;; We just use the conservative number here.
-
-(define_insn ""
- [(set (pc)
- (plus:SI (match_operand:SI 0 "register_operand" "d")
- (label_ref:SI (match_operand 1 "" ""))))
- (use (label_ref:SI (match_dup 1)))]
- "!(Pmode == DImode) && next_active_insn (insn) != 0
- && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC
- && PREV_INSN (next_active_insn (insn)) == operands[1]"
- "*
-{
- /* .cpadd expands to add REG,REG,$gp when pic, and nothing when not pic. */
- if (mips_abi == ABI_32 || mips_abi == ABI_O64
- || (mips_abi == ABI_N32 && TARGET_GAS))
- output_asm_insn (\".cpadd\\t%0\", operands);
- return \"%*j\\t%0\";
-}"
- [(set_attr "type" "jump")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_expand "tablejump_internal4"
- [(parallel [(set (pc)
- (plus:DI (match_operand:DI 0 "se_register_operand" "d")
- (label_ref:DI (match_operand 1 "" ""))))
- (use (label_ref:DI (match_dup 1)))])]
- ""
- "")
-
-;;; Make sure that this only matches the insn before ADDR_DIFF_VEC. Otherwise
-;;; it is not valid. ??? With the USE, the condition tests may not be required
-;;; any longer.
-
-(define_insn ""
- [(set (pc)
- (plus:DI (match_operand:DI 0 "se_register_operand" "d")
- (label_ref:DI (match_operand 1 "" ""))))
- (use (label_ref:DI (match_dup 1)))]
- "Pmode == DImode && next_active_insn (insn) != 0
- && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC
- && PREV_INSN (next_active_insn (insn)) == operands[1]"
- "*
-{
- /* .cpadd expands to add REG,REG,$gp when pic, and nothing when not pic. */
- if (TARGET_GAS && mips_abi == ABI_64)
- output_asm_insn (\".cpadd\\t%0\", operands);
- return \"%*j\\t%0\";
-}"
- [(set_attr "type" "jump")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
+ }
+}")
;; Implement a switch statement when generating embedded PIC code.
;; Switches are implemented by `tablejump' when not using -membedded-pic.
(define_expand "epilogue"
[(const_int 2)]
""
- "
{
- if (mips_isa >= 0) /* avoid unused code warnings */
- {
- mips_expand_epilogue ();
- DONE;
- }
-}")
+ mips_expand_epilogue (false);
+ DONE;
+})
+
+(define_expand "sibcall_epilogue"
+ [(const_int 2)]
+ ""
+{
+ mips_expand_epilogue (true);
+ DONE;
+})
;; Trivial return. Make it look like a normal return insn as that
;; allows jump optimizations to work better .
;;
;; ....................
-;; calls.c now passes a third argument, make saber happy
-
-(define_expand "call"
- [(parallel [(call (match_operand 0 "memory_operand" "m")
- (match_operand 1 "" "i"))
- (clobber (reg:SI 31))
- (use (match_operand 2 "" "")) ;; next_arg_reg
- (use (match_operand 3 "" ""))])] ;; struct_value_size_rtx
- ""
- "
-{
- rtx addr;
-
- if (operands[0]) /* eliminate unused code warnings */
- {
- addr = XEXP (operands[0], 0);
- if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
- || ! call_insn_operand (addr, VOIDmode))
- XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, addr);
-
- /* In order to pass small structures by value in registers
- compatibly with the MIPS compiler, we need to shift the value
- into the high part of the register. Function_arg has encoded
- a PARALLEL rtx, holding a vector of adjustments to be made
- as the next_arg_reg variable, so we split up the insns,
- and emit them separately. */
-
- if (operands[2] != (rtx)0 && GET_CODE (operands[2]) == PARALLEL)
- {
- rtvec adjust = XVEC (operands[2], 0);
- int num = GET_NUM_ELEM (adjust);
- int i;
+;; Sibling calls. All these patterns use direct jumps.
- for (i = 0; i < num; i++)
- emit_insn (RTVEC_ELT (adjust, i));
- }
-
- if (TARGET_MIPS16
- && mips16_hard_float
- && operands[2] != 0
- && (int) GET_MODE (operands[2]) != 0)
- {
- if (build_mips16_call_stub (NULL_RTX, operands[0], operands[1],
- (int) GET_MODE (operands[2])))
- DONE;
- }
+;; call_insn_operand will only accepts constant addresses if a direct
+;; jump is acceptable. Since the 'S' constraint is defined in terms of
+;; call_insn_operand, the same is true of the contraints.
- emit_call_insn (gen_call_internal0 (operands[0], operands[1],
- gen_rtx_REG (SImode,
- GP_REG_FIRST + 31)));
- DONE;
- }
-}")
+;; When we use an indirect jump, we need a register that will be
+;; preserved by the epilogue. Since TARGET_ABICALLS forces us to
+;; use $25 for this purpose -- and $25 is never clobbered by the
+;; epilogue -- we might as well use it for !TARGET_ABICALLS as well.
-(define_expand "call_internal0"
+(define_expand "sibcall"
[(parallel [(call (match_operand 0 "" "")
(match_operand 1 "" ""))
- (clobber (match_operand:SI 2 "" ""))])]
- ""
- "")
-
-;; We need to recognize reg:SI 31 specially for the mips16, because we
-;; don't have a constraint letter for it.
-
-(define_insn ""
- [(call (mem (match_operand 0 "call_insn_operand" "ei"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=y"))]
- "TARGET_MIPS16 && !TARGET_ABICALLS && !TARGET_LONG_CALLS
- && GET_CODE (operands[2]) == REG && REGNO (operands[2]) == 31"
- "%*jal\\t%0"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_insn "call_internal1"
- [(call (mem (match_operand 0 "call_insn_operand" "ri"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "!TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
-{
- register rtx target = operands[0];
-
- if (GET_CODE (target) == CONST_INT)
- return \"%[li\\t%@,%0\\n\\t%*jal\\t%2,%@%]\";
- else if (CONSTANT_ADDRESS_P (target))
- return \"%*jal\\t%0\";
- else
- return \"%*jal\\t%2,%0\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
-
-(define_insn "call_internal2"
- [(call (mem (match_operand 0 "call_insn_operand" "ri"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
-{
- register rtx target = operands[0];
-
- if (GET_CODE (target) == CONST_INT)
- return \"li\\t%^,%0\\n\\tjal\\t%2,%^\";
- else if (CONSTANT_ADDRESS_P (target))
- {
- if (GET_MODE (target) == SImode)
- return \"la\\t%^,%0\\n\\tjal\\t%2,%^\";
- else
- return \"dla\\t%^,%0\\n\\tjal\\t%2,%^\";
- }
- else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%0\\n\\tjal\\t%2,%^\";
- else
- return \"jal\\t%2,%0\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_insn "call_internal3a"
- [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "!TARGET_MIPS16
- && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
- "%*jal\\t%2,%0"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
-
-(define_insn "call_internal3b"
- [(call (mem:DI (match_operand:DI 0 "se_register_operand" "r"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "!TARGET_MIPS16
- && Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
- "%*jal\\t%2,%0"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "1")])
-
-(define_insn "call_internal3c"
- [(call (mem:SI (match_operand:SI 0 "register_operand" "e"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=y"))]
- "TARGET_MIPS16 && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS
- && GET_CODE (operands[2]) == REG && REGNO (operands[2]) == 31"
- "%*jal\\t%2,%0"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
-
-(define_insn "call_internal4a"
- [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "!(Pmode == DImode) && TARGET_ABICALLS && TARGET_LONG_CALLS"
- "*
-{
- if (REGNO (operands[0]) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%0\\n\\tjal\\t%2,%^\";
- else
- return \"jal\\t%2,%0\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_insn "call_internal4b"
- [(call (mem:DI (match_operand:DI 0 "se_register_operand" "r"))
- (match_operand 1 "" "i"))
- (clobber (match_operand:SI 2 "register_operand" "=d"))]
- "Pmode == DImode && TARGET_ABICALLS && TARGET_LONG_CALLS"
- "*
-{
- if (REGNO (operands[0]) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%0\\n\\tjal\\t%2,%^\";
- else
- return \"jal\\t%2,%0\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-;; calls.c now passes a fourth argument, make saber happy
-
-(define_expand "call_value"
- [(parallel [(set (match_operand 0 "register_operand" "=df")
- (call (match_operand 1 "memory_operand" "m")
- (match_operand 2 "" "i")))
- (clobber (reg:SI 31))
- (use (match_operand 3 "" ""))])] ;; next_arg_reg
- ""
- "
+ (use (match_operand 2 "" "")) ;; next_arg_reg
+ (use (match_operand 3 "" ""))])] ;; struct_value_size_rtx
+ "TARGET_SIBCALLS"
{
- rtx addr;
-
- if (operands[0]) /* eliminate unused code warning */
- {
- addr = XEXP (operands[1], 0);
- if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
- || ! call_insn_operand (addr, VOIDmode))
- XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, addr);
-
- /* In order to pass small structures by value in registers
- compatibly with the MIPS compiler, we need to shift the value
- into the high part of the register. Function_arg has encoded
- a PARALLEL rtx, holding a vector of adjustments to be made
- as the next_arg_reg variable, so we split up the insns,
- and emit them separately. */
-
- if (operands[3] != (rtx)0 && GET_CODE (operands[3]) == PARALLEL)
- {
- rtvec adjust = XVEC (operands[3], 0);
- int num = GET_NUM_ELEM (adjust);
- int i;
-
- for (i = 0; i < num; i++)
- emit_insn (RTVEC_ELT (adjust, i));
- }
-
- if (TARGET_MIPS16
- && mips16_hard_float
- && ((operands[3] != 0
- && (int) GET_MODE (operands[3]) != 0)
- || GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_FLOAT))
- {
- if (build_mips16_call_stub (operands[0], operands[1], operands[2],
- (operands[3] == 0 ? 0
- : (int) GET_MODE (operands[3]))))
- DONE;
- }
-
- /* Handle Irix6 function calls that have multiple non-contiguous
- results. */
- if (GET_CODE (operands[0]) == PARALLEL && XVECLEN (operands[0], 0) > 1)
- {
- emit_call_insn (gen_call_value_multiple_internal0
- (XEXP (XVECEXP (operands[0], 0, 0), 0),
- operands[1], operands[2],
- XEXP (XVECEXP (operands[0], 0, 1), 0),
- gen_rtx_REG (SImode, GP_REG_FIRST + 31)));
- DONE;
- }
-
- /* We have a call returning a DImode structure in an FP reg.
- Strip off the now unnecessary PARALLEL. */
- if (GET_CODE (operands[0]) == PARALLEL)
- operands[0] = XEXP (XVECEXP (operands[0], 0, 0), 0);
-
- emit_call_insn (gen_call_value_internal0 (operands[0], operands[1], operands[2],
- gen_rtx_REG (SImode,
- GP_REG_FIRST + 31)));
+ mips_expand_call (0, XEXP (operands[0], 0), operands[1], operands[2], true);
+ DONE;
+})
- DONE;
- }
-}")
+(define_insn "sibcall_internal"
+ [(call (mem:SI (match_operand 0 "call_insn_operand" "j,S"))
+ (match_operand 1 "" ""))]
+ "TARGET_SIBCALLS && SIBLING_CALL_P (insn)"
+ "@
+ %*jr\\t%0
+ %*j\\t%0"
+ [(set_attr "type" "call")])
-(define_expand "call_value_internal0"
+(define_expand "sibcall_value"
[(parallel [(set (match_operand 0 "" "")
(call (match_operand 1 "" "")
(match_operand 2 "" "")))
- (clobber (match_operand:SI 3 "" ""))])]
- ""
- "")
-
-;; Recognize $31 specially on the mips16, because we don't have a
-;; constraint letter for it.
-
-(define_insn ""
- [(set (match_operand 0 "register_operand" "=d")
- (call (mem (match_operand 1 "call_insn_operand" "ei"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=y"))]
- "TARGET_MIPS16 && !TARGET_ABICALLS && !TARGET_LONG_CALLS
- && GET_CODE (operands[3]) == REG && REGNO (operands[3]) == 31"
- "%*jal\\t%1"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_insn "call_value_internal1"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem (match_operand 1 "call_insn_operand" "ri"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "!TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
-{
- register rtx target = operands[1];
-
- if (GET_CODE (target) == CONST_INT)
- return \"%[li\\t%@,%1\\n\\t%*jal\\t%3,%@%]\";
- else if (CONSTANT_ADDRESS_P (target))
- return \"%*jal\\t%1\";
- else
- return \"%*jal\\t%3,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
-
-(define_insn "call_value_internal2"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem (match_operand 1 "call_insn_operand" "ri"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
+ (use (match_operand 3 "" ""))])] ;; next_arg_reg
+ "TARGET_SIBCALLS"
{
- register rtx target = operands[1];
-
- if (GET_CODE (target) == CONST_INT)
- return \"li\\t%^,%1\\n\\tjal\\t%3,%^\";
- else if (CONSTANT_ADDRESS_P (target))
- {
- if (GET_MODE (target) == SImode)
- return \"la\\t%^,%1\\n\\tjal\\t%3,%^\";
- else
- return \"dla\\t%^,%1\\n\\tjal\\t%3,%^\";
- }
- else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%1\\n\\tjal\\t%3,%^\";
- else
- return \"jal\\t%3,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
-(define_insn "call_value_internal3a"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "!TARGET_MIPS16
- && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
- "%*jal\\t%3,%1"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
-
-(define_insn "call_value_internal3b"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem:DI (match_operand:DI 1 "se_register_operand" "r"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "!TARGET_MIPS16
- && Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
- "%*jal\\t%3,%1"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
+ mips_expand_call (operands[0], XEXP (operands[1], 0),
+ operands[2], operands[3], true);
+ DONE;
+})
-(define_insn "call_value_internal3c"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem:SI (match_operand:SI 1 "register_operand" "e"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=y"))]
- "TARGET_MIPS16 && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS
- && GET_CODE (operands[3]) == REG && REGNO (operands[3]) == 31"
- "%*jal\\t%3,%1"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
+(define_insn "sibcall_value_internal"
+ [(set (match_operand 0 "register_operand" "=df,df")
+ (call (mem:SI (match_operand 1 "call_insn_operand" "j,S"))
+ (match_operand 2 "" "")))]
+ "TARGET_SIBCALLS && SIBLING_CALL_P (insn)"
+ "@
+ %*jr\\t%1
+ %*j\\t%1"
+ [(set_attr "type" "call")])
+
+(define_insn "sibcall_value_multiple_internal"
+ [(set (match_operand 0 "register_operand" "=df,df")
+ (call (mem:SI (match_operand 1 "call_insn_operand" "j,S"))
+ (match_operand 2 "" "")))
+ (set (match_operand 3 "register_operand" "=df,df")
+ (call (mem:SI (match_dup 1))
+ (match_dup 2)))]
+ "TARGET_SIBCALLS && SIBLING_CALL_P (insn)"
+ "@
+ %*jr\\t%1
+ %*j\\t%1"
+ [(set_attr "type" "call")])
-(define_insn "call_value_internal4a"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "!(Pmode == DImode) && TARGET_ABICALLS && TARGET_LONG_CALLS"
- "*
+(define_expand "call"
+ [(parallel [(call (match_operand 0 "" "")
+ (match_operand 1 "" ""))
+ (use (match_operand 2 "" "")) ;; next_arg_reg
+ (use (match_operand 3 "" ""))])] ;; struct_value_size_rtx
+ ""
{
- if (REGNO (operands[1]) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%1\\n\\tjal\\t%3,%^\";
- else
- return \"jal\\t%3,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
+ mips_expand_call (0, XEXP (operands[0], 0), operands[1], operands[2], false);
+ DONE;
+})
-(define_insn "call_value_internal4b"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem:DI (match_operand:DI 1 "se_register_operand" "r"))
- (match_operand 2 "" "i")))
- (clobber (match_operand:SI 3 "register_operand" "=d"))]
- "Pmode == DImode && TARGET_ABICALLS && TARGET_LONG_CALLS"
- "*
-{
- if (REGNO (operands[1]) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%1\\n\\tjal\\t%3,%^\";
- else
- return \"jal\\t%3,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
+(define_insn_and_split "call_internal"
+ [(call (mem:SI (match_operand 0 "call_insn_operand" "c,S"))
+ (match_operand 1 "" ""))
+ (clobber (reg:SI 31))]
+ ""
+ "%*jal\\t%0"
+ "reload_completed && TARGET_SPLIT_CALLS"
+ [(const_int 0)]
+ {
+ emit_call_insn (gen_call_split (operands[0], operands[1]));
+ emit_insn (gen_exception_receiver ());
+ DONE;
+ }
+ [(set_attr "jal" "indirect,direct")
+ (set_attr "extended_mips16" "no,yes")])
+
+(define_insn "call_split"
+ [(call (mem:SI (match_operand 0 "call_insn_operand" "c"))
+ (match_operand 1 "" ""))
+ (clobber (reg:SI 31))
+ (const_int 1)]
+ "TARGET_SPLIT_CALLS"
+ "%*jalr\\t%0"
+ [(set_attr "type" "call")])
-(define_expand "call_value_multiple_internal0"
+(define_expand "call_value"
[(parallel [(set (match_operand 0 "" "")
(call (match_operand 1 "" "")
(match_operand 2 "" "")))
- (set (match_operand 3 "" "")
- (call (match_dup 1)
- (match_dup 2)))
- (clobber (match_operand:SI 4 "" ""))])]
+ (use (match_operand 3 "" ""))])] ;; next_arg_reg
""
- "")
-
-;; ??? May eventually need all 6 versions of the call patterns with multiple
-;; return values.
-
-(define_insn "call_value_multiple_internal1"
- [(set (match_operand 0 "register_operand" "=df")
- (call (mem (match_operand 1 "call_insn_operand" "ri"))
- (match_operand 2 "" "i")))
- (set (match_operand 3 "register_operand" "=df")
- (call (mem (match_dup 1))
- (match_dup 2)))
- (clobber (match_operand:SI 4 "register_operand" "=d"))]
- "!TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
{
- register rtx target = operands[1];
-
- if (GET_CODE (target) == CONST_INT)
- return \"%[li\\t%@,%1\\n\\t%*jal\\t%4,%@%]\";
- else if (CONSTANT_ADDRESS_P (target))
- return \"%*jal\\t%1\";
- else
- return \"%*jal\\t%4,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")])
+ mips_expand_call (operands[0], XEXP (operands[1], 0),
+ operands[2], operands[3], false);
+ DONE;
+})
-(define_insn "call_value_multiple_internal2"
+(define_insn_and_split "call_value_internal"
+ [(set (match_operand 0 "register_operand" "=df,df")
+ (call (mem:SI (match_operand 1 "call_insn_operand" "c,S"))
+ (match_operand 2 "" "")))
+ (clobber (reg:SI 31))]
+ ""
+ "%*jal\\t%1"
+ "reload_completed && TARGET_SPLIT_CALLS"
+ [(const_int 0)]
+ {
+ emit_call_insn (gen_call_value_split (operands[0], operands[1],
+ operands[2]));
+ emit_insn (gen_exception_receiver ());
+ DONE;
+ }
+ [(set_attr "jal" "indirect,direct")
+ (set_attr "extended_mips16" "no,yes")])
+
+(define_insn "call_value_split"
+ [(set (match_operand 0 "register_operand" "=df")
+ (call (mem:SI (match_operand 1 "call_insn_operand" "c"))
+ (match_operand 2 "" "")))
+ (clobber (reg:SI 31))
+ (const_int 1)]
+ "TARGET_SPLIT_CALLS"
+ "%*jalr\\t%1"
+ [(set_attr "type" "call")])
+
+(define_insn_and_split "call_value_multiple_internal"
+ [(set (match_operand 0 "register_operand" "=df,df")
+ (call (mem:SI (match_operand 1 "call_insn_operand" "c,S"))
+ (match_operand 2 "" "")))
+ (set (match_operand 3 "register_operand" "=df,df")
+ (call (mem:SI (match_dup 1))
+ (match_dup 2)))
+ (clobber (reg:SI 31))]
+ ""
+ "%*jal\\t%1"
+ "reload_completed && TARGET_SPLIT_CALLS"
+ [(const_int 0)]
+ {
+ emit_call_insn (gen_call_value_multiple_split (operands[0], operands[1],
+ operands[2], operands[3]));
+ emit_insn (gen_exception_receiver ());
+ DONE;
+ }
+ [(set_attr "jal" "indirect,direct")
+ (set_attr "extended_mips16" "no,yes")])
+
+(define_insn "call_value_multiple_split"
[(set (match_operand 0 "register_operand" "=df")
- (call (mem (match_operand 1 "call_insn_operand" "ri"))
- (match_operand 2 "" "i")))
+ (call (mem:SI (match_operand 1 "call_insn_operand" "c"))
+ (match_operand 2 "" "")))
(set (match_operand 3 "register_operand" "=df")
- (call (mem (match_dup 1))
- (match_dup 2)))
- (clobber (match_operand:SI 4 "register_operand" "=d"))]
- "TARGET_ABICALLS && !TARGET_LONG_CALLS"
- "*
-{
- register rtx target = operands[1];
-
- if (GET_CODE (target) == CONST_INT)
- return \"li\\t%^,%1\\n\\tjal\\t%4,%^\";
- else if (CONSTANT_ADDRESS_P (target))
- {
- if (GET_MODE (target) == SImode)
- return \"la\\t%^,%1\\n\\tjal\\t%4,%^\";
- else
- return \"dla\\t%^,%1\\n\\tjal\\t%4,%^\";
- }
- else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
- return \"move\\t%^,%1\\n\\tjal\\t%4,%^\";
- else
- return \"jal\\t%4,%1\";
-}"
- [(set_attr "type" "call")
- (set_attr "mode" "none")
- (set_attr "length" "8")])
-
+ (call (mem:SI (match_dup 1))
+ (match_dup 2)))
+ (clobber (reg:SI 31))
+ (const_int 1)]
+ "TARGET_SPLIT_CALLS"
+ "%*jalr\\t%1"
+ [(set_attr "type" "call")])
;; Call subroutine returning any type.
""
"
{
- if (operands[0]) /* silence statement not reached warnings */
- {
- int i;
-
- emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx));
+ int i;
- for (i = 0; i < XVECLEN (operands[2], 0); i++)
- {
- rtx set = XVECEXP (operands[2], 0, i);
- emit_move_insn (SET_DEST (set), SET_SRC (set));
- }
+ emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx));
- emit_insn (gen_blockage ());
- DONE;
+ for (i = 0; i < XVECLEN (operands[2], 0); i++)
+ {
+ rtx set = XVECEXP (operands[2], 0, i);
+ emit_move_insn (SET_DEST (set), SET_SRC (set));
}
+
+ emit_insn (gen_blockage ());
+ DONE;
}")
\f
;;
(match_operand 1 "const_int_operand" "")
(match_operand 2 "const_int_operand" ""))]
"ISA_HAS_PREFETCH"
-"{
- if (symbolic_operand (operands[0], GET_MODE (operands[0])))
- operands[0] = force_reg (GET_MODE (operands[0]), operands[0]);
-}")
+{
+ if (symbolic_operand (operands[0], GET_MODE (operands[0])))
+ operands[0] = force_reg (GET_MODE (operands[0]), operands[0]);
+})
(define_insn "prefetch_si_address"
[(prefetch (plus:SI (match_operand:SI 0 "register_operand" "r")
(match_operand:SI 2 "const_int_operand" "n"))]
"ISA_HAS_PREFETCH && Pmode == SImode"
"* return mips_emit_prefetch (operands);"
- [(set_attr "type" "load")])
+ [(set_attr "type" "prefetch")])
(define_insn "prefetch_si"
[(prefetch (match_operand:SI 0 "register_operand" "r")
(match_operand:SI 2 "const_int_operand" "n"))]
"ISA_HAS_PREFETCH && Pmode == SImode"
"* return mips_emit_prefetch (operands);"
- [(set_attr "type" "load")])
+ [(set_attr "type" "prefetch")])
(define_insn "prefetch_di_address"
- [(prefetch (plus:DI (match_operand:DI 0 "se_register_operand" "r")
+ [(prefetch (plus:DI (match_operand:DI 0 "register_operand" "r")
(match_operand:DI 3 "const_int_operand" "i"))
(match_operand:DI 1 "const_int_operand" "n")
(match_operand:DI 2 "const_int_operand" "n"))]
"ISA_HAS_PREFETCH && Pmode == DImode"
"* return mips_emit_prefetch (operands);"
- [(set_attr "type" "load")])
+ [(set_attr "type" "prefetch")])
(define_insn "prefetch_di"
- [(prefetch (match_operand:DI 0 "se_register_operand" "r")
+ [(prefetch (match_operand:DI 0 "register_operand" "r")
(match_operand:DI 1 "const_int_operand" "n")
(match_operand:DI 2 "const_int_operand" "n"))]
"ISA_HAS_PREFETCH && Pmode == DImode"
"* return mips_emit_prefetch (operands);"
- [(set_attr "type" "load")])
+ [(set_attr "type" "prefetch")])
(define_insn "nop"
[(const_int 0)]
[(set (match_operand:SI 0 "register_operand" "=d,d")
(if_then_else:SI
(match_operator 4 "equality_op"
- [(match_operand:DI 1 "se_register_operand" "d,d")
+ [(match_operand:DI 1 "register_operand" "d,d")
(const_int 0)])
(match_operand:SI 2 "reg_or_0_operand" "dJ,0")
(match_operand:SI 3 "reg_or_0_operand" "0,dJ")))]
(match_operator 4 "equality_op"
[(match_operand:SI 1 "register_operand" "d,d")
(const_int 0)])
- (match_operand:DI 2 "se_reg_or_0_operand" "dJ,0")
- (match_operand:DI 3 "se_reg_or_0_operand" "0,dJ")))]
+ (match_operand:DI 2 "reg_or_0_operand" "dJ,0")
+ (match_operand:DI 3 "reg_or_0_operand" "0,dJ")))]
"(ISA_HAS_CONDMOVE || ISA_HAS_INT_CONDMOVE) && TARGET_64BIT"
"@
mov%B4\\t%0,%z2,%1
[(set (match_operand:DI 0 "register_operand" "=d,d")
(if_then_else:DI
(match_operator 4 "equality_op"
- [(match_operand:DI 1 "se_register_operand" "d,d")
+ [(match_operand:DI 1 "register_operand" "d,d")
(const_int 0)])
- (match_operand:DI 2 "se_reg_or_0_operand" "dJ,0")
- (match_operand:DI 3 "se_reg_or_0_operand" "0,dJ")))]
+ (match_operand:DI 2 "reg_or_0_operand" "dJ,0")
+ (match_operand:DI 3 "reg_or_0_operand" "0,dJ")))]
"(ISA_HAS_CONDMOVE || ISA_HAS_INT_CONDMOVE) && TARGET_64BIT"
"@
mov%B4\\t%0,%z2,%1
"register_operand"
"z,z")
(const_int 0)])
- (match_operand:DI 1 "se_reg_or_0_operand" "dJ,0")
- (match_operand:DI 2 "se_reg_or_0_operand" "0,dJ")))]
+ (match_operand:DI 1 "reg_or_0_operand" "dJ,0")
+ (match_operand:DI 2 "reg_or_0_operand" "0,dJ")))]
"ISA_HAS_CONDMOVE && TARGET_HARD_FLOAT && TARGET_64BIT"
"@
mov%T3\\t%0,%z1,%4
[(set (match_operand:SF 0 "register_operand" "=f,f")
(if_then_else:SF
(match_operator 4 "equality_op"
- [(match_operand:DI 1 "se_register_operand" "d,d")
+ [(match_operand:DI 1 "register_operand" "d,d")
(const_int 0)])
(match_operand:SF 2 "register_operand" "f,0")
(match_operand:SF 3 "register_operand" "0,f")))]
[(set (match_operand:DF 0 "register_operand" "=f,f")
(if_then_else:DF
(match_operator 4 "equality_op"
- [(match_operand:DI 1 "se_register_operand" "d,d")
+ [(match_operand:DI 1 "register_operand" "d,d")
(const_int 0)])
(match_operand:DF 2 "register_operand" "f,0")
(match_operand:DF 3 "register_operand" "0,f")))]
[(set (match_dup 4) (match_operand 1 "comparison_operator" ""))
(set (match_operand:DI 0 "register_operand" "")
(if_then_else:DI (match_dup 5)
- (match_operand:DI 2 "se_reg_or_0_operand" "")
- (match_operand:DI 3 "se_reg_or_0_operand" "")))]
+ (match_operand:DI 2 "reg_or_0_operand" "")
+ (match_operand:DI 3 "reg_or_0_operand" "")))]
"(ISA_HAS_CONDMOVE || ISA_HAS_INT_CONDMOVE) && TARGET_64BIT"
"
{
[(set_attr "type" "branch")
(set_attr "mode" "none")
(set_attr "length" "8")])
-
-;; For the rare case where we need to load an address into a register
-;; that can not be recognized by the normal movsi/addsi instructions.
-;; I have no idea how many insns this can actually generate. It should
-;; be rare, so over-estimating as 10 instructions should not have any
-;; real performance impact.
-(define_insn "leasi"
- [(set (match_operand:SI 0 "register_operand" "=d")
- (match_operand:SI 1 "address_operand" "p"))]
- "Pmode == SImode"
- "la %0,%a1"
- [(set_attr "type" "arith")
- (set_attr "mode" "SI")
- (set_attr "length" "40")])
-
-;; Similarly for targets where we have 64bit pointers.
-(define_insn "leadi"
- [(set (match_operand:DI 0 "register_operand" "=d")
- (match_operand:DI 1 "address_operand" "p"))]
- "Pmode == DImode"
- "dla %0,%a1"
- [(set_attr "type" "arith")
- (set_attr "mode" "DI")
- (set_attr "length" "40")])
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.57.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
-# Defaults:
-ac_help=
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --with-local-prefix=DIR specifies directory to put local include"
-ac_help="$ac_help
- --with-gxx-include-dir=DIR
- specifies directory to put g++ header files"
-ac_help="$ac_help
- --with-cpp-install-dir=DIR
- install the user visible C preprocessor in DIR
- (relative to PREFIX) as well as PREFIX/bin"
-ac_help="$ac_help
- --with-gnu-ld arrange to work with GNU ld."
-ac_help="$ac_help
- --with-ld arrange to use the specified ld (full pathname)"
-ac_help="$ac_help
- --with-gnu-as arrange to work with GNU as"
-ac_help="$ac_help
- --with-as arrange to use the specified as (full pathname)"
-ac_help="$ac_help
- --enable-werror enable -Werror in bootstrap stage2 and later"
-ac_help="$ac_help
- --enable-checking[=LIST]
- enable expensive run-time checks. With LIST,
- enable only specific categories of checks.
- Categories are: misc,tree,rtl,rtlflag,gc,gcac;
- default is misc,tree,gc,rtlflag"
-ac_help="$ac_help
- --enable-coverage[=LEVEL]
- enable compiler\'s code coverage collection.
- Use to measure compiler performance and locate
- unused parts of the compiler. With LEVEL, specify
- optimization. Values are opt, noopt,
- default is noopt"
-ac_help="$ac_help
- --with-stabs arrange to use stabs instead of host debug format"
-ac_help="$ac_help
- --with-elf arrange to use ELF instead of host debug format"
-ac_help="$ac_help
- --enable-multilib enable library support for multiple ABIs"
-ac_help="$ac_help
- --enable-__cxa_atexit enable __cxa_atexit for C++"
-ac_help="$ac_help
- --enable-c-mbchar enable multibyte characters for C and C++"
-ac_help="$ac_help
- --enable-threads enable thread usage for target GCC
- --enable-threads=LIB use LIB thread package for target GCC"
-ac_help="$ac_help
- --enable-objc-gc enable the use of Boehm's garbage collector with
- the GNU Objective-C runtime"
-ac_help="$ac_help
- --with-dwarf2 force the default debug format to be DWARF 2"
-ac_help="$ac_help
- --disable-shared don't provide a shared libgcc"
-ac_help="$ac_help
- --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
-ac_help="$ac_help
- --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
-ac_help="$ac_help
- --enable-initfini-array use .init_array/.fini_array sections"
-ac_help="$ac_help
- --enable-sjlj-exceptions
- arrange to use setjmp/longjmp exception handling"
-ac_help="$ac_help
- --enable-libunwind-exceptions force use libunwind for exceptions"
-ac_help="$ac_help
- --enable-nls use Native Language Support (default)"
-ac_help="$ac_help
- --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --disable-win32-registry
- disable lookup of installation paths in the
- Registry on Windows hosts
- --enable-win32-registry enable registry lookup (default)
- --enable-win32-registry=KEY
- use KEY instead of GCC version as the last portion
- of the registry key"
-ac_help="$ac_help
- --with-gc={simple,page} choose the garbage collection mechanism to use
- with the compiler"
-ac_help="$ac_help
- --with-system-zlib use installed libz"
-ac_help="$ac_help
- --enable-maintainer-mode
- enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be
- installed in a compiler-specific directory"
-ac_help="$ac_help
- --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="tree.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_canonical host_canonical target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP GNATBIND ac_ct_GNATBIND ADAC strict1_warn warn_cflags WERROR nocommon_flag valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES make_compare_target FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV manext objext extra_modes_file FORBUILD PACKAGE VERSION ALLOCA GLIBC21 USE_NLS MSGFMT GMSGFMT XGETTEXT INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT INTLLIBS INTLDEPS INTLOBJS POSUB DATADIRNAME INSTOBJEXT GENCAT MKINSTALLDIRS INTL_LIBTOOL_SUFFIX_PREFIX CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 BUILD_CC BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_file build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir dep_host_xmake_file dep_tmake_file extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_extra_gcc_objs host_xm_file_list host_xm_file host_xm_defines out_host_hook_obj install lang_options_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_file tm_defines tm_p_file_list tm_p_file xm_file xm_defines c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS'
+ac_subst_files='target_overrides host_overrides language_fragments language_hooks'
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=tree.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+Usage: $0 [OPTION]... [VAR=VALUE]...
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+Defaults for the options are specified in brackets.
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
-# Determine the host, build, and target systems
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+For better control, use the options below.
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
+ cat <<\_ACEOF
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
fi
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:669: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:690: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
+if test -n "$ac_init_help"; then
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:708: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+ cat <<\_ACEOF
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-werror enable -Werror in bootstrap stage2 and later
+ --enable-checking=LIST
+ enable expensive run-time checks. With LIST,
+ enable only specific categories of checks.
+ Categories are: misc,tree,rtl,rtlflag,gc,gcac;
+ default is misc,tree,gc,rtlflag
+ --enable-coverage=LEVEL
+ enable compiler\'s code coverage collection.
+ Use to measure compiler performance and locate
+ unused parts of the compiler. With LEVEL, specify
+ optimization. Values are opt, noopt,
+ default is noopt
+ --enable-multilib enable library support for multiple ABIs
+ --enable-__cxa_atexit enable __cxa_atexit for C++
+ --enable-c-mbchar enable multibyte characters for C and C++
+ --enable-threads enable thread usage for target GCC
+ --enable-threads=LIB use LIB thread package for target GCC
+ --enable-objc-gc enable the use of Boehm's garbage collector with
+ the GNU Objective-C runtime
+ --disable-shared don't provide a shared libgcc
+ --enable-initfini-array use .init_array/.fini_array sections
+ --enable-sjlj-exceptions
+ arrange to use setjmp/longjmp exception handling
+ --enable-libunwind-exceptions force use libunwind for exceptions
+ --enable-nls use Native Language Support (default)
+ --disable-nls do not use Native Language Support
+ --disable-win32-registry
+ disable lookup of installation paths in the
+ Registry on Windows hosts
+ --enable-win32-registry enable registry lookup (default)
+ --enable-win32-registry=KEY
+ use KEY instead of GCC version as the last portion
+ of the registry key
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-version-specific-runtime-libs
+ specify that runtime libraries should be
+ installed in a compiler-specific directory
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-local-prefix=DIR specifies directory to put local include
+ --with-gxx-include-dir=DIR
+ specifies directory to put g++ header files
+ --with-cpp-install-dir=DIR
+ install the user visible C preprocessor in DIR
+ (relative to PREFIX) as well as PREFIX/bin
+ --with-gnu-ld arrange to work with GNU ld.
+ --with-ld arrange to use the specified ld (full pathname)
+ --with-gnu-as arrange to work with GNU as
+ --with-as arrange to use the specified as (full pathname)
+ --with-stabs arrange to use stabs instead of host debug format
+ --with-elf arrange to use ELF instead of host debug format
+ --with-dwarf2 force the default debug format to be DWARF 2
+ --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
+ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
+ --with-included-gettext use the GNU gettext library included here
+ --with-gc={simple,page} choose the garbage collection mechanism to use
+ with the compiler
+ --with-system-zlib use installed libz
+ --with-slibdir=DIR shared libraries in DIR LIBDIR
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
-# Define variables host_canonical and build_canonical
-build_canonical=${build}
-host_canonical=${host}
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+_ACEOF
+fi
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
-target_subdir=
-if test "${host}" != "${target}" ; then
- target_subdir=${target_alias}/
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
fi
-
-# Set program_transform_name
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers auto-host.h:config.in"
+
+
+# Determine the host, build, and target systems
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+# Define variables host_canonical and build_canonical
+build_canonical=${build}
+host_canonical=${host}
+
+
+
+target_subdir=
+if test "${host}" != "${target}" ; then
+ target_subdir=${target_alias}/
+fi
+
+
+# Set program_transform_name
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
# Check for bogus environment variables.
# - one of the terminals (":" and ";") is the first or last sign
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
-echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:773: checking LIBRARY_PATH variable" >&5
+echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
+echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory"
library_path_setting="ok"
;;
esac
-echo "$ac_t""$library_path_setting" 1>&6
+echo "$as_me:$LINENO: result: $library_path_setting" >&5
+echo "${ECHO_T}$library_path_setting" >&6
if test "$library_path_setting" != "ok"; then
-{ echo "configure: error:
+{ { echo "$as_me:$LINENO: error:
+*** LIBRARY_PATH shouldn't contain the current directory when
+*** building gcc. Please change the environment variable
+*** and run configure again." >&5
+echo "$as_me: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
-*** and run configure again." 1>&2; exit 1; }
+*** and run configure again." >&2;}
+ { (exit 1); exit 1; }; }
fi
# Test if GCC_EXEC_PREFIX contains the notation for the current directory
# - one of the terminals (":" and ";") is the first or last sign
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
-echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
-echo "configure:798: checking GCC_EXEC_PREFIX variable" >&5
+echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
+echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory"
gcc_exec_prefix_setting="ok"
;;
esac
-echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
+echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
+echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
if test "$gcc_exec_prefix_setting" != "ok"; then
-{ echo "configure: error:
+{ { echo "$as_me:$LINENO: error:
+*** GCC_EXEC_PREFIX shouldn't contain the current directory when
+*** building gcc. Please change the environment variable
+*** and run configure again." >&5
+echo "$as_me: error:
*** GCC_EXEC_PREFIX shouldn't contain the current directory when
*** building gcc. Please change the environment variable
-*** and run configure again." 1>&2; exit 1; }
+*** and run configure again." >&2;}
+ { (exit 1); exit 1; }; }
fi
# -----------
# Specify the local prefix
local_prefix=
+
# Check whether --with-local-prefix or --without-local-prefix was given.
if test "${with_local_prefix+set}" = set; then
withval="$with_local_prefix"
case "${withval}" in
-yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
+yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
+echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
+ { (exit 1); exit 1; }; } ;;
no) ;;
*) local_prefix=$with_local_prefix ;;
esac
-fi
-
+fi;
# Default local prefix if it is empty
if test x$local_prefix = x; then
# depending on where we built the sources.
gcc_gxx_include_dir=
# Specify the g++ header file directory
+
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
case "${withval}" in
-yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
+yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
+echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
+ { (exit 1); exit 1; }; } ;;
no) ;;
*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
esac
-fi
-
+fi;
if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
fi
fi
+
# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
if test "${with_cpp_install_dir+set}" = set; then
withval="$with_cpp_install_dir"
if test x$withval = xyes; then
- { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
+echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
+ { (exit 1); exit 1; }; }
elif test x$withval != xno; then
cpp_install_dir=$withval
fi
-fi
-
+fi;
# -------------------
# Find default linker
# -------------------
# With GNU ld
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
gnu_ld_flag="$with_gnu_ld"
else
gnu_ld_flag=no
-fi
-
+fi;
# With pre-defined ld
+
# Check whether --with-ld or --without-ld was given.
if test "${with_ld+set}" = set; then
withval="$with_ld"
DEFAULT_LINKER="$with_ld"
-fi
-
+fi;
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test ! -x "$DEFAULT_LINKER"; then
- echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
+ { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
+echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
gnu_ld_flag=yes
fi
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define DEFAULT_LINKER "$DEFAULT_LINKER"
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:907: checking whether a default linker was specified" >&5
+echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
+echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then
- echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
+ echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
+echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
else
- echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
+ echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
+echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
fi
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# ----------------------
# ----------------------
# With GNU as
+
# Check whether --with-gnu-as or --without-gnu-as was given.
if test "${with_gnu_as+set}" = set; then
withval="$with_gnu_as"
gas_flag="$with_gnu_as"
else
gas_flag=no
-fi
+fi;
# Check whether --with-as or --without-as was given.
if test "${with_as+set}" = set; then
withval="$with_as"
DEFAULT_ASSEMBLER="$with_as"
-fi
-
+fi;
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test ! -x "$DEFAULT_ASSEMBLER"; then
- echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
+ { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
+echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
gas_flag=yes
fi
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:951: checking whether a default assembler was specified" >&5
+echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
+echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then
- echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
+ echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
+echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
else
- echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
+ echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
+echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
fi
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# ---------------
# ---------------
# Find the native compiler
-# Extract the first word of "gcc", so it can be a program name with args.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # 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
-echo "configure:970: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1000: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1051: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+
+ test -n "$CC" && break
+ done
fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ test -n "$ac_ct_CC" && break
+done
-cat > conftest.$ac_ext << EOF
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#line 1094 "configure"
-#include "confdefs.h"
+int
+main ()
+{
-main(){return(0);}
-EOF
-if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
+int
+main ()
+{
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1130: checking whether we are using GNU C" >&5
-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 { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- ac_cv_prog_gcc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1158: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_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
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$CC" != xcc; then
- echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1191: checking whether $CC and cc understand -c and -o together" >&5
+ echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
else
- echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1194: checking whether cc understands -c and -o together" >&5
+ echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
fi
-set dummy $CC; ac_cc="`echo $2 |
- sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
-if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'foo(){}' > conftest.c
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
-ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
- ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+ if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
then
# cc works too.
:
fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
#define NO_MINUS_C_MINUS_O 1
-EOF
+_ACEOF
fi
# Check C compiler features
# -------------------------
-echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1255: checking whether ${CC-cc} accepts -Wno-long-long" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5
+echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_no_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-long-long"
-cat > conftest.$ac_ext <<EOF
-#line 1262 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_no_long_long=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_prog_cc_no_long_long=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_no_long_long=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6
-echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1285: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1300 "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:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1317 "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:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1334 "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:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
- CPP="$ac_cv_prog_CPP"
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- ac_cv_prog_CPP="$CPP"
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$CPP" 1>&6
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1365: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1372 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
+ no)
+cat >>confdefs.h <<\_ACEOF
+#define inline
+_ACEOF
;;
- *) cat >> confdefs.h <<EOF
+ *) cat >>confdefs.h <<_ACEOF
#define inline $ac_cv_c_inline
-EOF
+_ACEOF
;;
esac
-echo $ac_n "checking for volatile""... $ac_c" 1>&6
-echo "configure:1405: checking for volatile" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for volatile" >&5
+echo $ECHO_N "checking for volatile... $ECHO_C" >&6
+if test "${gcc_cv_c_volatile+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1410 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
volatile int foo;
-; return 0; }
-EOF
-if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_c_volatile=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_c_volatile=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_c_volatile=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$gcc_cv_c_volatile" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_c_volatile" >&5
+echo "${ECHO_T}$gcc_cv_c_volatile" >&6
if test $gcc_cv_c_volatile = yes ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_VOLATILE 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for long double""... $ac_c" 1>&6
-echo "configure:1439: checking for long double" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6
+if test "${gcc_cv_c_long_double+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$GCC" = yes; then
gcc_cv_c_long_double=yes
else
-cat > conftest.$ac_ext <<EOF
-#line 1447 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 0.0;
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
-; return 0; }
-EOF
-if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_c_long_double=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_c_long_double=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_c_long_double=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
fi
-
-echo "$ac_t""$gcc_cv_c_long_double" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_c_long_double" >&5
+echo "${ECHO_T}$gcc_cv_c_long_double" >&6
if test $gcc_cv_c_long_double = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_DOUBLE 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for long long int""... $ac_c" 1>&6
-echo "configure:1479: checking for long long int" >&5
-if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6
+if test "${ac_cv_c_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1484 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
long long int i;
-; return 0; }
-EOF
-if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_long_long=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_long_long=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_long_long=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_long_long" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
+echo "${ECHO_T}$ac_cv_c_long_long" >&6
if test $ac_cv_c_long_long = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_LONG 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for __int64""... $ac_c" 1>&6
-echo "configure:1511: checking for __int64" >&5
-if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1516 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for __int64" >&5
+echo $ECHO_N "checking for __int64... $ECHO_C" >&6
+if test "${ac_cv_c___int64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
__int64 i;
-; return 0; }
-EOF
-if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c___int64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c___int64=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c___int64=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c___int64" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
+echo "${ECHO_T}$ac_cv_c___int64" >&6
if test $ac_cv_c___int64 = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE___INT64 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
-echo "configure:1544: checking for built-in _Bool" >&5
-if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for built-in _Bool" >&5
+echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6
+if test "${gcc_cv_c__bool+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1549 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
_Bool foo;
-; return 0; }
-EOF
-if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_c__bool=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_c__bool=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+gcc_cv_c__bool=no
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$ac_t""$gcc_cv_c__bool" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5
+echo "${ECHO_T}$gcc_cv_c__bool" >&6
if test $gcc_cv_c__bool = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE__BOOL 1
-EOF
+_ACEOF
fi
# sizeof(char) is 1 by definition.
-echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1580: checking size of short" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 1586 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (short) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_short=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_short != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_short = x ; then
- { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
+echo "$as_me: error: cannot determine a size for short" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_short" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
-EOF
+_ACEOF
-echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1619: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 1625 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (int) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:1635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_int=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_int != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_int = x ; then
- { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
+echo "$as_me: error: cannot determine a size for int" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
-EOF
+_ACEOF
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1658: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 1664 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_long=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long = x ; then
- { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
+echo "$as_me: error: cannot determine a size for long" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
+_ACEOF
if test $ac_cv_c_long_long = yes; then
- echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1698: checking size of long long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 1704 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (long long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_long_long=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_long_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long_long = x ; then
- { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
+echo "$as_me: error: cannot determine a size for long long" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-EOF
+_ACEOF
fi
if test $ac_cv_c___int64 = yes; then
- echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:1739: checking size of __int64" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking size of __int64" >&5
+echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
+if test "${ac_cv_sizeof___int64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 1745 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (__int64) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof___int64=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof___int64 != x ; then break; fi
done
fi
if test x$ac_cv_sizeof___int64 = x ; then
- { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
+echo "$as_me: error: cannot determine a size for __int64" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
+echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF___INT64 $ac_cv_sizeof___int64
-EOF
+_ACEOF
fi
-echo $ac_n "checking execution character set""... $ac_c" 1>&6
-echo "configure:1780: checking execution character set" >&5
-if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1785 "configure"
-#include "confdefs.h"
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking execution character set" >&5
+echo $ECHO_N "checking execution character set... $ECHO_C" >&6
+if test "${ac_cv_c_charset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
&& 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
ASCII
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "ASCII" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "ASCII" >/dev/null 2>&1; then
ac_cv_c_charset=ASCII
fi
rm -f conftest*
if test x${ac_cv_c_charset+set} != xset; then
- cat > conftest.$ac_ext <<EOF
-#line 1801 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
&& 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
EBCDIC
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "EBCDIC" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "EBCDIC" >/dev/null 2>&1; then
ac_cv_c_charset=EBCDIC
fi
rm -f conftest*
ac_cv_c_charset=unknown
fi
fi
-
-echo "$ac_t""$ac_cv_c_charset" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_charset" >&5
+echo "${ECHO_T}$ac_cv_c_charset" >&6
if test $ac_cv_c_charset = unknown; then
- { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: *** Cannot determine host character set." >&5
+echo "$as_me: error: *** Cannot determine host character set." >&2;}
+ { (exit 1); exit 1; }; }
elif test $ac_cv_c_charset = EBCDIC; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HOST_EBCDIC 1
-EOF
+_ACEOF
fi
# -----------------
# See if GNAT has been installed
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1846: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GNATBIND"; then
ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GNATBIND="$ac_cv_prog_GNATBIND"
+GNATBIND=$ac_cv_prog_GNATBIND
if test -n "$GNATBIND"; then
- echo "$ac_t""$GNATBIND" 1>&6
+ echo "$as_me:$LINENO: result: $GNATBIND" >&5
+echo "${ECHO_T}$GNATBIND" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_GNATBIND"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_GNATBIND=$GNATBIND
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1878: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$GNATBIND"; then
- ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
+ if test -n "$ac_ct_GNATBIND"; then
+ ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_GNATBIND="gnatbind"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_GNATBIND="gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
fi
fi
-GNATBIND="$ac_cv_prog_GNATBIND"
-if test -n "$GNATBIND"; then
- echo "$ac_t""$GNATBIND" 1>&6
+ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
+if test -n "$ac_ct_GNATBIND"; then
+ echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
+echo "${ECHO_T}$ac_ct_GNATBIND" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ GNATBIND=$ac_ct_GNATBIND
else
- GNATBIND="no"
-fi
+ GNATBIND="$ac_cv_prog_GNATBIND"
fi
-echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
-echo "configure:1911: checking for compiler driver that understands Ada" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for compiler driver that understands Ada" >&5
+echo $ECHO_N "checking for compiler driver that understands Ada... $ECHO_C" >&6
+if test "${gcc_cv_prog_adac+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
done
rm -f conftest.*
fi
-
-echo "$ac_t""$gcc_cv_prog_adac" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_prog_adac" >&5
+echo "${ECHO_T}$gcc_cv_prog_adac" >&6
ADAC=$gcc_cv_prog_adac
fi
-if test x$have_gnat != xno ; then
-echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1954: checking whether ${ADAC} accepts -Wno-long-long" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test x$have_gnat != xno ; then
+echo "$as_me:$LINENO: checking whether ${ADAC} accepts -Wno-long-long" >&5
+echo $ECHO_N "checking whether ${ADAC} accepts -Wno-long-long... $ECHO_C" >&6
+if test "${ac_cv_prog_adac_no_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_prog_adac_no_long_long" >&5
+echo "${ECHO_T}$ac_cv_prog_adac_no_long_long" >&6
else
ac_cv_prog_adac_no_long_long=yes
fi
fi
-# If the native compiler is GCC, we can enable warnings even in stage1.
+# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
warn_cflags=
# Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then
enableval="$enable_werror"
- :
+
else
enable_werror=yes
-fi
-
+fi;
if test x$enable_werror = xyes ; then
WERROR=-Werror
fi
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
valgrind) ac_checking_valgrind=1 ;;
- *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
+echo "$as_me: error: unknown check category $check" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
done
;;
else
# Enable some checks by default for development versions of GCC
ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
-fi
-
+fi;
nocommon_flag=""
if test x$ac_checking != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_CHECKING 1
-EOF
+_ACEOF
nocommon_flag=-fno-common
fi
if test x$ac_tree_checking != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_TREE_CHECKING 1
-EOF
+_ACEOF
fi
if test x$ac_rtl_checking != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_RTL_CHECKING 1
-EOF
+_ACEOF
fi
if test x$ac_rtlflag_checking != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_RTL_FLAG_CHECKING 1
-EOF
+_ACEOF
fi
if test x$ac_gc_checking != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_GC_CHECKING 1
-EOF
+_ACEOF
fi
if test x$ac_gc_always_collect != x ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_GC_ALWAYS_COLLECT 1
-EOF
+_ACEOF
fi
valgrind_path_defines=
if test x$ac_checking_valgrind != x ; then
# It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both.
- echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
-echo "configure:2092: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2094 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
+echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <memcheck.h>
#ifndef VALGRIND_DISCARD
#error VALGRIND_DISCARD not defined
#endif
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
gcc_cv_header_memcheck_h=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_header_memcheck_h=no
-fi
-rm -f conftest*
- echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
- ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
-echo "configure:2118: checking for valgrind.h" >&5
-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 2123 "configure"
-#include "confdefs.h"
-#include <valgrind.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gcc_cv_header_memcheck_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
+echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
+ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_valgrind_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for valgrind.h" >&5
+echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
+if test "${ac_cv_header_valgrind_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
+echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking valgrind.h usability" >&5
+echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <valgrind.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking valgrind.h presence" >&5
+echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <valgrind.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for valgrind.h" >&5
+echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
+if test "${ac_cv_header_valgrind_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_valgrind_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
+echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_valgrind_h = yes; then
have_valgrind_h=yes
else
- echo "$ac_t""no" 1>&6
-have_valgrind_h=no
+ have_valgrind_h=no
fi
+
# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2153: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_valgrind_path+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$valgrind_path" in
/*)
fi
valgrind_path="$ac_cv_path_valgrind_path"
if test -n "$valgrind_path"; then
- echo "$ac_t""$valgrind_path" 1>&6
+ echo "$as_me:$LINENO: result: $valgrind_path" >&5
+echo "${ECHO_T}$valgrind_path" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
- { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind.h/memcheck.h" >&5
+echo "$as_me: error: *** Can't find both valgrind and valgrind.h/memcheck.h" >&2;}
+ { (exit 1); exit 1; }; }
fi
valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
valgrind_command="$valgrind_path -q"
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_VALGRIND_CHECKING 1
-EOF
+_ACEOF
if test $gcc_cv_header_memcheck_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MEMCHECK_H 1
-EOF
+_ACEOF
fi
fi
coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
;;
*)
- { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
+echo "$as_me: error: unknown coverage setting $enableval" >&2;}
+ { (exit 1); exit 1; }; }
;;
esac
else
coverage_flags=""
-fi
-
+fi;
# -------------------------------
# -------------------------------
# With stabs
+
# Check whether --with-stabs or --without-stabs was given.
if test "${with_stabs+set}" = set; then
withval="$with_stabs"
stabs="$with_stabs"
else
stabs=no
-fi
-
+fi;
# With ELF
+
# Check whether --with-elf or --without-elf was given.
if test "${with_elf+set}" = set; then
withval="$with_elf"
elf="$with_elf"
else
elf=no
-fi
-
+fi;
# Determine whether or not multilibs are enabled.
# Check whether --enable-multilib or --disable-multilib was given.
if test "${enable_multilib+set}" = set; then
enableval="$enable_multilib"
- :
+
else
enable_multilib=yes
-fi
-
+fi;
# Enable __cxa_atexit for C++.
# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
if test "${enable___cxa_atexit+set}" = set; then
enableval="$enable___cxa_atexit"
- :
-fi
+fi;
if test x$enable___cxa_atexit = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define DEFAULT_USE_CXA_ATEXIT 1
-EOF
+_ACEOF
fi
-
+
# Enable Multibyte Characters for C/C++
# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
if test "${enable_c_mbchar+set}" = set; then
enableval="$enable_c_mbchar"
if test x$enable_c_mbchar != xno; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define MULTIBYTE_CHARS 1
-EOF
+_ACEOF
fi
-fi
+fi;
-
# Enable threads
# Pass with no value to take the default
# Pass with a value to specify a thread package
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
- :
+
else
enable_threads=''
-fi
-
+fi;
enable_threads_flag=$enable_threads
# Check if a valid thread package
fi
else
objc_boehm_gc=''
-fi
+fi;
# Check whether --with-dwarf2 or --without-dwarf2 was given.
dwarf2="$with_dwarf2"
else
dwarf2=no
-fi
-
+fi;
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
-
+
case $enable_shared in
yes | no) ;;
*)
else
enable_shared=yes
-fi
+fi;
# Check whether --with-sysroot or --without-sysroot was given.
if test "${with_sysroot+set}" = set; then
withval="$with_sysroot"
-
+
case ${with_sysroot} in
yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
*) TARGET_SYSTEM_ROOT=$with_sysroot ;;
esac
-
+
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
esac
else
-
+
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE=
CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
-fi
-
+fi;
# Checks for other programs
# -------------------------
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2410: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
# Find some useful tools
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2443: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AWK="$ac_cv_prog_AWK"
+AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$AWK" && break
+ test -n "$AWK" && break
done
-echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:2473: checking whether ln works" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ln works" >&5
+echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
+if test "${gcc_cv_prog_LN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftestdata_t
echo >conftestdata_f
fi
LN="$gcc_cv_prog_LN"
if test "$gcc_cv_prog_LN" = "ln"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
if test "$gcc_cv_prog_LN" = "ln -s"; then
- echo "$ac_t""no, using ln -s" 1>&6
+ echo "$as_me:$LINENO: result: no, using ln -s" >&5
+echo "${ECHO_T}no, using ln -s" >&6
else
- echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
+ echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5
+echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6
fi
fi
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2505: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+if test "${gcc_cv_prog_LN_S+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftestdata_t
echo >conftestdata_f
fi
LN_S="$gcc_cv_prog_LN_S"
if test "$gcc_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
if test "$gcc_cv_prog_LN_S" = "ln"; then
- echo "$ac_t""no, using ln" 1>&6
+ echo "$as_me:$LINENO: result: no, using ln" >&5
+echo "${ECHO_T}no, using ln" >&6
else
- echo "$ac_t""no, and neither does ln, so using cp" 1>&6
+ echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
+echo "${ECHO_T}no, and neither does ln, so using cp" >&6
fi
fi
-# 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
-echo "configure:2539: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
fi
# Find a good install program. We prefer a C program (faster),
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2577: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
INSTALL="$ac_install_sh"
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
# See if we have the mktemp command.
# Extract the first word of "mktemp", so it can be a program name with args.
set dummy mktemp; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$have_mktemp_command"; then
ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_have_mktemp_command="yes"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_have_mktemp_command="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
fi
fi
-have_mktemp_command="$ac_cv_prog_have_mktemp_command"
+have_mktemp_command=$ac_cv_prog_have_mktemp_command
if test -n "$have_mktemp_command"; then
- echo "$ac_t""$have_mktemp_command" 1>&6
+ echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
+echo "${ECHO_T}$have_mktemp_command" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test -f $srcdir/../texinfo/Makefile.in; then
MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
gcc_cv_prog_makeinfo_modern=yes
- echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
+ echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5
+echo "${ECHO_T}Using makeinfo from the unified source tree." >&6
else
# See if makeinfo has been installed and is modern enough
# that we can use it.
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2670: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$MAKEINFO"; then
ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_MAKEINFO="makeinfo"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEINFO="makeinfo"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-MAKEINFO="$ac_cv_prog_MAKEINFO"
+MAKEINFO=$ac_cv_prog_MAKEINFO
if test -n "$MAKEINFO"; then
- echo "$ac_t""$MAKEINFO" 1>&6
+ echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test -n "$MAKEINFO"; then
# Found it, now check the version.
- echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
-echo "configure:2699: checking for modern makeinfo" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for modern makeinfo" >&5
+echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
+if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- echo "configure:2705: version of makeinfo is $ac_prog_version" >&5
+ echo "configure:4986: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
esac
fi
-
-echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
+echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
else
gcc_cv_prog_makeinfo_modern=no
fi
fi
if test $gcc_cv_prog_makeinfo_modern = no; then
- echo "configure: warning:
+ { echo "$as_me:$LINENO: WARNING:
*** Makeinfo is missing or too old.
-*** Info documentation will not be built." 1>&2
+*** Info documentation will not be built." >&5
+echo "$as_me: WARNING:
+*** Makeinfo is missing or too old.
+*** Info documentation will not be built." >&2;}
BUILD_INFO=
else
- BUILD_INFO=info
+ BUILD_INFO=info
fi
# Is pod2man recent enough to regenerate manpages?
-echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
-echo "configure:2733: checking for recent Pod::Man" >&5
+echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
+echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
- echo "$ac_t""yes" 1>&6
- GENERATED_MANPAGES=generated-manpages
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ GENERATED_MANPAGES=generated-manpages
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
GENERATED_MANPAGES=
fi
# skip bytes instead of using tail. The test being performed is
# "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
# but we need to sink errors and handle broken shells.
-echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
-echo "configure:2747: checking for cmp's capabilities" >&5
+echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
+echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
echo abfoo >t1
echo cdfoo >t2
if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
fi
rm t1 t2
-echo "$ac_t""$make_compare_target" 1>&6
+echo "$as_me:$LINENO: result: $make_compare_target" >&5
+echo "${ECHO_T}$make_compare_target" >&6
# How about lex?
if test -f $srcdir/../flex/skel.c; then
else
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2770: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_FLEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$FLEX"; then
ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_FLEX="flex"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_FLEX="flex"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
fi
fi
-FLEX="$ac_cv_prog_FLEX"
+FLEX=$ac_cv_prog_FLEX
if test -n "$FLEX"; then
- echo "$ac_t""$FLEX" 1>&6
+ echo "$as_me:$LINENO: result: $FLEX" >&5
+echo "${ECHO_T}$FLEX" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
else
# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2807: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_BISON+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$BISON"; then
ac_cv_prog_BISON="$BISON" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_BISON="bison"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_BISON="bison"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
fi
fi
-BISON="$ac_cv_prog_BISON"
+BISON=$ac_cv_prog_BISON
if test -n "$BISON"; then
- echo "$ac_t""$BISON" 1>&6
+ echo "$as_me:$LINENO: result: $BISON" >&5
+echo "${ECHO_T}$BISON" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
# Checks for C headers
# --------------------
-echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
-echo "configure:2841: checking for GNU C library" >&5
-if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2846 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for GNU C library" >&5
+echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
+if test "${gcc_cv_glibc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <features.h>
-int main() {
+int
+main ()
+{
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
#error Not a GNU C library system
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_glibc=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_glibc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_glibc=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$gcc_cv_glibc" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
+echo "${ECHO_T}$gcc_cv_glibc" >&6
if test $gcc_cv_glibc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define _GNU_SOURCE 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2877: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2907 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2946 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-EOF
-if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2981: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2986 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_time=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define TIME_WITH_SYS_TIME 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
-echo "configure:3016: checking for working stdbool.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working stdbool.h" >&5
+echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdbool_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3021 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdbool.h>
-int main() {
+int
+main ()
+{
bool foo = false;
-; return 0; }
-EOF
-if { (eval echo configure:3028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdbool_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdbool_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdbool_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
if test $ac_cv_header_stdbool_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STDBOOL_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:3049: checking whether string.h and strings.h may both be included" >&5
-if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
+echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
+if test "${gcc_cv_header_string+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3054 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
#include <strings.h>
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_header_string=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_header_string=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_header_string=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$gcc_cv_header_string" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
+echo "${ECHO_T}$gcc_cv_header_string" >&6
if test $gcc_cv_header_string = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STRING_WITH_STRINGS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3083: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3088 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_sys_wait_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_WAIT_H 1
-EOF
+_ACEOF
fi
-for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h ldfcn.h wchar.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3131: checking for $ac_hdr" >&5
-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 3136 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
# Check for thread headers.
-ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for thread.h""... $ac_c" 1>&6
-echo "configure:3171: checking for thread.h" >&5
-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 3176 "configure"
-#include "confdefs.h"
+if test "${ac_cv_header_thread_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for thread.h" >&5
+echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
+if test "${ac_cv_header_thread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
+echo "${ECHO_T}$ac_cv_header_thread_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking thread.h usability" >&5
+echo $ECHO_N "checking thread.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <thread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking thread.h presence" >&5
+echo $ECHO_N "checking thread.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <thread.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: thread.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: thread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: thread.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: thread.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: thread.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: thread.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: thread.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: thread.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: thread.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: thread.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for thread.h" >&5
+echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
+if test "${ac_cv_header_thread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_thread_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
+echo "${ECHO_T}$ac_cv_header_thread_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_thread_h = yes; then
have_thread_h=yes
else
- echo "$ac_t""no" 1>&6
-have_thread_h=
+ have_thread_h=
fi
-ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:3205: checking for pthread.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3210 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking pthread.h usability" >&5
+echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <pthread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking pthread.h presence" >&5
+echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_pthread_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_pthread_h = yes; then
have_pthread_h=yes
else
- echo "$ac_t""no" 1>&6
-have_pthread_h=
+ have_pthread_h=
fi
+
# These tests can't be done till we know if we have limits.h.
-echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
-echo "configure:3240: checking for CHAR_BIT" >&5
-if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3245 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
+echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
+if test "${gcc_cv_decl_char_bit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef CHAR_BIT
found
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "found" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "found" >/dev/null 2>&1; then
gcc_cv_decl_char_bit=yes
else
- rm -rf conftest*
gcc_cv_decl_char_bit=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
+echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
if test $gcc_cv_decl_char_bit = no; then
- echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
-echo "configure:3270: checking number of bits in a byte" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking number of bits in a byte" >&5
+echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
+if test "${gcc_cv_c_nbby+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
i=8
gcc_cv_c_nbby=
while test $i -lt 65; do
- cat > conftest.$ac_ext <<EOF
-#line 3278 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
switch(0) {
case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
; }
-; return 0; }
-EOF
-if { (eval echo configure:3288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_c_nbby=$i; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
i=`expr $i + 1`
done
test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
fi
-
-echo "$ac_t""$gcc_cv_c_nbby" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
+echo "${ECHO_T}$gcc_cv_c_nbby" >&6
if test $gcc_cv_c_nbby = failed; then
- { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
+echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define CHAR_BIT $gcc_cv_c_nbby
-EOF
+_ACEOF
fi
fi
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3313: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3320 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3335 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
- echo $ac_n "cross-compiling... " 2>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
-#include "confdefs.h"
+ echo $ac_n "cross-compiling... " 2>&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main () {
/* Are we little or big endian? From Harbison&Steele. */
union
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}
-EOF
-if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = unknown; then
-echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
-echo "configure:3397: checking to probe for byte ordering" >&5
+echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
+echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
echo $ac_n 'guessing bigendian ... ' >&6
fi
fi
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
fi
if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HOST_WORDS_BIG_ENDIAN 1
-EOF
+_ACEOF
BYTEORDER=4321
else
BYTEORDER=1234
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define BYTEORDER $BYTEORDER
-EOF
+_ACEOF
if test $ac_cv_c_bigendian = unknown; then
- { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
+echo "$as_me: error: unknown endianess - sorry" >&2;}
+ { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
fi
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
-echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
-echo "configure:3477: checking for collect2 libraries" >&5
-if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for collect2 libraries" >&5
+echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
+if test "${gcc_cv_collect2_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_LIBS="$LIBS"
for libs in '' -lld -lmld \
'-L/usr/lib/cmplrs/cc3.11 -lmld'
do
LIBS="$libs"
- cat > conftest.$ac_ext <<EOF
-#line 3488 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char ldopen();
-
-int main() {
-ldopen()
-; return 0; }
-EOF
-if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char ldopen ();
+int
+main ()
+{
+ldopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_collect2_libs="$libs"; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
LIBS="$save_LIBS"
test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
fi
-
-echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
+echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
case $gcc_cv_collect2_libs in
"none required") ;;
*) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
# -lexc. So test for it.
save_LIBS="$LIBS"
LIBS=
+echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
+echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
+if test "${ac_cv_search_exc_resume+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_exc_resume=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
-echo "configure:3525: checking for library containing exc_resume" >&5
-if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_exc_resume="no"
-cat > conftest.$ac_ext <<EOF
-#line 3532 "configure"
-#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char exc_resume();
-
-int main() {
-exc_resume()
-; return 0; }
-EOF
-if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char exc_resume ();
+int
+main ()
+{
+exc_resume ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_search_exc_resume="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3554 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_exc_resume" = no; then
+ for ac_lib in exc; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char exc_resume();
-
-int main() {
-exc_resume()
-; return 0; }
-EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_exc_resume="-l$i"
+ builtin and then its argument prototype would still apply. */
+char exc_resume ();
+int
+main ()
+{
+exc_resume ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_exc_resume="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
-if test "$ac_cv_search_exc_resume" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
+echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
+if test "$ac_cv_search_exc_resume" != no; then
test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
-
-else :
-
+
fi
+
GNAT_LIBEXC="$LIBS"
LIBS="$save_LIBS"
# they're both in the same place. jcf-dump needs them.
save_LIBS="$LIBS"
LIBS=
+echo "$as_me:$LINENO: checking for library containing ldexp" >&5
+echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
+if test "${ac_cv_search_ldexp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_ldexp=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
-echo "configure:3595: checking for library containing ldexp" >&5
-if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_ldexp="no"
-cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
-#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char ldexp();
-
-int main() {
-ldexp()
-; return 0; }
-EOF
-if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char ldexp ();
+int
+main ()
+{
+ldexp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_search_ldexp="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-test "$ac_cv_search_ldexp" = "no" && for i in m; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3624 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_ldexp" = no; then
+ for ac_lib in m; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char ldexp();
-
-int main() {
-ldexp()
-; return 0; }
-EOF
-if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_ldexp="-l$i"
+ builtin and then its argument prototype would still apply. */
+char ldexp ();
+int
+main ()
+{
+ldexp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_ldexp="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_ldexp" 1>&6
-if test "$ac_cv_search_ldexp" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
+echo "${ECHO_T}$ac_cv_search_ldexp" >&6
+if test "$ac_cv_search_ldexp" != no; then
test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
-
-else :
-
+
fi
+
LDEXP_LIB="$LIBS"
LIBS="$save_LIBS"
# See if the stage1 system preprocessor understands the ANSI C
# preprocessor stringification operator. (Used by symcat.h.)
-
-
-echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
-echo "configure:3664: checking for preprocessor stringizing operator" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3669 "configure"
-#include "confdefs.h"
-
+echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
+if test "${ac_cv_c_stringize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define x(y) #y
char *s = x(teststring);
-
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "#teststring" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "#teststring" >/dev/null 2>&1; then
ac_cv_c_stringize=no
else
- rm -rf conftest*
ac_cv_c_stringize=yes
fi
rm -f conftest*
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+echo "${ECHO_T}$ac_cv_c_stringize" >&6
+if test $ac_cv_c_stringize = yes; then
-if test "${ac_cv_c_stringize}" = yes
-then
- cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRINGIZE 1
-EOF
+_ACEOF
fi
-echo "$ac_t""${ac_cv_c_stringize}" 1>&6
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
-echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
-echo "configure:3702: checking for inttypes.h" >&5
-if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3707 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${gcc_cv_header_inttypes_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <inttypes.h>
-int main() {
+int
+main ()
+{
intmax_t i = -1;
-; return 0; }
-EOF
-if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_header_inttypes_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_header_inttypes_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_header_inttypes_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
if test $gcc_cv_header_inttypes_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_INTTYPES_H 1
-EOF
+_ACEOF
fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
scandir alphasort gettimeofday mbstowcs wcswidth
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3742: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3747 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test x$ac_cv_func_mbstowcs = xyes; then
- echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
-echo "configure:3797: checking whether mbstowcs works" >&5
-if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
+echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
+if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
gcc_cv_func_mbstowcs_works=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 3805 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
int main()
{
mbstowcs(0, "", 0);
return 0;
}
-EOF
-if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_func_mbstowcs_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- gcc_cv_func_mbstowcs_works=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gcc_cv_func_mbstowcs_works=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
+echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
if test x$gcc_cv_func_mbstowcs_works = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_WORKING_MBSTOWCS 1
-EOF
+_ACEOF
fi
fi
-echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3838: checking for ssize_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${ac_cv_type_ssize_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3843 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((ssize_t *) 0)
+ return 0;
+if (sizeof (ssize_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_ssize_t=yes
else
- rm -rf conftest*
- ac_cv_type_ssize_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_ssize_t=no
fi
-echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
-if test $ac_cv_type_ssize_t = no; then
- cat >> confdefs.h <<\EOF
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
+if test $ac_cv_type_ssize_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define ssize_t int
-EOF
+_ACEOF
fi
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
-echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3874: checking for uid_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3879 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
+if test "${ac_cv_type_uid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
- rm -rf conftest*
ac_cv_type_uid_t=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+echo "${ECHO_T}$ac_cv_type_uid_t" >&6
if test $ac_cv_type_uid_t = no; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define uid_t int
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define gid_t int
-EOF
+_ACEOF
fi
-echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:3908: checking type of array argument to getgroups" >&5
-if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
+echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
+if test "${ac_cv_type_getgroups+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_type_getgroups=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 3916 "configure"
-#include "confdefs.h"
-
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Thanks to Mike Rendell for this test. */
#include <sys/types.h>
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
-main()
+
+int
+main ()
{
gid_t gidset[NGID];
int i, n;
happens when gid_t is short but getgroups modifies an array of ints. */
exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
}
-
-EOF
-if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_type_getgroups=gid_t
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_getgroups=gid_t
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_type_getgroups=int
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_type_getgroups=int
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
if test $ac_cv_type_getgroups = cross; then
- cat > conftest.$ac_ext <<EOF
-#line 3955 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
ac_cv_type_getgroups=gid_t
else
- rm -rf conftest*
ac_cv_type_getgroups=int
fi
rm -f conftest*
fi
fi
+echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
+echo "${ECHO_T}$ac_cv_type_getgroups" >&6
-echo "$ac_t""$ac_cv_type_getgroups" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define GETGROUPS_T $ac_cv_type_getgroups
-EOF
+_ACEOF
if test "${target}" = "${build}"; then
fi
-echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:3996: checking whether the printf functions support %p" >&5
-if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
+echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
+if test "${gcc_cv_func_printf_ptr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
gcc_cv_func_printf_ptr=no
else
- cat > conftest.$ac_ext <<EOF
-#line 4004 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
int main()
sscanf(buf, "%p", &q);
return (p != q);
}
-EOF
-if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_func_printf_ptr=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- gcc_cv_func_printf_ptr=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gcc_cv_func_printf_ptr=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core core.* *.core
fi
-
-echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
+echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
if test $gcc_cv_func_printf_ptr = yes ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRINTF_PTR 1
-EOF
+_ACEOF
fi
case "${host}" in
*-*-uwin*)
- { echo "configure: error:
+ { { echo "$as_me:$LINENO: error:
+*** UWIN may not be used as a host platform because
+*** linking with posix.dll is not allowed by the GNU GPL" >&5
+echo "$as_me: error:
*** UWIN may not be used as a host platform because
-*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
+*** linking with posix.dll is not allowed by the GNU GPL" >&2;}
+ { (exit 1); exit 1; }; }
;;
*-*-*vms*)
- # Under VMS, vfork works very different than on Unix. The standard test
+ # Under VMS, vfork works very different than on Unix. The standard test
# won't work, and it isn't easily adaptable. It makes more sense to
# just force it.
ac_cv_func_vfork_works=yes
;;
esac
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4055: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4060 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+ return 0;
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_pid_t=yes
else
- rm -rf conftest*
- ac_cv_type_pid_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_pid_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define pid_t int
-EOF
+_ACEOF
fi
-ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:4089: checking for vfork.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 4094 "configure"
-#include "confdefs.h"
-#include <vfork.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_VFORK_H 1
-EOF
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-else
- echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:4124: checking for working vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:4130: checking for vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4135 "configure"
-#include "confdefs.h"
+done
+
+
+
+for ac_func in fork vfork
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vfork(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char vfork();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_vfork) || defined (__stub___vfork)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-vfork();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_vfork=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vfork=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
+if test "x$ac_cv_func_fork" = xyes; then
+ echo "$as_me:$LINENO: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_fork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* By Ruediger Kuhlmann. */
+ #include <sys/types.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ /* Some systems only have a dummy stub for fork() */
+ int main ()
+ {
+ if (fork() < 0)
+ exit (1);
+ exit (0);
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fork_works=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fork_works=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
-
ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ echo "$as_me:$LINENO: checking for working vfork" >&5
+echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
+if test "${ac_cv_func_vfork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 4180 "configure"
-#include "confdefs.h"
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_vfork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#include <sys/wait.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
#endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
+#if HAVE_VFORK_H
+# include <vfork.h>
#endif
/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent.
- The compiler is told about this with #include <vfork.h>,
- but some compilers (e.g. gcc -O) don't grok <vfork.h>.
- Test for this by using a static variable whose address
- is put into a register that is clobbered by the vfork. */
-static
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
#ifdef __cplusplus
sparc_address_test (int arg)
-#else
+# else
sparc_address_test (arg) int arg;
#endif
{
}
}
}
-main() {
+
+int
+main ()
+{
pid_t parent = getpid ();
pid_t child;
- sparc_address_test ();
+ sparc_address_test (0);
child = vfork ();
if (child == 0) {
- /* Here is another test for sparc vfork register problems.
- This test uses lots of local variables, at least
- as many local variables as main has allocated so far
- including compiler temporaries. 4 locals are enough for
- gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
- A buggy compiler should reuse the register of parent
- for one of the local variables, since it will think that
- parent can't possibly be used any more in this routine.
- Assigning to the local variable will thus munge parent
- in the parent process. */
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
pid_t
p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
|| p != p5 || p != p6 || p != p7)
_exit(1);
- /* On some systems (e.g. IRIX 3.3),
- vfork doesn't separate parent from child file descriptors.
- If the child closes a descriptor before it execs or exits,
- this munges the parent's descriptor as well.
- Test for this by closing stdout in the child. */
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
_exit(close(fileno(stdout)) != 0);
} else {
int status;
);
}
}
-EOF
-if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_vfork_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_vfork_works=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_vfork_works=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
+echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=ac_cv_func_vfork
+ { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
-if test $ac_cv_func_vfork_works = no; then
- cat >> confdefs.h <<\EOF
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_VFORK 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
#define vfork fork
-EOF
+_ACEOF
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_FORK 1
+_ACEOF
fi
+
for ac_func in getpagesize
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4300: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4305 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
x[0] = 1;
perror_exit ("test 3 no fault 1", 19);
}
-
+
signal (SIGSEGV, sigsegv);
if (setjmp (r) == 0)
{
}
EOF
-echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
-echo "configure:4599: checking for working mmap from /dev/zero" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working mmap from /dev/zero" >&5
+echo $ECHO_N "checking for working mmap from /dev/zero... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_dev_zero+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
# When cross-building, assume that this works, unless we know it
* ) ac_cv_func_mmap_dev_zero=yes ;;
esac
else
- cat > conftest.$ac_ext <<EOF
-#line 4614 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "ct-mmap.inc"
-EOF
-if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_dev_zero=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- if test $? -lt 4
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test $? -lt 4
then ac_cv_func_mmap_dev_zero=no
else ac_cv_func_mmap_dev_zero=buggy
fi
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_dev_zero" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_dev_zero" >&6
if test $ac_cv_func_mmap_dev_zero = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP_DEV_ZERO 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
-echo "configure:4645: checking for working mmap with MAP_ANON(YMOUS)" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working mmap with MAP_ANON(YMOUS)" >&5
+echo $ECHO_N "checking for working mmap with MAP_ANON(YMOUS)... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_anon+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
# Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
* ) ac_cv_func_mmap_anon=no ;;
esac
else
- cat > conftest.$ac_ext <<EOF
-#line 4658 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define USE_MAP_ANON
#include "ct-mmap.inc"
-EOF
-if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_anon=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- if test $? -lt 4
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test $? -lt 4
then ac_cv_func_mmap_anon=no
else ac_cv_func_mmap_anon=buggy
fi
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_anon" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_anon" >&6
if test $ac_cv_func_mmap_anon = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP_ANON 1
-EOF
+_ACEOF
fi
rm -f ct-mmap.inc
-echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
-echo "configure:4691: checking for working mmap of a file" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working mmap of a file" >&5
+echo $ECHO_N "checking for working mmap of a file... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_file+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Create a file one thousand bytes long.
for i in 1 2 3 4 5 6 7 8 9 0
* ) ac_cv_func_mmap_file=no ;;
esac
else
- cat > conftest.$ac_ext <<EOF
-#line 4709 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
Richard Henderson and Alexandre Oliva.
exit(0);
}
-EOF
-if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_file=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_file=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_file=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_file" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_file" >&6
if test $ac_cv_func_mmap_file = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP_FILE 1
-EOF
+_ACEOF
fi
-
+
am_cv_lib_iconv_ldpath=
- # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix"
-
+
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done
-
-fi
+fi;
- echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:4785: checking for iconv" >&5
-if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
- cat > conftest.$ac_ext <<EOF
-#line 4793 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
-int main() {
+int
+main ()
+{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
-; return 0; }
-EOF
-if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_func_iconv=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
- cat > conftest.$ac_ext <<EOF
-#line 4815 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
-int main() {
+int
+main ()
+{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
-; return 0; }
-EOF
-if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
-
-fi
-echo "$ac_t""$am_cv_func_iconv" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
if test "$am_cv_func_iconv" = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ICONV 1
-EOF
+_ACEOF
- echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:4846: checking for iconv declaration" >&5
- if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
+ if test "${am_cv_proto_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 4852 "configure"
-#include "confdefs.h"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
size_t iconv();
#endif
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_proto_iconv_arg1=""
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_proto_iconv_arg1="const"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_proto_iconv_arg1="const"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- echo "$ac_t""${ac_t:-
- }$am_cv_proto_iconv" 1>&6
- cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+echo "${ECHO_T}${ac_t:-
+ }$am_cv_proto_iconv" >&6
+
+cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
-EOF
+_ACEOF
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
-
+
# We will need to find libiberty.h and ansidecl.h
malloc realloc calloc free basename getopt clock
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4909: checking whether $ac_func is declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4914 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
+echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#undef $ac_tr_decl
#define $ac_tr_decl 1
-
+
#include "ansidecl.h"
#include "system.h"
-int main() {
+int
+main ()
+{
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
eval "gcc_cv_have_decl_$ac_func=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "gcc_cv_have_decl_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "gcc_cv_have_decl_$ac_func=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 1
-EOF
-
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 0
-EOF
-
+_ACEOF
+
fi
done
if test x = y ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETENV 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_ATOL 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_SBRK 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_ABORT 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_ATOF 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETCWD 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETWD 1
-EOF
+_ACEOF
\
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_STRSIGNAL 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 1
-EOF
+_ACEOF
\
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_FPRINTF_UNLOCKED 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_STRSTR 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_ERRNO 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_VASPRINTF 1
-EOF
+_ACEOF
\
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_MALLOC 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_REALLOC 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_CALLOC 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_FREE 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_BASENAME 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETOPT 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_CLOCK 1
-EOF
+_ACEOF
fi
for ac_func in getrlimit setrlimit getrusage
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:5030: checking whether $ac_func is declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5035 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
+echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#undef $ac_tr_decl
#define $ac_tr_decl 1
-
+
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#endif
-int main() {
+int
+main ()
+{
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
eval "gcc_cv_have_decl_$ac_func=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "gcc_cv_have_decl_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "gcc_cv_have_decl_$ac_func=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 1
-EOF
-
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 0
-EOF
-
+_ACEOF
+
fi
done
if test x = y ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETRLIMIT 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_SETRLIMIT 1
-EOF
- cat >> confdefs.h <<\EOF
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_GETRUSAGE 1
-EOF
+_ACEOF
fi
-cat > conftest.$ac_ext <<EOF
-#line 5092 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "ansidecl.h"
#include "system.h"
#include <sys/resource.h>
#endif
-int main() {
+int
+main ()
+{
rlim_t l = 0;
-; return 0; }
-EOF
-if { (eval echo configure:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+cat >>confdefs.h <<\_ACEOF
#define rlim_t long
-EOF
+_ACEOF
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
for ac_func in ldgetname
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:5122: checking whether $ac_func is declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5127 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
+echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#undef $ac_tr_decl
#define $ac_tr_decl 1
-
+
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_LDFCN_H
#endif
-int main() {
+int
+main ()
+{
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
eval "gcc_cv_have_decl_$ac_func=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "gcc_cv_have_decl_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "gcc_cv_have_decl_$ac_func=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 1
-EOF
-
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 0
-EOF
-
+_ACEOF
+
fi
done
if test x = y ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_LDGETNAME 1
-EOF
+_ACEOF
fi
for ac_func in times
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:5181: checking whether $ac_func is declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5186 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
+echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#undef $ac_tr_decl
#define $ac_tr_decl 1
-
+
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_TIMES_H
#endif
-int main() {
+int
+main ()
+{
#ifndef $ac_func
char *(*pfn) = (char *(*)) $ac_func ;
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
eval "gcc_cv_have_decl_$ac_func=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "gcc_cv_have_decl_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "gcc_cv_have_decl_$ac_func=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 1
-EOF
-
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
#define $ac_tr_decl 0
-EOF
-
+_ACEOF
+
fi
done
if test x = y ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_TIMES 1
-EOF
+_ACEOF
fi
# More time-related stuff.
-echo $ac_n "checking for struct tms""... $ac_c" 1>&6
-echo "configure:5238: checking for struct tms" >&5
-if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 5244 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for struct tms" >&5
+echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
+if test "${ac_cv_struct_tms+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "ansidecl.h"
#include "system.h"
#include <sys/times.h>
#endif
-int main() {
+int
+main ()
+{
struct tms tms;
-; return 0; }
-EOF
-if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_struct_tms=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_struct_tms=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tms=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_struct_tms" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
+echo "${ECHO_T}$ac_cv_struct_tms" >&6
if test $ac_cv_struct_tms = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRUCT_TMS 1
-EOF
+_ACEOF
fi
# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
# revisit after autoconf 2.50.
-echo $ac_n "checking for clock_t""... $ac_c" 1>&6
-echo "configure:5280: checking for clock_t" >&5
-if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 5286 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for clock_t" >&5
+echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
+if test "${gcc_cv_type_clock_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "ansidecl.h"
#include "system.h"
-int main() {
+int
+main ()
+{
clock_t x;
-; return 0; }
-EOF
-if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_type_clock_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_type_clock_t=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_type_clock_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
+echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
if test $gcc_cv_type_clock_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_CLOCK_T 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for uchar""... $ac_c" 1>&6
-echo "configure:5317: checking for uchar" >&5
-if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for uchar" >&5
+echo $ECHO_N "checking for uchar... $ECHO_C" >&6
+if test "${gcc_cv_type_uchar+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5322 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "ansidecl.h"
#include "system.h"
-int main() {
+int
+main ()
+{
if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;
-; return 0; }
-EOF
-if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_uchar=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_uchar=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uchar=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$gcc_cv_type_uchar" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5
+echo "${ECHO_T}$gcc_cv_type_uchar" >&6
if test $ac_cv_type_uchar = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_UCHAR 1
-EOF
+_ACEOF
fi
# Check whether --enable-initfini-array or --disable-initfini-array was given.
if test "${enable_initfini_array+set}" = set; then
enableval="$enable_initfini_array"
- :
+
else
-
-echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
-echo "configure:5363: checking for .preinit_array/.init_array/.fini_array support" >&5
-if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
+echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
+if test "${gcc_cv_initfini_array+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
gcc_cv_initfini_array=no
else
- cat > conftest.$ac_ext <<EOF
-#line 5371 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
static int x = -1;
int main (void) { return x; }
int foo (void) { x = 0; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
-EOF
-if { (eval echo configure:5379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_initfini_array=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- gcc_cv_initfini_array=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gcc_cv_initfini_array=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$gcc_cv_initfini_array" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
+echo "${ECHO_T}$gcc_cv_initfini_array" >&6
enable_initfini_array=$gcc_cv_initfini_array
-fi
-
+fi;
if test $enable_initfini_array = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_INITFINI_ARRAY 1
-EOF
+_ACEOF
fi
-# mkdir takes a single argument on some systems.
-echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:5407: checking if mkdir takes one argument" >&5
-if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# mkdir takes a single argument on some systems.
+echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
+echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
+if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5412 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
#ifdef HAVE_DIRECT_H
# include <direct.h>
#endif
-int main() {
+int
+main ()
+{
mkdir ("foo", 0);
-; return 0; }
-EOF
-if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gcc_cv_mkdir_takes_one_arg=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gcc_cv_mkdir_takes_one_arg=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_mkdir_takes_one_arg=yes
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
+echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
if test $gcc_cv_mkdir_takes_one_arg = yes ; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define MKDIR_TAKES_ONE_ARG 1
-EOF
+_ACEOF
fi
if test "${enable_sjlj_exceptions+set}" = set; then
enableval="$enable_sjlj_exceptions"
sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
-cat >> confdefs.h <<EOF
-#define CONFIG_SJLJ_EXCEPTIONS $sjlj
-EOF
-fi
+cat >>confdefs.h <<_ACEOF
+#define CONFIG_SJLJ_EXCEPTIONS $sjlj
+_ACEOF
+fi;
-echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
-echo "configure:5469: checking for main in -lunwind" >&5
-ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for main in -lunwind" >&5
+echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
+if test "${ac_cv_lib_unwind_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lunwind $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5477 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_unwind_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_unwind_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
+echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
+if test $ac_cv_lib_unwind_main = yes; then
use_libunwind_default=yes
else
- echo "$ac_t""no" 1>&6
-use_libunwind_default=no
+ use_libunwind_default=no
fi
# Use libunwind based exception handling.
use_libunwind_exceptions=$enableval
else
use_libunwind_exceptions=$use_libunwind_default
-fi
-
+fi;
if test x"$use_libunwind_exceptions" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_LIBUNWIND_EXCEPTIONS 1
-EOF
+_ACEOF
fi
for x in $build_xm_file; do
if test -f $srcdir/config/$x
then bx="$bx $x"
- else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+ else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
+echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
fi
done
build_xm_file="$bx"
for x in $host_xm_file; do
if test -f $srcdir/config/$x
then hx="$hx $x"
- else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+ else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
+echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
fi
done
host_xm_file="$hx"
for x in $xm_file; do
if test -f $srcdir/config/$x
then tx="$tx $x"
- else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+ else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
+echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
fi
done
xm_file="$tx"
fi
if test x$need_64bit_hwint = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_64BIT_HOST_WIDE_INT 1
-EOF
+_ACEOF
fi
# Look for a file containing extra machine modes.
if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
extra_modes_file='$(srcdir)'/config/${extra_modes}
-
- cat >> confdefs.h <<EOF
+
+
+cat >>confdefs.h <<_ACEOF
#define EXTRA_MODES_FILE "$extra_modes"
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define EXTRA_CC_MODES 1
-EOF
+_ACEOF
fi
# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
# If host=build, it is correct to have bconfig include auto-host.h
-# as well. If host!=build, we are in error and need to do more
+# as well. If host!=build, we are in error and need to do more
# work to find out the build config parameters.
if test x$host = x$build
then
# We create a subdir, then run autoconf in the subdir.
# To prevent recursion we set host and build for the new
# invocation of configure to the build for this invocation
- # of configure.
+ # of configure.
tempdir=build.$$
rm -rf $tempdir
mkdir $tempdir
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
- :
+
else
enable_nls=yes
-fi
-
+fi;
# if cross compiling, disable NLS support.
# It's not worth the trouble, at least for now.
if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
- echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
+ { echo "$as_me:$LINENO: WARNING: Disabling NLS support for canadian cross compiler." >&5
+echo "$as_me: WARNING: Disabling NLS support for canadian cross compiler." >&2;}
enable_nls=no
fi
-
-echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
-echo "configure:5781: checking for library containing strerror" >&5
-if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_strerror="no"
-cat > conftest.$ac_ext <<EOF
-#line 5788 "configure"
-#include "confdefs.h"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
-
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_search_strerror="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-test "$ac_cv_search_strerror" = "no" && for i in cposix; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5810 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
-
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_strerror="-l$i"
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_strerror" 1>&6
-if test "$ac_cv_search_strerror" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
-else :
-
+
fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5844: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5849 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
-; return 0; }
-EOF
-if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_const=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:5919: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5924 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((off_t *) 0)
+ return 0;
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_off_t=no
fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6
+if test $ac_cv_type_off_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define off_t long
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5952: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5957 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_size_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define size_t unsigned
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5987: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5992 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_working_alloca_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_working_alloca_h=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:6020: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6025 "configure"
-#include "confdefs.h"
-
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:6085: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6090 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6115: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6120 "configure"
-#include "confdefs.h"
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:6170: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
- cat > conftest.$ac_ext <<EOF
-#line 6178 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
find_stack_direction ()
{
static char *addr = 0;
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
- echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:6220: checking whether we are using the GNU C Library 2.1 or newer" >&5
-if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
+if test "${ac_cv_gnu_library_2_1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6225 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <features.h>
#ifdef __GNU_LIBRARY__
Lucky GNU user
#endif
#endif
-
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "Lucky GNU user" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then
ac_cv_gnu_library_2_1=yes
else
- rm -rf conftest*
ac_cv_gnu_library_2_1=no
fi
rm -f conftest*
-
-
+
+
fi
+echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
+echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
-echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
-
GLIBC21="$ac_cv_gnu_library_2_1"
-
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6261: checking for $ac_hdr" >&5
-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 6266 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
- for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6302: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6307 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
-
+
+
am_cv_lib_iconv_ldpath=
- # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix"
-
+
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done
-
-fi
+fi;
- echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:6371: checking for iconv" >&5
-if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
- cat > conftest.$ac_ext <<EOF
-#line 6379 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
-int main() {
+int
+main ()
+{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
-; return 0; }
-EOF
-if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_func_iconv=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
- cat > conftest.$ac_ext <<EOF
-#line 6401 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
-int main() {
+int
+main ()
+{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
-; return 0; }
-EOF
-if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
-
-fi
-echo "$ac_t""$am_cv_func_iconv" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
if test "$am_cv_func_iconv" = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ICONV 1
-EOF
+_ACEOF
- echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:6432: checking for iconv declaration" >&5
- if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
+ if test "${am_cv_proto_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 6438 "configure"
-#include "confdefs.h"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
size_t iconv();
#endif
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:6457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_proto_iconv_arg1=""
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_proto_iconv_arg1="const"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_proto_iconv_arg1="const"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- echo "$ac_t""${ac_t:-
- }$am_cv_proto_iconv" 1>&6
- cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+echo "${ECHO_T}${ac_t:-
+ }$am_cv_proto_iconv" >&6
+
+cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
-EOF
+_ACEOF
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
-
-
- echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:6486: checking for nl_langinfo and CODESET" >&5
-if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
+if test "${am_cv_langinfo_codeset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6491 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <langinfo.h>
-int main() {
+int
+main ()
+{
char* cs = nl_langinfo(CODESET);
-; return 0; }
-EOF
-if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_langinfo_codeset=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_langinfo_codeset=no
-fi
-rm -f conftest*
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_langinfo_codeset=no
fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
if test $am_cv_langinfo_codeset = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LANGINFO_CODESET 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:6521: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6526 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <locale.h>
-int main() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:6554: checking whether NLS is requested" >&5
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no
INTLDEPS=
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_NLS 1
-EOF
+_ACEOF
+
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:6577: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+fi;
+ echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
+echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
CATOBJEXT=NONE
-
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:6597: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6602 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_libintl_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_LIBINTL_H 1
-EOF
+if test $ac_cv_header_libintl_h = yes; then
- echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
-echo "configure:6628: checking for GNU gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6633 "configure"
-#include "confdefs.h"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBINTL_H 1
+_ACEOF
+
+ echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <libintl.h>
extern int _nl_msg_cat_cntr;
-int main() {
+int
+main ()
+{
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gnugettext1_libc=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gnugettext1_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gnugettext1_libc=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6
if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
- echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
-echo "configure:6658: checking for GNU gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
+if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $LIBICONV"
- cat > conftest.$ac_ext <<EOF
-#line 6665 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <libintl.h>
extern int _nl_msg_cat_cntr;
-int main() {
+int
+main ()
+{
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gnugettext1_libintl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gnugettext1_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gnugettext1_libintl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$gt_save_LIBS"
fi
-
-echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6
fi
if test "$gt_cv_func_gnugettext1_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
&& test "$PACKAGE" != gettext; }; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
gt_save_LIBS="$LIBS"
LIBS="$LIBS $INTLLIBS"
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6707: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6712 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6764: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6798: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6835: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
CATOBJEXT=.gmo
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
+
if test "$CATOBJEXT" = "NONE"; then
nls_cv_use_gnu_gettext=yes
fi
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6885: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6919: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6955: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
+ echo "$as_me:$LINENO: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
GMSGFMT=":"
fi
fi
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
XGETTEXT=":"
fi
fi
POSUB=po
fi
-
+ ac_config_commands="$ac_config_commands default-1"
+
if test "$PACKAGE" = gettext; then
for ac_prog in bison
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7027: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_INTLBISON+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$INTLBISON"; then
ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_INTLBISON="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_INTLBISON="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-INTLBISON="$ac_cv_prog_INTLBISON"
+INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
- echo "$ac_t""$INTLBISON" 1>&6
+ echo "$as_me:$LINENO: result: $INTLBISON" >&5
+echo "${ECHO_T}$INTLBISON" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$INTLBISON" && break
+ test -n "$INTLBISON" && break
done
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
- echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:7060: checking version of bison" >&5
+ echo "$as_me:$LINENO: checking version of bison" >&5
+echo $ECHO_N "checking version of bison... $ECHO_C" >&6
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
- echo "$ac_t""$ac_prog_version" 1>&6
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
fi
if test $ac_verc_fail = yes; then
INTLBISON=:
fi
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
if test $USE_INCLUDED_LIBINTL = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_INCLUDED_LIBINTL 1
-EOF
+_ACEOF
fi
nls_cv_header_libgt=
DATADIRNAME=share
-
+
INSTOBJEXT=.mo
-
+
GENCAT=gencat
-
-
+
+
if test "x$CATOBJEXT" != x; then
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:7105: checking for catalogs to be installed" >&5
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
# Look for .po and .gmo files in the source directory.
CATALOGS=
XLINGUAS=
fi
done
LINGUAS="$XLINGUAS"
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
MKINSTALLDIRS=
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
-
+
INTL_LIBTOOL_SUFFIX_PREFIX=
-
-
+
+
# Windows32 Registry support for specifying GCC installation paths.
# Check whether --enable-win32-registry or --disable-win32-registry was given.
if test "${enable_win32_registry+set}" = set; then
enableval="$enable_win32_registry"
- :
-fi
+fi;
case $host_os in
win32 | pe | cygwin* | mingw32* | uwin*)
-echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
-echo "configure:7163: checking whether windows registry support is requested" >&5
+echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
+echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
if test "x$enable_win32_registry" != xno; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_WIN32_REGISTRY 1
-EOF
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
+echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
+if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_RegOpenKeyExA=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- echo "$ac_t""yes" 1>&6
-
-echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
-echo "configure:7172: checking for library containing RegOpenKeyExA" >&5
-if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_RegOpenKeyExA="no"
-cat > conftest.$ac_ext <<EOF
-#line 7179 "configure"
-#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char RegOpenKeyExA();
-
-int main() {
-RegOpenKeyExA()
-; return 0; }
-EOF
-if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char RegOpenKeyExA ();
+int
+main ()
+{
+RegOpenKeyExA ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_search_RegOpenKeyExA="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7201 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_RegOpenKeyExA" = no; then
+ for ac_lib in advapi32; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char RegOpenKeyExA();
-
-int main() {
-RegOpenKeyExA()
-; return 0; }
-EOF
-if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_RegOpenKeyExA="-l$i"
+ builtin and then its argument prototype would still apply. */
+char RegOpenKeyExA ();
+int
+main ()
+{
+RegOpenKeyExA ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_RegOpenKeyExA="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
-if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
+echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
+if test "$ac_cv_search_RegOpenKeyExA" != no; then
test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
-
-else :
-
+
fi
+
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Check if user specified a different registry key.
esac
if test "x$enable_win32_registry" != xno; then
- echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
-echo "configure:7254: checking registry key on windows hosts" >&5
- cat >> confdefs.h <<EOF
+ echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
+echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
+
+cat >>confdefs.h <<_ACEOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
-EOF
+_ACEOF
- echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
+echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
fi
;;
esac
# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
-CROSS=
-ALL=all.internal
-SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
+CROSS=
+ALL=all.internal
+SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
if test x$host != x$target
then
CROSS="-DCROSS_COMPILE"
# Also, we cannot run fixincludes or fix-header.
# These are the normal (build=host) settings:
-BUILD_PREFIX=
-BUILD_PREFIX_1=ignore-
-BUILD_CC='$(CC)'
-BUILD_CFLAGS='$(ALL_CFLAGS)'
+BUILD_PREFIX=
+BUILD_PREFIX_1=ignore-
+BUILD_CC='$(CC)'
+BUILD_CFLAGS='$(ALL_CFLAGS)'
-STMP_FIXINC=stmp-fixinc
-STMP_FIXPROTO=stmp-fixproto
+STMP_FIXINC=stmp-fixinc
+STMP_FIXPROTO=stmp-fixproto
# And these apply if build != host.
if test x$build != x$host
case $use_collect2 in
no) use_collect2= ;;
"") ;;
- *)
+ *)
host_xm_defines="${host_xm_defines} USE_COLLECT2"
xm_defines="${xm_defines} USE_COLLECT2"
;;
# If build != host, and we aren't building gas in-tree, we identify a
# build->target assembler and hope that it will have the same features
# as the host->target assembler we'll be using.
-echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
-echo "configure:7463: checking what assembler to use" >&5
+echo "$as_me:$LINENO: checking what assembler to use" >&5
+echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
in_tree_gas=no
gcc_cv_as=
gcc_cv_gas_major_version=
fi
case $in_tree_gas in
yes)
- echo "$ac_t"""newly built gas"" 1>&6
+ echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
+echo "${ECHO_T}\"newly built gas\"" >&6
;;
no)
- echo "$ac_t""$gcc_cv_as" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
+echo "${ECHO_T}$gcc_cv_as" >&6
;;
esac
# If build != host, and we aren't building gas in-tree, we identify a
# build->target linker and hope that it will have the same features
# as the host->target linker we'll be using.
-echo $ac_n "checking what linker to use""... $ac_c" 1>&6
-echo "configure:7574: checking what linker to use" >&5
+echo "$as_me:$LINENO: checking what linker to use" >&5
+echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
in_tree_ld=no
gcc_cv_ld=
gcc_cv_gld_major_version=
fi
case $in_tree_ld in
yes)
- echo "$ac_t"""newly built ld"" 1>&6
+ echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
+echo "${ECHO_T}\"newly built ld\"" >&6
;;
no)
- echo "$ac_t""$gcc_cv_ld" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
+echo "${ECHO_T}$gcc_cv_ld" >&6
;;
esac
# Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
-echo $ac_n "checking what nm to use""... $ac_c" 1>&6
-echo "configure:7677: checking what nm to use" >&5
+echo "$as_me:$LINENO: checking what nm to use" >&5
+echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
in_tree_nm=no
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
fi
case $in_tree_nm in
- yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
- no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
+ yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
+echo "${ECHO_T}\"newly built nm\"" >&6 ;;
+ no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
+echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
esac
# Figure out what objdump we will be using.
-echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
-echo "configure:7700: checking what objdump to use" >&5
+echo "$as_me:$LINENO: checking what objdump to use" >&5
+echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
in_tree_objdump=no
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
sed ${program_transform_name}`$host_exeext
fi
case $in_tree_objdump in
- yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
- no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
+ yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
+echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
+ no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
+echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
esac
# Figure out what assembler alignment features are present.
-echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:7725: checking assembler alignment features" >&5
+echo "$as_me:$LINENO: checking assembler alignment features" >&5
+echo $ECHO_N "checking assembler alignment features... $ECHO_C" >&6
gcc_cv_as_alignment_features=none
if test $in_tree_gas = yes; then
# Gas version 2.6 and later support for .balign and .p2align.
gcc_cv_as_alignment_features=".balign and .p2align"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
-EOF
+_ACEOF
+
-
fi
gcc_cv_as_alignment_features=".p2align including maximum skip"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
-EOF
+_ACEOF
+
-
fi
echo ".p2align 2" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".balign and .p2align"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
-EOF
+_ACEOF
fi
rm -f conftest.s conftest.o
echo ".p2align 4,,7" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".p2align including maximum skip"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
-EOF
+_ACEOF
fi
rm -f conftest.s conftest.o
fi
-echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_alignment_features" >&5
+echo "${ECHO_T}$gcc_cv_as_alignment_features" >&6
-echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:7786: checking assembler subsection support" >&5
+echo "$as_me:$LINENO: checking assembler subsection support" >&5
+echo $ECHO_N "checking assembler subsection support... $ECHO_C" >&6
gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_subsections="working .subsection -1"
fi
-
+
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_SUBSECTION_ORDERING 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_subsections" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_subsections" >&5
+echo "${ECHO_T}$gcc_cv_as_subsections" >&6
-echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
-echo "configure:7835: checking assembler weak support" >&5
+echo "$as_me:$LINENO: checking assembler weak support" >&5
+echo $ECHO_N "checking assembler weak support... $ECHO_C" >&6
gcc_cv_as_weak=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
gcc_cv_as_weak="yes"
-
+
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_weak" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_WEAK 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_weak" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
+echo "${ECHO_T}$gcc_cv_as_weak" >&6
-echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
-echo "configure:7865: checking assembler hidden support" >&5
+echo "$as_me:$LINENO: checking assembler hidden support" >&5
+echo $ECHO_N "checking assembler hidden support... $ECHO_C" >&6
gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_hidden="yes"
fi
-
+
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
- # This is irritatingly difficult to feature test for. Look for
+ # This is irritatingly difficult to feature test for. Look for
# the date string after the version number.
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
fi
fi
if test x"$gcc_cv_as_hidden" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_HIDDEN 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_hidden" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
+echo "${ECHO_T}$gcc_cv_as_hidden" >&6
libgcc_visibility=$gcc_cv_as_hidden
case "$target" in
mips-sgi-irix6*)
esac
-echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
-echo "configure:7946: checking assembler leb128 support" >&5
+echo "$as_me:$LINENO: checking assembler leb128 support" >&5
+echo $ECHO_N "checking assembler leb128 support... $ECHO_C" >&6
gcc_cv_as_leb128=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_leb128="yes"
fi
-
+
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_leb128" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_LEB128 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_leb128" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
+echo "${ECHO_T}$gcc_cv_as_leb128" >&6
-echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
-echo "configure:8000: checking assembler eh_frame optimization" >&5
+echo "$as_me:$LINENO: checking assembler eh_frame optimization" >&5
+echo $ECHO_N "checking assembler eh_frame optimization... $ECHO_C" >&6
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_eh_frame="yes"
fi
-
+
fi
cat > conftest.lit <<EOF
0000 10000000 00000000 017a0001 781a0004 .........z..x...
0010 01000000 12000000 18000000 00000000 ................
- 0020 08000000 04080000 0044 .........D
+ 0020 08000000 04080000 0044 .........D
EOF
cat > conftest.big <<EOF
0000 00000010 00000000 017a0001 781a0004 .........z..x...
0010 00000001 00000012 00000018 00000000 ................
- 0020 00000008 04000000 0844 .........D
+ 0020 00000008 04000000 0844 .........D
EOF
# If the assembler didn't choke, and we can objdump,
# and we got the correct data, then succeed.
else
gcc_cv_as_eh_frame="bad"
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_AS_TRADITIONAL_FORMAT 1
-EOF
+_ACEOF
fi
fi
fi
rm -f conftest.*
fi
-echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
+echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
-echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
-echo "configure:8090: checking assembler section merging support" >&5
+echo "$as_me:$LINENO: checking assembler section merging support" >&5
+echo $ECHO_N "checking assembler section merging support... $ECHO_C" >&6
gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_shf_merge=yes
fi
-
+
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_shf_merge" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GAS_SHF_MERGE 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
+echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
-echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
-echo "configure:8122: checking assembler thread-local storage support" >&5
+echo "$as_me:$LINENO: checking assembler thread-local storage support" >&5
+echo $ECHO_N "checking assembler thread-local storage support... $ECHO_C" >&6
gcc_cv_as_tls=no
conftest_s=
tls_first_major=
gcc_cv_as_tls=yes
-
+
fi
rm -f conftest.s conftest.o
fi
if test "$gcc_cv_as_tls" = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_TLS 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_tls" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
+echo "${ECHO_T}$gcc_cv_as_tls" >&6
case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
- echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
-echo "configure:8269: checking assembler supports explicit relocations" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler supports explicit relocations" >&5
+echo $ECHO_N "checking assembler supports explicit relocations... $ECHO_C" >&6
+if test "${gcc_cv_as_explicit_relocs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_explicit_relocs=unknown
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
gcc_cv_as_explicit_relocs=yes
-
+
fi
fi
rm -f conftest.s conftest.o
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_explicit_relocs" >&5
+echo "${ECHO_T}$gcc_cv_as_explicit_relocs" >&6
if test "x$gcc_cv_as_explicit_relocs" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_EXPLICIT_RELOCS 1
-EOF
+_ACEOF
fi
;;
sparc*-*-*)
- echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:8322: checking assembler .register pseudo-op support" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler .register pseudo-op support" >&5
+echo $ECHO_N "checking assembler .register pseudo-op support... $ECHO_C" >&6
+if test "${gcc_cv_as_register_pseudo_op+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_register_pseudo_op=unknown
if test x$gcc_cv_as != x; then
# Check if we have .register
fi
rm -f conftest.s conftest.o
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_register_pseudo_op" >&5
+echo "${ECHO_T}$gcc_cv_as_register_pseudo_op" >&6
if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_REGISTER_PSEUDO_OP 1
-EOF
+_ACEOF
fi
- echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
-echo "configure:8350: checking assembler supports -relax" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler supports -relax" >&5
+echo $ECHO_N "checking assembler supports -relax... $ECHO_C" >&6
+if test "${gcc_cv_as_relax_opt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_relax_opt=unknown
if test x$gcc_cv_as != x; then
# Check if gas supports -relax
fi
rm -f conftest.s conftest.o
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_relax_opt" >&5
+echo "${ECHO_T}$gcc_cv_as_relax_opt" >&6
if test "x$gcc_cv_as_relax_opt" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_RELAX_OPTION 1
-EOF
+_ACEOF
fi
- echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
-echo "configure:8378: checking assembler and linker support unaligned pc related relocs" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler and linker support unaligned pc related relocs" >&5
+echo $ECHO_N "checking assembler and linker support unaligned pc related relocs... $ECHO_C" >&6
+if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_sparc_ua_pcrel=unknown
if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
gcc_cv_as_sparc_ua_pcrel=no
fi
rm -f conftest.s conftest.o conftest
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
+echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_SPARC_UA_PCREL 1
-EOF
+_ACEOF
fi
- echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
-echo "configure:8405: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
+echo $ECHO_N "checking assembler and linker support unaligned pc related relocs against hidden symbols... $ECHO_C" >&6
+if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
gcc_cv_as_sparc_ua_pcrel_hidden=unknown
if test x$gcc_cv_objdump != x; then
else
gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
+echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
-EOF
+_ACEOF
fi
- echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:8445: checking for assembler offsetable %lo() support" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for assembler offsetable %lo() support" >&5
+echo $ECHO_N "checking for assembler offsetable %lo() support... $ECHO_C" >&6
+if test "${gcc_cv_as_offsetable_lo10+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_offsetable_lo10=unknown
if test "x$gcc_cv_as" != x; then
# Check if assembler has offsetable %lo()
fi
rm -f conftest.s conftest.o conftest1.s conftest1.o
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_offsetable_lo10" >&5
+echo "${ECHO_T}$gcc_cv_as_offsetable_lo10" >&6
if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_OFFSETABLE_LO10 1
-EOF
+_ACEOF
fi
;;
i[34567]86-*-* | x86_64-*-*)
- echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8484: checking assembler instructions" >&5
+ echo "$as_me:$LINENO: checking assembler instructions" >&5
+echo $ECHO_N "checking assembler instructions... $ECHO_C" >&6
gcc_cv_as_instructions=
- if test $in_tree_gas = yes ; then
+ if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 9 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_instructions="filds fists"
-
+
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_instructions" != x; then
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_as_instructions" >&5
+echo "${ECHO_T}$gcc_cv_as_instructions" >&6
- echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
-echo "configure:8518: checking assembler GOTOFF in data directives" >&5
+ echo "$as_me:$LINENO: checking assembler GOTOFF in data directives" >&5
+echo $ECHO_N "checking assembler GOTOFF in data directives... $ECHO_C" >&6
gcc_cv_as_gotoff_in_data=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
gcc_cv_as_gotoff_in_data=yes
-
+
fi
gcc_cv_as_gotoff_in_data=yes
fi
fi
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
-EOF
+_ACEOF
- echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_as_gotoff_in_data" >&5
+echo "${ECHO_T}$gcc_cv_as_gotoff_in_data" >&6
;;
ia64*-*-*)
- echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
-echo "configure:8552: checking assembler supports ltoffx and ldxmov" >&5
-if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking assembler supports ltoffx and ldxmov" >&5
+echo $ECHO_N "checking assembler supports ltoffx and ldxmov... $ECHO_C" >&6
+if test "${gcc_cv_as_ltoffx_ldxmov_relocs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
gcc_cv_as_ltoffx_ldxmov_relocs=unknown
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
gcc_cv_as_ltoffx_ldxmov_relocs=yes
-
+
fi
fi
rm -f conftest.s conftest.o
fi
-
-fi
-echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_ltoffx_ldxmov_relocs" >&5
+echo "${ECHO_T}$gcc_cv_as_ltoffx_ldxmov_relocs" >&6
if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
-EOF
+_ACEOF
fi
;;
esac
-echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
-echo "configure:8597: checking assembler dwarf2 debug_line support" >&5
+echo "$as_me:$LINENO: checking assembler dwarf2 debug_line support" >&5
+echo $ECHO_N "checking assembler dwarf2 debug_line support... $ECHO_C" >&6
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
&& test x"$insn" != x ; then
gcc_cv_as_dwarf2_debug_line="yes"
fi
-
+
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_DWARF2_DEBUG_LINE 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
+echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
-echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
-echo "configure:8659: checking assembler --gdwarf2 support" >&5
+echo "$as_me:$LINENO: checking assembler --gdwarf2 support" >&5
+echo $ECHO_N "checking assembler --gdwarf2 support... $ECHO_C" >&6
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test x"$insn" != x ; then
gcc_cv_as_gdwarf2_flag="yes"
fi
-
+
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
+echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
-echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
-echo "configure:8693: checking assembler --gstabs support" >&5
+echo "$as_me:$LINENO: checking assembler --gstabs support" >&5
+echo $ECHO_N "checking assembler --gstabs support... $ECHO_C" >&6
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test x"$insn" != x ; then
gcc_cv_as_gstabs_flag="yes"
fi
-
+
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gstabs_flag" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_GSTABS_DEBUG_FLAG 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
+echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
-echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
-echo "configure:8726: checking linker read-only and read-write section mixing" >&5
+echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
+echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
rm -f conftest.* conftest[123].*
fi
if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LD_RO_RW_SECTION_MIXING 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
+echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
-echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
-echo "configure:8764: checking linker PT_GNU_EH_FRAME support" >&5
+echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
+echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
fi
fi
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LD_EH_FRAME_HDR 1
-EOF
+_ACEOF
fi
-echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
+echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
# Miscellaneous target-specific checks.
case "$target" in
mips*-*-*)
- echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
-echo "configure:8788: checking whether libgloss uses STARTUP directives consistently" >&5
+ echo "$as_me:$LINENO: checking whether libgloss uses STARTUP directives consistently" >&5
+echo $ECHO_N "checking whether libgloss uses STARTUP directives consistently... $ECHO_C" >&6
gcc_cv_mips_libgloss_startup=no
gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
if test "x$exec_prefix" = xNONE; then
fi
done
if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
+ echo "$as_me:$LINENO: result: $gcc_cv_mips_libgloss_startup" >&5
+echo "${ECHO_T}$gcc_cv_mips_libgloss_startup" >&6
+
+ echo "$as_me:$LINENO: checking whether the assembler has explicit relocation support" >&5
+echo $ECHO_N "checking whether the assembler has explicit relocation support... $ECHO_C" >&6
+ if test x$gcc_cv_mips_explicit_relocs = x; then
+ gcc_cv_mips_explicit_relocs=no
+ if test x$gcc_cv_as != x; then
+ echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
+ if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
+ gcc_cv_mips_explicit_relocs=yes
+ fi
+ rm -f conftest.s conftest.o
+ fi
+ fi
+ if test $gcc_cv_mips_explicit_relocs = yes; then
+ test x$target_cpu_default != x || target_cpu_default=0
+ target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
+ fi
+ echo "$as_me:$LINENO: result: $gcc_cv_mips_explicit_relocs" >&5
+echo "${ECHO_T}$gcc_cv_mips_explicit_relocs" >&6
;;
esac
if test x$with_sysroot = x && test x$host = x$target \
&& test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define PREFIX_INCLUDE_DIR "$prefix/include"
-EOF
+_ACEOF
fi
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
enable_languages="${LANGUAGES}"
- echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
+ { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5
+echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;}
else
enable_languages=all
if test x"${enable_languages}" = x \
|| test x"${enable_languages}" = xyes;
then
- { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5
+echo "$as_me: error: --enable-languages needs at least one language argument" >&2;}
+ { (exit 1); exit 1; }; }
fi
fi
enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
missing_languages=
for expected_language in ${expected_languages} ..
-do
+do
if test "${expected_language}" != ..; then
missing_language="${expected_language}"
if test "${expected_language}" = "c" \
missing_language=
fi
for found_language in ${found_languages} ..
- do
+ do
if test "${found_language}" != ..; then
if test "${expected_language}" = "${found_language}"; then
missing_language=
done
if test "x$missing_languages" != x; then
- { echo "configure: error:
+ { { echo "$as_me:$LINENO: error:
+The following requested languages were not found:${missing_languages}
+The following languages were available: c${found_languages}" >&5
+echo "$as_me: error:
The following requested languages were not found:${missing_languages}
-The following languages were available: c${found_languages}" 1>&2; exit 1; }
+The following languages were available: c${found_languages}" >&2;}
+ { (exit 1); exit 1; }; }
fi
# Make gthr-default.h if we have a thread file.
# Find out what GC implementation we want, or may, use.
+
# Check whether --with-gc or --without-gc was given.
if test "${with_gc+set}" = set; then
withval="$with_gc"
GGC=ggc-$withval
;;
*)
- { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
+echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
+ { (exit 1); exit 1; }; }
;;
esac
else
GGC=ggc-page
-fi
-
+fi;
echo "Using $GGC for garbage collection."
# Use the system's zlib library.
zlibdir=-L../zlib
zlibinc="-I\$(srcdir)/../zlib"
+
# Check whether --with-system-zlib or --without-system-zlib was given.
if test "${with_system_zlib+set}" = set; then
withval="$with_system_zlib"
zlibdir=
zlibinc=
-fi
-
+fi;
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:8993: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
maintainer_mode=$enableval
else
maintainer_mode=no
-fi
-
+fi;
-echo "$ac_t""$maintainer_mode" 1>&6
+echo "$as_me:$LINENO: result: $maintainer_mode" >&5
+echo "${ECHO_T}$maintainer_mode" >&6
if test "$maintainer_mode" = "yes"; then
MAINT=''
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"
- :
-fi
+
+fi;
# Check whether --with-slibdir or --without-slibdir was given.
else
slibdir='$(libdir)'
fi
-fi
-
+fi;
objdir=`${PWDCMD-pwd}`
# Create the Makefile
# and configure language subdirectories
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files $all_outputs"
+ ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
do
- case "\$ac_option" in
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
esac
+ shift
done
-ac_given_srcdir=$srcdir
+ac_configure_extra_args=
-trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@build_canonical@%$build_canonical%g
-s%@host_canonical@%$host_canonical%g
-s%@target_subdir@%$target_subdir%g
-s%@CC@%$CC%g
-s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
-s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
-s%@CPP@%$CPP%g
-s%@GNATBIND@%$GNATBIND%g
-s%@ADAC@%$ADAC%g
-s%@strict1_warn@%$strict1_warn%g
-s%@warn_cflags@%$warn_cflags%g
-s%@WERROR@%$WERROR%g
-s%@nocommon_flag@%$nocommon_flag%g
-s%@valgrind_path@%$valgrind_path%g
-s%@valgrind_path_defines@%$valgrind_path_defines%g
-s%@valgrind_command@%$valgrind_command%g
-s%@coverage_flags@%$coverage_flags%g
-s%@enable_multilib@%$enable_multilib%g
-s%@enable_shared@%$enable_shared%g
-s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
-s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
-s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@AWK@%$AWK%g
-s%@LN@%$LN%g
-s%@LN_S@%$LN_S%g
-s%@RANLIB@%$RANLIB%g
-s%@INSTALL@%$INSTALL%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@have_mktemp_command@%$have_mktemp_command%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@BUILD_INFO@%$BUILD_INFO%g
-s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
-s%@make_compare_target@%$make_compare_target%g
-s%@FLEX@%$FLEX%g
-s%@BISON@%$BISON%g
-s%@stage1_cflags@%$stage1_cflags%g
-s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
-s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
-s%@LDEXP_LIB@%$LDEXP_LIB%g
-s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
-s%@LIBICONV@%$LIBICONV%g
-s%@manext@%$manext%g
-s%@objext@%$objext%g
-s%@extra_modes_file@%$extra_modes_file%g
-s%@FORBUILD@%$FORBUILD%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ALLOCA@%$ALLOCA%g
-s%@GLIBC21@%$GLIBC21%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@INTLBISON@%$INTLBISON%g
-s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POSUB@%$POSUB%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@GENCAT@%$GENCAT%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
-s%@CROSS@%$CROSS%g
-s%@ALL@%$ALL%g
-s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
-s%@inhibit_libc@%$inhibit_libc%g
-s%@BUILD_PREFIX@%$BUILD_PREFIX%g
-s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
-s%@BUILD_CC@%$BUILD_CC%g
-s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
-s%@STMP_FIXINC@%$STMP_FIXINC%g
-s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
-s%@libgcc_visibility@%$libgcc_visibility%g
-s%@gthread_flags@%$gthread_flags%g
-s%@GGC@%$GGC%g
-s%@zlibdir@%$zlibdir%g
-s%@zlibinc@%$zlibinc%g
-s%@MAINT@%$MAINT%g
-s%@gcc_tooldir@%$gcc_tooldir%g
-s%@dollar@%$dollar%g
-s%@slibdir@%$slibdir%g
-s%@objdir@%$objdir%g
-s%@subdirs@%$subdirs%g
-s%@srcdir@%$srcdir%g
-s%@all_boot_languages@%$all_boot_languages%g
-s%@all_compilers@%$all_compilers%g
-s%@all_gtfiles@%$all_gtfiles%g
-s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
-s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
-s%@all_lang_makefiles@%$all_lang_makefiles%g
-s%@all_languages@%$all_languages%g
-s%@all_stagestuff@%$all_stagestuff%g
-s%@build_exeext@%$build_exeext%g
-s%@build_install_headers_dir@%$build_install_headers_dir%g
-s%@build_xm_file_list@%$build_xm_file_list%g
-s%@build_xm_file@%$build_xm_file%g
-s%@build_xm_defines@%$build_xm_defines%g
-s%@check_languages@%$check_languages%g
-s%@cc_set_by_configure@%$cc_set_by_configure%g
-s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
-s%@cpp_install_dir@%$cpp_install_dir%g
-s%@dep_host_xmake_file@%$dep_host_xmake_file%g
-s%@dep_tmake_file@%$dep_tmake_file%g
-s%@extra_headers_list@%$extra_headers_list%g
-s%@extra_objs@%$extra_objs%g
-s%@extra_parts@%$extra_parts%g
-s%@extra_passes@%$extra_passes%g
-s%@extra_programs@%$extra_programs%g
-s%@float_h_file@%$float_h_file%g
-s%@gcc_config_arguments@%$gcc_config_arguments%g
-s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
-s%@libstdcxx_incdir@%$libstdcxx_incdir%g
-s%@gcc_version@%$gcc_version%g
-s%@gcc_version_full@%$gcc_version_full%g
-s%@gcc_version_trigger@%$gcc_version_trigger%g
-s%@host_exeext@%$host_exeext%g
-s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
-s%@host_xm_file_list@%$host_xm_file_list%g
-s%@host_xm_file@%$host_xm_file%g
-s%@host_xm_defines@%$host_xm_defines%g
-s%@out_host_hook_obj@%$out_host_hook_obj%g
-s%@install@%$install%g
-s%@lang_options_files@%$lang_options_files%g
-s%@lang_specs_files@%$lang_specs_files%g
-s%@lang_tree_files@%$lang_tree_files%g
-s%@local_prefix@%$local_prefix%g
-s%@md_file@%$md_file%g
-s%@objc_boehm_gc@%$objc_boehm_gc%g
-s%@out_file@%$out_file%g
-s%@out_object_file@%$out_object_file%g
-s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
-s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
-s%@symbolic_link@%$symbolic_link%g
-s%@thread_file@%$thread_file%g
-s%@tm_file_list@%$tm_file_list%g
-s%@tm_file@%$tm_file%g
-s%@tm_defines@%$tm_defines%g
-s%@tm_p_file_list@%$tm_p_file_list%g
-s%@tm_p_file@%$tm_p_file%g
-s%@xm_file@%$xm_file%g
-s%@xm_defines@%$xm_defines%g
-s%@c_target_objs@%$c_target_objs%g
-s%@cxx_target_objs@%$cxx_target_objs%g
-s%@target_cpu_default@%$target_cpu_default%g
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+
+subdirs='$subdirs'
+symbolic_link='$symbolic_link'
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@build_canonical@,$build_canonical,;t t
+s,@host_canonical@,$host_canonical,;t t
+s,@target_subdir@,$target_subdir,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
+s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@GNATBIND@,$GNATBIND,;t t
+s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
+s,@ADAC@,$ADAC,;t t
+s,@strict1_warn@,$strict1_warn,;t t
+s,@warn_cflags@,$warn_cflags,;t t
+s,@WERROR@,$WERROR,;t t
+s,@nocommon_flag@,$nocommon_flag,;t t
+s,@valgrind_path@,$valgrind_path,;t t
+s,@valgrind_path_defines@,$valgrind_path_defines,;t t
+s,@valgrind_command@,$valgrind_command,;t t
+s,@coverage_flags@,$coverage_flags,;t t
+s,@enable_multilib@,$enable_multilib,;t t
+s,@enable_shared@,$enable_shared,;t t
+s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
+s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
+s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@AWK@,$AWK,;t t
+s,@LN@,$LN,;t t
+s,@LN_S@,$LN_S,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@INSTALL@,$INSTALL,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@have_mktemp_command@,$have_mktemp_command,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@BUILD_INFO@,$BUILD_INFO,;t t
+s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
+s,@make_compare_target@,$make_compare_target,;t t
+s,@FLEX@,$FLEX,;t t
+s,@BISON@,$BISON,;t t
+s,@stage1_cflags@,$stage1_cflags,;t t
+s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
+s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
+s,@LDEXP_LIB@,$LDEXP_LIB,;t t
+s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
+s,@LIBICONV@,$LIBICONV,;t t
+s,@manext@,$manext,;t t
+s,@objext@,$objext,;t t
+s,@extra_modes_file@,$extra_modes_file,;t t
+s,@FORBUILD@,$FORBUILD,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@GLIBC21@,$GLIBC21,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@INTLBISON@,$INTLBISON,;t t
+s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@INTLDEPS@,$INTLDEPS,;t t
+s,@INTLOBJS@,$INTLOBJS,;t t
+s,@POSUB@,$POSUB,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
+s,@CROSS@,$CROSS,;t t
+s,@ALL@,$ALL,;t t
+s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
+s,@inhibit_libc@,$inhibit_libc,;t t
+s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t
+s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
+s,@STMP_FIXINC@,$STMP_FIXINC,;t t
+s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
+s,@libgcc_visibility@,$libgcc_visibility,;t t
+s,@gthread_flags@,$gthread_flags,;t t
+s,@GGC@,$GGC,;t t
+s,@zlibdir@,$zlibdir,;t t
+s,@zlibinc@,$zlibinc,;t t
+s,@MAINT@,$MAINT,;t t
+s,@gcc_tooldir@,$gcc_tooldir,;t t
+s,@dollar@,$dollar,;t t
+s,@slibdir@,$slibdir,;t t
+s,@objdir@,$objdir,;t t
+s,@subdirs@,$subdirs,;t t
+s,@srcdir@,$srcdir,;t t
+s,@all_boot_languages@,$all_boot_languages,;t t
+s,@all_compilers@,$all_compilers,;t t
+s,@all_gtfiles@,$all_gtfiles,;t t
+s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
+s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
+s,@all_lang_makefiles@,$all_lang_makefiles,;t t
+s,@all_languages@,$all_languages,;t t
+s,@all_stagestuff@,$all_stagestuff,;t t
+s,@build_exeext@,$build_exeext,;t t
+s,@build_install_headers_dir@,$build_install_headers_dir,;t t
+s,@build_xm_file_list@,$build_xm_file_list,;t t
+s,@build_xm_file@,$build_xm_file,;t t
+s,@build_xm_defines@,$build_xm_defines,;t t
+s,@check_languages@,$check_languages,;t t
+s,@cc_set_by_configure@,$cc_set_by_configure,;t t
+s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
+s,@cpp_install_dir@,$cpp_install_dir,;t t
+s,@dep_host_xmake_file@,$dep_host_xmake_file,;t t
+s,@dep_tmake_file@,$dep_tmake_file,;t t
+s,@extra_headers_list@,$extra_headers_list,;t t
+s,@extra_objs@,$extra_objs,;t t
+s,@extra_parts@,$extra_parts,;t t
+s,@extra_passes@,$extra_passes,;t t
+s,@extra_programs@,$extra_programs,;t t
+s,@float_h_file@,$float_h_file,;t t
+s,@gcc_config_arguments@,$gcc_config_arguments,;t t
+s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
+s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
+s,@gcc_version@,$gcc_version,;t t
+s,@gcc_version_full@,$gcc_version_full,;t t
+s,@gcc_version_trigger@,$gcc_version_trigger,;t t
+s,@host_exeext@,$host_exeext,;t t
+s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t
+s,@host_xm_file_list@,$host_xm_file_list,;t t
+s,@host_xm_file@,$host_xm_file,;t t
+s,@host_xm_defines@,$host_xm_defines,;t t
+s,@out_host_hook_obj@,$out_host_hook_obj,;t t
+s,@install@,$install,;t t
+s,@lang_options_files@,$lang_options_files,;t t
+s,@lang_specs_files@,$lang_specs_files,;t t
+s,@lang_tree_files@,$lang_tree_files,;t t
+s,@local_prefix@,$local_prefix,;t t
+s,@md_file@,$md_file,;t t
+s,@objc_boehm_gc@,$objc_boehm_gc,;t t
+s,@out_file@,$out_file,;t t
+s,@out_object_file@,$out_object_file,;t t
+s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
+s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
+s,@symbolic_link@,$symbolic_link,;t t
+s,@thread_file@,$thread_file,;t t
+s,@tm_file_list@,$tm_file_list,;t t
+s,@tm_file@,$tm_file,;t t
+s,@tm_defines@,$tm_defines,;t t
+s,@tm_p_file_list@,$tm_p_file_list,;t t
+s,@tm_p_file@,$tm_p_file,;t t
+s,@xm_file@,$xm_file,;t t
+s,@xm_defines@,$xm_defines,;t t
+s,@c_target_objs@,$c_target_objs,;t t
+s,@cxx_target_objs@,$cxx_target_objs,;t t
+s,@target_cpu_default@,$target_cpu_default,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@target_overrides@/r $target_overrides
-s%@target_overrides@%%g
+s,@target_overrides@,,;t t
/@host_overrides@/r $host_overrides
-s%@host_overrides@%%g
+s,@host_overrides@,,;t t
/@language_fragments@/r $language_fragments
-s%@language_fragments@%%g
+s,@language_fragments@,,;t t
/@language_hooks@/r $language_hooks
-s%@language_hooks@%%g
-
+s,@language_hooks@,,;t t
CEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
+fi # test -n "$CONFIG_FILES"
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[: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" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # 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"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
else
- ac_dir_suffix= ac_dots=
- fi
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
*) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# 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_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without 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'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="auto-host.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[: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" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) 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
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > 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
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# 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.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# 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.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
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
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$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
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
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
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.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
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
-subdirs='$subdirs'
-symbolic_link='$symbolic_link'
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in $CONFIG_FILES; do
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 ) for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
fi
;;
esac
- done
-
+ done ;;
+ default )
case x$CONFIG_HEADERS in
xauto-host.h:config.in)
echo > cstamp-h ;;
echo creating libintl.h
echo '#include "intl/libintl.h"' >libintl.h
fi
+ ;;
+ esac
+done
+_ACEOF
-exit 0
-EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi