1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/AvocadoDB into devel

This commit is contained in:
Heiko Kernbach 2012-05-08 13:01:36 +02:00
commit 9f63a4f225
52 changed files with 2439 additions and 1931 deletions

View File

@ -58,181 +58,7 @@ static bool EqualFieldAccess (TRI_associative_pointer_t* array,
return TRI_EqualString(key, fieldAccess->_fieldName);
}
static int TypeWeight (const TRI_json_t* const value) {
switch (value->_type) {
case TRI_JSON_BOOLEAN:
return 1;
case TRI_JSON_NUMBER:
return 2;
case TRI_JSON_STRING:
return 3;
case TRI_JSON_LIST:
return 4;
case TRI_JSON_ARRAY:
return 5;
case TRI_JSON_NULL:
default:
return 0;
}
}
static int Compare (const TRI_json_t* const lhs, const TRI_json_t* const rhs) {
int lWeight = TypeWeight(lhs);
int rWeight = TypeWeight(rhs);
if (lWeight < rWeight) {
return -1;
}
if (lWeight > rWeight) {
return 1;
}
// equal weight
switch (lhs->_type) {
case TRI_JSON_NULL:
return 0; // null == null;
case TRI_JSON_BOOLEAN:
if (lhs->_value._boolean == rhs->_value._boolean) {
return 0;
}
if (!lhs->_value._boolean && rhs->_value._boolean) {
return -1;
}
return 1;
case TRI_JSON_NUMBER:
if (lhs->_value._number == rhs->_value._number) {
return 0;
}
if (lhs->_value._number < rhs->_value._number) {
return -1;
}
return 1;
case TRI_JSON_STRING:
return strcmp(lhs->_value._string.data, rhs->_value._string.data);
case TRI_JSON_LIST: {
size_t nl = lhs->_value._objects._length;
size_t nr = rhs->_value._objects._length;
size_t i;
for (i = 0; i < nl; ++i) {
int result;
if (i >= nr) {
// left list is longer
return 1;
}
result = Compare(TRI_AtVector(&lhs->_value._objects, i), TRI_AtVector(&rhs->_value._objects, i));
if (result != 0) {
return result;
}
}
// right list is longer
if (nr > nl) {
return -1;
}
return 0;
}
case TRI_JSON_ARRAY: {
size_t nl = lhs->_value._objects._length;
size_t nr = rhs->_value._objects._length;
size_t i;
for (i = 0; i < nl; i += 2) {
int result;
if (i > nr) {
// left list is longer
return 1;
}
// compare key
result = Compare(TRI_AtVector(&lhs->_value._objects, i), TRI_AtVector(&rhs->_value._objects, i));
if (result != 0) {
return result;
}
// compare value
result = Compare(TRI_AtVector(&lhs->_value._objects, i + 1), TRI_AtVector(&rhs->_value._objects, i + 1));
if (result != 0) {
return result;
}
}
// right list is longer
if (nr > nl) {
return -1;
}
return 0;
}
default:
return 0;
}
}
static bool IsSameValue (const TRI_json_t* const lhs, const TRI_json_t* const rhs) {
if (!lhs || !rhs) {
return false;
}
if (lhs->_type != rhs->_type) {
return false;
}
switch (lhs->_type) {
case TRI_JSON_NULL:
return true;
case TRI_JSON_BOOLEAN:
return (lhs->_value._boolean == rhs->_value._boolean);
case TRI_JSON_NUMBER:
return (lhs->_value._number == rhs->_value._number); // TODO: handle epsilon
case TRI_JSON_STRING:
return TRI_EqualString(lhs->_value._string.data, rhs->_value._string.data);
case TRI_JSON_LIST:
case TRI_JSON_ARRAY: {
// lists and arrays can be treated the same here
size_t n = lhs->_value._objects._length;
size_t i;
if (n != rhs->_value._objects._length) {
return false;
}
for (i = 0; i < n; ++i) {
if (!IsSameValue(TRI_AtVector(&lhs->_value._objects, i), TRI_AtVector(&rhs->_value._objects, i))) {
return false;
}
}
return true;
}
default:
return false;
}
}
static bool IsInList (const TRI_json_t* const lhs, const TRI_json_t* const rhs) {
size_t n;
size_t i;
if (!lhs || !rhs || !rhs->_type == TRI_JSON_LIST) {
return false;
}
n = rhs->_value._objects._length;
for (i = 0; i < n; ++i) {
TRI_json_t* r = (TRI_json_t*) TRI_AtVector(&rhs->_value._objects, i);
if (IsSameValue(lhs, r)) {
return true;
}
}
return false;
}
#ifdef RANGE_OPTIMIZER
static char* AccessName (const TRI_aql_access_e type) {
switch (type) {
case TRI_AQL_ACCESS_ALL:
@ -252,6 +78,54 @@ static char* AccessName (const TRI_aql_access_e type) {
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief free access member data
////////////////////////////////////////////////////////////////////////////////
static void FreeAccessMembers (TRI_aql_field_access_t* const fieldAccess) {
assert(fieldAccess);
switch (fieldAccess->_type) {
case TRI_AQL_ACCESS_EXACT:
case TRI_AQL_ACCESS_LIST:
if (fieldAccess->_value._value) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, fieldAccess->_value._value);
}
break;
case TRI_AQL_ACCESS_SINGLE_RANGE:
if (fieldAccess->_value._singleRange._value) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, fieldAccess->_value._singleRange._value);
}
break;
case TRI_AQL_ACCESS_DOUBLE_RANGE:
if (fieldAccess->_value._between._lower._value) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, fieldAccess->_value._between._lower._value);
}
if (fieldAccess->_value._between._upper._value) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, fieldAccess->_value._between._upper._value);
}
break;
case TRI_AQL_ACCESS_ALL:
case TRI_AQL_ACCESS_IMPOSSIBLE:
default: {
// nada
}
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief free access structure with its members
////////////////////////////////////////////////////////////////////////////////
static void FreeAccess (TRI_aql_field_access_t* const fieldAccess) {
assert(fieldAccess);
FreeAccessMembers(fieldAccess);
TRI_Free(TRI_UNKNOWN_MEM_ZONE, fieldAccess->_fieldName);
TRI_Free(TRI_UNKNOWN_MEM_ZONE, fieldAccess);
}
static TRI_aql_field_access_t* MergeAccess (TRI_aql_context_t* const context,
TRI_aql_field_access_t* lhs,
TRI_aql_field_access_t* rhs) {
@ -267,47 +141,53 @@ static TRI_aql_field_access_t* MergeAccess (TRI_aql_context_t* const context,
lhs = rhs;
rhs = tmp;
}
if (lhs->_type == TRI_AQL_ACCESS_ALL) {
// TODO: free lhs
return rhs;
}
if (lhs->_type == TRI_AQL_ACCESS_IMPOSSIBLE) {
// TODO: free rhs
// impossible merged with anything just returns impossible
FreeAccess(rhs);
return lhs;
}
if (lhs->_type == TRI_AQL_ACCESS_ALL) {
// all merged with anything just returns the other side
FreeAccess(lhs);
return rhs;
}
if (lhs->_type == TRI_AQL_ACCESS_EXACT) {
if (rhs->_type == TRI_AQL_ACCESS_EXACT) {
if (!IsSameValue(lhs->_value._exactValue, rhs->_value._exactValue)) {
// lhs and rhs values are non-identical
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, lhs->_value._exactValue);
// TODO: free rhs
return lhs;
}
// check if values are identical
bool isSame = TRI_CheckSameValueJson(lhs->_value._value, rhs->_value._value);
// lhs and rhs values are identical
// TODO: free rhs
FreeAccess(rhs);
if (!isSame) {
// lhs and rhs values are non-identical, return impossible
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
}
return lhs;
}
else if (rhs->_type == TRI_AQL_ACCESS_LIST) {
if (!IsInList(lhs->_value._exactValue, rhs->_value._list)) {
// lhs value is not in rhs list
// check if lhs is contained in rhs list
bool inList = TRI_CheckInListJson(lhs->_value._value, rhs->_value._value);
FreeAccess(rhs);
if (!inList) {
// lhs value is not in rhs list, return impossible
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, lhs->_value._exactValue);
// TODO: free rhs
return lhs;
}
// lhs value is contained in rhs
// TODO: free rhs
return lhs;
}
else if (rhs->_type == TRI_AQL_ACCESS_SINGLE_RANGE) {
// check if value is in range
int result = Compare(lhs->_value._exactValue, rhs->_value._singleRange._value);
int result = TRI_CompareValuesJson(lhs->_value._value, rhs->_value._singleRange._value);
bool contained = ((rhs->_value._singleRange._type == TRI_AQL_RANGE_LOWER_EXCLUDED && result > 0) ||
(rhs->_value._singleRange._type == TRI_AQL_RANGE_LOWER_INCLUDED && result >= 0) ||
@ -315,15 +195,17 @@ static TRI_aql_field_access_t* MergeAccess (TRI_aql_context_t* const context,
(rhs->_value._singleRange._type == TRI_AQL_RANGE_UPPER_INCLUDED && result <= 0));
if (!contained) {
// lhs value is not contained in rhs range
// lhs value is not contained in rhs range, return impossible
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, lhs->_value._exactValue);
// TODO: free rhs
return lhs;
}
// lhs value is contained in rhs range
// TODO: free lhs
// lhs value is contained in rhs range, simply return rhs
FreeAccess(lhs);
return rhs;
}
else if (rhs->_type == TRI_AQL_ACCESS_DOUBLE_RANGE) {
@ -331,34 +213,39 @@ static TRI_aql_field_access_t* MergeAccess (TRI_aql_context_t* const context,
int result;
bool contained;
result = Compare(lhs->_value._exactValue, rhs->_value._between._lower._value);
// compare lower end
result = TRI_CompareValuesJson(lhs->_value._value, rhs->_value._between._lower._value);
contained = ((rhs->_value._between._lower._type == TRI_AQL_RANGE_LOWER_EXCLUDED && result > 0) ||
(rhs->_value._between._lower._type == TRI_AQL_RANGE_LOWER_INCLUDED && result >= 0));
if (!contained) {
// lhs value is not contained in rhs range
// lhs value is not contained in rhs range, return impossible
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, lhs->_value._exactValue);
// TODO: free rhs
return lhs;
}
result = Compare(lhs->_value._exactValue, rhs->_value._between._upper._value);
// compare upper end
result = TRI_CompareValuesJson(lhs->_value._value, rhs->_value._between._upper._value);
contained = ((rhs->_value._between._upper._type == TRI_AQL_RANGE_UPPER_EXCLUDED && result < 0) ||
(rhs->_value._between._upper._type == TRI_AQL_RANGE_UPPER_INCLUDED && result <= 0));
if (!contained) {
// lhs value is not contained in rhs range
// lhs value is not contained in rhs range, return impossible
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, lhs->_value._exactValue);
// TODO: free rhs
return lhs;
}
// lhs value is contained in rhs range
// TODO: free lhs
// lhs value is contained in rhs range, return rhs
FreeAccess(lhs);
return rhs;
}
}
@ -377,7 +264,171 @@ static TRI_aql_field_access_t* MergeAccess (TRI_aql_context_t* const context,
if (lhs->_type == TRI_AQL_ACCESS_SINGLE_RANGE) {
if (rhs->_type == TRI_AQL_ACCESS_SINGLE_RANGE) {
// check if value in range
TRI_json_t* lhsValue;
TRI_json_t* rhsValue;
TRI_aql_range_e lhsType;
TRI_aql_range_e rhsType;
int result;
if (lhs->_value._singleRange._type > rhs->_value._singleRange._type) {
// swap operands so they are always sorted
TRI_aql_field_access_t* tmp = lhs;
lhs = rhs;
rhs = tmp;
}
result = TRI_CompareValuesJson(lhs->_value._singleRange._value, rhs->_value._singleRange._value);
lhsType = lhs->_value._singleRange._type;
rhsType = rhs->_value._singleRange._type;
lhsValue = lhs->_value._singleRange._value;
rhsValue = rhs->_value._singleRange._value;
// check if ranges overlap
if ((lhsType == TRI_AQL_RANGE_LOWER_EXCLUDED && rhsType == TRI_AQL_RANGE_LOWER_EXCLUDED) ||
(lhsType == TRI_AQL_RANGE_LOWER_INCLUDED && rhsType == TRI_AQL_RANGE_LOWER_INCLUDED)) {
// > && >
// >= && >=
if (result > 0) {
// lhs > rhs
FreeAccess(rhs);
return lhs;
}
else {
FreeAccess(lhs);
return rhs;
}
}
else if ((lhsType == TRI_AQL_RANGE_UPPER_EXCLUDED && rhsType == TRI_AQL_RANGE_UPPER_EXCLUDED) ||
(lhsType == TRI_AQL_RANGE_UPPER_INCLUDED && rhsType == TRI_AQL_RANGE_UPPER_INCLUDED)) {
// < && <
// <= && <=
if (result > 0) {
// lhs > rhs
FreeAccess(lhs);
return rhs;
}
else {
FreeAccess(rhs);
return lhs;
}
}
else if (lhsType == TRI_AQL_RANGE_LOWER_EXCLUDED && rhsType == TRI_AQL_RANGE_LOWER_INCLUDED) {
// > && >=
if (result >= 0) {
// lhs > rhs
FreeAccess(rhs);
return lhs;
}
else {
FreeAccess(lhs);
return rhs;
}
}
else if (lhsType == TRI_AQL_RANGE_LOWER_EXCLUDED && rhsType == TRI_AQL_RANGE_UPPER_EXCLUDED) {
// > && <
if (result < 0) {
// save pointers
lhsValue = lhs->_value._singleRange._value;
rhsValue = rhs->_value._singleRange._value;
rhs->_value._singleRange._value = NULL;
FreeAccess(rhs);
lhs->_type = TRI_AQL_ACCESS_DOUBLE_RANGE;
lhs->_value._between._lower._type = lhsType;
lhs->_value._between._lower._value = lhsValue;
lhs->_value._between._upper._type = rhsType;
lhs->_value._between._upper._value = rhsValue;
return lhs;
}
else {
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
return lhs;
}
}
else if ((lhsType == TRI_AQL_RANGE_LOWER_EXCLUDED && rhsType == TRI_AQL_RANGE_UPPER_INCLUDED) ||
(lhsType == TRI_AQL_RANGE_LOWER_INCLUDED && rhsType == TRI_AQL_RANGE_UPPER_EXCLUDED)) {
// > && <=
// >= && <
if (result < 0) {
// save pointers
lhsValue = lhs->_value._singleRange._value;
rhsValue = rhs->_value._singleRange._value;
rhs->_value._singleRange._value = NULL;
FreeAccess(rhs);
lhs->_type = TRI_AQL_ACCESS_DOUBLE_RANGE;
lhs->_value._between._lower._type = lhsType;
lhs->_value._between._lower._value = lhsValue;
lhs->_value._between._upper._type = rhsType;
lhs->_value._between._upper._value = rhsValue;
return lhs;
}
else {
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
return lhs;
}
}
else if (lhsType == TRI_AQL_RANGE_LOWER_INCLUDED && rhsType == TRI_AQL_RANGE_UPPER_INCLUDED) {
// >= && <=
if (result < 0) {
// save pointers
lhsValue = lhs->_value._singleRange._value;
rhsValue = rhs->_value._singleRange._value;
rhs->_value._singleRange._value = NULL;
FreeAccess(rhs);
lhs->_type = TRI_AQL_ACCESS_DOUBLE_RANGE;
lhs->_value._between._lower._type = lhsType;
lhs->_value._between._lower._value = lhsValue;
lhs->_value._between._upper._type = rhsType;
lhs->_value._between._upper._value = rhsValue;
return lhs;
}
else if (result == 0) {
FreeAccess(rhs);
// save pointer
lhsValue = lhs->_value._singleRange._value;
lhs->_type = TRI_AQL_ACCESS_EXACT;
lhs->_value._value = lhsValue;
return lhs;
}
else {
FreeAccess(rhs);
FreeAccessMembers(lhs);
lhs->_type = TRI_AQL_ACCESS_IMPOSSIBLE;
return lhs;
}
}
else if (lhsType == TRI_AQL_RANGE_UPPER_EXCLUDED && rhsType == TRI_AQL_RANGE_UPPER_INCLUDED) {
// < && <=
if (result <= 0) {
FreeAccess(rhs);
return lhs;
}
else {
FreeAccess(lhs);
return rhs;
}
}
}
else if (rhs->_type == TRI_AQL_ACCESS_DOUBLE_RANGE) {
// check if value in range
@ -416,7 +467,7 @@ static TRI_aql_field_access_t* CreateAccess (TRI_aql_context_t* const context,
if (operator == AQL_NODE_OPERATOR_BINARY_EQ) {
fieldAccess->_type = TRI_AQL_ACCESS_EXACT;
fieldAccess->_value._exactValue = value;
fieldAccess->_value._value = value;
}
else if (operator == AQL_NODE_OPERATOR_BINARY_LT) {
fieldAccess->_type = TRI_AQL_ACCESS_SINGLE_RANGE;
@ -438,6 +489,11 @@ static TRI_aql_field_access_t* CreateAccess (TRI_aql_context_t* const context,
fieldAccess->_value._singleRange._type = TRI_AQL_RANGE_LOWER_INCLUDED;
fieldAccess->_value._singleRange._value = value;
}
else if (operator == AQL_NODE_OPERATOR_BINARY_IN) {
fieldAccess->_type = TRI_AQL_ACCESS_LIST;
fieldAccess->_value._value = value;
TRI_SortListJson(fieldAccess->_value._value);
}
else {
assert(false);
}
@ -445,7 +501,6 @@ static TRI_aql_field_access_t* CreateAccess (TRI_aql_context_t* const context,
return fieldAccess;
}
static void CreateFieldAccess (TRI_aql_context_t* const context,
const TRI_aql_field_name_t* const field,
const TRI_aql_node_type_e operator,
@ -473,7 +528,7 @@ static void CreateFieldAccess (TRI_aql_context_t* const context,
// free previous
// free fieldAccess
if (merged) {
TRI_InsertKeyAssociativePointer(&context->_ranges, fieldAccess->_fieldName, merged, true);
TRI_InsertKeyAssociativePointer(&context->_ranges, merged->_fieldName, merged, true);
printf("MERGE1\n");
}
@ -557,7 +612,8 @@ static void InspectFilter (TRI_aql_context_t* const context,
node->_type == AQL_NODE_OPERATOR_BINARY_LT ||
node->_type == AQL_NODE_OPERATOR_BINARY_LE ||
node->_type == AQL_NODE_OPERATOR_BINARY_GT ||
node->_type == AQL_NODE_OPERATOR_BINARY_GE) {
node->_type == AQL_NODE_OPERATOR_BINARY_GE ||
node->_type == AQL_NODE_OPERATOR_BINARY_IN) {
TRI_aql_node_t* lhs = TRI_AQL_NODE_MEMBER(node, 0);
TRI_aql_node_t* rhs = TRI_AQL_NODE_MEMBER(node, 1);
@ -581,6 +637,7 @@ static void InspectFilter (TRI_aql_context_t* const context,
}
}
}
#endif
////////////////////////////////////////////////////////////////////////////////
/// @brief create javascript function code for a relational operation
@ -804,15 +861,16 @@ static TRI_aql_node_t* OptimiseSort (TRI_aql_context_t* const context,
static TRI_aql_node_t* OptimiseFilter (TRI_aql_context_t* const context,
TRI_aql_node_t* node) {
#ifdef RANGE_OPTIMIZER
TRI_aql_node_t* expression = TRI_AQL_NODE_MEMBER(node, 0);
bool result;
if (!expression) {
return node;
}
if (!TRI_IsConstantValueNodeAql(expression)) {
//InspectFilter(context, expression);
InspectFilter(context, expression);
return node;
}
@ -823,7 +881,7 @@ static TRI_aql_node_t* OptimiseFilter (TRI_aql_context_t* const context,
return NULL;
}
#endif
return node;
}
@ -1111,6 +1169,7 @@ static TRI_aql_node_t* OptimiseBinaryArithmeticOperation (TRI_aql_context_t* con
static TRI_aql_node_t* MarkFor (TRI_aql_context_t* const context,
TRI_aql_node_t* node) {
#ifdef RANGE_OPTIMIZER
TRI_aql_node_t* nameNode = TRI_AQL_NODE_MEMBER(node, 0);
TRI_aql_node_t* expressionNode = TRI_AQL_NODE_MEMBER(node, 1);
@ -1126,6 +1185,7 @@ static TRI_aql_node_t* MarkFor (TRI_aql_context_t* const context,
return node;
}
}
#endif
return node;
}
@ -1172,7 +1232,7 @@ static TRI_aql_node_t* ModifyNode (void* data, TRI_aql_node_t* node) {
case AQL_NODE_FCALL:
return OptimiseFcall(context, node);
case AQL_NODE_FOR:
// return MarkFor(context, node);
return MarkFor(context, node);
default:
break;
}
@ -1218,7 +1278,8 @@ TRI_aql_node_t* TRI_FoldConstantsAql (TRI_aql_context_t* const context,
node = TRI_ModifyWalkTreeAql(walker, node);
TRI_FreeModifyTreeWalkerAql(walker);
/*
#ifdef RANGE_OPTIMIZER
size_t i;
for (i = 0; i < context->_ranges._nrAlloc; ++i) {
TRI_aql_field_access_t* fieldAccess = context->_ranges._table[i];
@ -1229,10 +1290,10 @@ TRI_aql_node_t* TRI_FoldConstantsAql (TRI_aql_context_t* const context,
printf("\nFIELD ACCESS\n- FIELD: %s\n",fieldAccess->_fieldName);
printf("- TYPE: %s\n", AccessName(fieldAccess->_type));
if (fieldAccess->_type == TRI_AQL_ACCESS_EXACT) {
if (fieldAccess->_type == TRI_AQL_ACCESS_EXACT || fieldAccess->_type == TRI_AQL_ACCESS_LIST) {
TRI_string_buffer_t b;
TRI_InitStringBuffer(&b, TRI_UNKNOWN_MEM_ZONE);
TRI_StringifyJson(&b, fieldAccess->_value._exactValue);
TRI_StringifyJson(&b, fieldAccess->_value._value);
printf("- VALUE: %s\n", b._buffer);
}
@ -1241,10 +1302,20 @@ TRI_aql_node_t* TRI_FoldConstantsAql (TRI_aql_context_t* const context,
TRI_InitStringBuffer(&b, TRI_UNKNOWN_MEM_ZONE);
TRI_StringifyJson(&b, fieldAccess->_value._singleRange._value);
printf("- VALUE: %s\n", b._buffer);
}
else if (fieldAccess->_type == TRI_AQL_ACCESS_DOUBLE_RANGE) {
TRI_string_buffer_t b;
TRI_InitStringBuffer(&b, TRI_UNKNOWN_MEM_ZONE);
TRI_StringifyJson(&b, fieldAccess->_value._between._lower._value);
TRI_AppendStringStringBuffer(&b, ", ");
TRI_StringifyJson(&b, fieldAccess->_value._between._upper._value);
printf("- VALUE: %s\n", b._buffer);
}
}
*/
#endif
return node;
}

View File

@ -29,12 +29,13 @@
#define TRIAGENS_DURHAM_AHUACATL_CONSTANT_FOLDER_H 1
#include <BasicsC/common.h>
#include <BasicsC/associative.h>
#include <BasicsC/hashes.h>
#include <BasicsC/json-utilities.h>
#include <BasicsC/logging.h>
#include <BasicsC/strings.h>
#include <BasicsC/string-buffer.h>
#include <BasicsC/hashes.h>
#include <BasicsC/logging.h>
#include <BasicsC/vector.h>
#include <BasicsC/associative.h>
#include "Ahuacatl/ahuacatl-ast-node.h"
#include "Ahuacatl/ahuacatl-tree-walker.h"
@ -89,8 +90,7 @@ typedef struct TRI_aql_field_access_s {
char* _fieldName;
TRI_aql_access_e _type;
union {
TRI_json_t* _exactValue;
TRI_json_t* _list;
TRI_json_t* _value;
TRI_aql_range_t _singleRange;
struct {
TRI_aql_range_t _lower;

289
BasicsC/json-utilities.c Normal file
View File

@ -0,0 +1,289 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief utility functions for json objects
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Jan Steemann
/// @author Copyright 2012, triagens GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#include <BasicsC/json-utilities.h>
// -----------------------------------------------------------------------------
// --SECTION-- private functions
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup Json
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief fruitsort initialisation parameters
///
/// Included fsrt.inc with these parameters will create a function SortJsonList
/// that is used to do the sorting. SortJsonList will call OrderDataCompareFunc()
/// to do the actual element comparisons
////////////////////////////////////////////////////////////////////////////////
static int CompareJson (TRI_json_t*, TRI_json_t*, size_t);
#define FSRT_INSTANCE SortJson
#define FSRT_NAME SortListJson
#define FSRT_TYPE TRI_json_t
#define FSRT_COMP(l,r,s) CompareJson(l,r,s)
uint32_t SortJsonFSRT_Rand = 0;
static uint32_t SortJsonRandomGenerator (void) {
return (SortJsonFSRT_Rand = SortJsonFSRT_Rand * 31415 + 27818);
}
#define FSRT__RAND \
((fs_b) + FSRT__UNIT * (SortJsonRandomGenerator() % FSRT__DIST(fs_e,fs_b,FSRT__SIZE)))
#include <BasicsC/fsrt.inc>
////////////////////////////////////////////////////////////////////////////////
/// @brief get type weight of a json value usable for comparison and sorting
////////////////////////////////////////////////////////////////////////////////
static inline int TypeWeight (const TRI_json_t* const value) {
switch (value->_type) {
case TRI_JSON_BOOLEAN:
return 1;
case TRI_JSON_NUMBER:
return 2;
case TRI_JSON_STRING:
return 3;
case TRI_JSON_LIST:
return 4;
case TRI_JSON_ARRAY:
return 5;
case TRI_JSON_NULL:
case TRI_JSON_UNUSED:
default:
return 0;
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief callback function used for json value sorting
////////////////////////////////////////////////////////////////////////////////
static int CompareJson (TRI_json_t* lhs, TRI_json_t* rhs, size_t size) {
return TRI_CompareValuesJson((TRI_json_t*) lhs, (TRI_json_t*) rhs);
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- public functions
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup Json
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief compare two json values
////////////////////////////////////////////////////////////////////////////////
int TRI_CompareValuesJson (const TRI_json_t* const lhs,
const TRI_json_t* const rhs) {
int lWeight = TypeWeight(lhs);
int rWeight = TypeWeight(rhs);
if (lWeight < rWeight) {
return -1;
}
if (lWeight > rWeight) {
return 1;
}
// equal weight
switch (lhs->_type) {
case TRI_JSON_UNUSED:
case TRI_JSON_NULL:
return 0; // null == null;
case TRI_JSON_BOOLEAN:
if (lhs->_value._boolean == rhs->_value._boolean) {
return 0;
}
if (!lhs->_value._boolean && rhs->_value._boolean) {
return -1;
}
return 1;
case TRI_JSON_NUMBER:
if (lhs->_value._number == rhs->_value._number) {
return 0;
}
if (lhs->_value._number < rhs->_value._number) {
return -1;
}
return 1;
case TRI_JSON_STRING:
return strcmp(lhs->_value._string.data, rhs->_value._string.data);
case TRI_JSON_LIST: {
size_t nl = lhs->_value._objects._length;
size_t nr = rhs->_value._objects._length;
size_t i;
for (i = 0; i < nl; ++i) {
int result;
if (i >= nr) {
// left list is longer
return 1;
}
result = TRI_CompareValuesJson(TRI_AtVector(&lhs->_value._objects, i),
TRI_AtVector(&rhs->_value._objects, i));
if (result != 0) {
return result;
}
}
// right list is longer
if (nr > nl) {
return -1;
}
return 0;
}
case TRI_JSON_ARRAY: {
size_t nl = lhs->_value._objects._length;
size_t nr = rhs->_value._objects._length;
size_t i;
for (i = 0; i < nl; i += 2) {
int result;
if (i > nr) {
// left list is longer
return 1;
}
// compare key
result = TRI_CompareValuesJson(TRI_AtVector(&lhs->_value._objects, i),
TRI_AtVector(&rhs->_value._objects, i));
if (result != 0) {
return result;
}
// compare value
result = TRI_CompareValuesJson(TRI_AtVector(&lhs->_value._objects, i + 1),
TRI_AtVector(&rhs->_value._objects, i + 1));
if (result != 0) {
return result;
}
}
// right list is longer
if (nr > nl) {
return -1;
}
return 0;
}
default:
return 0;
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief check if two json values are the same
////////////////////////////////////////////////////////////////////////////////
bool TRI_CheckSameValueJson (const TRI_json_t* const lhs,
const TRI_json_t* const rhs) {
return (TRI_CompareValuesJson(lhs, rhs) == 0);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief checks if a json value is contained in a json list
////////////////////////////////////////////////////////////////////////////////
bool TRI_CheckInListJson (const TRI_json_t* const search,
const TRI_json_t* const list) {
size_t n;
size_t i;
assert(search);
assert(list);
assert(list->_type == TRI_JSON_LIST);
// iterate over list
n = list->_value._objects._length;
for (i = 0; i < n; ++i) {
TRI_json_t* listValue = (TRI_json_t*) TRI_AtVector(&list->_value._objects, i);
if (TRI_CheckSameValueJson(search, listValue)) {
// value is contained in list, exit
return true;
}
}
// finished list iteration, value not contained
return false;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief sorts a json list in place
////////////////////////////////////////////////////////////////////////////////
TRI_json_t* TRI_SortListJson (TRI_json_t* const list) {
size_t n;
assert(list);
assert(list->_type == TRI_JSON_LIST);
n = list->_value._objects._length;
if (n > 1) {
// only sort if more than one value in list
SortListJson((TRI_json_t*) TRI_BeginVector(&list->_value._objects),
(TRI_json_t*) TRI_EndVector(&list->_value._objects));
}
return list;
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
// End:

89
BasicsC/json-utilities.h Normal file
View File

@ -0,0 +1,89 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief utility functions for json objects
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2004-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Jan Steemann
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#ifndef TRIAGENS_BASICS_C_JSON_UTILITIES_H
#define TRIAGENS_BASICS_C_JSON_UTILITIES_H 1
#include <BasicsC/common.h>
#include <BasicsC/json.h>
#ifdef __cplusplus
extern "C" {
#endif
// -----------------------------------------------------------------------------
// --SECTION-- public functions
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup Json
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief compare two json values
///
/// the values are first compared by their types, and only by their values if
/// the types are the same
/// returns -1 if lhs is smaller than rhs, 0 if lhs == rhs, and 1 if rhs is
/// greater than lhs
////////////////////////////////////////////////////////////////////////////////
int TRI_CompareValuesJson (const TRI_json_t* const, const TRI_json_t* const);
////////////////////////////////////////////////////////////////////////////////
/// @brief check if two json values are the same
////////////////////////////////////////////////////////////////////////////////
bool TRI_CheckSameValueJson (const TRI_json_t* const, const TRI_json_t* const);
////////////////////////////////////////////////////////////////////////////////
/// @brief checks if a json value is contained in a json list
////////////////////////////////////////////////////////////////////////////////
bool TRI_CheckInListJson (const TRI_json_t* const, const TRI_json_t* const);
////////////////////////////////////////////////////////////////////////////////
/// @brief sorts a json list in place
////////////////////////////////////////////////////////////////////////////////
TRI_json_t* TRI_SortListJson (TRI_json_t* const list);
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
// End:

View File

@ -240,6 +240,58 @@ void* TRI_AtVector (TRI_vector_t const* vector, size_t pos) {
return (void*) (vector->_buffer + pos * vector->_elementSize);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief inserts an element at a given position
////////////////////////////////////////////////////////////////////////////////
void TRI_InsertVector (TRI_vector_t* vector, void const* element, size_t position) {
char* newBuffer;
size_t newSize;
// ...........................................................................
// Check and see if we need to extend the vector
// ...........................................................................
if (vector->_length >= vector->_capacity || position >= vector->_length) {
newSize = (size_t) (1 + GROW_FACTOR * vector->_capacity);
if (position >= newSize) {
newSize = position + 1;
}
newBuffer = (char*) TRI_Allocate(vector->_memoryZone, newSize * vector->_elementSize, false);
if (newBuffer == NULL) {
TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY);
return;
}
vector->_capacity = newSize;
if (vector->_buffer != NULL) {
memcpy(newBuffer, vector->_buffer, vector->_length * vector->_elementSize);
TRI_Free(vector->_memoryZone, vector->_buffer);
}
vector->_buffer = newBuffer;
}
if (position < vector->_length) {
memmove(vector->_buffer + (vector->_elementSize * (position + 1)),
vector->_buffer + (vector->_elementSize * position),
vector->_elementSize * (vector->_length - position)
);
vector->_length += 1;
}
else {
vector->_length = position + 1;
}
memcpy(vector->_buffer + (vector->_elementSize * position), element, vector->_elementSize);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief sets an element at a given position
////////////////////////////////////////////////////////////////////////////////
@ -458,6 +510,11 @@ int TRI_PushBackVectorPointer (TRI_vector_pointer_t* vector, void* element) {
////////////////////////////////////////////////////////////////////////////////
int TRI_InsertVectorPointer (TRI_vector_pointer_t* vector, void* element, size_t n) {
// ...........................................................................
// Check and see if we need to extend the vector
// ...........................................................................
if (vector->_length >= vector->_capacity || n >= vector->_length) {
void* newBuffer;
size_t newSize = (size_t) (1 + GROW_FACTOR * vector->_capacity);
@ -728,6 +785,11 @@ int TRI_PushBackVectorString (TRI_vector_string_t* vector, char* element) {
////////////////////////////////////////////////////////////////////////////////
int TRI_InsertVectorString (TRI_vector_string_t* vector, char* element, size_t n) {
// ...........................................................................
// Check and see if we need to extend the vector
// ...........................................................................
if (n >= vector->_capacity || n >= vector->_length) {
char** newBuffer;
size_t newSize = (size_t) (1 + GROW_FACTOR * vector->_capacity);

View File

@ -146,6 +146,13 @@ void TRI_RemoveVector (TRI_vector_t*, size_t n);
void* TRI_AtVector (TRI_vector_t const*, size_t);
////////////////////////////////////////////////////////////////////////////////
/// @brief inserts an element at a given position
////////////////////////////////////////////////////////////////////////////////
void TRI_InsertVector (TRI_vector_t* vector, void const* element, size_t position);
////////////////////////////////////////////////////////////////////////////////
/// @brief sets an element at a given position
////////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,18 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/by-example
{ "collection" : "3179705695", "example" : [ { "i" : 1 } ] }
HTTP/1.1 201 Created
content-type: application/json
{
"result": [
{ "a": { "k": 2, "j": 2 }, "i": 1, "_rev": 3181802847, "_id": "3179705695/3181802847" },
{ "a": { "j": 1 }, "i": 1, "_rev": 3181475167, "_id": "3179705695/3181475167" },
{ "a": { "k": 1, "j": 1 }, "i": 1, "_rev": 3181737311, "_id": "3179705695/3181737311" },
{ "i": 1, "_rev": 3181147487, "_id": "3179705695/3181147487" }
],
"count": 4,
"error": false,
"hasMore": false,
"code": 201
}

View File

@ -0,0 +1,15 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/by-example
{ "collection" : "3179705695", "example" : [ { "a" : { "j" : 1 } } ] }
HTTP/1.1 201 Created
content-type: application/json
{
"result": [
{ "a": { "j": 1 }, "i": 1, "_rev": 3181475167, "_id": "3179705695/3181475167" }
],
"count": 1,
"error": false,
"hasMore": false,
"code": 201
}

View File

@ -0,0 +1,16 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/by-example
{ "collection" : "3179705695", "example" : [ "a.j", 1 ] }
HTTP/1.1 201 Created
content-type: application/json
{
"result": [
{ "a": { "j": 1 }, "i": 1, "_rev": 3181475167, "_id": "3179705695/3181475167" },
{ "a": { "k": 1, "j": 1 }, "i": 1, "_rev": 3181737311, "_id": "3179705695/3181737311" }
],
"count": 2,
"error": false,
"hasMore": false,
"code": 201
}

View File

@ -0,0 +1,11 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/first-example
{ "collection" : "666351134", "example" : [ "a.j", 1, "a.k", 1 ] }
HTTP/1.1 200 OK
content-type: application/json
{
"error": false,
"code": 200,
"document": { "_rev": 668382750, "_id": "666351134/668382750", "a": { "k": 1, "j": 1, "l" : 10 }, "i": 1 }
}

View File

@ -0,0 +1,12 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/first-example
{ "collection" : "666351134", "example" : [ "a.j", 1, "a.k", 2 ] }
HTTP/1.1 404 Not Found
content-type: application/json
{
"errorMessage": "no match",
"error": true,
"code": 404,
"errorNum": 404
}

View File

@ -1,7 +1,10 @@
function aqlTestSuite () {
function testSizeOfTestCollection () {
assertEqual(5, 5);
}
return {
testSizeOfTestCollection : function () {
assertEqual(5, 5);
};
}
jsUnity.run(aqlTestSuite);
return jsunity.done();

View File

@ -0,0 +1,2 @@
avocado> db.users.count();
10001

View File

@ -0,0 +1,2 @@
avocado> db.users.firstExample("name", 1237);
{ "_id" : "100225/83049373", "_rev" : 83049373, "name" : 1237 }

View File

@ -11,6 +11,6 @@ fi
HEADER='<html><head><title>AvocadoDB Manual</title> <style media="screen" type="text/css" style="display:none">body{background-color:white;font:13px Helvetica,arial,freesans,clean,sans-serif;line-height:1.4;color:#333;}#access{font-size:16px;margin-left:12px;display:block;margin-left:10px;margin-right:10px;background-color:#F3F1EE!important;}#access a{border-right:1px solid #DBDEDF;color:#A49F96;display:block;line-height:38px;padding:0 10px;text-decoration:none;}#navigation ul{text-transform:uppercase;list-style:none;margin:0;}#navigation li{float:left;position:relative;}#container{width:920px;margin:0 auto;}a{color:#4183C4;text-decoration:none;}.contents h2{font-size:24px;border-bottom:1px solid #CCC;color:black;}.contents h1{font-size:33px;border-bottom:1px solid #CCC;color:black;}.clearfix:after{content:".";display:block;clear:both;font-size:0;height:0;visibility:hidden;}/**/ *:first-child+html .clearfix{min-height:0;}/**/ * html .clearfix{height:1%;}</style></head><body><div id="container"><img src="images/logo_avocadodb.jpg" width="397" height="67" alt="AvocadoDB"><div id="access" role="navigation"><div id="navigation"><ul id="menu-ahome" class="menu"><li><a href="Home.html">Table of contents</a></li> <li><a href="http://www.avocadodb.org">AvocadoDB homepage</a></li></ul></div><div class="clearfix"></div></div><div>'
FOOTER='</div></body></html>'
sed -e "s~<\\?php include \"include/header.php\" \\?> ~${HEADER}~" $INPUT \
| sed -e "s~<\\?php include \"include/footer.php\" \\?> ~${FOOTER}~" \
sed -e "s~<?php include \"include/header.php\" ?> ~${HEADER}~" $INPUT \
| sed -e "s~<?php include \"include/footer.php\" ?> ~${FOOTER}~" \
| sed -e "s~<div class=\"title\">\\([^<]*\\)</div>~<h1>\\1</h1>~" > $OUTPUT

View File

@ -32,6 +32,7 @@ libavocado_a_SOURCES = \
BasicsC/hashes.c \
BasicsC/init.c \
BasicsC/json.c \
BasicsC/json-utilities.c \
BasicsC/linked-list.c \
BasicsC/locks-macos.c \
BasicsC/locks-posix.c \
@ -409,6 +410,8 @@ WIKI = \
ShellIndex \
SimpleQueries \
UserManualServer \
UserManualServerBasics \
UserManualServerStartStop \
UserManualShell \
UserManualShellStartStop \
jsUnity

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.12 from Makefile.am.
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -60,23 +60,6 @@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -111,13 +94,9 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/m4/Makefile.all-in-one-v8 \
$(top_srcdir)/BasicsC/local-configuration.h.in \
$(top_srcdir)/Doxygen/avocado.doxy.in \
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.h.in \
$(top_srcdir)/config/config.sub $(top_srcdir)/config/depcomp \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \
$(top_srcdir)/configure config/compile config/config.guess \
config/config.sub config/depcomp config/install-sh \
config/missing
$(top_srcdir)/config/config.h.in $(top_srcdir)/configure \
config/compile config/config.guess config/config.sub \
config/depcomp config/install-sh config/missing
@ENABLE_MRUBY_TRUE@am__append_4 = \
@ENABLE_MRUBY_TRUE@ MRuby/MRLineEditor.cpp \
@ENABLE_MRUBY_TRUE@ MRuby/mr-utils.cpp
@ -179,11 +158,11 @@ CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
AM_V_AR = $(am__v_AR_$(V))
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
am__v_AR_0 = @echo " AR " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
libavocado_a_AR = $(AR) $(ARFLAGS)
libavocado_a_LIBADD =
@ -199,9 +178,9 @@ am__libavocado_a_SOURCES_DIST = Basics/ConditionLocker.cpp \
BasicsC/associative-multi.c BasicsC/associative.c \
BasicsC/conversions.c BasicsC/csv.c BasicsC/error.c \
BasicsC/files.c BasicsC/hashes.c BasicsC/init.c BasicsC/json.c \
BasicsC/linked-list.c BasicsC/locks-macos.c \
BasicsC/locks-posix.c BasicsC/logging.c BasicsC/memory.c \
BasicsC/process-utils.c BasicsC/random.c \
BasicsC/json-utilities.c BasicsC/linked-list.c \
BasicsC/locks-macos.c BasicsC/locks-posix.c BasicsC/logging.c \
BasicsC/memory.c BasicsC/process-utils.c BasicsC/random.c \
BasicsC/socket-utils.c BasicsC/string-buffer.c \
BasicsC/strings.c BasicsC/structures.c \
BasicsC/system-functions.c BasicsC/terminal-utils-ncurses.c \
@ -254,12 +233,12 @@ am_libavocado_a_OBJECTS = Basics/ConditionLocker.$(OBJEXT) \
BasicsC/csv.$(OBJEXT) BasicsC/error.$(OBJEXT) \
BasicsC/files.$(OBJEXT) BasicsC/hashes.$(OBJEXT) \
BasicsC/init.$(OBJEXT) BasicsC/json.$(OBJEXT) \
BasicsC/linked-list.$(OBJEXT) BasicsC/locks-macos.$(OBJEXT) \
BasicsC/locks-posix.$(OBJEXT) BasicsC/logging.$(OBJEXT) \
BasicsC/memory.$(OBJEXT) BasicsC/process-utils.$(OBJEXT) \
BasicsC/random.$(OBJEXT) BasicsC/socket-utils.$(OBJEXT) \
BasicsC/string-buffer.$(OBJEXT) BasicsC/strings.$(OBJEXT) \
BasicsC/structures.$(OBJEXT) \
BasicsC/json-utilities.$(OBJEXT) BasicsC/linked-list.$(OBJEXT) \
BasicsC/locks-macos.$(OBJEXT) BasicsC/locks-posix.$(OBJEXT) \
BasicsC/logging.$(OBJEXT) BasicsC/memory.$(OBJEXT) \
BasicsC/process-utils.$(OBJEXT) BasicsC/random.$(OBJEXT) \
BasicsC/socket-utils.$(OBJEXT) BasicsC/string-buffer.$(OBJEXT) \
BasicsC/strings.$(OBJEXT) BasicsC/structures.$(OBJEXT) \
BasicsC/system-functions.$(OBJEXT) \
BasicsC/terminal-utils-ncurses.$(OBJEXT) \
BasicsC/terminal-utils.$(OBJEXT) \
@ -462,28 +441,28 @@ am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_@AM_V@)
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
am__v_CXX_0 = @echo " CXX " $@;
AM_V_CXX = $(am__v_CXX_$(V))
am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
am__v_CXX_0 = @echo " CXX " $@;
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
am__v_CXXLD_0 = @echo " CXXLD " $@;
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
AM_V_CXXLD = $(am__v_CXXLD_$(V))
am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
am__v_CXXLD_0 = @echo " CXXLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libavocado_a_SOURCES) $(UnitTests_basics_suite_SOURCES) \
$(UnitTests_geo_suite_SOURCES) $(avocado_SOURCES) \
$(avocimp_SOURCES) $(avocirb_SOURCES) $(avocsh_SOURCES)
@ -492,11 +471,6 @@ DIST_SOURCES = $(am__libavocado_a_SOURCES_DIST) \
$(am__UnitTests_geo_suite_SOURCES_DIST) $(avocado_SOURCES) \
$(avocimp_SOURCES) $(am__avocirb_SOURCES_DIST) \
$(avocsh_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -518,33 +492,19 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
DATA = $(nobase_pkgdata_DATA)
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
AM_RECURSIVE_TARGETS = cscope
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@ -750,9 +710,9 @@ libavocado_a_SOURCES = Basics/ConditionLocker.cpp \
BasicsC/associative-multi.c BasicsC/associative.c \
BasicsC/conversions.c BasicsC/csv.c BasicsC/error.c \
BasicsC/files.c BasicsC/hashes.c BasicsC/init.c BasicsC/json.c \
BasicsC/linked-list.c BasicsC/locks-macos.c \
BasicsC/locks-posix.c BasicsC/logging.c BasicsC/memory.c \
BasicsC/process-utils.c BasicsC/random.c \
BasicsC/json-utilities.c BasicsC/linked-list.c \
BasicsC/locks-macos.c BasicsC/locks-posix.c BasicsC/logging.c \
BasicsC/memory.c BasicsC/process-utils.c BasicsC/random.c \
BasicsC/socket-utils.c BasicsC/string-buffer.c \
BasicsC/strings.c BasicsC/structures.c \
BasicsC/system-functions.c BasicsC/terminal-utils-ncurses.c \
@ -1051,6 +1011,8 @@ WIKI = \
ShellIndex \
SimpleQueries \
UserManualServer \
UserManualServerBasics \
UserManualServerStartStop \
UserManualShell \
UserManualShellStartStop \
jsUnity
@ -1126,7 +1088,7 @@ all: $(BUILT_SOURCES)
.SUFFIXES:
.SUFFIXES: .c .cpp .o .obj
am--refresh: Makefile
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Makefile.files $(srcdir)/Makefile.doxygen $(srcdir)/Makefile.javascript $(srcdir)/Makefile.unittests $(srcdir)/Makefile.flex $(srcdir)/Makefile.bison $(srcdir)/m4/Makefile.all-in-one-libev $(srcdir)/m4/Makefile.all-in-one-v8 $(srcdir)/m4/Makefile.all-in-one-mruby $(am__configure_deps)
@for dep in $?; do \
@ -1151,7 +1113,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(srcdir)/Makefile.files $(srcdir)/Makefile.doxygen $(srcdir)/Makefile.javascript $(srcdir)/Makefile.unittests $(srcdir)/Makefile.flex $(srcdir)/Makefile.bison $(srcdir)/m4/Makefile.all-in-one-libev $(srcdir)/m4/Makefile.all-in-one-v8 $(srcdir)/m4/Makefile.all-in-one-mruby:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@ -1163,8 +1124,10 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config/config.h: config/stamp-h1
@if test ! -f $@; then rm -f config/stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; else :; fi
@if test ! -f $@; then \
rm -f config/stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; \
else :; fi
config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status
@rm -f config/stamp-h1
@ -1175,8 +1138,10 @@ $(top_srcdir)/config/config.h.in: $(am__configure_deps)
touch $@
BasicsC/local-configuration.h: BasicsC/stamp-h2
@if test ! -f $@; then rm -f BasicsC/stamp-h2; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) BasicsC/stamp-h2; else :; fi
@if test ! -f $@; then \
rm -f BasicsC/stamp-h2; \
$(MAKE) $(AM_MAKEFLAGS) BasicsC/stamp-h2; \
else :; fi
BasicsC/stamp-h2: $(top_srcdir)/BasicsC/local-configuration.h.in $(top_builddir)/config.status
@rm -f BasicsC/stamp-h2
@ -1255,6 +1220,8 @@ BasicsC/init.$(OBJEXT): BasicsC/$(am__dirstamp) \
BasicsC/$(DEPDIR)/$(am__dirstamp)
BasicsC/json.$(OBJEXT): BasicsC/$(am__dirstamp) \
BasicsC/$(DEPDIR)/$(am__dirstamp)
BasicsC/json-utilities.$(OBJEXT): BasicsC/$(am__dirstamp) \
BasicsC/$(DEPDIR)/$(am__dirstamp)
BasicsC/linked-list.$(OBJEXT): BasicsC/$(am__dirstamp) \
BasicsC/$(DEPDIR)/$(am__dirstamp)
BasicsC/locks-macos.$(OBJEXT): BasicsC/$(am__dirstamp) \
@ -1478,17 +1445,14 @@ MRuby/MRLineEditor.$(OBJEXT): MRuby/$(am__dirstamp) \
MRuby/$(DEPDIR)/$(am__dirstamp)
MRuby/mr-utils.$(OBJEXT): MRuby/$(am__dirstamp) \
MRuby/$(DEPDIR)/$(am__dirstamp)
libavocado.a: $(libavocado_a_OBJECTS) $(libavocado_a_DEPENDENCIES) $(EXTRA_libavocado_a_DEPENDENCIES)
libavocado.a: $(libavocado_a_OBJECTS) $(libavocado_a_DEPENDENCIES)
$(AM_V_at)-rm -f libavocado.a
$(AM_V_AR)$(libavocado_a_AR) libavocado.a $(libavocado_a_OBJECTS) $(libavocado_a_LIBADD)
$(AM_V_at)$(RANLIB) libavocado.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
@ -1527,11 +1491,8 @@ clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
@ -1612,7 +1573,7 @@ UnitTests/Jutland/StringBufferTest.$(OBJEXT): \
UnitTests/Jutland/StringUtilsTest.$(OBJEXT): \
UnitTests/Jutland/$(am__dirstamp) \
UnitTests/Jutland/$(DEPDIR)/$(am__dirstamp)
UnitTests/basics_suite$(EXEEXT): $(UnitTests_basics_suite_OBJECTS) $(UnitTests_basics_suite_DEPENDENCIES) $(EXTRA_UnitTests_basics_suite_DEPENDENCIES) UnitTests/$(am__dirstamp)
UnitTests/basics_suite$(EXEEXT): $(UnitTests_basics_suite_OBJECTS) $(UnitTests_basics_suite_DEPENDENCIES) UnitTests/$(am__dirstamp)
@rm -f UnitTests/basics_suite$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(UnitTests_basics_suite_OBJECTS) $(UnitTests_basics_suite_LDADD) $(LIBS)
UnitTests/Cambridge/$(am__dirstamp):
@ -1627,7 +1588,7 @@ UnitTests/Cambridge/Runner.$(OBJEXT): \
UnitTests/Cambridge/georeg.$(OBJEXT): \
UnitTests/Cambridge/$(am__dirstamp) \
UnitTests/Cambridge/$(DEPDIR)/$(am__dirstamp)
UnitTests/geo_suite$(EXEEXT): $(UnitTests_geo_suite_OBJECTS) $(UnitTests_geo_suite_DEPENDENCIES) $(EXTRA_UnitTests_geo_suite_DEPENDENCIES) UnitTests/$(am__dirstamp)
UnitTests/geo_suite$(EXEEXT): $(UnitTests_geo_suite_OBJECTS) $(UnitTests_geo_suite_DEPENDENCIES) UnitTests/$(am__dirstamp)
@rm -f UnitTests/geo_suite$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(UnitTests_geo_suite_OBJECTS) $(UnitTests_geo_suite_LDADD) $(LIBS)
Admin/$(am__dirstamp):
@ -1979,7 +1940,7 @@ VocBase/voc-shaper.$(OBJEXT): VocBase/$(am__dirstamp) \
VocBase/$(DEPDIR)/$(am__dirstamp)
VocBase/vocbase.$(OBJEXT): VocBase/$(am__dirstamp) \
VocBase/$(DEPDIR)/$(am__dirstamp)
avocado$(EXEEXT): $(avocado_OBJECTS) $(avocado_DEPENDENCIES) $(EXTRA_avocado_DEPENDENCIES)
avocado$(EXEEXT): $(avocado_OBJECTS) $(avocado_DEPENDENCIES)
@rm -f avocado$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(avocado_OBJECTS) $(avocado_LDADD) $(LIBS)
SimpleHttpClient/$(am__dirstamp):
@ -2006,7 +1967,7 @@ V8Client/V8ClientConnection.$(OBJEXT): V8Client/$(am__dirstamp) \
V8Client/$(DEPDIR)/$(am__dirstamp)
V8Client/avocimp.$(OBJEXT): V8Client/$(am__dirstamp) \
V8Client/$(DEPDIR)/$(am__dirstamp)
avocimp$(EXEEXT): $(avocimp_OBJECTS) $(avocimp_DEPENDENCIES) $(EXTRA_avocimp_DEPENDENCIES)
avocimp$(EXEEXT): $(avocimp_OBJECTS) $(avocimp_DEPENDENCIES)
@rm -f avocimp$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(avocimp_OBJECTS) $(avocimp_LDADD) $(LIBS)
MRClient/$(am__dirstamp):
@ -2017,12 +1978,12 @@ MRClient/$(DEPDIR)/$(am__dirstamp):
@: > MRClient/$(DEPDIR)/$(am__dirstamp)
MRClient/avocirb.$(OBJEXT): MRClient/$(am__dirstamp) \
MRClient/$(DEPDIR)/$(am__dirstamp)
avocirb$(EXEEXT): $(avocirb_OBJECTS) $(avocirb_DEPENDENCIES) $(EXTRA_avocirb_DEPENDENCIES)
avocirb$(EXEEXT): $(avocirb_OBJECTS) $(avocirb_DEPENDENCIES)
@rm -f avocirb$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(avocirb_OBJECTS) $(avocirb_LDADD) $(LIBS)
V8Client/avocsh.$(OBJEXT): V8Client/$(am__dirstamp) \
V8Client/$(DEPDIR)/$(am__dirstamp)
avocsh$(EXEEXT): $(avocsh_OBJECTS) $(avocsh_DEPENDENCIES) $(EXTRA_avocsh_DEPENDENCIES)
avocsh$(EXEEXT): $(avocsh_OBJECTS) $(avocsh_DEPENDENCIES)
@rm -f avocsh$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(avocsh_OBJECTS) $(avocsh_LDADD) $(LIBS)
@ -2080,6 +2041,7 @@ mostlyclean-compile:
-rm -f BasicsC/files.$(OBJEXT)
-rm -f BasicsC/hashes.$(OBJEXT)
-rm -f BasicsC/init.$(OBJEXT)
-rm -f BasicsC/json-utilities.$(OBJEXT)
-rm -f BasicsC/json.$(OBJEXT)
-rm -f BasicsC/linked-list.$(OBJEXT)
-rm -f BasicsC/locks-macos.$(OBJEXT)
@ -2325,6 +2287,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/files.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/hashes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/init.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/json-utilities.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/json.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/linked-list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/locks-macos.Po@am__quote@
@ -2519,47 +2482,48 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
install-nobase_pkgdataDATA: $(nobase_pkgdata_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(nobase_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
fi; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for file in $$files; do \
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)/$$dir'"; \
echo "$(MKDIR_P) '$(DESTDIR)$(pkgdatadir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgdatadir)/$$dir"; }; \
echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(pkgdatadir)/$$dir'"; \
$(INSTALL_DATA) $$xfiles "$(DESTDIR)$(pkgdatadir)/$$dir" || exit $$?; }; \
@ -2569,7 +2533,9 @@ uninstall-nobase_pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(nobase_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -2620,32 +2586,8 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@ -2688,36 +2630,36 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
$(am__remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@ -2728,8 +2670,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@ -2749,7 +2691,6 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@ -2773,21 +2714,13 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@ -2822,15 +2755,10 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
@ -2996,11 +2924,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-nobase_pkgdataDATA \
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-cscope clean-generic clean-local \
clean-binPROGRAMS clean-generic clean-local \
clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \
cscope cscopelist ctags dist dist-all dist-bzip2 dist-gzip \
dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-compile distclean-generic distclean-hdr \
ctags dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am \

View File

@ -11,6 +11,6 @@ MANUAL_DST="fceller@www.avocadodb.org:/srv/www/www.avocadodb.org/avoc/manuals"
publish:
(cd Doxygen/wiki && git checkout --force && git pull)
$(MAKE) wiki
(cd Doxygen/wiki && git commit -m "`date`" -a; git push)
(cd Doxygen/wiki && git add *.md; git commit -m "`date`" -a; git push)
@for w in $(WIKI); do scp Doxygen/html/$$w.html $(MANUAL_DST); done

View File

@ -52,7 +52,7 @@
/// @page HttpIndex HTTP Interface for Indexes
///
/// This is an introduction to AvocadoDB's Http interface for indexes in
/// general. There are special section for
/// general. There are special sections for
///
/// @copydoc IndexesTOC
///

View File

@ -41,6 +41,8 @@
///
/// <ol>
/// <li>@ref HttpSimpleAll "POST /_api/simple/all"</li>
/// <li>@ref HttpSimpleByExample "POST /_api/simple/by-example"</li>
/// <li>@ref HttpSimpleFirstExample "POST /_api/simple/first-example"</li>
/// <li>@ref HttpSimpleNear "POST /_api/simple/near"</li>
/// <li>@ref HttpSimpleWithin "POST /_api/simple/within"</li>
/// </ol>
@ -71,13 +73,20 @@
/// @copydetails JSA_PUT_api_simple_all
/// <hr>
///
/// @anchor HttpSimpleByExample
/// @copydetails JSA_PUT_api_simple_by_example
/// <hr>
///
/// @anchor HttpSimpleFirstExample
/// @copydetails JSA_PUT_api_simple_first_example
/// <hr>
///
/// @anchor HttpSimpleNear
/// @copydetails JSA_PUT_api_simple_near
/// <hr>
///
/// @anchor HttpSimpleWithin
/// @copydetails JSA_PUT_api_simple_within
/// <hr>
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -74,9 +74,6 @@
///
/// @subsection HomePython Python
///
/// Help wanted:
/// http://www.avocadodb.org/2012/03/24/contributors-for-python-api-wanted-for-nosql-project
///
/// @subsection HomeREST REST
///
/// @subsection HomeRuby Ruby

View File

@ -29,10 +29,8 @@
/// @page InstallManual AvocadoDB Installation Manual
///
/// <ol>
/// <li>@ref Installing
/// <li>
/// <li>@ref Compiling
/// </li>
/// <li>@ref Installing</li>
/// <li>@ref Compiling</li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
@ -56,7 +54,7 @@
/// @page Installing Installing the AvocadoDB
///
/// <hr>
/// @copydoc CompilingTOC
/// @copydoc InstallingTOC
/// <hr>
///
/// @section MacOSX

View File

@ -0,0 +1,64 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief module "internal"
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2012 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page jsUnity Using jsUnity and node-jscoverage
///
/// The AvocadoDB contains a wrapper for
/// <a href="http://jsunity.com/">jsUnity</a>, a lightyweight universal
/// JavAScript unit testing framework.
///
/// @section jsUnityRunningTest Running jsUnity Tests
/////////////////////////////////////////////////////
///
/// Assume that you have a test file containing
///
/// @verbinclude jsunity1
///
/// Then you can run the test suite using @FN{jsunity.runTest}
///
/// @verbinclude jsunity2
///
/// @section jsUnityRunningCoverage Running jsUnity Tests with Coverage
///////////////////////////////////////////////////////////////////////
///
/// You can use the coverage tool
/// <a href="https://github.com/visionmedia/node-jscoverage">@LIT{node-jscoverage}</a>.
///
/// Assume that your file live in a directory called @LIT{lib}. Use
///
/// @CODE{node-jscoverage lib lib-cov}
///
/// to create a copy of the JavaScript files with coverage information. Start
/// the AvocadoDB with these files and use @FN{jsunity.runCoverage} instead of
/// @FN{jsunity.runTest}.
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
// End:

View File

@ -60,22 +60,18 @@
/// <li>@ref HttpSystem
/// @copydetails HttpSystemTOC
/// </li>
/// <li>@ref OTWPSimpleQueries
/// <ol>
/// <li>@ref OTWPSimpleQueriesByExample "PUT /_api/simple/by-example"</li>
/// </ol>
/// </li>
/// <li>@ref Key-Value
/// <ol>
/// <li>@ref Key-ValuePost "POST /_api/key/@FA{collection-name}/@FA{key}"</li>
/// <li>@ref Key-ValuePut "PUT /_api/key/@FA{collection-name}/@FA{key}"</li>
/// <li>@ref Key-ValueGet "GET /_api/key/@FA{collection-name}/@FA{key}"</li>
/// <li>@ref Key-ValueDelete "DELETE /_api/key/@FA{collection-name}/@FA{key}"</li>
/// <li>@ref Key-ValueSearch "GET /_api/keys/@FA{collection-name}/@FA{prefix}"</li>
/// </ol>
/// </li>
/// </ol>
/// </li>
/// <li>@ref Key-Value (Under Construction)
/// <ol>
/// <li>@ref Key-ValuePost "POST /_api/key/collection-name/key"</li>
/// <li>@ref Key-ValuePut "PUT /_api/key/collection-name/key"</li>
/// <li>@ref Key-ValueGet "GET /_api/key/collection-name/key"</li>
/// <li>@ref Key-ValueDelete "DELETE /_api/key/collection-name/key"</li>
/// <li>@ref Key-ValueSearch "GET /_api/keys/collection-name/prefix"</li>
/// </ol>
/// </li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
@ -85,14 +81,6 @@
/// <hr>
/// @copydoc OTWPTOC
/// <hr>
///
/// @section OTWPSimpleQueries Simple Queries
/////////////////////////////////////////////
///
/// @anchor OTWPSimpleQueriesByExample
/// @copydetails JSA_PUT_api_simple_by_example
/// <hr>
///
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -31,36 +31,39 @@
/// <ol>
/// <li>@ref SimpleQueriesQueries
/// <ol>
/// <li>@ref SimpleQueryDocument "db.@FA{collection}.document(@FA{document-reference})"</li>
/// <li>@ref SimpleQueryAll "db.@FA{collection}.all()"</li>
/// <li>@ref SimpleQueryByExample "db.@FA{collection}.byExample()"</li>
/// <li>@ref SimpleQueryCount "@FA{query}.count()"</li>
/// <li>@ref SimpleQueryDocument "collection.document(document-reference)"</li>
/// <li>@ref SimpleQueryAll "collection.all()"</li>
/// <li>@ref SimpleQueryByExample "collection.byExample(example)"</li>
/// <li>@ref SimpleQueryFirstExample "collection.firstExample(example)"</li>
/// <li>@ref SimpleQueryCollectionCount "collection.count()"</li>
/// <li>@ref SimpleQueryToArray "collection.toArray()"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesGeoQueries
/// <ol>
/// <li>@ref SimpleQueryNear "db.@FA{collection}.near()"</li>
/// <li>@ref SimpleQueryWithin "db.@FA{collection}.within()"</li>
/// <li>@ref SimpleQueryGeo "db.@FA{collection}.geo()"</li>
/// <li>@ref SimpleQueryNear "collection.near(latitude, longitude)"</li>
/// <li>@ref SimpleQueryWithin "collection.within(latitude, longitude)"</li>
/// <li>@ref SimpleQueryGeo "collection.geo(location)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesEdgesQueries
/// <ol>
/// <li>@ref SimpleQueryEdges "edges.@FA{collection}.edges()"</li>
/// <li>@ref SimpleQueryInEdges "edges.@FA{collection}.inEdges()"</li>
/// <li>@ref SimpleQueryOutEdges "edges.@FA{collection}.outEdges()"</li>
/// <li>@ref SimpleQueryEdges "edges-collection.edges(vertex)"</li>
/// <li>@ref SimpleQueryInEdges "edges-collection.inEdges(vertex)"</li>
/// <li>@ref SimpleQueryOutEdges "edges-collection.outEdges(vertex)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesPagination
/// <ol>
/// <li>@ref SimpleQueryLimit "@FA{query}.limit(@FA{limit})"</li>
/// <li>@ref SimpleQuerySkip "@FA{query}.skip(@FA{skip})"</li>
/// <li>@ref SimpleQueryLimit "query.limit(limit)"</li>
/// <li>@ref SimpleQuerySkip "query.skip(skip)"</li>
/// </ol>
/// </li>
/// <li>@ref SimpleQueriesSequentialAccess
/// <ol>
/// <li>@ref SimpleQueryHasNext "@FA{query}.hasNext()"</li>
/// <li>@ref SimpleQueryNext "@FA{query}.next()"</li>
/// <li>@ref SimpleQueryHasNext "query.hasNext()"</li>
/// <li>@ref SimpleQueryNext "query.next()"</li>
/// <li>@ref SimpleQueryCount "query.count()"</li>
/// </ol>
/// </li>
/// </ol>
@ -72,17 +75,20 @@
/// Simple queries can be used if the query condition is straight forward
/// simple, i. e., a document reference, all documents, a query-by-example, or a
/// simple geo query. In a simple query you can specify exactly one collection
/// and one condition. The result can then be sorted and result can be split
/// into pages.
/// and one condition.
///
/// <hr>
/// @copydoc SimpleQueriesTOC
/// <hr>
///
/// If a query returns a cursor, then you can use @FN{hasNext} and @FN{next} to
/// iterate over the result set or @FN{toArray} to convert it to an array.
///
/// @section SimpleQueriesQueries Queries
/////////////////////////////////////////
///
/// @anchor SimpleQueryDocument
/// @copydetails JS_DocumentVocbaseCol
/// <hr>
///
/// @anchor SimpleQueryAll
@ -93,8 +99,16 @@
/// @copydetails JSF_AvocadoCollection_prototype_byExample
/// <hr>
///
/// @anchor SimpleQueryCount
/// @copydetails JSF_SimpleQuery_prototype_count
/// @anchor SimpleQueryFirstExample
/// @copydetails JSF_AvocadoCollection_prototype_firstExample
/// <hr>
///
/// @anchor SimpleQueryCollectionCount
/// @copydetails JS_CountVocbaseCol
/// <hr>
///
/// @anchor SimpleQueryToArray
/// @copydetails JSF_AvocadoCollection_prototype_toArray
///
/// @section SimpleQueriesGeoQueries Geo Queries
////////////////////////////////////////////////
@ -148,7 +162,7 @@
/// If, for example, you display the result of a user search, then you are in
/// general not interested in the completed result set, but only the first 10 or
/// so documents. Or maybe the next 10 documents for the second page. In this
/// case, you can the @FN{skip} and @FN{limit} operators. These operators works
/// case, you can the @FN{skip} and @FN{limit} operators. These operators work
/// like LIMIT in MySQL.
///
/// @FN{skip} used together with @FN{limit} can be used to implement pagination.
@ -174,6 +188,10 @@
///
/// @anchor SimpleQueryNext
/// @copydetails JSF_SimpleQuery_prototype_next
/// <hr>
///
/// @anchor SimpleQueryCount
/// @copydetails JSF_SimpleQuery_prototype_count
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -33,12 +33,6 @@
/// <ol>
/// <li>@ref UserManualServerStartStop
/// </li>
/// <li>AvocadoScript
/// <ol>
/// <li>@ref SimpleQueries
/// </li>
/// </ol>
/// </li>
/// <li>Avocado Query Language
/// <ol>
/// <li>@ref AQLBasics
@ -49,47 +43,18 @@
/// </li>
/// </ol>
/// </li>
/// <li>@ref AvocadoScript
/// <ol>
/// <li>GeoCoordinates
/// </li>
/// </ol>
/// </li>
/// <li>Vertices, Edges, and Graphs
/// <ol>
/// <li>@ref Graphs
/// </li>
/// <li>@ref JSModuleGraph
/// </li>
/// </ol>
/// </li>
/// <li>@ref AvocadoErrors
/// </li>
/// </ol>
/// </li>
/// <li>Client Communication
/// <ol>
/// <li>@ref HttpInterface
/// <ol>
/// <li>@ref RestDocument
/// </li>
/// </ol>
/// </li>
/// </ol>
/// </li>
/// <li>@ref DBAdmin
/// <ol>
/// <li>@ref DBAdminDurability
/// </li>
/// <li>@ref DBAdminIndex
/// <ol>
/// <li>@ref DBAdminIndexGeo
/// </ol>
/// </li>
/// </ol>
/// </li>
/// <li>Advanced Topics
/// <ol>
/// <li>@ref DBAdmin
/// <ol>
/// <li>@ref DBAdminDurability
/// </li>
/// </ol>
/// </li>
/// <li>Actions
/// <ol>
/// <li>@ref Actions
@ -98,12 +63,6 @@
/// </li>
/// </ol>
/// </li>
/// <li>@ref HttpInterface
/// <ol>
/// <li>@ref RestSystem
/// </li>
/// </ol>
/// </li>
/// <li>@ref jsUnity
/// </li>
/// </ol>
@ -128,20 +87,21 @@
/// @page UserManualServerStartStopTOC
///
/// <ol>
/// <li>@ref UserManualServerStartStopHttp "Starting the HTTP Server"</li>
/// <li>@ref UserManualServerStartStopDebug "Starting the Debug Shell"</li>
/// <li>@ref UserManualServerStartStopOptions "Frequently Used Options"</li>
/// <li>@ref UserManualServerStartStopHttp</li>
/// <li>@ref UserManualServerStartStopDebug</li>
/// <li>@ref UserManualServerStartStopOptions</li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @page UserManualServerStartStop Starting the AvocadoDB
///
/// The AvocadoDB has two mode of operation: as server, where it will answer to
/// HTTP requests, see @ref HttpInterface, and a debug shell, where you can
/// access the database directly. Using the debug shell allows you to issue all
/// commands normally available in actions and transactions, see @ref
/// AvocadoScript.
/// The AvocadoDB has two modes of operation: as server, where it will answer to
/// client requests and an emergency console, where you can access the database
/// directly. The latter should - as the name suggests - only be used in case of
/// an emergency, for example, a corrupted collection. Using the emergency
/// console allows you to issue all commands normally available in actions and
/// transactions.
///
/// You should never start more than one server for the same database,
/// independent from the mode of operation.
@ -151,6 +111,7 @@
/// <hr>
///
/// @section UserManualServerStartStopHttp Starting the HTTP Server
///////////////////////////////////////////////////////////////////
///
/// The following command starts the AvocadoDB in server mode. You will be able
/// to access the server using HTTP request on port 8529. See below for a list
@ -158,14 +119,16 @@
///
/// @verbinclude option-database-directory
///
/// @section UserManualServerStartStopDebug Starting the Debug Shell
/// @section UserManualServerStartStopDebug Starting the Emergency Console
//////////////////////////////////////////////////////////////////////////
///
/// The following command starts a debug shell. See below for a list of
/// The following command starts a emergency console. See below for a list of
/// frequently used options, see @ref CommandLine "here" for a complete list.
///
/// @verbinclude start1
///
/// @section UserManualServerStartStopOptions Frequently Used Options
/////////////////////////////////////////////////////////////////////
///
/// The following command-line options are frequently used. For a full
/// list of options see @ref CommandLine "here".
@ -198,11 +161,6 @@
/// <ol>
/// <li>@ref DBAdminDurability
/// </li>
/// <li>@ref DBAdminIndex
/// <ol>
/// <li>@ref DBAdminIndexGeo
/// </ol>
/// </li>
/// </ol>
////////////////////////////////////////////////////////////////////////////////
@ -214,8 +172,10 @@
/// <hr>
///
/// @section DBAdminDurability Durability
/////////////////////////////////////////
///
/// @subsection DBAdminDurability1 Mostly Memory/Durability
///////////////////////////////////////////////////////////
///
/// Database documents are stored in the memory-memory-mapped files are used to
/// store them. The operating system has the advantageous option to decide
@ -224,6 +184,7 @@
/// documents securely at once (durability).
///
/// @subsection DBAdminDurability2 AppendOnly/MVCC
//////////////////////////////////////////////////
///
/// Instead of overwriting existing documents, a completely new version of the
/// document is generated. The two benefits are:
@ -237,18 +198,9 @@
/// processes.
///
/// @subsection DBAdminDurability3 Configuration
////////////////////////////////////////////////
///
/// @copydetails JS_PropertiesVocbaseCol
///
/// @section DBAdminIndex Index Management
///
/// @subsection DBAdminIndexHash Hash Indexes
///
/// copydetails JS_EnsureHashIndexVocbaseCol
///
/// @subsection DBAdminIndexGeo Geo Indexes
///
/// copydetails JS_EnsureGeoIndexVocbaseCol
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

View File

@ -74,6 +74,8 @@ typedef struct array_shaper_s {
TRI_associative_pointer_t _shapeDictionary;
TRI_vector_pointer_t _shapes;
// todo: add attribute weight structure
}
array_shaper_t;
@ -402,6 +404,12 @@ static char const* LookupAttributeIdArrayShaper (TRI_shaper_t* shaper, TRI_shape
return NULL;
}
static int64_t LookupAttributeWeight (TRI_shaper_t* shaper, TRI_shape_aid_t aid) {
// todo: add support for an attribute weight
assert(0);
return -1;
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
@ -559,7 +567,8 @@ TRI_shaper_t* TRI_CreateArrayShaper (TRI_memory_zone_t* zone) {
shaper->base.lookupAttributeId = LookupAttributeIdArrayShaper;
shaper->base.findShape = FindShapeShape;
shaper->base.lookupShapeId = LookupShapeId;
shaper->base.lookupAttributeWeight = LookupAttributeWeight;
// handle basics
ok = TRI_InsertBasicTypesShaper(&shaper->base);

View File

@ -60,7 +60,7 @@ typedef struct TRI_shaper_s {
char const* (*lookupAttributeId) (struct TRI_shaper_s*, TRI_shape_aid_t);
TRI_shape_t const* (*findShape) (struct TRI_shaper_s*, TRI_shape_t*);
TRI_shape_t const* (*lookupShapeId) (struct TRI_shaper_s*, TRI_shape_sid_t);
int64_t (*lookupAttributeWeight) (struct TRI_shaper_s*, TRI_shape_aid_t);
TRI_shape_path_t const* (*lookupAttributePathByPid) (struct TRI_shaper_s*, TRI_shape_pid_t);
TRI_shape_pid_t (*findAttributePathByName) (struct TRI_shaper_s*, char const*);

View File

@ -469,7 +469,22 @@ static int CompareShapedJsonShapedJson (const TRI_shaped_json_t* left, const TRI
}
result = CompareShapeTypes (left, right, leftShaper, rightShaper);
// ............................................................................
// In the above function CompareShaeTypes we use strcmp which may return
// an integer greater than 1 or less than -1. From this function we only
// need to know whether we have equality (0), less than (-1) or greater than (1)
// ............................................................................
if (result < 0) {
result = -1;
}
else if (result > 0) {
result = 1;
}
return result;
} // end of function CompareShapedJsonShapedJson
@ -718,7 +733,16 @@ static int IndexStaticMultiCompareElementElement (TRI_skiplist_multi_t* multiSki
for (j = 0; j < hLeftElement->numFields; j++) {
compareResult = CompareShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields), leftShaper, rightShaper);
if (compareResult != 0) {
// ......................................................................
// The function CompareShaedJsonShapedJson can only return 0, -1, or 1
// that is, TRI_SKIPLIST_COMPARE_STRICTLY_EQUAL (0)
// TRI_SKIPLIST_COMPARE_STRICTLY_LESS (-1)
// TRI_SKIPLIST_COMPARE_STRICTLY_GREATER (1)
// ......................................................................
return compareResult;
}
}

View File

@ -25,9 +25,10 @@
/// @author Copyright 2006-2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#include "skiplist.h"
#include <BasicsC/logging.h>
#include <BasicsC/random.h>
#include "skiplist.h"
#include "compare.h"
#define SKIPLIST_ABSOLUTE_MAX_HEIGHT 100
@ -340,11 +341,11 @@ void TRI_InitSkipList (TRI_skiplist_t* skiplist, size_t elementSize,
}
// ..........................................................................
// Assign the comparision call back functions
// Assign the STATIC comparision call back functions
// ..........................................................................
skiplist->compareElementElement = compareElementElement;
skiplist->compareKeyElement = compareKeyElement;
skiplist->compareElementElement = IndexStaticCompareElementElement; // compareElementElement;
skiplist->compareKeyElement = IndexStaticCompareKeyElement; // compareKeyElement;
// ..........................................................................
// Assign the maximum height of the skip list. This maximum height must be
@ -352,7 +353,7 @@ void TRI_InitSkipList (TRI_skiplist_t* skiplist, size_t elementSize,
// ..........................................................................
skiplist->_base._maxHeight = maximumHeight;
if (maximumHeight > SKIPLIST_ABSOLUTE_MAX_HEIGHT) {
printf("%s:%d:Invalid maximum height for skiplist\n",__FILE__,__LINE__);
LOG_ERROR("Invalid maximum height for skiplist", TRI_ERROR_INTERNAL);
assert(false);
}
@ -1290,7 +1291,7 @@ void* TRI_RightLookupByKeySkipList (TRI_skiplist_t* skiplist, void* key) {
// Use the callback to determine if the element is less or greater than
// the next node element.
// .......................................................................
compareResult = IndexStaticCompareKeyElement(skiplist,key,&(prevNode->_element), 1);
compareResult = IndexStaticCompareKeyElement(skiplist, key, &(prevNode->_element), 1);
// .......................................................................
@ -1311,7 +1312,7 @@ void* TRI_RightLookupByKeySkipList (TRI_skiplist_t* skiplist, void* key) {
}
// .......................................................................
// The element is greater than the next node element. Keep going on this
// The key is greater than the next node element. Keep going on this
// level.
// .......................................................................
if (compareResult < 0) {
@ -1399,9 +1400,9 @@ void TRI_InitSkipListMulti (TRI_skiplist_multi_t* skiplist,
// Assign the comparision call back functions
// ..........................................................................
skiplist->compareElementElement = compareElementElement;
skiplist->compareKeyElement = compareKeyElement;
skiplist->equalElementElement = equalElementElement;
skiplist->compareElementElement = IndexStaticMultiCompareElementElement; //compareElementElement;
skiplist->compareKeyElement = IndexStaticMultiCompareKeyElement; // compareKeyElement;
skiplist->equalElementElement = IndexStaticMultiEqualElementElement; //equalElementElement;
// ..........................................................................
// Assign the maximum height of the skip list. This maximum height must be
@ -1409,7 +1410,7 @@ void TRI_InitSkipListMulti (TRI_skiplist_multi_t* skiplist,
// ..........................................................................
skiplist->_base._maxHeight = maximumHeight;
if (maximumHeight > SKIPLIST_ABSOLUTE_MAX_HEIGHT) {
printf("%s:%d:Invalid maximum height for skiplist\n",__FILE__,__LINE__);
LOG_ERROR("Invalid maximum height for skiplist", TRI_ERROR_INTERNAL);
assert(false);
}
@ -2114,7 +2115,7 @@ int TRI_RemoveElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* elemen
}
// .....................................................................
// The element could be located and we are at the lowest level
// The element could be located (by matching the key) and we are at the lowest level
// .....................................................................
if (compareResult == TRI_SKIPLIST_COMPARE_SLIGHTLY_LESS) {
goto END;
@ -2163,7 +2164,7 @@ int TRI_RemoveElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* elemen
// ..........................................................................
if (old != NULL) {
memcpy(old, &(currentNode->_element), skiplist->_base._elementSize);
IndexStaticCopyElementElement(&(skiplist->_base), old, &(currentNode->_element));
}

View File

@ -1150,6 +1150,8 @@ static bool multiSkiplistIndex_findHelperIntervalValid(SkiplistIndex* skiplistIn
compareResult = skiplistIndex->skiplist.nonUniqueSkiplist->compareKeyElement(
skiplistIndex->skiplist.nonUniqueSkiplist,
&(lNode->_element), &(rNode->_element), 0);
return (compareResult == -1);
}
@ -1292,6 +1294,7 @@ TRI_skiplist_iterator_t* MultiSkiplistIndex_find(SkiplistIndex* skiplistIndex, T
if (results == NULL) {
return NULL;
}
results->_index = skiplistIndex;
TRI_InitVector(&(results->_intervals), TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_skiplist_iterator_interval_t));
results->_currentInterval = 0;

View File

@ -109,10 +109,6 @@ describe AvocadoDB do
AvocadoDB.drop_collection(@cn)
@cid = AvocadoDB.create_collection(@cn, false)
cmd = api + "?collection=#{@cid}"
body = "{ \"type\" : \"geo\", \"fields\" : [ \"a\" ] }"
#doc = AvocadoDB.post(cmd, :body => body)
(0..10).each{|i|
lat = 10 * (i - 5)
@ -189,10 +185,6 @@ describe AvocadoDB do
AvocadoDB.drop_collection(@cn)
@cid = AvocadoDB.create_collection(@cn, false)
cmd = api + "?collection=#{@cid}"
body = "{ \"type\" : \"geo\", \"fields\" : [ \"a\" ] }"
#doc = AvocadoDB.post(cmd, :body => body)
(0..10).each{|i|
lat = 10 * (i - 5)
@ -259,5 +251,116 @@ describe AvocadoDB do
end
end
################################################################################
## by-example query
################################################################################
context "by-example query:" do
before do
@cn = "UnitTestsCollectionByExample"
AvocadoDB.drop_collection(@cn)
@cid = AvocadoDB.create_collection(@cn, false)
end
after do
AvocadoDB.drop_collection(@cn)
end
it "finds the examples" do
body = "{ \"i\" : 1 }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d1 = doc.parsed_response['_id']
body = "{ \"i\" : 1, \"a\" : { \"j\" : 1 } }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d2 = doc.parsed_response['_id']
body = "{ \"i\" : 1, \"a\" : { \"j\" : 1, \"k\" : 1 } }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d3 = doc.parsed_response['_id']
body = "{ \"i\" : 1, \"a\" : { \"j\" : 2, \"k\" : 2 } }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d4 = doc.parsed_response['_id']
body = "{ \"i\" : 2 }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d5 = doc.parsed_response['_id']
body = "{ \"i\" : 2, \"a\" : 2 }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d6 = doc.parsed_response['_id']
body = "{ \"i\" : 2, \"a\" : { \"j\" : 2, \"k\" : 2 } }"
doc = AvocadoDB.post("/document?collection=#{@cid}", :body => body)
doc.code.should eq(202)
d7 = doc.parsed_response['_id']
cmd = api + "/by-example"
body = "{ \"collection\" : \"#{@cid}\", \"example\" : [ { \"i\" : 1 } ] }"
doc = AvocadoDB.log_put("#{prefix}-by-example1", cmd, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc.parsed_response['hasMore'].should eq(false)
doc.parsed_response['result'].length.should eq(4)
doc.parsed_response['count'].should eq(4)
doc.parsed_response['result'].map{|i| i['_id']}.should =~ [d1,d2,d3,d4]
cmd = api + "/by-example"
body = "{ \"collection\" : \"#{@cid}\", \"example\" : [ { \"a\" : { \"j\" : 1 } } ] }"
doc = AvocadoDB.log_put("#{prefix}-by-example2", cmd, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc.parsed_response['hasMore'].should eq(false)
doc.parsed_response['result'].length.should eq(1)
doc.parsed_response['count'].should eq(1)
doc.parsed_response['result'].map{|i| i['_id']}.should =~ [d2]
cmd = api + "/by-example"
body = "{ \"collection\" : \"#{@cid}\", \"example\" : [ \"a.j\", 1 ] }"
doc = AvocadoDB.log_put("#{prefix}-by-example3", cmd, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc.parsed_response['hasMore'].should eq(false)
doc.parsed_response['result'].length.should eq(2)
doc.parsed_response['count'].should eq(2)
doc.parsed_response['result'].map{|i| i['_id']}.should =~ [d2,d3]
cmd = api + "/first-example"
body = "{ \"collection\" : \"#{@cid}\", \"example\" : [ \"a.j\", 1, \"a.k\", 1 ] }"
doc = AvocadoDB.log_put("#{prefix}-first-example", cmd, :body => body)
doc.code.should eq(200)
doc.headers['content-type'].should eq("application/json")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(200)
doc.parsed_response['document']['_id'].should eq(d3)
cmd = api + "/first-example"
body = "{ \"collection\" : \"#{@cid}\", \"example\" : [ \"a.j\", 1, \"a.k\", 2 ] }"
doc = AvocadoDB.log_put("#{prefix}-first-example-not-found", cmd, :body => body)
doc.code.should eq(404)
doc.headers['content-type'].should eq("application/json")
doc.parsed_response['error'].should eq(true)
doc.parsed_response['code'].should eq(404)
end
end
end
end

View File

@ -480,6 +480,14 @@ BOOST_AUTO_TEST_CASE (tst_insert) {
void* r = 0;
// ...........................................................................
// this test needs to be altered slightly e.g.
// TRI_InsertVectorPointer(&v1, &a, 100);
// TRI_InsertVectorPointer(&v1, &a, 20);
// TRI_InsertVectorPointer(&v1, &a, 200);
// ...........................................................................
TRI_InsertVectorPointer(&v1, &a, 0);
BOOST_CHECK_EQUAL((size_t) 1, v1._length);
BOOST_CHECK_EQUAL(&a, TRI_AtVectorPointer(&v1, 0));

View File

@ -1851,7 +1851,7 @@ static v8::Handle<v8::Value> JS_ByExampleQuery (v8::Arguments const& argv) {
ReleaseCollection(collection);
return scope.Close(v8::ThrowException(
CreateErrorObject(TRI_ERROR_BAD_PARAMETER,
"usage: document(<path1>, <value1>, ...)")));
"usage: byExample(<path1>, <value1>, ...)")));
}
size_t n = argv.Length() / 2;
@ -4112,6 +4112,14 @@ static v8::Handle<v8::Value> JS_ExecuteAql (v8::Arguments const& argv) {
////////////////////////////////////////////////////////////////////////////////
/// @brief counts the number of documents in a result set
///
/// @FUN{@FA{collection}.count()}
///
/// Returns the number of living documents in the collection.
///
/// @EXAMPLES
///
/// @verbinclude shell-collection-count
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_CountVocbaseCol (v8::Arguments const& argv) {

View File

@ -1 +1 @@
0.4.0
0.4.2

359
aclocal.m4 vendored
View File

@ -1,8 +1,7 @@
# generated automatically by aclocal 1.12 -*- Autoconf -*-
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
# Inc.
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,30 +13,28 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.12], [],
m4_if([$1], [1.11.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -53,24 +50,22 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12])dnl
[AM_AUTOMAKE_VERSION([1.11.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
@ -89,7 +84,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is '.', but things will broke when you
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@ -115,21 +110,22 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
# serial 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
@ -148,15 +144,16 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 16
# serial 10
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
@ -179,12 +176,12 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
@ -192,9 +189,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@ -233,16 +229,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@ -251,16 +247,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@ -308,7 +304,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@ -318,34 +314,28 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE([dependency-tracking], [dnl
AS_HELP_STRING(
[--enable-dependency-tracking],
[do not reject slow dependency extractors])
AS_HELP_STRING(
[--disable-dependency-tracking],
[speeds up one-time build])])
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@ -364,7 +354,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named 'Makefile.in', but
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@ -376,19 +366,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running 'make'.
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
@ -406,7 +398,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each '.P' file that we will
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
@ -416,13 +408,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 18
# serial 16
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@ -473,25 +466,23 @@ m4_ifval([$2],
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
AM_MISSING_PROG([AUTOCONF], [autoconf])
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
AM_MISSING_PROG([AUTOHEADER], [autoheader])
AM_MISSING_PROG([MAKEINFO], [makeinfo])
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@ -505,28 +496,28 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES([CXX])],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
@ -554,14 +545,12 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@ -575,9 +564,9 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST([install_sh])])
AC_SUBST(install_sh)])
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -600,13 +589,13 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# serial 4
# AM_MAKE_INCLUDE()
# -----------------
@ -625,7 +614,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from 'make'.
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@ -650,7 +639,8 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -686,13 +676,14 @@ m4_define([AC_PROG_CC],
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# serial 6
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@ -722,21 +713,19 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# AM_PROG_MKDIR_P
# ---------------
# Check for 'mkdir -p'.
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
@ -756,13 +745,13 @@ esac
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@ -770,13 +759,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# --------------------
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@ -789,18 +778,22 @@ AC_DEFUN([_AM_IF_OPTION],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 9
# serial 5
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@ -811,40 +804,32 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
esac
# Do 'set' in a subshell so we don't clobber the current shell's
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
if test "$[2]" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$[2]" = conftest.file
)
then
@ -854,123 +839,70 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT([yes])
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
AC_MSG_RESULT([done])])
rm -f conftest.file
])
AC_MSG_RESULT(yes)])
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# serial 1
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# ("yes" being less verbose, "no" or empty being verbose).
# (`yes' being less verbose, `no' or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
case $enable_silent_rules in @%:@ (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
[AC_ARG_ENABLE([silent-rules],
[ --enable-silent-rules less verbose build output (undo: `make V=1')
--disable-silent-rules verbose build output (undo: `make V=0')])
case $enable_silent_rules in
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
dnl See automake bug#9928 and bug#10237.
am_make=${MAKE-make}
AC_CACHE_CHECK([whether $am_make supports nested variables],
[am_cv_make_support_nested_variables],
[if AS_ECHO([['TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor 'install' (even GNU) is that you can't
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in "make install-strip", and initialize
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip". However 'strip' might not be the right
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# serial 2
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@ -979,24 +911,24 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# ---------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
@ -1007,11 +939,10 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
@ -1019,7 +950,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of '-'.
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in

View File

@ -1,9 +1,10 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2012-03-05.13; # UTC
scriptversion=2009-10-06.20; # UTC
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -28,219 +29,21 @@ scriptversion=2012-03-05.13; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@ -250,13 +53,11 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
eat=
for arg
do
@ -265,8 +66,8 @@ do
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
@ -293,10 +94,10 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
@ -305,7 +106,7 @@ fi
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d

375
config/config.guess vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
timestamp='2012-02-10'
timestamp='2009-11-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -17,7 +17,9 @@ timestamp='2012-02-10'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -54,9 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -138,12 +139,22 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}" in
i?86)
test -z "$VENDOR" && VENDOR=pc
;;
*)
test -z "$VENDOR" && VENDOR=unknown
;;
esac
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@ -179,7 +190,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
os=netbsd
os=netbsd
;;
esac
# The OS release
@ -202,19 +213,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
@ -222,7 +233,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@ -268,10 +279,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@ -282,13 +290,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
echo m68k-${VENDOR}-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
echo ${UNAME_MACHINE}-${VENDOR}-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
echo ${UNAME_MACHINE}-${VENDOR}-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@ -297,13 +305,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
echo arm-unknown-riscos
echo arm-${VENDOR}-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
@ -396,23 +404,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
echo m68k-${VENDOR}-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@ -482,8 +490,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -496,7 +504,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@ -553,7 +561,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -596,52 +604,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@ -722,9 +730,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
echo ${UNAME_MACHINE}-${VENDOR}-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@ -732,22 +740,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@ -771,31 +779,32 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
case ${UNAME_MACHINE} in
pc98)
echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@ -804,26 +813,23 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
echo ia64-${VENDOR}-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@ -842,32 +848,25 @@ EOF
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
echo x86_64-${VENDOR}-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
echo powerpcle-${VENDOR}-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@ -877,41 +876,32 @@ EOF
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
fi
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo frv-${VENDOR}-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@ -922,16 +912,16 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@ -950,54 +940,51 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo or32-${VENDOR}-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
echo sparc-${VENDOR}-linux-gnu
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
echo hppa64-${VENDOR}-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
*) echo hppa-${VENDOR}-linux-gnu ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
echo powerpc64-${VENDOR}-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
echo powerpc-${VENDOR}-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo x86_64-${VENDOR}-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@ -1006,11 +993,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@ -1019,16 +1006,16 @@ EOF
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
echo ${UNAME_MACHINE}-${VENDOR}-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
echo ${UNAME_MACHINE}-${VENDOR}-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
echo i386-${VENDOR}-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
@ -1042,13 +1029,13 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@ -1070,13 +1057,13 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@ -1087,7 +1074,7 @@ EOF
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
echo i860-${VENDOR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@ -1111,8 +1098,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
@ -1124,19 +1111,19 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
@ -1155,10 +1142,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@ -1184,11 +1171,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
echo mips-${VENDOR}-sysv${UNAME_RELEASE}
fi
exit ;;
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@ -1253,9 +1240,6 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@ -1280,13 +1264,13 @@ EOF
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
echo ${UNAME_MACHINE}-${VENDOR}-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
echo pdp10-${VENDOR}-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
echo pdp10-${VENDOR}-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
@ -1295,19 +1279,19 @@ EOF
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
echo pdp10-${VENDOR}-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
echo pdp10-${VENDOR}-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@ -1325,9 +1309,6 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@ -1350,11 +1331,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
"4"
#else
""
""
#endif
); exit (0);
); exit (0);
#endif
#endif

204
config/config.sub vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
timestamp='2012-02-10'
timestamp='2009-11-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,7 +21,9 @@ timestamp='2012-02-10'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -73,9 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -122,18 +123,13 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@ -160,8 +156,8 @@ case $os in
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
@ -177,10 +173,10 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
@ -249,22 +245,17 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@ -290,39 +281,29 @@ case $basic_machine in
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rl78 | rx \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
@ -332,21 +313,6 @@ case $basic_machine in
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@ -361,25 +327,21 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@ -405,29 +367,25 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
@ -452,7 +410,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@ -522,20 +480,11 @@ case $basic_machine in
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
@ -567,7 +516,7 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
cr16)
basic_machine=cr16-unknown
os=-elf
;;
@ -725,6 +674,7 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@ -782,7 +732,7 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
@ -821,18 +771,10 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@ -897,12 +839,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -985,10 +921,9 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
ppc) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@ -1082,9 +1017,6 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@ -1141,8 +1073,20 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=$basic_machine-unknown
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
@ -1212,9 +1156,6 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@ -1312,11 +1253,11 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
@ -1352,9 +1293,8 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1401,7 +1341,7 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
-os400*)
os=-os400
;;
-wince*)
@ -1450,7 +1390,7 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
-tpf*)
os=-tpf
;;
-triton*)
@ -1495,8 +1435,6 @@ case $os in
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@ -1519,10 +1457,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
score-*)
os=-elf
;;
spu-*)
spu-*)
os=-elf
;;
*-acorn)
@ -1534,17 +1472,8 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@ -1564,11 +1493,14 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mep-*)
mep-*)
os=-elf
;;
mips*-cisco)
@ -1595,7 +1527,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
*-knuth)
os=-mmixware
;;
*-wec)

View File

@ -1,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2012-03-27.16; # UTC
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -27,7 +28,7 @@ scriptversion=2012-03-27.16; # UTC
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
@ -39,11 +40,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@ -56,12 +57,6 @@ EOF
;;
esac
# A tabulation character.
tab=' '
# A newline character.
nl='
'
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@ -95,24 +90,10 @@ if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@ -167,21 +148,20 @@ gcc)
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -213,15 +193,18 @@ sgi)
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr "$nl" ' ' >> "$depfile"
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
@ -233,17 +216,10 @@ sgi)
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@ -273,11 +249,12 @@ aix)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependent.h'.
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# '$object: dependent.h' and one to simply 'dependent.h:'.
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -288,26 +265,23 @@ aix)
;;
icc)
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
# However on
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\':
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
# tcc 0.9.26 (FIXME still under development at the moment of writing)
# will emit a similar output, but also prepend the continuation lines
# with horizontal tabulation characters.
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
@ -316,21 +290,15 @@ icc)
exit $stat
fi
rm -f "$depfile"
# Each line is of the form 'foo.o: dependent.h',
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
< "$tmpdepfile" > "$depfile"
sed '
s/[ '"$tab"'][ '"$tab"']*/ /g
s/^ *//
s/ *\\*$//
s/^[^:]*: *//
/^$/d
/:$/d
s/$/ :/
' < "$tmpdepfile" >> "$depfile"
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -366,7 +334,7 @@ hp2)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
@ -381,9 +349,9 @@ hp2)
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
@ -429,59 +397,14 @@ tru64)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
@ -499,7 +422,7 @@ dashmstdout)
shift
fi
# Remove '-o $object'.
# Remove `-o $object'.
IFS=" "
for arg
do
@ -519,14 +442,15 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' "$nl" < "$tmpdepfile" | \
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@ -579,10 +503,9 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@ -602,7 +525,7 @@ cpp)
shift
fi
# Remove '-o $object'.
# Remove `-o $object'.
IFS=" "
for arg
do
@ -671,8 +594,8 @@ msvisualcpp)
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -35,7 +35,7 @@ scriptversion=2011-11-20.07; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
@ -156,10 +156,6 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
@ -202,17 +194,13 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@ -240,9 +228,9 @@ fi
for src
do
# Protect names problematic for 'test' and other utilities.
# Protect names starting with `-'.
case $src in
-* | [=\(\)!]) src=./$src;;
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
@ -264,7 +252,12 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@ -354,7 +347,7 @@ do
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
@ -392,7 +385,7 @@ do
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
-*) prefix='./';;
*) prefix='';;
esac
@ -410,7 +403,7 @@ do
for d
do
test X"$d" = X && continue
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then

View File

@ -1,9 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2012-01-06.18; # UTC
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -25,7 +26,7 @@ scriptversion=2012-01-06.18; # UTC
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
@ -33,7 +34,7 @@ run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, 'missing' is being run in the
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
@ -64,7 +65,7 @@ case $1 in
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
@ -73,20 +74,21 @@ Options:
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file 'aclocal.m4'
autoconf touch file 'configure'
autoheader touch file 'config.h.in'
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all 'Makefile.in' files
bison create 'y.tab.[ch]', if possible, from existing .[ch]
flex create 'lex.yy.c', if possible, from existing .c
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create 'lex.yy.c', if possible, from existing .c
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create 'y.tab.[ch]', if possible, from existing .[ch]
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@ -98,8 +100,8 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
echo 1>&2 "$0: Unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
@ -120,13 +122,22 @@ case $1 in
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running '$TOOL --version' or '$TOOL --help' to check whether
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
@ -138,27 +149,27 @@ esac
case $program in
aclocal*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified 'acinclude.m4' or '${configure_ac}'. You might want
to install the Automake and Perl packages. Grab them from
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified '${configure_ac}'. You might want to install the
Autoconf and GNU m4 packages. Grab them from any GNU
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified 'acconfig.h' or '${configure_ac}'. You might want
to install the Autoconf and GNU m4 packages. Grab them
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
@ -175,9 +186,9 @@ WARNING: '$1' is $msg. You should only need it if
automake*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
You might want to install the Automake and Perl packages.
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
@ -186,10 +197,10 @@ WARNING: '$1' is $msg. You should only need it if
autom4te*)
echo 1>&2 "\
WARNING: '$1' is needed, but is $msg.
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get '$1' as part of Autoconf from any GNU
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
@ -209,13 +220,13 @@ WARNING: '$1' is needed, but is $msg.
bison*|yacc*)
echo 1>&2 "\
WARNING: '$1' $msg. You should only need it if
you modified a '.y' file. You may need the Bison package
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
Bison from any GNU archive site."
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG=\${$#}
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@ -239,13 +250,13 @@ WARNING: '$1' $msg. You should only need it if
lex*|flex*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified a '.l' file. You may need the Flex package
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
Flex from any GNU archive site."
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG=\${$#}
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@ -262,10 +273,10 @@ WARNING: '$1' is $msg. You should only need it if
help2man*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
Help2man package in order for those modifications to take
effect. You can get Help2man from any GNU archive site."
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@ -280,12 +291,12 @@ WARNING: '$1' is $msg. You should only need it if
makeinfo*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified a '.texi' or '.texinfo' file, or any other file
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy 'make' (AIX,
DU, IRIX). You might want to install the Texinfo package or
the GNU make package. Grab either from any GNU archive site."
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@ -307,14 +318,49 @@ WARNING: '$1' is $msg. You should only need it if
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: '$1' is needed, and is $msg.
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the 'README' file,
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing '$1' program."
some other package would contain this missing \`$1' program."
exit 1
;;
esac

461
configure vendored
View File

@ -1,11 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for triAGENS AvocadoDB 0.4.0.
# Generated by GNU Autoconf 2.68 for triAGENS AvocadoDB 0.4.2.
#
# Report bugs to <info@triagens.de>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@ -134,31 +136,6 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@ -192,8 +169,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@ -238,25 +214,21 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@ -359,14 +331,6 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@ -488,10 +452,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# 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 sensitive to this).
@ -526,16 +486,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
as_ln_s='cp -p'
fi
else
as_ln_s='cp -pR'
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@ -547,8 +507,28 @@ else
as_mkdir_p=false
fi
as_test_x='test -x'
as_executable_p=as_fn_executable_p
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@ -580,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='triAGENS AvocadoDB'
PACKAGE_TARNAME='avocado'
PACKAGE_VERSION='0.4.0'
PACKAGE_STRING='triAGENS AvocadoDB 0.4.0'
PACKAGE_VERSION='0.4.2'
PACKAGE_STRING='triAGENS AvocadoDB 0.4.2'
PACKAGE_BUGREPORT='info@triagens.de'
PACKAGE_URL='http://www.avocadodb.org'
@ -712,7 +692,6 @@ CXXCPP
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@ -728,8 +707,6 @@ CXXFLAGS
CXX
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
am__untar
am__tar
AMTAR
@ -1334,6 +1311,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_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
@ -1419,7 +1398,7 @@ 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 triAGENS AvocadoDB 0.4.0 to adapt to many kinds of systems.
\`configure' configures triAGENS AvocadoDB 0.4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1490,7 +1469,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of triAGENS AvocadoDB 0.4.0:";;
short | recursive ) echo "Configuration of triAGENS AvocadoDB 0.4.2:";;
esac
cat <<\_ACEOF
@ -1508,12 +1487,10 @@ Optional Features:
--enable-install-dbdir install an empty database directory
--enable-relative all path are relative to the binary (yes/no/devel
[default])
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--enable-silent-rules less verbose build output (undo: `make V=1')
--disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-error-on-warning
treat warnings as errors (default: no)
--enable-eff-cpp use -Weffc++ (default: no)
@ -1645,10 +1622,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
triAGENS AvocadoDB configure 0.4.0
generated by GNU Autoconf 2.69
triAGENS AvocadoDB configure 0.4.2
generated by GNU Autoconf 2.68
Copyright (C) 2012 Free Software Foundation, Inc.
Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@ -1836,7 +1813,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
$as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
@ -1924,7 +1901,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
$as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
@ -2110,8 +2087,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by triAGENS AvocadoDB $as_me 0.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
It was created by triAGENS AvocadoDB $as_me 0.4.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2799,7 +2776,7 @@ fi
am__api_version='1.12'
am__api_version='1.11'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@ -2838,7 +2815,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@ -2896,6 +2873,9 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@ -2906,40 +2886,32 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do 'set' in a subshell so we don't clobber the current shell's
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
if test "$2" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$2" = conftest.file
)
then
@ -2951,16 +2923,6 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
rm -f conftest.file
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@ -2987,8 +2949,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
@ -3000,10 +2962,10 @@ if test x"${install_sh}" != xset; then
esac
fi
# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip". However 'strip' might not be the right
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
# will honor the `STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@ -3022,7 +2984,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -3062,7 +3024,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -3113,7 +3075,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
{ test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@ -3166,7 +3128,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -3252,7 +3214,7 @@ fi
# Define the identity of the package.
PACKAGE='avocado'
VERSION='0.4.0'
VERSION='0.4.2'
cat >>confdefs.h <<_ACEOF
@ -3282,11 +3244,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
# Always define AMTAR for backward compatibility.
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
@ -3297,38 +3259,11 @@ if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=0;;
case $enable_silent_rules in
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
if ${am_cv_make_support_nested_variables+:} false; then :
$as_echo_n "(cached) " >&6
else
if $as_echo 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
$as_echo "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'
@ -3383,7 +3318,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from 'make'.
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@ -3416,7 +3351,6 @@ fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@ -3455,7 +3389,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -3499,7 +3433,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -3945,9 +3879,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@ -3981,16 +3914,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@ -3999,16 +3932,16 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@ -4219,7 +4152,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -4263,7 +4196,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -4457,7 +4390,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
struct stat;
#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);
@ -4553,9 +4487,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@ -4589,16 +4522,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@ -4607,16 +4540,16 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@ -4698,7 +4631,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -4742,7 +4675,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -4938,9 +4871,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@ -4974,16 +4906,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@ -4992,16 +4924,16 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@ -5609,7 +5541,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -5649,7 +5581,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -6159,8 +6091,6 @@ _ACEOF
esac
rm -rf conftest*
fi
fi
@ -6324,7 +6254,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_acx_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -6480,7 +6410,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -6637,7 +6567,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_DOT_PATH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -6754,7 +6684,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_LEX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -6786,8 +6716,7 @@ a { ECHO; }
b { REJECT; }
c { yymore (); }
d { yyless (1); }
e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
yyless ((input () != 0)); }
e { yyless (input () != 0); }
f { unput (yytext[0]); }
. { BEGIN INITIAL; }
%%
@ -6965,7 +6894,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_BISON="bison"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -7172,7 +7101,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_NCURSES_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -7215,7 +7144,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_NCURSES_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@ -7350,7 +7279,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@ -7416,7 +7345,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@ -9678,14 +9607,6 @@ if test -z "${ENABLE_DARWIN_TRUE}" && test -z "${ENABLE_DARWIN_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_DARWIN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
$as_echo_n "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@ -10080,16 +10001,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
as_ln_s='cp -p'
fi
else
as_ln_s='cp -pR'
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@ -10149,16 +10070,28 @@ else
as_mkdir_p=false
fi
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@ -10179,8 +10112,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by triAGENS AvocadoDB $as_me 0.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
This file was extended by triAGENS AvocadoDB $as_me 0.4.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@ -10246,11 +10179,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
triAGENS AvocadoDB config.status 0.4.0
configured by $0, generated by GNU Autoconf 2.69,
triAGENS AvocadoDB config.status 0.4.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
Copyright (C) 2012 Free Software Foundation, Inc.
Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@ -10341,7 +10274,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@ -10989,7 +10922,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named 'Makefile.in', but
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@ -11023,19 +10956,21 @@ $as_echo X"$mf" |
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running 'make'.
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||

View File

@ -6,7 +6,7 @@ dnl ============================================================================
dnl PREAMBLE triAGENS GmbH Build Environment
dnl ============================================================================
AC_INIT([triAGENS AvocadoDB], [0.4.0], [info@triagens.de], [avocado], [http://www.avocadodb.org])
AC_INIT([triAGENS AvocadoDB], [0.4.2], [info@triagens.de], [avocado], [http://www.avocadodb.org])
dnl ----------------------------------------------------------------------------
dnl auxillary directory for install-sh and missing

View File

@ -351,25 +351,29 @@ actions.defineHttp({
///
/// The call expects a JSON hash array as body with the following attributes:
///
/// @FA{collection}
/// - @LIT{collection}: The identifier or name of the collection to query.
///
/// The identifier or name of the collection to query.
/// - @LIT{example}: The example.
///
/// @FA{example}
/// - @LIT{skip}: The documents to skip in the query. (optional)
///
/// The example.
/// - @LIT{limit}: The maximal amount of documents to return. (optional)
///
/// @FA{skip} (optional)
///
/// The documents to skip in the query.
///
/// @FA{limit} (optional)
///
/// The maximal amount of documents to return.
/// Returns a cursor containing the result, see @ref HttpCursor for details.
///
/// @EXAMPLES
///
/// @verbinclude api_simple7
/// Matching an attribute:
///
/// @verbinclude api-simple-by-example1
///
/// Matching an attribute which is a sub-document:
///
/// @verbinclude api-simple-by-example2
///
/// Matching an attribute within a sub-document:
///
/// @verbinclude api-simple-by-example3
////////////////////////////////////////////////////////////////////////////////
actions.defineHttp({
@ -383,16 +387,18 @@ actions.defineHttp({
return;
}
var limit = body.limit;
var skip = body.skip;
var name = body.collection;
var example = body.example;
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
}
else {
collection = internal.db._collection(name);
var limit = body.limit;
var skip = body.skip;
var name = body.collection;
var example = body.example;
var name = body.collection;
var id = parseInt(name) || name;
var collection = internal.db._collection(id);
if (collection == null) {
actions.collectionNotFound(req, res, name);
@ -401,17 +407,95 @@ actions.defineHttp({
actions.badParameter(req, res, "example");
}
else {
var result = collection.byExample(example);
try {
var result = collection.byExample.apply(collection, example);
if (skip != null) {
result = result.skip(skip);
if (skip != null) {
result = result.skip(skip);
}
if (limit != null) {
result = result.limit(limit);
}
actions.resultCursor(req, res, CREATE_CURSOR(result.toArray(), true));
}
if (limit != null) {
result = result.limit(limit);
catch (err) {
actions.resultException(req, res, err);
}
}
}
}
});
actions.resultOk(req, res, actions.HTTP_OK, result.toArray());
////////////////////////////////////////////////////////////////////////////////
/// @fn JSA_PUT_api_simple_first_example
/// @brief returns one document of a collection matching a given example
///
/// @REST{PUT /_api/simple/first-example}
///
/// This will return the first document matching a given example.
///
/// The call expects a JSON hash array as body with the following attributes:
///
/// - @LIT{collection}: The identifier or name of the collection to query.
///
/// - @LIT{example}: The example.
///
/// - @LIT{skip}: The documents to skip in the query. (optional)
///
/// - @LIT{limit}: The maximal amount of documents to return. (optional)
///
/// Returns a result containing the document or @LIT{HTTP 404} if no
/// document matched the example.
///
/// @EXAMPLES
///
/// If a matching document was found:
///
/// @verbinclude api-simple-first-example
///
/// If no document was found:
///
/// @verbinclude api-simple-first-example-not-found
////////////////////////////////////////////////////////////////////////////////
actions.defineHttp({
url : API + "first-example",
context : "api",
callback : function (req, res) {
var body = actions.getJsonBody(req, res);
if (body === undefined) {
return;
}
if (req.requestType != actions.PUT) {
actions.unsupported(req, res);
}
else {
var example = body.example;
var name = body.collection;
var id = parseInt(name) || name;
var collection = internal.db._collection(id);
if (collection == null) {
actions.collectionNotFound(req, res, name);
}
else if (typeof example !== "object") {
actions.badParameter(req, res, "example");
}
else {
var result = collection.byExample.apply(collection, example).limit(1);
if (result.hasNext()) {
actions.resultOk(req, res, actions.HTTP_OK, { document : result.next() });
}
else {
actions.resultNotFound(req, res, "no match");
}
}
}
}

View File

@ -98,29 +98,28 @@ SQ.SimpleQueryByExample.prototype.execute = function () {
var documents;
if (this._execution == null) {
if (this._skip == null || this._skip <= 0) {
this._skip = 0;
var data = {
collection : this._collection._id,
example : this._example
}
if (this._limit != null) {
data.limit = this._limit;
}
var parameters = [ ];
// the actual example is passed in the first argument
for (var i in this._example[0]) {
if (this._example[0].hasOwnProperty(i)) {
// attribute name
parameters.push(i);
// attribute value
parameters.push(this._example[0][i]);
}
if (this._skip != null) {
data.skip = this._skip;
}
var requestResult = this._collection._database._connection.PUT("/_api/simple/by-example", JSON.stringify(data));
var documents = this._collection.BY_EXAMPLE.apply(this._collection, parameters);
TRI_CheckRequestResult(requestResult);
this._execution = new SQ.GeneralArrayCursor(documents, this._skip, this._limit);
this._countQuery = documents.length;
this._countTotal = documents.length;
this._execution = new AvocadoQueryCursor(this._collection._database, requestResult);
if (requestResult.hasOwnProperty("count")) {
this._countQuery = requestResult.count;
}
}
}
@ -128,6 +127,52 @@ SQ.SimpleQueryByExample.prototype.execute = function () {
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- public functions
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup SimpleQuery
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief constructs a query-by-example for a collection
////////////////////////////////////////////////////////////////////////////////
AvocadoCollection.prototype.firstExample = function () {
// create a REAL array, otherwise JSON.stringify will fail
var example = [];
for (var i = 0; i < arguments.length; ++i) {
example.push(arguments[i]);
}
var data = {
collection : this._id,
example : example
}
var requestResult = this._database._connection.PUT("/_api/simple/first-example", JSON.stringify(data));
if (requestResult != null
&& requestResult.error == true
&& requestResult.errorNum == internal.errors.ERROR_HTTP_NOT_FOUND.code) {
return null;
}
TRI_CheckRequestResult(requestResult);
return requestResult.document;
}
AvocadoEdgesCollection.prototype.firstExample = AvocadoCollection.prototype.firstExample;
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- SIMPLE QUERY NEAR
// -----------------------------------------------------------------------------

View File

@ -36,37 +36,6 @@ var DURATION = 0;
internal.loadFile("jsunity/jsunity");
jsUnity.log = console;
////////////////////////////////////////////////////////////////////////////////
/// @page jsUnity Using jsUnity and node-jscoverage
///
/// The AvocadoDB contains a wrapper for
/// <a href="http://jsunity.com/">jsUnity</a>, a lightyweight universal
/// JavAScript unit testing framework.
///
/// @section jsUnityRunningTest Running jsUnity Tests
///
/// Assume that you have a test file containing
///
/// @verbinclude jsunity1
///
/// Then you can run the test suite using @FN{jsunity.runTest}
///
/// @verbinclude jsunity2
///
/// @section jsUnityRunningCoverage Running jsUnity Tests with Coverage
///
/// You can use the coverage tool
/// <a href="https://github.com/visionmedia/node-jscoverage">@LIT{node-jscoverage}</a>.
///
/// Assume that your file live in a directory called @LIT{lib}. Use
///
/// @CODE{node-jscoverage lib lib-cov}
///
/// to create a copy of the JavaScript files with coverage information. Start
/// the AvocadoDB with these files and use @FN{jsunity.runCoverage} instead of
/// @FN{jsunity.runTest}.
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- private functions
// -----------------------------------------------------------------------------

View File

@ -47,9 +47,9 @@ var AvocadoEdgesCollection = internal.AvocadoEdgesCollection;
///
/// @FUN{all()}
///
/// Selects all documents of a collection. You can use @FN{toArray}, @FN{next},
/// or @FN{hasNext} to access the result. The result can be limited using the
/// @FN{skip} and @FN{limit} operator.
/// Selects all documents of a collection and returns a cursor. You can use
/// @FN{toArray}, @FN{next}, or @FN{hasNext} to access the result. The result
/// can be limited using the @FN{skip} and @FN{limit} operator.
///
/// @EXAMPLES
///
@ -257,14 +257,20 @@ AvocadoEdgesCollection.prototype.geo = AvocadoCollection.geo;
///
/// @FUN{@FA{collection}.byExample(@FA{path1}, @FA{value1}, ...)}
///
/// Selects all documents of a collection that match the specified
/// example. The example must be specified as paths and values. Allowed
/// Selects all documents of a collection that match the specified example and
/// returns a cursor. The example must be specified as paths and values. Allowed
/// attribute types for searching are numbers, strings, and boolean values.
///
/// You can use @FN{toArray}, @FN{next}, or @FN{hasNext} to access
/// the result. The result can be limited using the @FN{skip} and @FN{limit}
/// operator.
///
/// @FUN{@FA{collection}.byExample(@FA{example})}
///
/// As alternative you can supply an example as single argument. Note that an
/// attribute name of the form @LIT{a.b} is interpreted as attribute path, not
/// as attribute.
///
/// @EXAMPLES
///
/// Use @FN{toArray} to get all documents at once:
@ -277,40 +283,19 @@ AvocadoEdgesCollection.prototype.geo = AvocadoCollection.geo;
////////////////////////////////////////////////////////////////////////////////
AvocadoCollection.prototype.byExample = function () {
return new SimpleQueryByExample(this, arguments);
// create a REAL array, otherwise JSON.stringify will fail
var example = [];
for (var i = 0; i < arguments.length; ++i) {
example.push(arguments[i]);
}
return new SimpleQueryByExample(this, example);
}
AvocadoEdgesCollection.prototype.byExample = AvocadoCollection.prototype.byExample;
////////////////////////////////////////////////////////////////////////////////
/// @brief constructs a query-by-example for a collection
///
/// @FUN{@FA{collection}.firstExample(@FA{path1}, @FA{value1}, ...)}
///
/// Returns the first documents of a collection that match the specified example
/// or @LIT{null}. The example must be specified as paths and
/// values. Allowed attribute types for searching are numbers, strings, and
/// boolean values.
///
/// @EXAMPLES
////////////////////////////////////////////////////////////////////////////////
AvocadoCollection.prototype.firstExample = function () {
var cursor = new SimpleQueryByExample(this, arguments);
var result = null;
if (cursor.hasNext()) {
result = cursor.next();
}
cursor.dispose();
return result;
}
AvocadoEdgesCollection.prototype.firstExample = AvocadoCollection.prototype.firstExample;
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////

View File

@ -41,7 +41,7 @@ var SQB = require("simple-query-basics");
require("simple-query");
// -----------------------------------------------------------------------------
// --SECTION-- basic skips and limits
// --SECTION-- basic skips and limits for array
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
@ -176,14 +176,14 @@ function SimpleQueryArraySkipLimitSuite () {
}
// -----------------------------------------------------------------------------
// --SECTION-- basic skips and limits
// --SECTION-- basic skips and limits for all
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief test suite: skip and limit with a collection
////////////////////////////////////////////////////////////////////////////////
function SimpleQuerySkipLimitSuite () {
function SimpleQueryAllSkipLimitSuite () {
var cn = "UnitTestsCollectionSkipLimit";
var collection = null;
var numbers = null;
@ -195,30 +195,30 @@ function SimpleQuerySkipLimitSuite () {
/// @brief set up
////////////////////////////////////////////////////////////////////////////////
setUp : function () {
internal.db._drop(cn);
collection = internal.db._create(cn, { waitForSync : false });
setUp : function () {
internal.db._drop(cn);
collection = internal.db._create(cn, { waitForSync : false });
for (var i = 0; i < 10; ++i) {
collection.save({ n : i });
}
for (var i = 0; i < 10; ++i) {
collection.save({ n : i });
}
numbers = collection.all().toArray().map(num);
},
numbers = collection.all().toArray().map(num);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief tear down
////////////////////////////////////////////////////////////////////////////////
tearDown : function () {
collection.drop();
},
tearDown : function () {
collection.drop();
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: skip
////////////////////////////////////////////////////////////////////////////////
testSkip : function () {
testAllSkip : function () {
var n = collection.all().skip(0).toArray().map(num);
assertEqual(n, numbers);
@ -256,7 +256,7 @@ function SimpleQuerySkipLimitSuite () {
/// @brief test: limit
////////////////////////////////////////////////////////////////////////////////
testLimit : function () {
testAllLimit : function () {
var n = collection.all().limit(10).toArray().map(num);
assertEqual(n, numbers);
@ -290,7 +290,7 @@ function SimpleQuerySkipLimitSuite () {
/// @brief test: skip and limit
////////////////////////////////////////////////////////////////////////////////
testSkipLimit : function () {
testAllSkipLimit : function () {
var n = collection.all().skip(0).limit(10).toArray().map(num);
assertEqual(n, numbers);
@ -318,6 +318,112 @@ function SimpleQuerySkipLimitSuite () {
};
}
// -----------------------------------------------------------------------------
// --SECTION-- basic tests for byExample
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief test suite: skip and limit with a collection
////////////////////////////////////////////////////////////////////////////////
function SimpleQueryByExampleSuite () {
var cn = "UnitTestsCollectionByExample";
var collection = null;
var id = function(d) { return d._id; };
return {
////////////////////////////////////////////////////////////////////////////////
/// @brief set up
////////////////////////////////////////////////////////////////////////////////
setUp : function () {
internal.db._drop(cn);
collection = internal.db._create(cn, { waitForSync : false });
},
////////////////////////////////////////////////////////////////////////////////
/// @brief tear down
////////////////////////////////////////////////////////////////////////////////
tearDown : function () {
collection.drop();
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: byExample
////////////////////////////////////////////////////////////////////////////////
testByExampleObject : function () {
var d1 = collection.save({ i : 1 });
var d2 = collection.save({ i : 1, a : { j : 1 } });
var d3 = collection.save({ i : 1, a : { j : 1, k : 1 } });
var d4 = collection.save({ i : 1, a : { j : 2, k : 2 } });
var d5 = collection.save({ i : 2 });
var d6 = collection.save({ i : 2, a : 2 });
var d7 = collection.save({ i : 2, a : { j : 2, k : 2 } });
var s;
s = collection.byExample({ i : 1 }).toArray().map(id).sort();
assertEqual([d1._id, d2._id, d3._id, d4._id].sort(), s);
s = collection.byExample({ i : 2 }).toArray().map(id).sort();
assertEqual([d5._id, d6._id, d7._id].sort(), s);
s = collection.byExample({ a : { j : 1 } }).toArray().map(id).sort();
assertEqual([d2._id], s);
s = collection.byExample({ "a.j" : 1 }).toArray().map(id).sort();
assertEqual([d2._id, d3._id].sort(), s);
s = collection.byExample({ i : 2, "a.k" : 2 }).toArray().map(id).sort();
assertEqual([d7._id], s);
s = collection.firstExample({ "i" : 2, "a.k" : 2 });
assertEqual(d7._id, s._id);
s = collection.firstExample({ "i" : 2, "a.k" : 27 });
assertEqual(null, s);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test: byExample
////////////////////////////////////////////////////////////////////////////////
testByExampleList : function () {
var d1 = collection.save({ i : 1 });
var d2 = collection.save({ i : 1, a : { j : 1 } });
var d3 = collection.save({ i : 1, a : { j : 1, k : 1 } });
var d4 = collection.save({ i : 1, a : { j : 2, k : 2 } });
var d5 = collection.save({ i : 2 });
var d6 = collection.save({ i : 2, a : 2 });
var d7 = collection.save({ i : 2, a : { j : 2, k : 2 } });
var s;
s = collection.byExample("i", 1).toArray().map(id).sort();
assertEqual([d1._id, d2._id, d3._id, d4._id].sort(), s);
s = collection.byExample("i", 2).toArray().map(id).sort();
assertEqual([d5._id, d6._id, d7._id].sort(), s);
s = collection.byExample("a", { j : 1 }).toArray().map(id).sort();
assertEqual([d2._id], s);
s = collection.byExample("a.j", 1).toArray().map(id).sort();
assertEqual([d2._id, d3._id].sort(), s);
s = collection.byExample("i", 2, "a.k", 2).toArray().map(id).sort();
assertEqual([d7._id], s);
s = collection.firstExample("i", 2, "a.k", 2);
assertEqual(d7._id, s._id);
s = collection.firstExample("i", 2, "a.k", 27);
assertEqual(null, s);
}
};
}
// -----------------------------------------------------------------------------
// --SECTION-- main
// -----------------------------------------------------------------------------
@ -327,7 +433,8 @@ function SimpleQuerySkipLimitSuite () {
////////////////////////////////////////////////////////////////////////////////
jsunity.run(SimpleQueryArraySkipLimitSuite);
jsunity.run(SimpleQuerySkipLimitSuite);
jsunity.run(SimpleQueryAllSkipLimitSuite);
jsunity.run(SimpleQueryByExampleSuite);
return jsunity.done();

View File

@ -419,6 +419,11 @@ static string JS_server_server =
"\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"/// @brief converts collection into an array\n"
"///\n"
"/// @FUN{@FA{collection}.toArray()}\n"
"///\n"
"/// Converts the collection into an array of documents. Never use this call\n"
"/// in a production environment.\n"
"////////////////////////////////////////////////////////////////////////////////\n"
"\n"
"AvocadoCollection.prototype.toArray = function() {\n"

View File

@ -90,20 +90,27 @@ SQ.SimpleQueryByExample.prototype.execute = function () {
this._skip = 0;
}
var parameters = [ ];
var parameters = [];
// the actual example is passed in the first argument
for (var i in this._example[0]) {
if (this._example[0].hasOwnProperty(i)) {
if (this._example.length == 1) {
for (var i in this._example[0]) {
if (this._example[0].hasOwnProperty(i)) {
// attribute name
parameters.push(i);
// attribute name
parameters.push(i);
// attribute value
parameters.push(this._example[0][i]);
// attribute value
parameters.push(this._example[0][i]);
}
}
}
// the arguments are passed
else {
parameters = this._example;
}
var documents = this._collection.BY_EXAMPLE.apply(this._collection, parameters);
this._execution = new SQ.GeneralArrayCursor(documents, this._skip, this._limit);
@ -116,6 +123,55 @@ SQ.SimpleQueryByExample.prototype.execute = function () {
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- public functions
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup SimpleQuery
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief constructs a query-by-example for a collection
///
/// @FUN{@FA{collection}.firstExample(@FA{path1}, @FA{value1}, ...)}
///
/// Returns the first documents of a collection that match the specified example
/// or @LIT{null}. The example must be specified as paths and
/// values. Allowed attribute types for searching are numbers, strings, and
/// boolean values.
///
/// @FUN{@FA{collection}.firstExample(@FA{example})}
///
/// As alternative you can supply an example as single argument. Note that an
/// attribute name of the form @LIT{a.b} is interpreted as attribute path, not
/// as attribute.
///
/// @EXAMPLES
///
/// @verbinclude shell-simple-query-first-example
////////////////////////////////////////////////////////////////////////////////
AvocadoCollection.prototype.firstExample = function () {
var cursor = new SQ.SimpleQueryByExample(this, arguments);
var result = null;
if (cursor.hasNext()) {
result = cursor.next();
}
cursor.dispose();
return result;
}
AvocadoEdgesCollection.prototype.firstExample = AvocadoCollection.prototype.firstExample;
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- SIMPLE QUERY NEAR
// -----------------------------------------------------------------------------

View File

@ -418,6 +418,11 @@ AvocadoEdgesCollection.STATUS_DELETED = 5;
////////////////////////////////////////////////////////////////////////////////
/// @brief converts collection into an array
///
/// @FUN{@FA{collection}.toArray()}
///
/// Converts the collection into an array of documents. Never use this call
/// in a production environment.
////////////////////////////////////////////////////////////////////////////////
AvocadoCollection.prototype.toArray = function() {