fix merge.
This commit is contained in:
parent
b9effea2e9
commit
31aed3db43
361
C/qly.c
361
C/qly.c
@ -1,361 +0,0 @@
|
||||
/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V. Santos Costa and Universidade do Porto 1985-- *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: stdpreds.c *
|
||||
* comments: quick saver/loader *
|
||||
* *
|
||||
* Last rev: $Date: 2011-08-29$,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $ *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <SWI-Stream.h>
|
||||
#include <Yap.h>
|
||||
#include <Yatom.h>
|
||||
#include <clause.h>
|
||||
|
||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next)))
|
||||
|
||||
typedef enum {
|
||||
QLF_START_CLAUSE,
|
||||
QLF_END_CLAUSES,
|
||||
QLF_CONSTANT_INT,
|
||||
QLF_CONSTANT_ATOM,
|
||||
QLF_ATOM,
|
||||
QLF_WIDE_ATOM
|
||||
} qlf_tag_t;
|
||||
|
||||
#define CHECK(F) { size_t r = (F); if (!r) return r; }
|
||||
|
||||
static size_t save_bytes(IOSTREAM *stream, void *ptr, size_t sz)
|
||||
{
|
||||
return Sfwrite(ptr, sz, 1, stream);
|
||||
}
|
||||
|
||||
static size_t save_term(IOSTREAM *stream, Term t)
|
||||
{
|
||||
size_t len = Yap_ExportTerm(t, (char *)H, sizeof(CELL)*(ASP-H));
|
||||
if (len <= 0) return 0;
|
||||
return save_bytes(stream, (char *)H, len);
|
||||
}
|
||||
|
||||
static size_t save_tag(IOSTREAM *stream, qlf_tag_t tag)
|
||||
{
|
||||
return save_bytes(stream, &tag, sizeof(qlf_tag_t));
|
||||
}
|
||||
|
||||
static size_t save_pointer(IOSTREAM *stream, void *ptr)
|
||||
{
|
||||
void *p = ptr;
|
||||
return save_bytes(stream, &p, sizeof(void *));
|
||||
}
|
||||
|
||||
static size_t save_uint(IOSTREAM *stream, UInt val)
|
||||
{
|
||||
UInt v = val;
|
||||
return save_bytes(stream, &v, sizeof(UInt));
|
||||
}
|
||||
|
||||
static size_t save_int(IOSTREAM *stream, Int val)
|
||||
{
|
||||
Int v = val;
|
||||
return save_bytes(stream, &v, sizeof(Int));
|
||||
}
|
||||
|
||||
static size_t save_atom(IOSTREAM *stream, Atom at)
|
||||
{
|
||||
if (IsWideAtom(at)) {
|
||||
size_t sz = wcslen(RepAtom(at)->WStrOfAE);
|
||||
CHECK(save_tag(stream, QLF_WIDE_ATOM));
|
||||
CHECK(save_uint(stream, sz));
|
||||
return save_bytes(stream, RepAtom(at)->WStrOfAE, (sz+1)*sizeof(wchar_t));
|
||||
} else {
|
||||
size_t sz = strlen(RepAtom(at)->StrOfAE);
|
||||
CHECK(save_tag(stream, QLF_ATOM));
|
||||
return save_bytes(stream, RepAtom(at)->StrOfAE, (sz+1)*sizeof(char));
|
||||
}
|
||||
}
|
||||
|
||||
static size_t save_Arity(IOSTREAM *stream, Int a)
|
||||
{
|
||||
return save_uint(stream, a);
|
||||
}
|
||||
|
||||
static size_t save_CellPtoHeap(IOSTREAM *stream, CELL *ptr)
|
||||
{
|
||||
return save_pointer(stream, ptr);
|
||||
}
|
||||
|
||||
static size_t save_ConstantTerm(IOSTREAM *stream, Term t)
|
||||
{
|
||||
if (IsIntTerm(t)) {
|
||||
CHECK(save_tag(stream, QLF_CONSTANT_INT));
|
||||
return save_int(stream, IntOfTerm(t));
|
||||
}
|
||||
CHECK(save_tag(stream, QLF_CONSTANT_ATOM));
|
||||
return save_atom(stream, AtomOfTerm(t));
|
||||
}
|
||||
|
||||
static size_t save_DoubleInCode(IOSTREAM *stream, CELL *t)
|
||||
{
|
||||
return save_bytes(stream, (void *)(t+1), sizeof(double));
|
||||
}
|
||||
|
||||
static size_t save_Constant(IOSTREAM *stream, COUNT c)
|
||||
{
|
||||
return save_bytes(stream, (void *)&c, sizeof(COUNT));
|
||||
}
|
||||
|
||||
static size_t save_DBGroundTerm(IOSTREAM *stream, Term t)
|
||||
{
|
||||
return save_term(stream, t);
|
||||
}
|
||||
|
||||
static size_t save_Func(IOSTREAM *stream, Functor f)
|
||||
{
|
||||
CHECK(save_atom(stream, NameOfFunctor(f)));
|
||||
return save_Arity(stream, ArityOfFunctor(f));
|
||||
}
|
||||
|
||||
static size_t save_ExternalFunction(IOSTREAM *stream, CPredicate f)
|
||||
{
|
||||
Yap_Error(INTERNAL_ERROR, TermNil, "trying to save an ExternalFunction");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t save_IntegerInCode(IOSTREAM *stream, CELL *t)
|
||||
{
|
||||
return save_int(stream, t[1]);
|
||||
}
|
||||
|
||||
static size_t save_Integer(IOSTREAM *stream, Int i)
|
||||
{
|
||||
return save_int(stream, i);
|
||||
}
|
||||
|
||||
static size_t save_PtoLUIndex(IOSTREAM *stream, struct logic_upd_index *p)
|
||||
{
|
||||
Yap_Error(INTERNAL_ERROR, TermNil, "trying to save PtoLUIndex");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t save_PtoOp(IOSTREAM *stream, yamop *l)
|
||||
{
|
||||
return save_pointer(stream, (void *)l);
|
||||
}
|
||||
|
||||
static size_t save_PtoLUClause(IOSTREAM *stream, struct logic_upd_clause *t)
|
||||
{
|
||||
Yap_Error(INTERNAL_ERROR, TermNil, "trying to save PtoLUIndex");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t save_BlobTermInCode(IOSTREAM *stream, Term t)
|
||||
{
|
||||
return save_pointer(stream, (void *)RepAppl(t));
|
||||
}
|
||||
|
||||
static size_t save_Opcode(IOSTREAM *stream, OPCODE op)
|
||||
{
|
||||
return save_int(stream, Yap_op_from_opcode(op));
|
||||
}
|
||||
|
||||
#ifdef YAPOR
|
||||
static size_t save_OrArg(IOSTREAM *stream, unsigned int i)
|
||||
{
|
||||
return save_uint(stream, i);
|
||||
}
|
||||
#endif /* YAPOR */
|
||||
|
||||
static size_t save_PtoPred(IOSTREAM *stream, struct pred_entry *ap)
|
||||
{
|
||||
if (ap->ModuleOfPred) {
|
||||
CHECK(save_atom(stream, AtomOfTerm(ap->ModuleOfPred)));
|
||||
} else {
|
||||
CHECK(save_atom(stream, AtomProlog));
|
||||
}
|
||||
if (ap->ArityOfPE) {
|
||||
CHECK(save_int(stream, ap->ArityOfPE));
|
||||
return save_atom(stream, NameOfFunctor(ap->FunctorOfPred));
|
||||
} else {
|
||||
CHECK(save_int(stream, 0));
|
||||
return save_atom(stream, (Atom)(ap->FunctorOfPred));
|
||||
}
|
||||
}
|
||||
|
||||
static size_t save_Module(IOSTREAM *stream, Term tmod)
|
||||
{
|
||||
if (tmod == 0) {
|
||||
return save_atom(stream, AtomProlog);
|
||||
} else {
|
||||
return save_atom(stream, AtomOfTerm(tmod));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TABLING
|
||||
static size_t save_TabEntry(IOSTREAM *stream, struct table_entry *ap)
|
||||
{
|
||||
return save_pointer(stream, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PRECOMPUTE_REGADDRESS
|
||||
#define arg_from_x(I) (((CELL *)(I))-XREGS)
|
||||
#else
|
||||
#define arg_from_x(I) (I)
|
||||
#endif /* PRECOMPUTE_REGADDRESS */
|
||||
|
||||
static size_t save_X(IOSTREAM *stream, wamreg reg)
|
||||
{
|
||||
return save_int(stream, arg_from_x(reg));
|
||||
}
|
||||
|
||||
static size_t save_Y(IOSTREAM *stream, yslot reg)
|
||||
{
|
||||
return save_int(stream, reg);
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_code(IOSTREAM *stream, yamop *pc, yamop *max) {
|
||||
#include "saveclause.h"
|
||||
if (max && max > pc) {
|
||||
return save_bytes(stream, pc, (char *)max-(char *)pc);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_lu_clause(IOSTREAM *stream, LogUpdClause *cl) {
|
||||
CHECK(save_tag(stream, QLF_START_CLAUSE));
|
||||
CHECK(save_term(stream, cl->ClSource->Entry));
|
||||
return save_code(stream, cl->ClCode, (yamop *)cl->ClSource);
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_dynamic_clause(IOSTREAM *stream, DynamicClause *cl) {
|
||||
CHECK(save_tag(stream, QLF_START_CLAUSE));
|
||||
return save_code(stream, cl->ClCode, NULL);
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_static_clause(IOSTREAM *stream, StaticClause *cl) {
|
||||
CHECK(save_tag(stream, QLF_START_CLAUSE));
|
||||
if (!(cl->ClFlags & FactMask)) {
|
||||
// Yap_DebugPlWrite(cl->usc.ClSource->Entry);fprintf(stderr,"\n");
|
||||
CHECK(save_term(stream, cl->usc.ClSource->Entry));
|
||||
return save_code(stream, cl->ClCode, (yamop *)(cl->usc.ClSource));
|
||||
} else {
|
||||
return save_code(stream, cl->ClCode, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_mega_clause(IOSTREAM *stream, MegaClause *cl) {
|
||||
UInt i;
|
||||
yamop *ptr;
|
||||
UInt ncls = cl->ClPred->cs.p_code.NOfClauses;
|
||||
|
||||
for (i = 0, ptr = cl->ClCode; i < ncls; i++) {
|
||||
yamop *nextptr = (yamop *)((char *)ptr + cl->ClItemSize);
|
||||
CHECK(save_tag(stream, QLF_START_CLAUSE));
|
||||
CHECK(save_code(stream, ptr, nextptr));
|
||||
ptr = nextptr;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_clauses(IOSTREAM *stream, PredEntry *pp) {
|
||||
yamop *FirstC, *LastC;
|
||||
|
||||
FirstC = pp->cs.p_code.FirstClause;
|
||||
LastC = pp->cs.p_code.LastClause;
|
||||
if (FirstC == NULL && LastC == NULL) {
|
||||
return save_tag(stream, QLF_END_CLAUSES);
|
||||
}
|
||||
if (pp->PredFlags & LogUpdatePredFlag) {
|
||||
LogUpdClause *cl = ClauseCodeToLogUpdClause(FirstC);
|
||||
|
||||
while (cl != NULL) {
|
||||
CHECK(save_lu_clause(stream, cl));
|
||||
cl = cl->ClNext;
|
||||
}
|
||||
} else if (pp->PredFlags & MegaClausePredFlag) {
|
||||
MegaClause *cl = ClauseCodeToMegaClause(FirstC);
|
||||
|
||||
CHECK(save_mega_clause(stream, cl));
|
||||
} else if (pp->PredFlags & DynamicPredFlag) {
|
||||
yamop *cl = FirstC;
|
||||
|
||||
do {
|
||||
CHECK(save_dynamic_clause(stream, ClauseCodeToDynamicClause(cl)));
|
||||
if (cl == LastC) return 1;
|
||||
cl = NextDynamicClause(cl);
|
||||
} while (TRUE);
|
||||
} else {
|
||||
StaticClause *cl = ClauseCodeToStaticClause(FirstC);
|
||||
|
||||
do {
|
||||
CHECK(save_static_clause(stream, cl));
|
||||
if (cl->ClCode == LastC) return 1;
|
||||
cl = cl->ClNext;
|
||||
} while (TRUE);
|
||||
}
|
||||
return save_tag(stream, QLF_END_CLAUSES);
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_pred(IOSTREAM *stream, PredEntry *ap) {
|
||||
CHECK(save_Func(stream, ap->FunctorOfPred));
|
||||
CHECK(save_uint(stream, ap->ArityOfPE));
|
||||
CHECK(save_uint(stream, ap->PredFlags));
|
||||
CHECK(save_uint(stream, ap->cs.p_code.NOfClauses));
|
||||
return save_clauses(stream, ap);
|
||||
}
|
||||
|
||||
static size_t
|
||||
save_module(IOSTREAM *stream, Term mod) {
|
||||
PredEntry *ap = Yap_ModulePred(mod);
|
||||
while (ap) {
|
||||
CHECK(save_pred(stream, ap));
|
||||
ap = ap->NextPredOfModule;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Int
|
||||
p_save_module_preds( USES_REGS1 )
|
||||
{
|
||||
IOSTREAM *stream;
|
||||
Term tmod = Deref(ARG2);
|
||||
|
||||
if (!Yap_getOutputStream(Yap_InitSlot(Deref(ARG1) PASS_REGS), &stream)) {
|
||||
return FALSE;
|
||||
}
|
||||
if (IsVarTerm(tmod)) {
|
||||
Yap_Error(INSTANTIATION_ERROR,tmod,"save_module/2");
|
||||
return FALSE;
|
||||
}
|
||||
if (!IsAtomTerm(tmod)) {
|
||||
Yap_Error(TYPE_ERROR_ATOM,tmod,"save_module/2");
|
||||
return FALSE;
|
||||
}
|
||||
return save_module(stream, tmod) != 0;
|
||||
}
|
||||
|
||||
void Yap_InitQLY(void)
|
||||
{
|
||||
Yap_InitCPred("$save_module_preds", 2, p_save_module_preds, SyncPredFlag|HiddenPredFlag|UserCPredFlag);
|
||||
}
|
||||
|
378
configure
vendored
378
configure
vendored
@ -6372,372 +6372,6 @@ else
|
||||
#include <sqlucode.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
SQLHENV henv;
|
||||
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
|
||||
=======
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
|
||||
|
||||
$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
|
||||
|
||||
LIBS="$LIBS -lreadline -lncurses"
|
||||
|
||||
else
|
||||
if test "x$with_readline" != xcheck; then
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "--with-readline was given, but test for readline failed
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
if test "$yap_cv_gmp" != "no"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
|
||||
=======
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
|
||||
$as_echo_n "checking for main in -lgmp... " >&6; }
|
||||
if ${ac_cv_lib_gmp_main+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lgmp $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return main ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_gmp_main=yes
|
||||
else
|
||||
ac_cv_lib_gmp_main=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
|
||||
=======
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
|
||||
$as_echo "$ac_cv_lib_gmp_main" >&6; }
|
||||
if test "x$ac_cv_lib_gmp_main" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGMP 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lgmp $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if ${ac_cv_prog_CPP+:} false; then :
|
||||
=======
|
||||
|
||||
if test "$yap_cv_yapr" != "no"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lR" >&5
|
||||
$as_echo_n "checking for main in -lR... " >&6; }
|
||||
if ${ac_cv_lib_R_main+:} false; then :
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lR $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
=======
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return main ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
<<<<<<< HEAD
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CPP=$CPP
|
||||
|
||||
fi
|
||||
CPP=$ac_cv_prog_CPP
|
||||
=======
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_R_main=yes
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
else
|
||||
ac_cv_lib_R_main=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
<<<<<<< HEAD
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
|
||||
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
|
||||
if ${ac_cv_path_GREP+:} false; then :
|
||||
=======
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_R_main" >&5
|
||||
$as_echo "$ac_cv_lib_R_main" >&6; }
|
||||
if test "x$ac_cv_lib_R_main" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBR 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lR $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lRmath" >&5
|
||||
$as_echo_n "checking for main in -lRmath... " >&6; }
|
||||
if ${ac_cv_lib_Rmath_main+:} false; then :
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lRmath $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
<<<<<<< HEAD
|
||||
$ac_path_GREP_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_GREP"; then
|
||||
as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
|
||||
fi
|
||||
=======
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return main ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_Rmath_main=yes
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
else
|
||||
ac_cv_lib_Rmath_main=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Rmath_main" >&5
|
||||
$as_echo "$ac_cv_lib_Rmath_main" >&6; }
|
||||
if test "x$ac_cv_lib_Rmath_main" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBRMATH 1
|
||||
_ACEOF
|
||||
|
||||
<<<<<<< HEAD
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
|
||||
$as_echo_n "checking for egrep... " >&6; }
|
||||
if ${ac_cv_path_EGREP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
|
||||
then ac_cv_path_EGREP="$GREP -E"
|
||||
else
|
||||
if test -z "$EGREP"; then
|
||||
ac_path_EGREP_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
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"
|
||||
{ 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
|
||||
*GNU*)
|
||||
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
$as_echo_n 0123456789 >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
$as_echo 'EGREP' >> "conftest.nl"
|
||||
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
as_fn_arith $ac_count + 1 && ac_count=$as_val
|
||||
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_EGREP="$ac_path_EGREP"
|
||||
ac_path_EGREP_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
$ac_path_EGREP_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_EGREP"; then
|
||||
as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
ac_cv_path_EGREP=$EGREP
|
||||
=======
|
||||
LIBS="-lRmath $LIBS"
|
||||
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
$as_echo_n "checking for ANSI C header files... " >&6; }
|
||||
if ${ac_cv_header_stdc+:} false; then :
|
||||
=======
|
||||
if test "$yap_cv_myddas" != "no"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmysqlclient" >&5
|
||||
$as_echo_n "checking for main in -lmysqlclient... " >&6; }
|
||||
if ${yap_cv_mysql+:} false; then :
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <mysql/mysql.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
MYSQL *conn;
|
||||
conn = mysql_init(NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
yap_cv_mysql=yes
|
||||
else
|
||||
yap_cv_mysql=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $yap_cv_mysql" >&5
|
||||
$as_echo "$yap_cv_mysql" >&6; }
|
||||
if test "$yap_cv_mysql" = yes
|
||||
then
|
||||
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL"
|
||||
LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient "
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc" >&5
|
||||
$as_echo_n "checking for main in -lodbc... " >&6; }
|
||||
if ${yap_cv_odbc+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sql.h>
|
||||
#include <sqlucode.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -6819,21 +6453,9 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
<<<<<<< HEAD
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
|
||||
"
|
||||
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
|
||||
=======
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
|
||||
>>>>>>> d4d4dbaddf15563b573697caec6fd7c63dfcbf2f
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
_ACEOF
|
||||
|
Reference in New Issue
Block a user