2010-09-27 21:59:13 +01:00
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_PREREQ([2.50])
|
|
|
|
|
|
|
|
dnl VARIABLES EXPORTED
|
|
|
|
dnl
|
|
|
|
dnl ARCH
|
|
|
|
dnl
|
|
|
|
dnl DefHeapSpace= Default DB space
|
|
|
|
dnl DefStackSpace= Default global+local
|
|
|
|
dnl DefTrailSpace= Default trail
|
|
|
|
dnl
|
|
|
|
dnl CPLINT
|
|
|
|
dnl
|
|
|
|
dnl CPLINT_LIBS=
|
|
|
|
dnl CPLINT_LIBS=
|
|
|
|
dnl CPLINT_LDFLAGS=
|
|
|
|
dnl CPLINT_SHLIB_LD=
|
|
|
|
dnl
|
|
|
|
dnl ENVIRONMENT to run YAP before Install is complete
|
|
|
|
dnl PRE_INSTALL_ENV= prefix to run YAP after libYap.so and yap are available
|
|
|
|
dnl but before make install
|
|
|
|
dnl INSTALL_ENV= prefix to run YAP while doing make install
|
|
|
|
dnl
|
|
|
|
dnl EXEC_SUFFIX=suffix for executable (.exe)
|
|
|
|
dnl
|
|
|
|
dnl INSTALL_DLLS= we can do dynamic linking
|
|
|
|
dnl SO= suffix for loadable binary (.so,.dll,.o)
|
|
|
|
dnl MERGE_DLL_OBJS= we need to merge several .o files into a single dll.
|
|
|
|
dnl
|
|
|
|
dnl CXXFLAGS= C++-flags
|
|
|
|
dnl SHLIB_FLAGS= C-flags used to compile a file that will be loaded dynamically
|
|
|
|
dnl DO_SECOND_LD= call a separate dll ld
|
|
|
|
dnl YAPLIB_LD= construct libYap.DLL
|
|
|
|
dnl SHLIB_LD= dll ld (C)
|
|
|
|
dnl SHLIB_CXX_LD= dll ld (C++)
|
|
|
|
dnl SHLIB_CFLAGS= cflags to use when constructing a DLL
|
|
|
|
dnl SHLIB_CXX_CFLAGS= c++flags to use when constructing a DLL
|
|
|
|
dnl YAPLIB_CFLAGS=flags to construct libYap
|
|
|
|
dnl EXTRA_LIBS_FOR_DLLS= libs that are required when lding a so
|
|
|
|
dnl EXTRA_LIBS_FOR_SWIDLLS= libs that are required when lding a SWI so
|
|
|
|
|
|
|
|
|
|
|
|
AC_INIT(console/yap.c)
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
2011-11-02 22:55:56 +00:00
|
|
|
AC_CONFIG_HEADER(YapTermConfig.h)
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
dnl store the environment's compilation flags
|
|
|
|
mycflags="$CFLAGS"
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_SUBST(GCC)
|
|
|
|
AC_SUBST(C_INTERF_FLAGS)
|
|
|
|
AC_SUBST(C_PARSER_FLAGS)
|
2011-08-09 15:30:59 +01:00
|
|
|
AC_LANG(C)
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2011-11-15 10:22:03 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(HOST_ALIAS,"${target}")
|
|
|
|
|
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
YAP_TARGET=i386
|
|
|
|
;;
|
|
|
|
x86*)
|
|
|
|
YAP_TARGET=amd64
|
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
YAP_TARGET=sparc
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
YAP_TARGET=unknown
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2011-08-08 14:21:36 +01:00
|
|
|
dnl Gecode support
|
|
|
|
AC_CHECK_HEADER(gecode/support/config.hpp,
|
|
|
|
have_gecode=yes, have_gecode=no)
|
|
|
|
AC_ARG_ENABLE(gecode,
|
|
|
|
[ --enable-gecode install gecode library],
|
|
|
|
[use_gecode="$enableval"
|
|
|
|
if test "$use_gecode" = yes; then
|
|
|
|
if test "$have_gecode" = no; then
|
|
|
|
AC_MSG_ERROR([cannot enable gecode: gecode library not found])
|
|
|
|
fi
|
2011-12-01 20:54:39 +00:00
|
|
|
fi], use_gecode=$have_gecode)
|
2011-08-09 15:30:59 +01:00
|
|
|
AC_MSG_CHECKING([if dynamic arrays are supported])
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[void foo(int n) { int a[n]; a[1]=0; }]],[[foo(3);]])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([HAVE_DYNARRAY],[1],[Define if dynamic arrays are supported])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
2011-12-01 20:54:39 +00:00
|
|
|
GECODE_VERSION=unknown-gecode-version
|
2011-12-04 15:40:43 +00:00
|
|
|
GECODE_EXTRALIBS="-lgecodesupport -lgecodekernel -lgecodeint -lgecodeset -lgecodesearch"
|
2011-12-01 20:54:39 +00:00
|
|
|
AC_SUBST(GECODE_VERSION)
|
2011-12-02 13:30:55 +00:00
|
|
|
AC_SUBST(GECODE_EXTRALIBS)
|
2011-12-01 20:54:39 +00:00
|
|
|
if test "$use_gecode" = yes; then
|
2011-12-02 13:30:55 +00:00
|
|
|
AC_MSG_CHECKING([gecode version])
|
2011-12-01 20:54:39 +00:00
|
|
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
#include "gecode/support/config.hpp"
|
|
|
|
#include <stdio.h>
|
|
|
|
]],[[
|
|
|
|
FILE* out = fopen("conftest.out","w");
|
|
|
|
fprintf(out,"%s\n",GECODE_VERSION);
|
|
|
|
fclose(out);
|
|
|
|
return 0;
|
|
|
|
]])],[GECODE_VERSION=$(cat conftest.out)
|
|
|
|
AC_MSG_RESULT([$GECODE_VERSION])],
|
|
|
|
[AC_MSG_ERROR([cannot determine gecode version])])
|
2011-12-02 13:30:55 +00:00
|
|
|
case "$target_os" in
|
|
|
|
*darwin*)
|
|
|
|
AC_MSG_CHECKING([if -framework gecode is required])
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
saved_CXXFLAGS="$CXXFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS -framework gecode"
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
#include "gecode/int.hh"
|
|
|
|
]],[[
|
|
|
|
Gecode::Exception e("","");
|
|
|
|
return 0;
|
|
|
|
]])],[GECODE_EXTRALIBS="-framework gecode"
|
|
|
|
AC_MSG_RESULT([yes])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
AC_LANG_POP()
|
|
|
|
CXXFLAGS="$saved_CXXFLAGS"
|
|
|
|
;;
|
|
|
|
esac
|
2011-12-01 20:54:39 +00:00
|
|
|
fi
|
2011-08-08 14:21:36 +01:00
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_ENABLE(tabling,
|
|
|
|
[ --enable-tabling support tabling ],
|
2011-11-15 10:23:41 +00:00
|
|
|
tabling="$enableval", tabling=yes)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_ENABLE(or-parallelism,
|
2011-04-14 18:49:55 +01:00
|
|
|
[ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ],
|
2010-09-27 21:59:13 +01:00
|
|
|
orparallelism="$enableval", orparallelism=no)
|
|
|
|
AC_ARG_ENABLE(rational-trees,
|
|
|
|
[ --enable-rational-trees support infinite rational trees ],
|
|
|
|
rationaltrees="$enableval" , rationaltrees=yes)
|
|
|
|
AC_ARG_ENABLE(coroutining,
|
|
|
|
[ --enable-coroutining support co-routining, attributed variables and constraints],
|
|
|
|
rationaltrees="$enableval";coroutining="$enableval", coroutining=yes)
|
|
|
|
AC_ARG_ENABLE(depth-limit,
|
|
|
|
[ --enable-depth-limit support depth-bound computation ],
|
|
|
|
depthlimit="$enableval", depthlimit=yes)
|
|
|
|
AC_ARG_ENABLE(wam-profile,
|
|
|
|
[ --enable-wam-profile support low level profiling of abstract machine ],
|
|
|
|
wamprofile="$enableval", wamprofile=no)
|
|
|
|
AC_ARG_ENABLE(low-level-tracer,
|
|
|
|
[ --enable-low-level-tracer support support for procedure-call tracing ],
|
|
|
|
lowleveltracer="$enableval", lowleveltracer=no)
|
|
|
|
AC_ARG_ENABLE(threads,
|
|
|
|
[ --enable-threads support system threads ],
|
|
|
|
threads="$enableval", threads=no)
|
2012-03-22 21:37:20 +00:00
|
|
|
AC_ARG_ENABLE(bddlib,
|
|
|
|
[ --enable-bddlib dynamic bdd library ],
|
|
|
|
dynamic_bdd="$enableval", dynamic_bdd=no)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_ENABLE(pthread-locking,
|
|
|
|
[ --enable-pthread-locking use pthread locking primitives for internal locking (requires threads) ],
|
|
|
|
pthreadlocking="$enableval", pthreadlocking=no)
|
|
|
|
AC_ARG_ENABLE(max-performance,
|
|
|
|
[ --enable-max-performance try using the best flags for specific architecture ],
|
|
|
|
maxperformance="$enableval", maxperformance=no)
|
|
|
|
AC_ARG_ENABLE(max-memory,
|
|
|
|
[ --enable-max-memory try using the best flags for using the memory to the most ],
|
|
|
|
maxmemory="$enableval", maxmemory=yes)
|
|
|
|
AC_ARG_ENABLE(debug-yap,
|
|
|
|
[ --enable-debug-yap enable C-debugging for YAP ],
|
|
|
|
debugyap="$enableval", debugyap=no)
|
|
|
|
AC_ARG_ENABLE(eam,
|
|
|
|
[ --enable-eam enable EAM on YAP ],
|
|
|
|
eam="$enableval", eam=no)
|
|
|
|
AC_ARG_ENABLE(cygwin,
|
|
|
|
[ --enable-cygwin use cygwin library in WIN32 ],
|
|
|
|
cygwin="$enableval", cygwin=no)
|
2011-11-18 17:02:09 +00:00
|
|
|
AC_ARG_ENABLE(prism,
|
|
|
|
[ --enable-prism use PRISM system in YAP ],
|
|
|
|
prism="$enableval", prism=yes)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_ENABLE(dynamic_loading,
|
|
|
|
[ --enable-dynamic-loading compile YAP as a DLL ],
|
|
|
|
dynamic_loading="$enableval", dynamic_loading=no)
|
|
|
|
AC_ARG_ENABLE(static_compilation,
|
|
|
|
[ --enable-static-compilation compile YAP statically ],
|
|
|
|
static_compilation="$enableval", static_compilation=no)
|
|
|
|
AC_ARG_ENABLE(use-malloc,
|
|
|
|
[ --enable-use-malloc use malloc to allocate memory ],
|
2011-11-15 10:23:41 +00:00
|
|
|
use_malloc="$enableval", use_malloc=yes)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_ENABLE(condor,
|
|
|
|
[ --enable-condor allow YAP to be used from condor ],
|
|
|
|
use_condor="$enableval", use_condor=no)
|
|
|
|
AC_ARG_ENABLE(chr,
|
|
|
|
[ --enable-chr install chr library ],
|
|
|
|
use_chr="$enableval", use_chr=yes)
|
|
|
|
AC_ARG_ENABLE(clpqr,
|
|
|
|
[ --enable-clpqr install clpqr library ],
|
|
|
|
use_clpqr="$enableval", use_clpqr=yes)
|
|
|
|
AC_ARG_ENABLE(win64,
|
|
|
|
[ --enable-win64 compile YAP for win64 ],
|
|
|
|
target_win64="$enableval", target_win64=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(april,
|
|
|
|
[ --enable-april compile Yap to support April ILP system],
|
|
|
|
use_april="$enableval", use_april=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(dlcompat,
|
|
|
|
[ --enable-dlcompat use dlcompat library for dynamic loading on Mac OS X],
|
|
|
|
use_dlcompat="$enableval", use_dlcompat=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(cplint,
|
2011-10-22 15:33:04 +01:00
|
|
|
[ --enable-cplint[=DIR] enable the cplint library using the CUDD library in DIR/lib],
|
2010-09-27 21:59:13 +01:00
|
|
|
yap_cv_cplint=$enableval, yap_cv_cplint=no)
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_ARG_ENABLE(clpbn-bp,
|
|
|
|
[ --enable-clpbn-bp enable belief propagation solver in CLPBN. ],
|
2012-11-27 08:37:53 +00:00
|
|
|
yap_cv_clpbn_bp="$enableval", yap_cv_clpbn_bp=yes)
|
2011-07-13 15:31:22 +01:00
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_WITH(gmp,
|
|
|
|
[ --with-gmp[=DIR] use GNU Multiple Precision in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_gmp=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_gmp=no
|
|
|
|
else
|
|
|
|
yap_cv_gmp=$with_gmp
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_gmp}/lib"
|
|
|
|
LIBS="$LIBS -L${yap_cv_gmp}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_gmp}/include"
|
|
|
|
CFLAGS="$CFLAGS -I${yap_cv_gmp}/include"
|
|
|
|
fi,
|
|
|
|
[yap_cv_gmp=yes])
|
2012-02-06 11:01:10 +00:00
|
|
|
AC_ARG_WITH(R,
|
|
|
|
[ --with-R[=DIR] interface to R language],
|
2011-03-23 09:46:27 +00:00
|
|
|
if test "$withval" = yes; then
|
2012-02-06 11:01:10 +00:00
|
|
|
yap_cv_R=yes
|
2011-03-23 09:46:27 +00:00
|
|
|
elif test "$withval" = no; then
|
2012-02-06 11:01:10 +00:00
|
|
|
yap_cv_R=no
|
2011-03-23 09:46:27 +00:00
|
|
|
else
|
2012-10-08 23:58:22 +01:00
|
|
|
yap_cv_R=$withval
|
2011-03-23 09:46:27 +00:00
|
|
|
fi,
|
2012-03-05 16:00:47 +00:00
|
|
|
[yap_cv_R=no])
|
2012-10-08 23:58:22 +01:00
|
|
|
AC_ARG_WITH(python,
|
|
|
|
[ --with-python[=DIR] interface to R language],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_python=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_python=no
|
|
|
|
else
|
|
|
|
yap_cv_python=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_python=no])
|
2013-01-02 12:10:11 +00:00
|
|
|
|
|
|
|
AC_ARG_WITH(judy,
|
|
|
|
[ --with-judy[=DIR] UDI needs judy library],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_judy=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_judy=no
|
|
|
|
else
|
|
|
|
yap_cv_judy=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_judy=yes])
|
2011-03-23 09:46:27 +00:00
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_ARG_WITH(minisat,
|
|
|
|
[ --enable-minisat use minisat interface],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_minisat=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_minisat=no
|
|
|
|
else
|
|
|
|
yap_cv_minisat="$GXX"
|
|
|
|
fi,
|
|
|
|
[yap_cv_minisat=yes])
|
|
|
|
|
|
|
|
AC_ARG_WITH(cudd,
|
|
|
|
[ --with-cudd[=DIR] use CUDD package in DIR],
|
2012-03-06 14:40:56 +00:00
|
|
|
yap_cv_cudd="$withval",
|
2010-09-27 21:59:13 +01:00
|
|
|
[yap_cv_cudd=no])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(myddas,
|
2011-08-08 12:08:53 +01:00
|
|
|
[ --enable-myddas[[=DIR]] enable the MYDDAS library],
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$enableval" = yes; then
|
|
|
|
yap_cv_myddas=/usr
|
|
|
|
elif test "$enableval" = no; then
|
|
|
|
yap_cv_myddas=no
|
|
|
|
else
|
|
|
|
yap_cv_myddas=$enable_myddas
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_myddas}/lib "
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include "
|
2012-10-23 00:45:13 +01:00
|
|
|
ODBC_LDFLAGS="-L${yap_cv_myddas}/lib "
|
|
|
|
ODBC_CFLAGS="-I${yap_cv_myddas}/include "
|
2010-09-27 21:59:13 +01:00
|
|
|
fi,
|
|
|
|
[yap_cv_myddas=/usr])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(myddas-stats,
|
|
|
|
[ --enable-myddas-stats enable the MYDDAS library statistics support],
|
|
|
|
if test "$yap_cv_myddas" = no; then
|
|
|
|
myddasstats=no
|
|
|
|
else
|
|
|
|
myddasstats="$enableval"
|
|
|
|
fi, myddasstats=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(myddas-top-level,
|
|
|
|
[ --enable-myddas-top-level enable the MYDDAS top-level support to MySQL],
|
|
|
|
if test "$yap_cv_myddas" = no; then
|
|
|
|
myddastoplevel=no
|
|
|
|
else
|
|
|
|
myddastoplevel="$enableval"
|
|
|
|
fi, myddastoplevel=no)
|
|
|
|
|
|
|
|
AC_ARG_WITH(java,
|
|
|
|
[ --with-java=JAVA_HOME use Java instalation in JAVA_HOME],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_java="$JAVA_HOME"
|
|
|
|
dynamic_loading=yes
|
|
|
|
maxmemory=yes
|
|
|
|
dnl threads=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_java=no
|
|
|
|
else
|
|
|
|
yap_cv_java=$with_java
|
|
|
|
dynamic_loading=yes
|
|
|
|
maxmemory=yes
|
|
|
|
dnl threads=yes
|
|
|
|
fi,
|
|
|
|
[yap_cv_java=no])
|
|
|
|
|
|
|
|
AC_ARG_WITH(readline,
|
|
|
|
[ --with-readline[=DIR] use GNU Readline Library in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_readline=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_readline=no
|
|
|
|
else
|
|
|
|
yap_cv_readline=$with_readline
|
2012-09-26 13:50:25 +01:00
|
|
|
if test -d "${yap_cv_readline}/lib64" -a "$YAP_TARGET" = amd64; then
|
2012-09-26 13:53:50 +01:00
|
|
|
LDFLAGS="-L${yap_cv_readline}/lib64 -L${yap_cv_readline}/lib $LDFLAGS"
|
2012-09-26 13:50:25 +01:00
|
|
|
else
|
|
|
|
LDFLAGS="-L${yap_cv_readline}/lib $LDFLAGS"
|
|
|
|
fi
|
2011-02-15 23:45:47 +00:00
|
|
|
CPPFLAGS="-I${yap_cv_readline}/include $CPPFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
fi,
|
|
|
|
[yap_cv_readline=yes])
|
|
|
|
|
|
|
|
AC_ARG_WITH(matlab,
|
|
|
|
[ --with-matlab[=DIR] use MATLAB package in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_matlab=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_matlab=no
|
|
|
|
else
|
|
|
|
yap_cv_matlab=$with_matlab
|
|
|
|
MATLAB_INCLUDE="-I${yap_cv_matlab}/extern/include"
|
|
|
|
fi,
|
|
|
|
[yap_cv_matlab=no])
|
|
|
|
|
|
|
|
AC_ARG_WITH(mpi,
|
|
|
|
[ --with-mpi[=DIR] use MPI library in DIR],
|
|
|
|
if test "$withval" = yes; then
|
2012-02-01 08:57:26 +00:00
|
|
|
dnl handle UBUNTU systems
|
2010-09-27 21:59:13 +01:00
|
|
|
yap_cv_mpi=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_mpi=no
|
|
|
|
else
|
|
|
|
yap_cv_mpi=$with_mpi
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_mpi}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_mpi}/include"
|
|
|
|
fi,
|
|
|
|
[yap_cv_mpi=no])
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH(mpe,
|
|
|
|
[ --with-mpe[=DIR] use MPE library in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_mpe=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_mpe=no
|
|
|
|
else
|
|
|
|
yap_cv_mpe=$with_mpe
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_mpe}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_mpe}/include"
|
|
|
|
fi,
|
|
|
|
[yap_cv_mpe=no])
|
|
|
|
|
|
|
|
AC_ARG_WITH(lam,
|
|
|
|
[ --with-lam[=DIR] use LAM MPI library in DIR],
|
|
|
|
if test "$withval" = yes; then
|
2012-02-01 10:26:04 +00:00
|
|
|
yap_cv_lam=yes
|
2010-09-27 21:59:13 +01:00
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_lam=no
|
|
|
|
else
|
|
|
|
yap_cv_lam=$with_lam
|
2012-02-02 09:58:05 +00:00
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_lam}/lib"
|
2010-09-27 21:59:13 +01:00
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_lam}/include"
|
|
|
|
fi,
|
2012-02-17 11:40:35 +00:00
|
|
|
[yap_cv_lam=no])
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH(heap-space,
|
|
|
|
[ --with-heap-space[=space] default heap size in Kbytes],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_heap_space=0
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_heap_space=0
|
|
|
|
else
|
|
|
|
yap_cv_heap_space=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_heap_space=0])
|
|
|
|
|
|
|
|
AC_ARG_WITH(stack-space,
|
|
|
|
[ --with-stack-space[=space] default stack size in Kbytes],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_stack_space=0
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_stack_space=0
|
|
|
|
else
|
|
|
|
yap_cv_stack_space=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_stack_space=0])
|
|
|
|
|
|
|
|
AC_ARG_WITH(trail-space,
|
|
|
|
[ --with-trail-space[=space] default trail size in Kbytes],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_trail_space=0
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_trail_space=0
|
|
|
|
else
|
|
|
|
yap_cv_trail_space=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_trail_space=0])
|
|
|
|
|
|
|
|
AC_ARG_WITH(max-workers,
|
|
|
|
[ --with-max-workers[=integer] maximum number of or-parallel processes],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_max_workers="(8*SIZEOF_INT_P)"
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_max_workers="1"
|
|
|
|
else
|
|
|
|
yap_cv_max_workers=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_max_workers="(8*SIZEOF_INT_P)"])
|
|
|
|
|
|
|
|
AC_ARG_WITH(max-threads,
|
|
|
|
[ --with-max-threads[=integer] maximum number of or-parallel processes],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_max_threads="1024"
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_max_threads="1"
|
|
|
|
else
|
|
|
|
yap_cv_max_threads=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_max_threads="1024"])
|
|
|
|
|
|
|
|
AC_ARG_WITH(junit, [ --with-junit=PATH Specify location of the junit JAR file],
|
|
|
|
[case "$withval" in
|
|
|
|
yes) JUNIT=/usr/share/java/junit.jar
|
|
|
|
;;
|
|
|
|
no) JUNIT=""
|
|
|
|
;;
|
|
|
|
*) JUNIT="$withval"
|
|
|
|
;;
|
|
|
|
esac])
|
|
|
|
|
|
|
|
AC_DEFINE(MinHeapSpace, (1000*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinStackSpace,(300*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinTrailSpace,( 48*SIZEOF_INT_P))
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(DefHeapSpace,$yap_cv_heap_space)
|
|
|
|
AC_DEFINE_UNQUOTED(DefStackSpace,$yap_cv_stack_space)
|
|
|
|
AC_DEFINE_UNQUOTED(DefTrailSpace,$yap_cv_trail_space)
|
|
|
|
|
|
|
|
AC_SUBST(DefHeapSpace)
|
|
|
|
AC_SUBST(DefStackSpace)
|
|
|
|
AC_SUBST(DefTrailSpace)
|
|
|
|
|
2011-11-30 15:19:37 +00:00
|
|
|
if test "$orparallelism" = no
|
2010-09-27 21:59:13 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(MAX_WORKERS,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(MAX_WORKERS,$yap_cv_max_workers)
|
2011-12-07 17:04:46 +00:00
|
|
|
if test "$orparallelism" = copy -o "$orparallelism" = yes
|
2011-11-30 15:19:37 +00:00
|
|
|
then
|
|
|
|
use_malloc="no"
|
|
|
|
fi
|
|
|
|
tabling="no"
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$threads" = no
|
|
|
|
then
|
|
|
|
AC_DEFINE(MAX_THREADS,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(MAX_THREADS,$yap_cv_max_threads)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2011-11-18 17:02:09 +00:00
|
|
|
if test "$yap_cv_prism" = no
|
|
|
|
then
|
|
|
|
INSTALL_PRISM="@# "
|
|
|
|
else
|
|
|
|
INSTALL_PRISM=""
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl condor does not like dynamic linking on Linux, DEC, and HP-UX platforms.
|
|
|
|
if test "$yap_cv_matlab" = no
|
|
|
|
then
|
|
|
|
INSTALL_MATLAB="@# "
|
|
|
|
elif test "$yap_cv_matlab" = yes
|
|
|
|
then
|
|
|
|
INSTALL_MATLAB=""
|
|
|
|
else
|
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_matlab}/bin/glnx86"
|
|
|
|
;;
|
|
|
|
x86*)
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_matlab}/bin/glnxa64"
|
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_matlab}/bin/sol2"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
INSTALL_MATLAB=""
|
|
|
|
fi
|
|
|
|
|
2012-11-26 16:20:36 +00:00
|
|
|
if test "$yap_cv_clpbn_bp"="yes"; then
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
my_save_cxxflags="$CXXFLAGS"
|
|
|
|
CXXFLAGS=-std=c++0x
|
|
|
|
AC_MSG_CHECKING([whether CXX supports -std-c++0x])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
2012-11-27 08:37:53 +00:00
|
|
|
[AC_MSG_RESULT([yes])],
|
2012-05-03 15:40:33 +01:00
|
|
|
[AC_MSG_RESULT([no])]
|
2012-11-27 08:37:53 +00:00
|
|
|
[yap_cv_clpbn_bp=no]
|
2012-11-26 16:20:36 +00:00
|
|
|
)
|
|
|
|
CXXFLAGS="$my_save_cxxflags"
|
|
|
|
AC_LANG_POP()
|
|
|
|
fi
|
2012-05-03 15:40:33 +01:00
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$yap_cv_clpbn_bp" = no
|
|
|
|
then
|
|
|
|
ENABLE_CLPBN_BP="@# "
|
|
|
|
else
|
|
|
|
ENABLE_CLPBN_BP=""
|
2011-03-23 09:46:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_cudd" = no
|
|
|
|
then
|
2011-07-13 15:31:22 +01:00
|
|
|
ENABLE_CUDD="@# "
|
2012-03-22 21:37:20 +00:00
|
|
|
ENABLE_BDDLIB="@# "
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
2012-03-22 21:37:20 +00:00
|
|
|
if test "$dynamic_bdd" = yes
|
|
|
|
then
|
|
|
|
ENABLE_BDDLIB=""
|
|
|
|
else
|
|
|
|
ENABLE_BDDLIB="@# "
|
|
|
|
fi
|
2011-07-13 15:31:22 +01:00
|
|
|
ENABLE_CUDD=""
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl condor universe does not like dynamic linking on Linux, DEC, and HP-UX platforms.
|
|
|
|
if test "$use_condor" = yes
|
|
|
|
then
|
|
|
|
static_compilation="yes"
|
|
|
|
use_malloc="yes"
|
|
|
|
CC="condor_compile $CC"
|
|
|
|
CXX="condor_compile $CXX"
|
|
|
|
dnl no readline with condor.
|
|
|
|
yap_cv_readline="no"
|
|
|
|
AC_DEFINE(SUPPORT_CONDOR, 1)
|
|
|
|
dnl and it disables minisat
|
|
|
|
yap_cv_minisat=no
|
|
|
|
STATIC_MODE=""
|
|
|
|
else
|
|
|
|
static_compilation="no"
|
|
|
|
STATIC_MODE="# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Compilation Flags
|
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-O -g -Wall $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
CFLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
else
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-O3 -fomit-frame-pointer -Wall $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
C_INTERF_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
case "`$CC --version < /dev/null`" in
|
|
|
|
*3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;;
|
|
|
|
esac
|
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
CFLAGS="-DBP_FREE $CFLAGS"
|
|
|
|
CXXFLAGS="-DBP_FREE $CXXFLAGS"
|
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
case "$target_os" in
|
|
|
|
*solaris[2-9]*) dnl
|
|
|
|
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test "$tcpu"; then
|
|
|
|
target_cpu=$tcpu
|
|
|
|
fi
|
|
|
|
if test "$maxperformance" = "yes"
|
|
|
|
then
|
|
|
|
case "$target_cpu" in
|
|
|
|
athlon)
|
|
|
|
CFLAGS="-march=athlon $CFLAGS"
|
|
|
|
CXXFLAGS="-march=athlon $CXXFLAGS"
|
|
|
|
;;
|
|
|
|
i686*)
|
|
|
|
CFLAGS="-march=i686 $CFLAGS"
|
|
|
|
CXXFLAGS="-march=i686 $CXXFLAGS"
|
|
|
|
;;
|
|
|
|
i586*)
|
|
|
|
CFLAGS="-march=i586 $CFLAGS"
|
|
|
|
CXXFLAGS="-march=i586 $CXXFLAGS"
|
|
|
|
;;
|
|
|
|
i486*)
|
|
|
|
CFLAGS="-march=i486 $CFLAGS"
|
|
|
|
CXXFLAGS="-march=i486 $CXXFLAGS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$CC" = "sslittle-na-sstrix-gcc"
|
|
|
|
then
|
|
|
|
RANLIB="sslittle-na-sstrix-ranlib"
|
|
|
|
AR="sslittle-na-sstrix-ar"
|
|
|
|
PRE_INSTALL_ENV="sim-fast"
|
|
|
|
INSTALL_ENV="sim-fast"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
case "$target_cpu" in
|
|
|
|
i?86*)
|
|
|
|
if test "$CC" = "lcc"
|
|
|
|
then
|
|
|
|
CFLAGS="-A -A $CFLAGS"
|
|
|
|
elif test "$CC" = "cl"
|
|
|
|
then
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-/nologo $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
CFLAGS="/nologo $CFLAGS"
|
|
|
|
CPP="/nologo /E"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
hppa*)
|
|
|
|
if test "$CC" = "cc" -o $CC = c89
|
|
|
|
then
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-Ae -g -O $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
CFLAGS="-Ae -g -O $CFLAGS"
|
|
|
|
else
|
2011-08-09 12:30:37 +01:00
|
|
|
CXXFLAGS="-Ae +O3 +Onolimit $CXXFLAGS"
|
2010-09-27 21:59:13 +01:00
|
|
|
CFLAGS="-Ae +O3 +Onolimit $CFLAGS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl LDFLAGS="+e UserCPredicate $LDFLAGS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
C_INTERF_FLAGS="$CFLAGS"
|
|
|
|
C_PARSER_FLAGS="$CFLAGS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_CHECK_TOOL(INDENT,indent,:)
|
|
|
|
AC_CHECK_TOOL(AR,ar,:)
|
2012-02-06 10:16:54 +00:00
|
|
|
AC_CHECK_TOOL(MPI_CC,mpicc,${CC})
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
|
|
|
|
AC_PATH_PROG(SHELL,sh)
|
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl Check for libraries.
|
|
|
|
dnl mingw does not get along well with libm
|
|
|
|
dnl cygnus and mingw32 also need wsock32 to use sockets.
|
|
|
|
dnl
|
|
|
|
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
|
|
|
then
|
|
|
|
INSTALL_COMMAND=install_win32
|
2011-03-21 17:07:58 +00:00
|
|
|
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$cygwin" = "no" -o "$target_os" = "mingw32"
|
|
|
|
then
|
|
|
|
if test "$target_win64" = yes
|
|
|
|
then
|
2012-02-06 11:12:55 +00:00
|
|
|
dnl configure messes up badly on this.
|
2012-02-06 11:11:50 +00:00
|
|
|
target_cpu=x86_64
|
2012-02-06 11:21:14 +00:00
|
|
|
YAP_TARGET=amd64
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_LIB(ws2_32,main)
|
2012-06-08 12:55:23 +01:00
|
|
|
AC_CHECK_LIB(comdlg32,main)
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_CHECK_LIB(shell32,main)
|
2011-03-21 17:07:58 +00:00
|
|
|
EXTRA_LIBS_FOR_DLLS="-lws2_32"
|
2010-09-27 21:59:13 +01:00
|
|
|
elif test "$target_os" = "cygwin"
|
|
|
|
then
|
|
|
|
CC="${CC} -mno-cygwin"
|
|
|
|
CXX="${CXX} -mno-cygwin"
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_CHECK_LIB(comdlg32,main)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_LIB(wsock32,main)
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_CHECK_LIB(shell32,main)
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
|
|
|
AC_CHECK_LIB(wsock32,main)
|
2012-06-16 18:22:59 +01:00
|
|
|
AC_CHECK_LIB(comdlg32,main)
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_CHECK_LIB(shell32,main)
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
2012-02-06 10:27:21 +00:00
|
|
|
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll $EXTRA_LIBS_FOR_DLLS"
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_LIB(psapi,main)
|
|
|
|
yap_cv_readline=no
|
2011-03-21 23:43:06 +00:00
|
|
|
CLIB_NETLIBS="-lws2_32 -lpsapi -lgdi32"
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$prefix" = "NONE"
|
|
|
|
then
|
|
|
|
if test "$target_win64" = yes
|
|
|
|
then
|
|
|
|
prefix="\${SYSTEMDRIVE}/Yap64"
|
2012-02-06 10:46:44 +00:00
|
|
|
CLIB_NETLIBS="-lws2_32 -lwsock32 -lpsapi -lgdi32"
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
|
|
|
prefix="\${SYSTEMDRIVE}/Yap"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
ENABLE_WINCONSOLE=""
|
|
|
|
else
|
|
|
|
ENABLE_WINCONSOLE="#"
|
|
|
|
LIBS="-lcygwin"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
2011-03-09 13:05:03 +00:00
|
|
|
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
INSTALL_COMMAND="install_unix"
|
|
|
|
ENABLE_WINCONSOLE="#"
|
|
|
|
AC_CHECK_LIB(m,sin)
|
|
|
|
AC_CHECK_LIB(socket,socket)
|
|
|
|
dnl X/Open Networking is sometimes a separate library
|
|
|
|
AC_CHECK_LIB(xnet,getsockname)
|
|
|
|
AC_CHECK_LIB(stdc++,main)
|
|
|
|
AC_CHECK_LIB(nsl,main,
|
|
|
|
have_nsl=yes
|
|
|
|
,
|
|
|
|
have_nsl=no)
|
|
|
|
AC_CHECK_LIB(crypt,main)
|
|
|
|
AC_CHECK_LIB(nss_files,main)
|
|
|
|
AC_CHECK_LIB(nss_dns,main)
|
|
|
|
AC_CHECK_LIB(resolv,main)
|
2012-09-11 14:22:18 +01:00
|
|
|
if test "$prefix" != "NONE"; then
|
|
|
|
if test -d "${prefix}/lib64" -a "$YAP_TARGET" = amd64; then
|
|
|
|
LDFLAGS="$LDFLAGS -L${prefix}/lib64"
|
|
|
|
fi
|
|
|
|
LDFLAGS="$LDFLAGS -L${prefix}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${prefix}/include"
|
|
|
|
fi
|
|
|
|
if test "$exec_prefix" != "NONE"; then
|
|
|
|
if test -d "${exec_prefix}/lib64" -a "$YAP_TARGET" = amd64; then
|
|
|
|
LDFLAGS="$LDFLAGS -L${exec_prefix}/lib64"
|
|
|
|
fi
|
|
|
|
LDFLAGS="$LDFLAGS -L${exec_prefix}/lib"
|
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
2012-06-07 16:30:08 +01:00
|
|
|
AC_CHECK_LIB([ncurses], [main],[
|
2012-09-27 11:48:58 +01:00
|
|
|
LIBS="-lncurses $LIBS"
|
2012-06-07 16:30:08 +01:00
|
|
|
])
|
2010-10-13 00:20:40 +01:00
|
|
|
AC_CHECK_LIB([readline], [main],[
|
|
|
|
AC_DEFINE([HAVE_LIBREADLINE], [1],[Define if you have libreadline])
|
2012-09-27 11:48:58 +01:00
|
|
|
LIBS="-lreadline $LIBS"
|
2010-10-13 00:20:40 +01:00
|
|
|
],
|
|
|
|
[if test "x$with_readline" != xcheck; then
|
|
|
|
AC_MSG_FAILURE(
|
|
|
|
[--with-readline was given, but test for readline failed])
|
|
|
|
fi
|
2012-06-07 16:30:08 +01:00
|
|
|
])
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
2012-09-26 13:50:25 +01:00
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_gmp" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(gmp,main)
|
|
|
|
fi
|
|
|
|
|
2012-02-06 11:01:10 +00:00
|
|
|
if test "$yap_cv_R" = "no"; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_TARGET="dummy"
|
|
|
|
ENABLE_REAL="@# "
|
|
|
|
elif test -e "$srcdir"/packages/real/Makefile.in ; then
|
|
|
|
REAL_TARGET="ritf"
|
|
|
|
ENABLE_REAL=""
|
|
|
|
AC_CHECK_PROGS(REXE, R, "none")
|
2012-02-06 11:01:10 +00:00
|
|
|
if test "$yap_cv_R" = "yes"
|
2011-10-02 23:54:20 +01:00
|
|
|
then
|
2012-01-31 15:11:39 +00:00
|
|
|
case "$target_os" in
|
2011-10-02 23:54:20 +01:00
|
|
|
*darwin*)
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_INCLUDES="-I/Library/Frameworks/R.framework/Headers"
|
|
|
|
REAL_LIBS="-framework R -L /Library/Frameworks/R.framework/Libraries -lR"
|
2011-10-02 23:54:20 +01:00
|
|
|
;;
|
2012-01-31 15:11:39 +00:00
|
|
|
*cygwin*|*mingw*)
|
|
|
|
REAL_INCLUDES="$($REXE CMD config --cppflags | grep -v ^WARNING)"
|
|
|
|
REAL_LIBS="$($REXE CMD config --ldflags | grep -v ^WARNING)"
|
|
|
|
;;
|
2011-10-02 23:54:20 +01:00
|
|
|
**)
|
2011-11-15 10:22:03 +00:00
|
|
|
dnl R is spread all over the place
|
|
|
|
dnl one of the two may work (Fedora/Ubuntu)
|
|
|
|
if test -n "$R_HOME" ; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_INCLUDES="-I$R_HOME/include"
|
2011-11-15 10:22:03 +00:00
|
|
|
elif test "$YAP_TARGET" = amd64 -a -d /usr/lib64/R/include ; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_INCLUDES="-I/usr/lib64/R/include"
|
2011-11-15 10:22:03 +00:00
|
|
|
elif test -d /usr/include/R; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_INCLUDES="-I/usr/include/R"
|
2011-11-15 10:22:03 +00:00
|
|
|
elif test -d /usr/share/R/include; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_INCLUDES="-I/usr/share/R/include"
|
|
|
|
else
|
|
|
|
REAL_INCLUDES="$($REXE CMD config --cppflags | grep -v ^WARNING)"
|
2011-11-15 10:22:03 +00:00
|
|
|
fi
|
|
|
|
if test -n "$R_HOME" ; then
|
2012-02-01 10:26:04 +00:00
|
|
|
REAL_LIBS="-L $R_HOME/lib -lR"
|
2011-11-15 10:22:03 +00:00
|
|
|
elif test "$YAP_TARGET" = amd64 -a -d /usr/lib64/R/lib; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_LIBS="-L /usr/lib64/R/lib -lR"
|
2011-11-15 10:22:03 +00:00
|
|
|
elif test -d /usr/lib/R; then
|
2012-01-31 15:11:39 +00:00
|
|
|
REAL_LIBS="-L /usr/lib/R/lib -lR"
|
|
|
|
else
|
|
|
|
REAL_LIBS="$($REXE CMD config --ldflags | grep -v ^WARNING)"
|
2011-11-15 10:22:03 +00:00
|
|
|
fi
|
|
|
|
;;
|
2011-10-02 23:54:20 +01:00
|
|
|
esac
|
2011-11-15 12:37:21 +00:00
|
|
|
else
|
|
|
|
case "$target_os" in
|
|
|
|
*cygwin*|*mingw*)
|
2012-02-06 11:01:10 +00:00
|
|
|
REAL_INCLUDES="-I\"$yap_cv_R/include\""
|
2011-11-15 12:37:21 +00:00
|
|
|
if test "$YAP_TARGET" = i386; then
|
2012-02-06 11:01:10 +00:00
|
|
|
REAL_LIBS="\"$yap_cv_R/bin/i386/R.dll\""
|
2011-11-15 12:37:21 +00:00
|
|
|
else
|
2012-02-06 11:01:10 +00:00
|
|
|
REAL_LIBS="\"$yap_cv_R/bin/x64/R.dll\""
|
2011-11-15 12:37:21 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2012-02-06 11:01:10 +00:00
|
|
|
REAL_INCLUDES="-I$yap_cv_R/include"
|
|
|
|
REAL_LIBS="-L $yap_cv_R/lib -lR"
|
2011-11-15 12:37:21 +00:00
|
|
|
;;
|
|
|
|
esac
|
2012-01-31 15:11:39 +00:00
|
|
|
fi
|
2012-08-03 01:53:43 +01:00
|
|
|
OLD_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $REAL_INCLUDES"
|
|
|
|
AC_CHECK_HEADERS(Rinterface.h)
|
|
|
|
CFLAGS="$OLD_CFLAGS"
|
2012-01-31 15:11:39 +00:00
|
|
|
else
|
|
|
|
REAL_TARGET="dummy"
|
|
|
|
ENABLE_REAL="@# "
|
2011-03-23 09:46:27 +00:00
|
|
|
fi
|
|
|
|
|
2012-10-08 23:58:22 +01:00
|
|
|
if test "$yap_cv_python" = "no"; then
|
|
|
|
PYTHON_TARGET="dummy"
|
|
|
|
ENABLE_PYTHON="@# "
|
2012-11-02 22:37:27 +00:00
|
|
|
elif test -e "$srcdir"/packages/python/Makefile.in ; then
|
|
|
|
PYTHON_TARGET="pitf"
|
2012-10-08 23:58:22 +01:00
|
|
|
ENABLE_PYTHON=""
|
|
|
|
if test "$yap_cv_python" = "yes"
|
|
|
|
then
|
|
|
|
AC_CHECK_PROGS(PYTHON, python, "none")
|
|
|
|
else
|
|
|
|
PYTHON="$yap_cv_python"
|
|
|
|
fi
|
|
|
|
PYTHONHOME=`$PYTHON -c'import sys; print sys.prefix'`
|
|
|
|
PYTHONVERSION=`"$PYTHON" -c "import sys; print sys.version[[:3]]"`
|
|
|
|
PYTHON_LIBS="-L $PYTHONHOME/lib -lpython$PYTHONVERSION"
|
|
|
|
PYTHON_INCLUDES="-I $PYTHONHOME/include/python$PYTHONVERSION"
|
|
|
|
else
|
|
|
|
PYTHON_TARGET="dummy"
|
|
|
|
ENABLE_PYTHON="@# "
|
|
|
|
fi
|
|
|
|
|
2013-01-02 12:10:11 +00:00
|
|
|
if test "$yap_cv_judy" != "no"; then
|
2013-01-09 17:02:41 +00:00
|
|
|
AC_CHECK_LIB(Judy, Judy1Set,,[AC_MSG_RESULT([libJudy not found, UDI will only work with one Index at a time])])
|
2013-01-02 12:10:11 +00:00
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl if test "$yap_cv_cudd" != "no"
|
|
|
|
dnl then
|
|
|
|
dnl AC_CHECK_LIB(cudd,Cudd_Init)
|
|
|
|
dnl fi
|
|
|
|
|
|
|
|
if test "$yap_cv_myddas" != "no"
|
|
|
|
then
|
|
|
|
dnl check for mysql
|
2012-03-05 16:00:47 +00:00
|
|
|
AC_SEARCH_LIBS(mysql_init, [mysqlclient], [yap_cv_mysql="yes"], [yap_cv_mysql="no"])
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_mysql" = yes
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for odbc
|
2012-03-05 16:00:47 +00:00
|
|
|
case "$target_os" in
|
|
|
|
*darwin*)
|
|
|
|
LIBS="$LIBS -framework CoreFoundation"
|
|
|
|
;;
|
|
|
|
**)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SEARCH_LIBS(SQLAllocHandle, [odbc], [yap_cv_odbc="yes"], [yap_cv_odbc="no"])
|
2012-10-23 00:45:13 +01:00
|
|
|
if test "$yap_cv_odbc" = yes
|
2012-10-22 22:04:11 +01:00
|
|
|
then
|
2012-10-23 00:45:13 +01:00
|
|
|
ODBC_LIBS="$ODBC_LIBS -lodbc"
|
|
|
|
else
|
2012-10-22 22:04:11 +01:00
|
|
|
AC_SEARCH_LIBS(SQLAllocHandle, [iodbc], [yap_cv_odbc="yes"], [yap_cv_odbc="no"])
|
2012-10-23 00:45:13 +01:00
|
|
|
if test "$yap_cv_odbc" = yes
|
|
|
|
then
|
|
|
|
ODBC_LIBS="$ODBC_LIBS -liodbc"
|
|
|
|
fi
|
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_odbc" = yes
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC"
|
|
|
|
fi
|
|
|
|
|
2012-03-05 16:00:47 +00:00
|
|
|
if test "$myddasstats" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_STATS"
|
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2012-03-05 16:00:47 +00:00
|
|
|
if test "$myddastoplevel" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_TOP_LEVEL"
|
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2012-03-05 16:00:47 +00:00
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2012-03-06 14:40:56 +00:00
|
|
|
if test "$yap_cv_cudd" != no; then
|
|
|
|
oldlibs="$LIBS"
|
2012-07-16 17:58:21 +01:00
|
|
|
if test "$yap_cv_cudd" != "NONE" -a "$yap_cv_cudd" != "yes"; then
|
2012-07-08 13:45:16 +01:00
|
|
|
CUDD_CPPFLAGS="-I $yap_cv_cudd/include"
|
2012-06-16 21:05:29 +01:00
|
|
|
cudd_dir="$yap_cv_cudd"
|
2012-03-06 14:40:56 +00:00
|
|
|
elif test "$prefix" != "NONE"; then
|
2012-07-08 13:45:16 +01:00
|
|
|
CUDD_CPPFLAGS="-I $prefix/include"
|
2012-03-06 14:40:56 +00:00
|
|
|
cudd_dir="$prefix"
|
|
|
|
else
|
2012-07-08 13:45:16 +01:00
|
|
|
CUDD_CPPFLAGS="-I /usr/local/include"
|
2012-03-06 14:40:56 +00:00
|
|
|
cudd_dir=/usr/local
|
|
|
|
fi
|
2012-07-16 17:58:21 +01:00
|
|
|
OLD_CPPFLAGS="$CPPFLAGS"
|
2012-07-08 13:45:16 +01:00
|
|
|
CPPFLAGS="$CPPFLAGS $CUDD_CPPFLAGS"
|
|
|
|
AC_CHECK_HEADERS(util.h cudd/util.h cudd.h cudd/cudd.h)
|
|
|
|
AC_CHECK_HEADERS(cuddInt.h cudd/cuddInt.h)
|
2012-03-06 14:40:56 +00:00
|
|
|
dnl cudd can be most everywhere
|
|
|
|
if test -d "$cudd_dir/lib64/cudd" -a "$YAP_TARGET" = amd64; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/lib64/cudd"
|
|
|
|
elif test -d "$cudd_dir/lib64" -a "$YAP_TARGET" = amd64; then
|
2012-07-18 23:56:04 +01:00
|
|
|
LIBS="$LIBS -L $cudd_dir/lib64 -L $cudd_dir/lib"
|
2012-03-06 14:40:56 +00:00
|
|
|
elif test -d "$cudd_dir/lib/cudd"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/lib/cudd"
|
|
|
|
elif test -d "$cudd_dir/lib"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/lib"
|
|
|
|
fi
|
|
|
|
if test -d "$cudd_dir/util"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/util"
|
|
|
|
fi
|
|
|
|
AC_SEARCH_LIBS(util_print_cpu_stats, [cuddutil util])
|
|
|
|
if test -d "$cudd_dir/st"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/st"
|
|
|
|
fi
|
|
|
|
AC_SEARCH_LIBS(st_insert, [cuddst st])
|
|
|
|
if test -d "$cudd_dir/epd"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/epd"
|
|
|
|
fi
|
|
|
|
AC_SEARCH_LIBS(EpdAdd, [epd])
|
|
|
|
if test -d "$cudd_dir/mtr"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/mtr"
|
|
|
|
fi
|
|
|
|
AC_SEARCH_LIBS(Mtr_InitTree, [mtr])
|
|
|
|
if test -d "$cudd_dir/cudd"; then
|
|
|
|
LIBS="$LIBS -L $cudd_dir/cudd"
|
|
|
|
fi
|
|
|
|
AC_SEARCH_LIBS(Cudd_Init, [cudd], [cudd_installed="yes"], [cudd_installed="no"])
|
2012-07-16 17:58:21 +01:00
|
|
|
CPPFLAGS="$OLD_CPPFLAGS"
|
2012-03-06 14:40:56 +00:00
|
|
|
if test "$cudd_installed" = yes; then
|
|
|
|
CUDD_LDFLAGS="$LIBS"
|
|
|
|
else
|
|
|
|
cat << EOF
|
|
|
|
##################################################################
|
|
|
|
# ERROR: Could not find cudd library. Either I don't have the
|
|
|
|
# correct path, or CUDD is installed in some strange way
|
|
|
|
##################################################################
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
LIBS="$oldlibs"
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$threads" = yes
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(pthread,pthread_create)
|
|
|
|
AC_CHECK_HEADERS(pthread.h)
|
|
|
|
AC_CHECK_FUNCS(pthread_mutexattr_setkind_np pthread_mutexattr_settype)
|
|
|
|
if test "$pthreadlocking" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(USE_PTHREAD_LOCKING, 1)
|
|
|
|
fi
|
|
|
|
use_malloc=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test ! -z "$GCC"; then
|
|
|
|
COFLAGS="${COFLAGS--O2 -cc-options,-fno-strict-aliasing}"
|
|
|
|
CWFLAGS="${CWFLAGS--Wall}"
|
|
|
|
else
|
|
|
|
COFLAGS="${COFLAGS--O}"
|
|
|
|
CWFLAGS="${CWFLAGS-}"
|
|
|
|
fi
|
|
|
|
CMFLAGS=-fpic
|
|
|
|
CIFLAGS=-I.
|
|
|
|
|
2011-08-08 14:21:36 +01:00
|
|
|
if test "$use_gecode" = no; then
|
|
|
|
ENABLE_GECODE="@# "
|
|
|
|
else
|
|
|
|
ENABLE_GECODE=""
|
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_GECODE)
|
|
|
|
|
2011-11-10 12:26:23 +00:00
|
|
|
if test "$use_prism" = no; then
|
|
|
|
ENABLE_PRISM="@# "
|
|
|
|
else
|
|
|
|
ENABLE_PRISM=""
|
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_PRISM)
|
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
if test -e "$srcdir"/packages/archive/Makefile.in; then
|
|
|
|
ENABLE_LIBARCHIVE=""
|
|
|
|
else
|
|
|
|
ENABLE_LIBARCHIVE="@# "
|
|
|
|
fi
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
if test -e "$srcdir"/packages/odbc/Makefile.in; then
|
|
|
|
ENABLE_ODBC=""
|
|
|
|
else
|
|
|
|
ENABLE_ODBC="@# "
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$use_chr" = no; then
|
|
|
|
ENABLE_CHR="@# "
|
|
|
|
elif test -e "$srcdir"/packages/chr/Makefile.in; then
|
|
|
|
ENABLE_CHR=""
|
|
|
|
else
|
|
|
|
ENABLE_CHR="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$use_clpqr" = no; then
|
|
|
|
ENABLE_CLPQR="@# "
|
|
|
|
elif test -e "$srcdir"/packages/clpqr/Makefile.in; then
|
|
|
|
ENABLE_CLPQR=""
|
|
|
|
else
|
|
|
|
ENABLE_CLPQR="@# "
|
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test -e "$srcdir"/packages/clib/Makefile.in; then
|
|
|
|
ENABLE_CLIB=""
|
|
|
|
else
|
|
|
|
ENABLE_CLIB="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/http/Makefile.in; then
|
|
|
|
ENABLE_HTTP=""
|
|
|
|
else
|
|
|
|
ENABLE_HTTP="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/pldoc/Makefile.in; then
|
|
|
|
ENABLE_PLDOC=""
|
|
|
|
else
|
|
|
|
ENABLE_PLDOC="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/plunit/Makefile.in; then
|
|
|
|
ENABLE_PLUNIT=""
|
|
|
|
else
|
|
|
|
ENABLE_PLUNIT="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/R/Makefile.in; then
|
|
|
|
ENABLE_R=""
|
|
|
|
else
|
|
|
|
ENABLE_R="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/RDF/Makefile.in; then
|
|
|
|
ENABLE_RDF=""
|
|
|
|
else
|
|
|
|
ENABLE_RDF="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/semweb/Makefile.in; then
|
|
|
|
ENABLE_SEMWEB=""
|
|
|
|
else
|
|
|
|
ENABLE_SEMWEB="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/sgml/Makefile.in; then
|
|
|
|
ENABLE_SGML=""
|
|
|
|
else
|
|
|
|
ENABLE_SGML="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e "$srcdir"/packages/zlib/Makefile.in; then
|
|
|
|
ENABLE_ZLIB=""
|
|
|
|
else
|
|
|
|
ENABLE_ZLIB="@# "
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl
|
|
|
|
dnl java is hard
|
|
|
|
dnl
|
|
|
|
if test "$yap_cv_java" = no; then
|
|
|
|
ENABLE_JPL="@#"
|
|
|
|
elif test -e "$srcdir"/packages/jpl/Makefile.in; then
|
|
|
|
ENABLE_JPL=""
|
2012-06-29 21:33:27 +01:00
|
|
|
LIBJPL=libjpl
|
2010-09-27 21:59:13 +01:00
|
|
|
JAVA=java
|
|
|
|
JAVA_HOME="$yap_cv_java"
|
|
|
|
case "$target_os" in
|
|
|
|
*cygwin*|*mingw*)
|
2012-12-20 21:12:30 +00:00
|
|
|
JAVALIBS="\"$JAVA_HOME\"/lib/jvm.lib"
|
2012-09-21 11:50:55 +01:00
|
|
|
JPLCFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/win32"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*darwin*)
|
|
|
|
LIBS="$LIBS -framework JavaVM"
|
2012-02-12 12:28:37 +00:00
|
|
|
JAVALIBS="-L/System/Library/Frameworks/JavaVM.framework/Libraries -Wl,-framework,JavaVM"
|
2012-09-21 11:50:55 +01:00
|
|
|
JPLCFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
case "$target_os" in
|
|
|
|
*linux*)
|
2012-09-21 11:50:55 +01:00
|
|
|
JPLCFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/linux"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*solaris*)
|
2012-09-21 11:50:55 +01:00
|
|
|
JPLCFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/solaris"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
esac
|
2012-02-12 12:28:37 +00:00
|
|
|
JAVALIBS="-L$JAVA_HOME/jre/lib/$YAP_TARGET -L$JAVA_HOME/jre/lib/$YAP_TARGET/client -L$JAVA_HOME/jre/lib/$YAP_TARGET/server -Wl,-R,$JAVA_HOME/jre/lib/$YAP_TARGET -ljava -lverify -ljvm "
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test "$yap_cv_java" = ""; then
|
|
|
|
JAVA=java
|
|
|
|
JAR=jar
|
|
|
|
JAVAC=javac
|
|
|
|
JAVADOC=javadoc
|
|
|
|
else
|
2012-06-29 21:33:27 +01:00
|
|
|
JAVA=$yap_cv_java/bin/java
|
|
|
|
JAR=$yap_cv_java/bin/jar
|
|
|
|
JAVAC=$yap_cv_java/bin/javac
|
|
|
|
JAVADOC=$yap_cv_java/bin/javadoc
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
ENABLE_JPL="@#"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
|
|
|
if test "$cross_compiling" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS=
|
|
|
|
else
|
|
|
|
AC_SYS_RESTARTABLE_SYSCALLS
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl defaults
|
|
|
|
INSTALL_DLLS="#"
|
|
|
|
EXTRA_OBJS=""
|
|
|
|
SHLIB_LD="#"
|
|
|
|
SHLIB_CXX_LD="#"
|
|
|
|
DO_SECOND_LD="#"
|
|
|
|
M4="m4"
|
|
|
|
MERGE_DLL_OBJS="#"
|
|
|
|
IN_UNIX=""
|
|
|
|
|
|
|
|
dnl This has to be before $target_os
|
|
|
|
YAPLIB="libYap.a"
|
|
|
|
|
|
|
|
dnl now this is where things get nasty.
|
|
|
|
dnl trying to get the libraries
|
|
|
|
case "$target_os" in
|
|
|
|
*linux*)
|
|
|
|
if test "$static_compilation" = "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
if test "$have_dl" = "yes"
|
|
|
|
then
|
|
|
|
SO="so"
|
|
|
|
SHLIB_LD="$CC -shared -export-dynamic"
|
|
|
|
SHLIB_CXX_LD="$CXX -shared -export-dynamic"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
LIBS="$LIBS -ldl"
|
|
|
|
case "$target_cpu" in
|
|
|
|
alpha*)
|
|
|
|
LDFLAGS="-dynamic $LDFLAGS"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test "$CC" != "lcc"
|
|
|
|
then
|
|
|
|
LDFLAGS="-rdynamic $LDFLAGS"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_prog_gcc" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_CFLAGS="-shared -fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-shared -fPIC $CXXFLAGS"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG="-Wl,-soname=$DYNYAPLIB"
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
if test "$have_nsl" = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
YAPLIB_LD="\$(CC) -shared"
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
else
|
|
|
|
YAPLIB_LD="\$(CC)"
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
PRE_INSTALL_ENV=""
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*sunos4*)
|
|
|
|
M4="/usr/5bin/m4"
|
|
|
|
LDFLAGS="$LDFLAGS -N"
|
|
|
|
if test "$have_nsl" = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
|
|
|
SO="o"
|
|
|
|
INSTALL_DLLS=""
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*hpux*)
|
|
|
|
#do not use the first memory quadrant
|
|
|
|
AC_DEFINE(FORCE_SECOND_QUADRANT)
|
|
|
|
M4="/usr/bin/m4"
|
|
|
|
if test ${use_condor} = no
|
|
|
|
then
|
|
|
|
SHLIB_INTERFACE="load_shl.o"
|
|
|
|
if test "$CC" = cc -o "$CC" = c89
|
|
|
|
then
|
|
|
|
#this tells ld to export all non-static symbols,
|
|
|
|
#otherwise no external predicates.
|
|
|
|
SHLIB_LD="$CC -shared -export-dynamic"
|
|
|
|
SHLIB_CXX_LD="$CXX -shared -export-dynamic"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
SO="sl"
|
|
|
|
SHLIB_CFLAGS="+z $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="+z $CXXFLAGS"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
# If the xnet library was found, turn on X/Open networking
|
|
|
|
if test "$ac_cv_lib_xnet_getsockname" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(_XOPEN_SOURCE)
|
|
|
|
AC_DEFINE(_XOPEN_SOURCE_EXTENDED,1)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
INSTALL_DLLS="#"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#do not use realloc() from HP-UX 10.20 together with MPI
|
|
|
|
if test ${target_os} = hpux10.20
|
|
|
|
then
|
|
|
|
AC_DEFINE(MPI_AVOID_REALLOC,1)
|
|
|
|
fi
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*aix*)
|
|
|
|
# To actually use dlls in AIX I'd need to build YAP as a DLL first.
|
|
|
|
# I won't bother for now.
|
|
|
|
#
|
|
|
|
# SO="a"
|
|
|
|
#SHLIB_LD="\$(srcdir)/../../ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
|
|
|
|
#INSTALL_DLLS=""
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*osf*)
|
|
|
|
if ${use_condor} = no
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
dnl Linux has both elf and a.out, in this case we found elf
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
SO="so"
|
|
|
|
SHLIB_LD="ld -shared -expect_unresolved '*'"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
fi
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*irix6*)
|
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
|
|
|
SO="so"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
SHLIB_LD="ld -n32 -shared -rdata_shared"
|
|
|
|
SHLIB_CXX_LD="$SHLIB_LD"
|
|
|
|
INSTALL_DLLS=""
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*darwin*)
|
|
|
|
if test ${use_dlcompat} = yes
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
if test ${have_dl} = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -ldl"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
SO="dylib"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_LD="$CC -dynamiclib"
|
|
|
|
SHLIB_CXX_LD="$CXX -dynamiclib"
|
2012-01-27 18:08:04 +00:00
|
|
|
EXTRA_LIBS_FOR_DLLS="-L\$(abs_top_builddir) $LIBS $EXTRA_LIBS_FOR_DLLS -lYap -Wl,-install_name,\$(YAPLIBDIR)/\$@"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2012-01-27 18:08:04 +00:00
|
|
|
LDFLAGS="-L\$(abs_top_builddir) $LDFLAGS "
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
|
|
|
SHLIB_LD="$CC -dynamiclib -Wl,-undefined,dynamic_lookup"
|
|
|
|
SHLIB_CXX_LD="$CXX -dynamiclib -Wl,-undefined,dynamic_lookup"
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-install_name,\$(YAPLIBDIR)/\$@"
|
2010-09-27 21:59:13 +01:00
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_prog_gcc" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_CFLAGS="-shared -fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-shared -fPIC $CXXFLAGS"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2013-01-07 09:47:52 +00:00
|
|
|
CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
|
|
|
YAPLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.$SO"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
;;
|
2010-10-27 10:11:19 +01:00
|
|
|
*netbsd*|*openbsd*|*freebsd*|*dragonfly*)
|
2010-09-27 21:59:13 +01:00
|
|
|
if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__
|
|
|
|
then
|
|
|
|
#an a.out system
|
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
|
|
|
SO="o"
|
|
|
|
else
|
|
|
|
#an elf system
|
|
|
|
LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
|
|
|
|
SHLIB_CFLAGS="-fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
|
|
|
SHLIB_LD="$CC -shared -export-dynamic"
|
|
|
|
SHLIB_CXX_LD="$CXX -shared -export-dynamic"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
SO="so"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2013-01-17 12:59:52 +00:00
|
|
|
YAPLIB_LD=$SHLIB_LD
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG="-Wl,--soname=$DYNYAPLIB"
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
*solaris*)
|
|
|
|
#an elf system
|
|
|
|
LDFLAGS="-dynamic $LDFLAGS"
|
|
|
|
SHLIB_CFLAGS="-fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
|
|
|
SHLIB_LD="$CC -shared"
|
|
|
|
SHLIB_CXX_LD="$CXX -shared"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
SO="so"
|
|
|
|
INSTALL_DLLS=""
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG="-Wl,--soname=$DYNYAPLIB"
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
YAPLIB_LD="\$(CC)"
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV=""
|
|
|
|
YAPLIB_LD="\$(CC) -shared"
|
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*cyg*|*mingw*)
|
|
|
|
# gcc on cygwin seems to have trouble with longjmp
|
|
|
|
# and -fomit-frame-point -DBP_FREE
|
|
|
|
YAPLIB="yap.dll"
|
|
|
|
DYNYAPLIB="yap.dll"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-09-27 21:59:13 +01:00
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
|
|
|
if test "$target_win64" = no
|
|
|
|
then
|
|
|
|
LDFLAGS="-Wl,--large-address-aware $LDFLAGS"
|
|
|
|
fi
|
|
|
|
SHLIB_LD="\$(CC) -shared -Wl,--export-all-symbols"
|
|
|
|
SHLIB_CXX_LD="\$(CXX) -shared -Wl,--export-all-symbols"
|
|
|
|
SO="dll"
|
|
|
|
C_PARSER_FLAGS="$C_INTERF_FLAGS"
|
|
|
|
EXEC_SUFFIX=".exe"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
MERGE_DLL_OBJS=""
|
|
|
|
IN_UNIX="#"
|
|
|
|
YAPLIB_LD="\$(CC) -shared -Wl,--export-all-symbols"
|
|
|
|
PRE_INSTALL_ENV=""
|
|
|
|
INSTALL_ENV=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
if test "$have_dl" = yes
|
|
|
|
then
|
|
|
|
SO="o"
|
|
|
|
LIBS="$LIBS -ldl"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$have_nsl" = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
2010-10-18 01:25:00 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(LIBDIR) -Wl,-R,\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-12-31 04:14:45 +00:00
|
|
|
SONAMEFLAG=""
|
2010-10-18 01:25:00 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-11-07 19:44:54 +00:00
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-09-27 21:59:13 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
YAPLIB_CFLAGS="$SHLIB_CFLAGS"
|
|
|
|
YAPLIB="$DYNYAPLIB"
|
|
|
|
else
|
|
|
|
YAPLIB_CFLAGS="$CFLAGS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$coroutining" = "yes"
|
|
|
|
then
|
2012-12-11 23:02:05 +00:00
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1"
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$rationaltrees" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$rationaltrees" = "yes" -a "$coroutining" = "yes"
|
|
|
|
then
|
|
|
|
INSTALLCLP=""
|
|
|
|
else
|
|
|
|
INSTALLCLP="@#"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEBUG=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$eam" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DBEAM"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$wamprofile" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DANALYST=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$depthlimit" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$use_april" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1 -DAPRIL"
|
|
|
|
LDFLAGS="$LDFLAGS -L."
|
|
|
|
LIBS="$LIBS -lApril"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$lowleveltracer" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DLOW_LEVEL_TRACER=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$threads" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTHREADS=1"
|
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -D_GNU_SOURCE"
|
2011-04-14 18:49:55 +01:00
|
|
|
fi
|
|
|
|
case "$orparallelism" in
|
|
|
|
sba)
|
|
|
|
AC_MSG_FAILURE(
|
2011-07-13 17:36:26 +01:00
|
|
|
[--or-parallelism=sba incompatible with threads])
|
2011-04-14 18:49:55 +01:00
|
|
|
;;
|
|
|
|
a-cow)
|
|
|
|
AC_MSG_FAILURE(
|
2011-07-13 17:36:26 +01:00
|
|
|
[--or-parallelism=a-cow incompatible with threads])
|
2011-04-14 18:49:55 +01:00
|
|
|
;;
|
|
|
|
copy)
|
|
|
|
AC_MSG_FAILURE(
|
2011-07-13 17:36:26 +01:00
|
|
|
[--or-parallelism=copy incompatible with threads])
|
2011-04-14 18:49:55 +01:00
|
|
|
;;
|
|
|
|
yes|threads)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
case "$orparallelism" in
|
|
|
|
sba)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_SBA=1"
|
|
|
|
;;
|
|
|
|
a-cow)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_COW=1"
|
|
|
|
;;
|
|
|
|
threads)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
|
|
|
;;
|
|
|
|
yes|copy)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_COPY=1"
|
|
|
|
;;
|
|
|
|
esac
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test "$cutc" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$tabling" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTABLING=1"
|
|
|
|
fi
|
2012-02-01 10:26:04 +00:00
|
|
|
dnl LAM/MPI interface
|
|
|
|
|
2012-02-06 16:44:33 +00:00
|
|
|
LAMOBJS=""
|
2012-02-02 09:58:05 +00:00
|
|
|
MPI_OBJS=
|
2012-02-01 10:26:04 +00:00
|
|
|
LAM_MPI_CC=${MPI_CC}
|
2012-02-02 09:58:05 +00:00
|
|
|
if test "$yap_cv_lam" != "no" ; then
|
2012-02-06 17:35:32 +00:00
|
|
|
if test "$yap_cv_lam" != "yes" ; then
|
2012-02-02 09:58:05 +00:00
|
|
|
LAM_MPI_CC="$yap_cv_lam"/bin/mpicc
|
|
|
|
MPI_CC="$yap_cv_lam"/bin/mpicc
|
|
|
|
CPPFLAGS="$CPPFLAGS -I ${yap_cv_lam}/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_lam}/lib"
|
|
|
|
fi
|
2012-02-01 10:26:04 +00:00
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${LAM_MPI_CC}
|
2012-02-06 17:35:32 +00:00
|
|
|
AC_CHECK_HEADER(mpi.h,
|
2012-02-02 09:58:05 +00:00
|
|
|
[LAMOBJS=yap_mpi."$SO"
|
|
|
|
AC_DEFINE(HAVE_LIBMPI, 1)],
|
|
|
|
[LAMOBJS=""
|
|
|
|
AC_DEFINE(HAVE_LIBMPI, 0)])
|
|
|
|
CC=${OLD_CC}
|
|
|
|
dnl use mpich library
|
|
|
|
elif test "$yap_cv_mpi" != "no"; then
|
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${MPI_CC}
|
|
|
|
AC_CHECK_LIB(mpi,MPI_Init,
|
2012-02-06 16:44:33 +00:00
|
|
|
[LAMOBJS=yap_mpi."$SO"
|
|
|
|
AC_DEFINE(HAVE_LIBMPI, 1)],
|
|
|
|
[LAMOBJS=yap_mpi."$SO"
|
|
|
|
AC_DEFINE(HAVE_LIBMPI, 0)])
|
2012-02-02 09:58:05 +00:00
|
|
|
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
|
|
|
then
|
2012-02-01 10:26:04 +00:00
|
|
|
#YAPMPILIB=YapMPI.a
|
|
|
|
MPI_OBJS=mpi.o
|
2012-02-02 09:58:05 +00:00
|
|
|
else
|
|
|
|
AC_CHECK_LIB(mpich,MPI_Init,
|
2012-02-01 10:26:04 +00:00
|
|
|
[AC_DEFINE(HAVE_LIBMPICH, 1)],
|
|
|
|
[AC_DEFINE(HAVE_LIBMPICH, 0)])
|
2012-02-02 09:58:05 +00:00
|
|
|
if test "$ac_cv_lib_mpich_MPI_Init" = yes
|
|
|
|
then
|
2012-02-01 10:26:04 +00:00
|
|
|
#YAPMPILIB=YapMPI.a
|
|
|
|
MPI_OBJS=mpi.o
|
2012-02-02 09:58:05 +00:00
|
|
|
else
|
2012-02-01 10:26:04 +00:00
|
|
|
#YAPMPILIB=
|
|
|
|
MPI_CC=${CC}
|
2012-02-02 09:58:05 +00:00
|
|
|
fi
|
2012-02-01 10:26:04 +00:00
|
|
|
fi
|
2012-02-02 09:58:05 +00:00
|
|
|
AC_CHECK_HEADERS(mpi.h)
|
|
|
|
CC=${OLD_CC}
|
|
|
|
MPI_LIBS=
|
|
|
|
if test "$yap_cv_mpe" != "no"
|
|
|
|
then
|
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${MPI_CC}
|
|
|
|
AC_CHECK_LIB(mpe,MPE_Init_log,
|
2012-02-01 10:26:04 +00:00
|
|
|
[AC_DEFINE(HAVE_LIBMPE, 1)],
|
|
|
|
[AC_DEFINE(HAVE_LIBMPE, 0)])
|
2012-02-02 09:58:05 +00:00
|
|
|
if test "$ac_cv_lib_mpe_MPE_Init_log" = yes
|
|
|
|
then
|
2012-02-01 10:26:04 +00:00
|
|
|
MPI_LIBS="-lmpe"
|
|
|
|
MPI_OBJS="$MPI_OBJS mpe.o"
|
2012-02-02 09:58:05 +00:00
|
|
|
fi
|
|
|
|
AC_CHECK_HEADERS(mpe.h)
|
|
|
|
CC=${OLD_CC}
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
MPI_CC=${CC}
|
2012-02-01 10:26:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test ! "$yap_cv_cplint" = "no"
|
|
|
|
then
|
|
|
|
if test ! "$yap_cv_cplint" = "yes"
|
|
|
|
then
|
|
|
|
CPLINT_LDFLAGS+=" -L${yap_cv_cplint}/cudd -L${yap_cv_cplint}/mtr -L${yap_cv_cplint}/st -L${yap_cv_cplint}/util -L${yap_cv_cplint}/epd "
|
|
|
|
CPLINT_CFLAGS+=" -I${yap_cv_cplint}/include"
|
|
|
|
CPLINT_LIBS="-lcudd -lmtr -lst -lepd -lutil -lm "$CPLINT_LIBS
|
|
|
|
fi
|
2011-10-22 15:33:04 +01:00
|
|
|
ENABLE_CPLINT=""
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
|
|
|
then
|
|
|
|
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
|
|
|
|
SHLIB_SUFFIX="dll"
|
|
|
|
else
|
|
|
|
CPLINT_SHLIB_LD=$SHLIB_LD
|
|
|
|
SHLIB_SUFFIX="so"
|
|
|
|
fi
|
|
|
|
AC_SUBST(CPLINT_LIBS)
|
|
|
|
AC_SUBST(CPLINT_CFLAGS)
|
|
|
|
AC_SUBST(CPLINT_LDFLAGS)
|
|
|
|
AC_SUBST(CPLINT_SHLIB_LD)
|
|
|
|
AC_SUBST(SHLIB_SUFFIX)
|
|
|
|
else
|
|
|
|
ENABLE_CPLINT="@#"
|
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_CPLINT)
|
|
|
|
|
|
|
|
AC_SUBST(INSTALL_ENV)
|
|
|
|
AC_SUBST(PRE_INSTALL_ENV)
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2013-01-19 11:48:36 +00:00
|
|
|
AC_CHECK_HEADERS(arpa/inet.h alloca.h crtdbg.h crypt.h)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_HEADERS(ctype.h direct.h dirent.h dlfcn.h)
|
|
|
|
AC_CHECK_HEADERS(errno.h execinfo.h fcntl.h fenv.h)
|
|
|
|
AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h io.h limits.h)
|
2012-02-01 10:26:04 +00:00
|
|
|
AC_CHECK_HEADERS(locale.h malloc.h math.h memory.h)
|
2013-01-19 11:48:36 +00:00
|
|
|
AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h shlobj.h)
|
2011-02-10 21:45:43 +00:00
|
|
|
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h stdint.h string.h stropts.h)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_HEADERS(sys/conf.h sys/dir.h sys/file.h)
|
|
|
|
AC_CHECK_HEADERS(sys/mman.h sys/ndir.h sys/param.h)
|
|
|
|
AC_CHECK_HEADERS(sys/resource.h sys/select.h)
|
|
|
|
AC_CHECK_HEADERS(sys/shm.h sys/socket.h sys/stat.h)
|
|
|
|
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/types.h)
|
|
|
|
AC_CHECK_HEADERS(sys/ucontext.h sys/un.h sys/wait.h)
|
|
|
|
AC_CHECK_HEADERS(time.h unistd.h utime.h wctype.h winsock.h winsock2.h)
|
|
|
|
AC_CHECK_HEADERS(zlib.h zutil.h)
|
2013-01-19 11:48:36 +00:00
|
|
|
AC_CHECK_HEADERS(mach-o/dyld.h LibLoaderAPI.h)
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_gmp" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(gmp.h)
|
|
|
|
fi
|
2013-01-02 12:10:11 +00:00
|
|
|
if test "$yap_cv_judy" != "no"; then
|
|
|
|
AC_CHECK_HEADERS(Judy.h)
|
|
|
|
fi
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$yap_cv_myddas" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(mysql/mysql.h)
|
|
|
|
fi
|
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS( readline/readline.h)
|
2011-02-16 00:41:32 +00:00
|
|
|
AC_CHECK_HEADERS( readline/history.h)
|
2011-03-02 23:19:39 +00:00
|
|
|
AC_CHECK_FUNCS( rl_completion_matches rl_clear_pending_input rl_cleanup_after_signal rl_event_hook rl_filename_completion_function rl_free_line_state rl_insert_close rl_set_prompt rl_state_initialized )
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_STRUCT_TM
|
|
|
|
AC_CHECK_SIZEOF(int *,4)
|
|
|
|
AC_CHECK_SIZEOF(short int,2)
|
|
|
|
AC_CHECK_SIZEOF(int,4)
|
|
|
|
AC_CHECK_SIZEOF(long int,4)
|
|
|
|
AC_CHECK_SIZEOF(long long int,8)
|
|
|
|
AC_CHECK_SIZEOF(float,4)
|
|
|
|
AC_CHECK_SIZEOF(double,8)
|
|
|
|
|
|
|
|
dnl check type of malloc (i.e. char * or void *)
|
|
|
|
AC_MSG_CHECKING(for type of malloc)
|
|
|
|
AC_CACHE_VAL(yap_cv_malloct,[
|
|
|
|
AC_TRY_RUN(
|
|
|
|
#include <stdlib.h>
|
|
|
|
char *malloc(size_t);
|
|
|
|
int main() {
|
|
|
|
void *p=malloc(1);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
,
|
|
|
|
yap_cv_malloct=char,yap_cv_malloct=void,yap_cv_malloct=void)])
|
|
|
|
AC_MSG_RESULT($yap_cv_malloct *)
|
|
|
|
if test "$yap_cv_malloct" = void
|
|
|
|
then AC_DEFINE(MALLOC_T,void *)
|
|
|
|
else AC_DEFINE(MALLOC_T,char *)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
dnl check how to generate headers (i.e. should we use GCC inline?)
|
|
|
|
AC_MSG_CHECKING(for gcc inline)
|
|
|
|
AC_CACHE_VAL(yap_cv_gcc,[
|
|
|
|
AC_TRY_RUN(
|
|
|
|
#undef inline
|
|
|
|
inline int f(int x) {return x+1;}
|
|
|
|
int main() { return 0;}
|
|
|
|
,
|
|
|
|
yap_cv_gcc=yes,yap_cv_gcc=no,yap_cv_gcc=yes)])
|
|
|
|
AC_MSG_RESULT($yap_cv_gcc)
|
|
|
|
if test "$yap_cv_gcc" = yes
|
|
|
|
then
|
|
|
|
M4GENHDRS=m4/gcc_genhdrs.m4
|
|
|
|
AC_DEFINE(HAVE_GCC,1)
|
|
|
|
else
|
|
|
|
M4GENHDRS=m4/cc_genhdrs.m4
|
|
|
|
AC_DEFINE(HAVE_GCC,0)
|
|
|
|
fi
|
|
|
|
AC_SUBST(M4)
|
|
|
|
AC_SUBST(M4GENHDRS)
|
|
|
|
|
2012-09-21 12:58:51 +01:00
|
|
|
CMDEXT=sh
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl SWI compatibility, I don't know why just use host...
|
|
|
|
changequote(,)dnl
|
|
|
|
if test "x$ARCH" = "x"; then
|
|
|
|
case "$host" in
|
|
|
|
*linux*)
|
|
|
|
ARCH=`echo $host | sed 's/-.*/-linux/'`
|
|
|
|
;;
|
|
|
|
*-gnu)
|
|
|
|
ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)-gnu/\1-\2/'`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
changequote([,])dnl
|
|
|
|
AC_SUBST(ARCH)
|
|
|
|
|
2012-09-21 12:58:51 +01:00
|
|
|
CMDEXT=sh
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl System stuff for dynamic linking.
|
|
|
|
dnl
|
|
|
|
dnl Exports:
|
|
|
|
dnl
|
|
|
|
dnl "" if we can do dynamic linking, "#" otherwise
|
|
|
|
AC_SUBST(INSTALL_DLLS)
|
|
|
|
dnl if we need to merge several .o files into a single dll.
|
|
|
|
AC_SUBST(MERGE_DLL_OBJS)
|
|
|
|
dnl C-flags used to compile a file that will be loaded dynamically
|
|
|
|
AC_SUBST(CXXFLAGS)
|
|
|
|
AC_SUBST(SHLIB_CFLAGS)
|
|
|
|
AC_SUBST(SHLIB_CXXFLAGS)
|
|
|
|
dnl suffix for loadable binary (.so,.dll,.o)
|
|
|
|
AC_SUBST(SO)
|
|
|
|
dnl suffix for executable (.exe)
|
|
|
|
AC_SUBST(EXEC_SUFFIX)
|
|
|
|
dnl how to call the loader
|
|
|
|
AC_SUBST(DO_SECOND_LD)
|
|
|
|
AC_SUBST(SHLIB_LD)
|
|
|
|
AC_SUBST(SHLIB_CXX_LD)
|
|
|
|
AC_SUBST(YAPLIB_LD)
|
|
|
|
AC_SUBST(YAPLIB_CFLAGS)
|
|
|
|
AC_SUBST(EXTRA_LIBS_FOR_DLLS)
|
|
|
|
dnl objects in YAP library
|
|
|
|
AC_SUBST(YAPLIB)
|
|
|
|
AC_SUBST(DYNYAPLIB)
|
|
|
|
AC_SUBST(LDFLAGS)
|
2010-12-31 04:14:45 +00:00
|
|
|
AC_SUBST(SONAMEFLAG)
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl install_info
|
|
|
|
AC_SUBST(INSTALL_INFO)
|
|
|
|
dnl let YAP_EXTRAS fall through configure, from the env into Makefile
|
|
|
|
AC_SUBST(YAP_EXTRAS)
|
|
|
|
AC_SUBST(NO_BUILTIN_REGEXP)
|
|
|
|
AC_SUBST(ENABLE_CHR)
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_SUBST(ENABLE_CLIB)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(ENABLE_CLPQR)
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_SUBST(ENABLE_HTTP)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(ENABLE_JPL)
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_SUBST(ENABLE_PLDOC)
|
|
|
|
AC_SUBST(ENABLE_PLUNIT)
|
|
|
|
AC_SUBST(ENABLE_R)
|
|
|
|
AC_SUBST(ENABLE_RDF)
|
|
|
|
AC_SUBST(ENABLE_SEMWEB)
|
|
|
|
AC_SUBST(ENABLE_SGML)
|
|
|
|
AC_SUBST(ENABLE_ZLIB)
|
|
|
|
AC_SUBST(ENABLE_CLPBN_BP)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(JAVA)
|
|
|
|
AC_SUBST(JAVA_HOME)
|
|
|
|
AC_SUBST(JUNIT)
|
|
|
|
AC_SUBST(JAVAC)
|
|
|
|
AC_SUBST(JAVADOC)
|
|
|
|
AC_SUBST(JAR)
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_SUBST(LIBJPL)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(IN_UNIX)
|
|
|
|
AC_SUBST(YAPMPILIB)
|
|
|
|
AC_SUBST(LAM_MPI_CC)
|
|
|
|
AC_SUBST(MPI_OBJS)
|
|
|
|
AC_SUBST(MPI_LIBS)
|
|
|
|
AC_SUBST(INSTALL_COMMAND)
|
|
|
|
AC_SUBST(INSTALLCLP)
|
2012-09-21 11:50:55 +01:00
|
|
|
AC_SUBST(JPLCFLAGS)
|
|
|
|
AC_SUBST(JPLLIBS)
|
2012-02-12 12:28:37 +00:00
|
|
|
AC_SUBST(JAVALIBS)
|
2012-09-21 11:50:55 +01:00
|
|
|
AC_SUBST(JPLCFLAGS)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(LAMOBJS)
|
|
|
|
AC_SUBST(MAX_WORKERS)
|
|
|
|
AC_SUBST(STATIC_MODE)
|
|
|
|
AC_SUBST(ENABLE_WINCONSOLE)
|
2011-03-09 13:05:03 +00:00
|
|
|
AC_SUBST(EXTRA_INCLUDES_FOR_WIN32)
|
2012-09-21 12:58:51 +01:00
|
|
|
AC_SUBST(CMDEXT)
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_SUBST(ENABLE_CUDD)
|
2012-03-22 21:37:20 +00:00
|
|
|
AC_SUBST(ENABLE_BDDLIB)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(CUDD_LDFLAGS)
|
|
|
|
AC_SUBST(CUDD_CPPFLAGS)
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_SUBST(ENABLE_MINISAT)
|
2012-01-31 15:11:39 +00:00
|
|
|
AC_SUBST(ENABLE_REAL)
|
|
|
|
AC_SUBST(REAL_TARGET)
|
|
|
|
AC_SUBST(REAL_INCLUDES)
|
|
|
|
AC_SUBST(REAL_LIBS)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(INSTALL_MATLAB)
|
|
|
|
AC_SUBST(MATLAB_INCLUDE)
|
2011-11-18 17:02:09 +00:00
|
|
|
AC_SUBST(INSTALL_PRISM)
|
2012-10-08 23:58:22 +01:00
|
|
|
AC_SUBST(PYTHON_TARGET)
|
|
|
|
AC_SUBST(ENABLE_PYTHON)
|
|
|
|
AC_SUBST(PYTHON_INCLUDES)
|
|
|
|
AC_SUBST(PYTHON_LIBS)
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
dnl check for threaded code
|
|
|
|
AC_MSG_CHECKING(for gcc threaded code)
|
|
|
|
AC_CACHE_VAL(yap_cv_threaded_code,[
|
|
|
|
AC_TRY_RUN(
|
|
|
|
int main() {
|
|
|
|
void *t = &&l2;
|
|
|
|
l1: goto *t;
|
|
|
|
l2: return 0;
|
|
|
|
}
|
|
|
|
,
|
|
|
|
yap_cv_threaded_code=yes,yap_cv_threaded_code=no,yap_cv_threaded_code=yes)])
|
|
|
|
AC_MSG_RESULT($yap_cv_threaded_code)
|
|
|
|
if test "$yap_cv_threaded_code" = yes && test "$yap_cv_gcc" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(USE_THREADED_CODE,1)
|
|
|
|
M4GENABSMI=gen_gcc.m4
|
|
|
|
else
|
|
|
|
AC_DEFINE(USE_THREADED_CODE,0)
|
|
|
|
M4GENABSMI=gen_ansi.m4
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(M4GENABSMI)
|
|
|
|
|
|
|
|
|
|
|
|
dnl check for IEEE floats
|
|
|
|
AC_MSG_CHECKING(for IEEE floats)
|
|
|
|
AC_CACHE_VAL(yap_cv_ffieee,[
|
|
|
|
AC_TRY_RUN(
|
|
|
|
int main() {
|
|
|
|
union { float f; int i} a;
|
|
|
|
a.f = 1;
|
|
|
|
if (a.i==0x3f800000) return 0;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
,
|
|
|
|
yap_cv_ffieee=yes,yap_cv_ffieee=no,yap_cv_ffieee=yes)])
|
|
|
|
AC_MSG_RESULT($yap_cv_ffieee)
|
|
|
|
if test "$yap_cv_ffieee" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(FFIEEE,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(FFIEEE,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for sigsetjmp
|
|
|
|
AC_MSG_CHECKING(for sigsetjmp)
|
|
|
|
AC_CACHE_VAL(yap_cv_sigsetjmp,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <setjmp.h>
|
|
|
|
,
|
|
|
|
sigjmp_buf RestartEnv;
|
|
|
|
|
|
|
|
siglongjmp (RestartEnv, 1);
|
|
|
|
,
|
|
|
|
yap_cv_sigsetjmp=yes,yap_cv_sigsetjmp=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigsetjmp)
|
|
|
|
if test "$yap_cv_sigsetjmp" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGSETJMP,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGSETJMP,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for sigsegv
|
|
|
|
AC_MSG_CHECKING(for sigsegv)
|
|
|
|
AC_CACHE_VAL(yap_cv_sigsegv,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("Signal value is %d\n", SIGSEGV);
|
|
|
|
,
|
|
|
|
yap_cv_sigsegv=yes,yap_cv_sigsegv=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigsegv)
|
|
|
|
if test "$yap_cv_sigsegv" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for sigsegv
|
|
|
|
AC_MSG_CHECKING(for sigprof)
|
|
|
|
AC_CACHE_VAL(yap_cv_sigprof,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("Signal value is %d\n", SIGPROF);
|
|
|
|
,
|
|
|
|
yap_cv_sigprof=yes,yap_cv_sigprof=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigprof)
|
|
|
|
if test "$yap_cv_sigsegv" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGPROF,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGPROF,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for siginfo
|
|
|
|
AC_MSG_CHECKING(for siginfo)
|
|
|
|
AC_CACHE_VAL(yap_cv_siginfo,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("SIGINFO value is %d\n", SA_SIGINFO);
|
|
|
|
,
|
|
|
|
yap_cv_siginfo=yes,yap_cv_siginfo=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_siginfo)
|
|
|
|
if test "$yap_cv_siginfo" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGINFO,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGINFO,0)
|
|
|
|
fi
|
|
|
|
|
2011-03-21 17:07:58 +00:00
|
|
|
AC_MSG_CHECKING("variable timezone in tzset")
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[ #include <time.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __CYGWIN__
|
|
|
|
#define timezone _timezone
|
|
|
|
#endif
|
|
|
|
extern long timezone;
|
|
|
|
|
|
|
|
main()
|
|
|
|
{ tzset();
|
|
|
|
|
|
|
|
if ( timezone > -15*3600 &&
|
|
|
|
timezone < 15*3600 &&
|
|
|
|
timezone % 60 == 0 )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_VAR_TIMEZONE, 1,
|
|
|
|
[Define if tzset sets timezone variable]),
|
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_MSG_RESULT(assuming no))
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
|
|
|
|
AC_DEFINE(HAVE_STRUCT_TIME_TM_GMTOFF, [],
|
|
|
|
[Define is struct tm has tm_gmtoff]),
|
|
|
|
[],
|
|
|
|
[#include <time.h>])
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl this is copied from the Tcl code
|
|
|
|
dnl this code checks whether the system defines an union wait
|
|
|
|
AC_MSG_CHECKING([union wait])
|
|
|
|
AC_TRY_LINK([#include <sys/types.h>
|
|
|
|
#include <sys/wait.h>], [
|
|
|
|
union wait x;
|
|
|
|
wait(&x); /* make sure we can compile wait */
|
|
|
|
WIFEXITED(x); /* Generates compiler error if WIFEXITED
|
|
|
|
* uses an int. */
|
|
|
|
], union_wait_ok=yes, union_wait_ok=no)
|
|
|
|
AC_MSG_RESULT($union_wait_ok)
|
|
|
|
if test "$union_wait_ok" = no; then
|
|
|
|
AC_DEFINE(NO_UNION_WAIT)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check whether the system supports the environ variable
|
|
|
|
AC_MSG_CHECKING([environ])
|
|
|
|
AC_TRY_LINK([], [
|
|
|
|
extern char **environ;
|
|
|
|
], environ_ok=yes, environ_ok=no)
|
|
|
|
AC_MSG_RESULT($environ_ok)
|
|
|
|
if test "$environ_ok" = yes; then
|
|
|
|
AC_DEFINE(HAVE_ENVIRON)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_TYPE_SIGNAL
|
2012-06-29 21:33:27 +01:00
|
|
|
AC_CHECK_FUNCS(_NSGetEnviron _chsize_s access acosh)
|
2011-03-21 17:07:58 +00:00
|
|
|
AC_CHECK_FUNCS(alloca asinh atanh chdir clock clock_gettime)
|
|
|
|
AC_CHECK_FUNCS(ctime dlopen dup2)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_FUNCS(erf feclearexcept)
|
2013-01-19 11:48:36 +00:00
|
|
|
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime ftruncate getcwd getenv)
|
2013-01-13 17:55:13 +00:00
|
|
|
AC_CHECK_FUNCS(getexecname)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname)
|
|
|
|
AC_CHECK_FUNCS(gethrtime getpagesize)
|
|
|
|
AC_CHECK_FUNCS(getpwnam getrlimit getrusage gettimeofday getwd)
|
|
|
|
AC_CHECK_FUNCS(isatty isnan isinf kill labs link lgamma)
|
|
|
|
AC_CHECK_FUNCS(localtime lstat mallinfo)
|
2011-03-02 23:19:39 +00:00
|
|
|
AC_CHECK_FUNCS(mbscoll)
|
|
|
|
AC_CHECK_FUNCS(mbscasecoll)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_FUNCS(mbsnrtowcs)
|
|
|
|
AC_CHECK_FUNCS(memcpy memmove mkstemp mktemp)
|
|
|
|
AC_CHECK_FUNCS(nanosleep mktime opendir)
|
|
|
|
AC_CHECK_FUNCS(putenv rand random readlink regexec)
|
2011-03-02 23:19:39 +00:00
|
|
|
AC_CHECK_FUNCS(rename rint sbrk select setbuf)
|
|
|
|
AC_CHECK_FUNCS(setitimer setlocale setsid setlinebuf sigaction)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_FUNCS(siggetmask siginterrupt)
|
|
|
|
AC_CHECK_FUNCS(signal sigprocmask socket stat)
|
2012-07-25 02:51:30 +01:00
|
|
|
AC_CHECK_FUNCS(strchr strerror stricmp strlwr strncat strncpy strtod)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_FUNCS(time times tmpnam usleep utime vsnprintf)
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(regexec, [NO_BUILTIN_REGEXP="#"], [NO_BUILTIN_REGEXP=""])
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(NSLinkModule)
|
|
|
|
|
|
|
|
if test "$use_condor" = "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_FUNCS(alarm mmap popen shmat sleep system ttyname waitpid)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$target_os" != "mingw32"
|
|
|
|
then
|
|
|
|
AC_CHECK_FUNCS(fetestexcept snprintf)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for mpz_xor
|
|
|
|
AC_MSG_CHECKING(for mpz_xor)
|
|
|
|
AC_CACHE_VAL(yap_cv_mpz_xor,[
|
|
|
|
AC_TRY_LINK(
|
|
|
|
#include <gmp.h>
|
|
|
|
void check(mpz_t rop,mpz_t op1,mpz_t op2) {
|
|
|
|
mpz_xor(rop,op1,op2);
|
|
|
|
}
|
|
|
|
,
|
|
|
|
,
|
|
|
|
yap_cv_mpz_xor=yes,yap_cv_mpz_xor=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_mpz_xor)
|
|
|
|
if test "$yap_cv_mpz_xor" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
|
|
|
|
then
|
|
|
|
maxmemory="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl On some systems doing a fflush(NULL) to flush all output streams
|
|
|
|
dnl has the side-effect of makeing all charactes waiting in input
|
|
|
|
dnl pipes disapear.
|
|
|
|
AC_CACHE_CHECK(
|
|
|
|
[if fflush(NULL) clobbers input pipes],
|
|
|
|
[yap_cv_broken_fflush_null],
|
|
|
|
[ cat >conftest.$ac_ext <<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
char *buf;
|
|
|
|
int i;
|
|
|
|
char *bp;
|
|
|
|
bp = buf = malloc(1024);
|
|
|
|
while (1) {
|
|
|
|
while ((i = getc(stdin)) != -1
|
|
|
|
&& (*bp++ = i) != '\n'
|
|
|
|
&& (bp - buf < 1024) )
|
|
|
|
/* DO NOTHING */ ;
|
|
|
|
*bp = '\0';
|
|
|
|
fprintf(stdout, "%s", buf);
|
|
|
|
fflush(NULL);
|
|
|
|
if( i == EOF ) return 0;
|
|
|
|
bp = buf;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
AC_TRY_EVAL(ac_link)
|
|
|
|
if test "$?" = 0
|
|
|
|
then
|
|
|
|
cat conftest.$ac_ext | ./conftest$ac_exeext > conftest.out
|
|
|
|
AC_TRY_COMMAND(cmp conftest.$ac_ext conftest.out)
|
|
|
|
if test "$?" = 0
|
|
|
|
then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
yap_cv_broken_fflush_null=no
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
yap_cv_broken_fflush_null=yes
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
dnl This should never happen
|
|
|
|
AC_MSG_RESULT(failed)
|
|
|
|
yap_cv_broken_fflush_null=failed
|
|
|
|
fi
|
|
|
|
rm -f conftest.$ac_ext conftest.$ac_objext conftest$ac_exeext conftest.out ])
|
|
|
|
if test "$yap_cv_broken_fflush_null" = no
|
|
|
|
then
|
|
|
|
AC_DEFINE(BROKEN_FFLUSH_NULL,0)
|
|
|
|
else
|
|
|
|
dnl be conservative: if the test failed, assume fflush(NULL) is
|
|
|
|
dnl not working properly
|
|
|
|
AC_DEFINE(BROKEN_FFLUSH_NULL,1)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl disable smart memory management
|
|
|
|
if test "$use_malloc" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(USE_SYSTEM_MALLOC,1)
|
|
|
|
AC_DEFINE(GC_NO_TAGS,1)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl large memory configuration, don't trust Yap allocation routines
|
|
|
|
if test "$maxmemory" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(GC_NO_TAGS,1)
|
|
|
|
AC_DEFINE(USE_DL_MALLOC,1)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl SWI compatibility support!
|
|
|
|
PROLOG_SYSTEM=yap
|
|
|
|
IN_YAP=
|
|
|
|
IN_SWI="#"
|
|
|
|
CHR_TARGETS=chr_support."$SO"
|
|
|
|
|
|
|
|
AC_SUBST(PROLOG_SYSTEM)
|
|
|
|
AC_SUBST(IN_YAP)
|
|
|
|
AC_SUBST(IN_SWI)
|
|
|
|
AC_SUBST(TARGETS)
|
|
|
|
AC_SUBST(PLTARGETS)
|
|
|
|
AC_SUBST(CHR_TARGETS)
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
dnl clib
|
|
|
|
if test "$ENABLE_CLIB" = ""; then
|
2011-12-07 17:04:46 +00:00
|
|
|
CLIB_TARGETS="socket.$SO cgi.$SO memfile.$SO files.$SO mime.$SO $CRYPT_TARGETS"
|
|
|
|
CLIB_PLTARGETS="socket.pl cgi.pl memfile.pl filesex.pl mime.pl $CRYPT_TARGETS"
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
if test "$ac_cv_func_setitimer" = "yes"; then
|
|
|
|
CLIB_TARGETS="$CLIB_TARGETS time.$SO"
|
2011-03-10 11:06:13 +00:00
|
|
|
CLIB_PLTARGETS="$CLIB_PLTARGETS time.pl"
|
2010-09-27 21:59:13 +01:00
|
|
|
else
|
|
|
|
echo "WARNING: no setitimer(); dropping time.pl from targets"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$IN_UNIX" = ""; then
|
2012-02-13 11:23:51 +00:00
|
|
|
CLIB_TARGETS="uid.$SO unix.$SO $CLIB_TARGETS"
|
|
|
|
CLIB_PLTARGETS="uid.pl unix.pl $CLIB_PLTARGETS"
|
2010-09-27 21:59:13 +01:00
|
|
|
CLIB_NETLIBS=
|
|
|
|
else
|
|
|
|
AC_CHECK_FUNC(socket, [], [
|
|
|
|
AC_CHECK_LIB(socket, socket,
|
|
|
|
[CLIB_NETLIBS="$CLIB_NETLIBS -lsocket"]
|
|
|
|
AC_DEFINE(HAVE_LIBSOCKET, 1,
|
|
|
|
"Define if you have the socket library (-lsocket)."))])
|
|
|
|
AC_CHECK_FUNC(gethostent, [], [
|
|
|
|
AC_CHECK_LIB(nsl, gethostent,
|
|
|
|
[CLIB_NETLIBS="$CLIB_NETLIBS -lnsl"]
|
|
|
|
AC_DEFINE(HAVE_LIBNSL, 1,
|
|
|
|
"Define if you have the nsl library (-lnsl)."))])
|
|
|
|
fi
|
|
|
|
|
2010-12-03 12:12:15 +00:00
|
|
|
AC_CHECK_LIB(pthread, pthread_create,
|
|
|
|
[CLIB_PTHREADS="-lpthread"],[CLIB_PTHREADS=""])
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
oldlibs="$LIBS"
|
2011-03-21 23:43:06 +00:00
|
|
|
AC_CHECK_LIB(crypt, crypt, CRYPT_TARGET=crypt.\$SO, CRYPT_TARGET="")
|
2010-09-27 21:59:13 +01:00
|
|
|
CLIB_CRYPTLIBS="$LIBS"
|
|
|
|
AC_CHECK_FUNCS(crypt)
|
|
|
|
LIBS="$oldlibs"
|
|
|
|
|
2010-12-03 12:12:15 +00:00
|
|
|
AC_SUBST(CLIB_PTHREADS)
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_SUBST(CLIB_TARGETS)
|
|
|
|
AC_SUBST(CLIB_PLTARGETS)
|
|
|
|
AC_SUBST(CLIB_NETLIBS)
|
|
|
|
AC_SUBST(CLIB_CRYPTLIBS)
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CHECK_TYPES(socklen_t, [], [],
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
AC_CHECK_TYPES(ssize_t, [], [],
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
|
2012-12-20 21:12:30 +00:00
|
|
|
EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS $CLIB_PTHREADS"
|
|
|
|
AC_SUBST(EXTRA_LIBS_FOR_SWIDLLS)
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
dnl tszet and timezone trouble
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("variable timezone in tzset")
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[ #include <time.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __CYGWIN__
|
|
|
|
#define timezone _timezone
|
|
|
|
#endif
|
|
|
|
extern long timezone;
|
|
|
|
|
|
|
|
main()
|
|
|
|
{ tzset();
|
|
|
|
|
|
|
|
if ( timezone > -15*3600 &&
|
|
|
|
timezone < 15*3600 &&
|
|
|
|
timezone % 60 == 0 )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_VAR_TIMEZONE, 1,
|
|
|
|
[Define if tzset sets timezone variable]),
|
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_MSG_RESULT(assuming no))
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
|
|
|
|
AC_DEFINE(HAVE_STRUCT_TIME_TM_GMTOFF, [],
|
|
|
|
[Define is struct tm has tm_gmtoff]),
|
|
|
|
[],
|
|
|
|
[#include <time.h>])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(_XOPEN_SOURCE)
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#define _XOPEN_SOURCE
|
|
|
|
#include <unistd.h>
|
|
|
|
],
|
|
|
|
[
|
|
|
|
], AC_DEFINE(DEFINE_XOPEN_SOURCE, 1,
|
|
|
|
"Define if _XOPEN_SOURCE is needed")
|
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
if test "$with_time" = yes; then
|
|
|
|
if test "$ac_cv_func_setitimer" = "yes"; then
|
|
|
|
TARGETS="$TARGETS time.$SO"
|
|
|
|
else
|
|
|
|
echo "WARNING: no setitimer(); dropping time.pl from targets"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ac_cv_func_getrlimit" = "yes"; then
|
|
|
|
TARGETS="$TARGETS rlimit.$SO"
|
|
|
|
else
|
|
|
|
echo "WARNING: no getrlimit(); dropping rlimit.pl from targets"
|
|
|
|
fi
|
|
|
|
|
2011-03-10 11:06:13 +00:00
|
|
|
AC_ARG_ENABLE(mimecharset,
|
|
|
|
[ --enable-mimecharset=charset Default MIME charset to set on new messages],
|
|
|
|
RFC2045CHARSET="$enableval", RFC2045CHARSET="us-ascii")
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2011-03-10 11:06:13 +00:00
|
|
|
AC_SUBST(RFC2045CHARSET)
|
|
|
|
|
|
|
|
MAILDROP_CFLAGS="$SHLIB_CFLAGS -I. -I\$(srcdir) -I\$(srcdir)/.. -I../../../.."
|
|
|
|
AC_SUBST(MAILDROP_CFLAGS)
|
2010-09-27 21:59:13 +01:00
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$yap_cv_minisat" = no
|
|
|
|
then
|
|
|
|
ENABLE_MINISAT="@# "
|
|
|
|
elif test "$INSTALL_DLLS" = "#"
|
|
|
|
then
|
|
|
|
ENABLE_MINISAT="@# "
|
|
|
|
else
|
|
|
|
ENABLE_MINISAT=""
|
|
|
|
fi
|
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
dnl zlib
|
|
|
|
if test "$ENABLE_ZLIB" = ""
|
|
|
|
then
|
|
|
|
|
|
|
|
AC_CHECK_LIB(z, zlibVersion,
|
|
|
|
ZLIBS="-lz"
|
|
|
|
ZLIB=yes,
|
|
|
|
ZLIB=no)
|
|
|
|
|
|
|
|
if test "$ZLIB" = yes; then
|
|
|
|
ZLIB_TARGETS="zlib4pl.$SO"
|
|
|
|
ZLIB_PLTARGETS='zlib.pl'
|
|
|
|
ZLIB_INSTALL=install
|
|
|
|
else
|
|
|
|
ZLIB_TARGETS=nolib
|
|
|
|
ZLIB_INSTALL=nolib
|
|
|
|
cat << EOF
|
|
|
|
##################################################################
|
|
|
|
# ERROR: Could not find library zlib (-lz). Dropped library(zlib)
|
|
|
|
# Library zlib is available from http://www.zlib.net/
|
|
|
|
# Most Unix/Linux distributions are shipped with binaries. Make
|
|
|
|
# sure to have the development library installed.
|
|
|
|
##################################################################
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
AC_SUBST(ZLIBS)
|
|
|
|
AC_SUBST(ZLIB_TARGETS)
|
|
|
|
AC_SUBST(ZLIB_PLTARGETS)
|
|
|
|
AC_SUBST(ZLIB_INSTALL)
|
2012-10-23 00:45:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl archive
|
2012-09-11 14:22:18 +01:00
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
if test "$yap_cv_odbc" = yes; then
|
|
|
|
ODBC_TARGETS="odbc4pl.$SO"
|
|
|
|
ODBC_PLTARGETS=odbc.pl
|
|
|
|
AC_CHECK_HEADERS(sql.h)
|
|
|
|
AC_CHECK_FUNCS(localtime mktime gmtime timegm)
|
|
|
|
AC_CHECK_TYPES([SQLLEN, SQLULEN],,,
|
|
|
|
[#include <sql.h>
|
|
|
|
])
|
|
|
|
else
|
|
|
|
ODBC_TARGETS=nolib
|
|
|
|
ODBC_PLTARGETS=odbc.pl
|
2012-09-11 14:22:18 +01:00
|
|
|
fi
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
if test "$ENABLE_LIBARCHIVE" = ""
|
|
|
|
then
|
|
|
|
OLD_LIBS=$LIBS
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(archive.h,
|
|
|
|
[ AC_DEFINE([HAVE_ARCHIVE_H], 1,
|
|
|
|
[Define to 1 if you have <archive.h>.])
|
|
|
|
ARCHIVEH=yes
|
|
|
|
],
|
|
|
|
ARCHIVEH=no)
|
|
|
|
|
|
|
|
if test "$ARCHIVEH" = yes; then
|
|
|
|
AC_CHECK_LIB(archive, archive_read_new,
|
|
|
|
ARCHIVE_LIBS="-larchive"
|
|
|
|
ARCHIVELIB=yes,
|
|
|
|
ARCHIVELIB=no)
|
|
|
|
fi
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
LIBS="$LIBS -larchive"
|
2012-09-11 14:22:18 +01:00
|
|
|
AC_CHECK_FUNCS(archive_read_support_compression_bzip2 \
|
|
|
|
archive_read_support_compression_compress \
|
|
|
|
archive_read_support_compression_gzip \
|
|
|
|
archive_read_support_compression_lzma \
|
|
|
|
archive_read_support_compression_none \
|
|
|
|
archive_read_support_compression_xz)
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(archive_read_support_format_ar \
|
|
|
|
archive_read_support_format_cpio \
|
|
|
|
archive_read_support_format_empty \
|
|
|
|
archive_read_support_format_iso9660 \
|
|
|
|
archive_read_support_format_mtree \
|
|
|
|
archive_read_support_format_raw \
|
|
|
|
archive_read_support_format_tar \
|
|
|
|
archive_read_support_format_zip)
|
|
|
|
|
|
|
|
if test "$ARCHIVELIB" = yes; then
|
|
|
|
ARCHIVE_TARGETS="archive4pl.$SO"
|
|
|
|
ARCHIVE_PLTARGETS=archive.pl
|
|
|
|
else
|
|
|
|
ARCHIVE_TARGETS=nolib
|
|
|
|
cat << EOF
|
|
|
|
##################################################################
|
|
|
|
# ERROR: Could not find library archive (-larchive). Dropped
|
|
|
|
# library(archive). Library archive is available from
|
|
|
|
# http://code.google.com/p/libarchive/
|
|
|
|
#
|
|
|
|
# Most Unix/Linux distributions are shipped with binaries. Make
|
|
|
|
# sure to have the development library installed. E.g.
|
|
|
|
#
|
|
|
|
# Debian/Ubuntu/Mint: aptitude install libarchive-dev
|
|
|
|
# Fedora/... yum install libarchive-devel
|
|
|
|
# MacOS (Macports): port install libarchive
|
|
|
|
##################################################################
|
|
|
|
EOF
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ARCHIVE_LIBS)
|
|
|
|
AC_SUBST(ARCHIVE_TARGETS)
|
|
|
|
AC_SUBST(ARCHIVE_PLTARGETS)
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
LIBS="$OLD_LIBS"
|
2012-09-11 14:22:18 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ENABLE_LIBARCHIVE)
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
AC_SUBST(ODBC_CFLAGS)
|
|
|
|
AC_SUBST(ODBC_LDFLAGS)
|
|
|
|
AC_SUBST(ODBC_LIBS)
|
|
|
|
AC_SUBST(ODBC_TARGETS)
|
|
|
|
AC_SUBST(ODBC_PLTARGETS)
|
|
|
|
|
|
|
|
AC_SUBST(ENABLE_ODBC)
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p library/lammpi
|
|
|
|
mkdir -p library/matrix
|
|
|
|
mkdir -p library/matlab
|
|
|
|
mkdir -p library/mpi
|
|
|
|
mkdir -p library/random
|
|
|
|
mkdir -p library/regex
|
|
|
|
mkdir -p library/system
|
|
|
|
mkdir -p library/tries
|
|
|
|
mkdir -p library/rltree
|
|
|
|
mkdir -p LGPL/clp
|
|
|
|
mkdir -p LGPL/swi_console
|
|
|
|
mkdir -p GPL
|
|
|
|
mkdir -p packages/
|
2012-03-22 21:37:20 +00:00
|
|
|
mkdir -p packages/bdd
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/clib
|
|
|
|
mkdir -p packages/clib/sha1
|
|
|
|
mkdir -p packages/clib/maildrop
|
|
|
|
mkdir -p packages/clib/maildrop/rfc822
|
|
|
|
mkdir -p packages/clib/maildrop/rfc2045
|
|
|
|
mkdir -p packages/CLPBN
|
2011-07-22 21:35:18 +01:00
|
|
|
mkdir -p packages/CLPBN/clpbn
|
2012-05-23 14:45:02 +01:00
|
|
|
mkdir -p packages/CLPBN/horus
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/clpqr
|
|
|
|
mkdir -p packages/cplint
|
|
|
|
mkdir -p packages/cplint/approx
|
|
|
|
mkdir -p packages/cplint/approx/simplecuddLPADs
|
|
|
|
mkdir -p packages/http
|
|
|
|
mkdir -p packages/jpl
|
2012-02-12 12:28:37 +00:00
|
|
|
mkdir -p packages/jpl/src
|
|
|
|
mkdir -p packages/jpl/src/c
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/jpl/src/java
|
|
|
|
mkdir -p packages/jpl/src/java/jpl
|
|
|
|
mkdir -p packages/jpl/src/java/jpl/fli
|
|
|
|
mkdir -p packages/jpl/src/java/jpl/test
|
|
|
|
mkdir -p packages/jpl/examples
|
|
|
|
mkdir -p packages/jpl/examples/java
|
2010-11-01 22:20:58 +00:00
|
|
|
mkdir -p packages/meld
|
2011-03-09 13:05:03 +00:00
|
|
|
mkdir -p packages/PLStream
|
|
|
|
mkdir -p packages/PLStream/libtai
|
2011-06-12 22:26:04 +01:00
|
|
|
mkdir -p packages/pldoc
|
2012-07-07 15:43:07 +01:00
|
|
|
mkdir -p packages/pldoc/server
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/plunit
|
2011-11-10 12:26:23 +00:00
|
|
|
mkdir -p packages/prism
|
|
|
|
mkdir -p packages/prism/src
|
|
|
|
mkdir -p packages/prism/src/c
|
|
|
|
mkdir -p packages/prism/src/c/core
|
|
|
|
mkdir -p packages/prism/src/c/mp
|
|
|
|
mkdir -p packages/prism/src/c/up
|
|
|
|
mkdir -p packages/prism/src/prolog
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/ProbLog
|
|
|
|
mkdir -p packages/ProbLog/simplecudd
|
2011-07-13 15:31:22 +01:00
|
|
|
mkdir -p packages/ProbLog/simplecudd_lfi
|
2011-03-19 15:29:06 +00:00
|
|
|
mkdir -p packages/R
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/RDF
|
2012-01-31 15:11:39 +00:00
|
|
|
mkdir -p packages/real
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/semweb
|
|
|
|
mkdir -p packages/sgml
|
2012-02-14 12:41:12 +00:00
|
|
|
mkdir -p packages/xml
|
2010-09-27 21:59:13 +01:00
|
|
|
mkdir -p packages/zlib
|
2012-09-11 14:22:18 +01:00
|
|
|
mkdir -p packages/archive
|
2010-09-27 21:59:13 +01:00
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_FILES([GPL/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/lammpi/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/matlab/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/matrix/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/mpi/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/random/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/regex/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/rltree/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/system/Makefile])
|
|
|
|
AC_CONFIG_FILES([library/tries/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/clp/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/swi_console/Makefile])
|
2011-02-10 21:33:56 +00:00
|
|
|
AC_CONFIG_FILES([packages/Makefile.defs])
|
|
|
|
AC_CONFIG_FILES([packages/Dialect.defs])
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CONFIG_FILES([packages/CLPBN/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/cplint/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/cplint/approx/simplecuddLPADs/Makefile])
|
2011-10-22 15:33:04 +01:00
|
|
|
AC_CONFIG_FILES([packages/cplint/slipcase/Makefile])
|
2010-11-01 22:20:58 +00:00
|
|
|
AC_CONFIG_FILES([packages/meld/Makefile])
|
2012-02-14 12:41:12 +00:00
|
|
|
AC_CONFIG_FILES([packages/xml/Makefile])
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CONFIG_FILES([packages/ProbLog/Makefile ])
|
|
|
|
|
|
|
|
if test "$ENABLE_CHR" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/chr/Makefile])
|
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$ENABLE_CLIB" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/clib/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/clib/maildrop/rfc822/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/clib/maildrop/rfc2045/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/clib/maildrop/rfc2045/rfc2045charset.h])
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$ENABLE_CLPQR" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/clpqr/Makefile])
|
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$ENABLE_HTTP" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/http/Makefile])
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
if test "$ENABLE_JPL" = ""; then
|
2012-10-22 21:38:04 +01:00
|
|
|
AC_CONFIG_FILES([packages/jpl/Makefile packages/jpl/jpl_paths.yap packages/jpl/src/java/Makefile ])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_PYTHON" = ""; then
|
2012-11-02 22:37:27 +00:00
|
|
|
AC_CONFIG_FILES([ packages/python/Makefile ])
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$ENABLE_PLDOC" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/pldoc/Makefile])
|
2012-07-07 15:43:07 +01:00
|
|
|
AC_CONFIG_FILES([packages/pldoc/server/man_server.pl])
|
2011-07-13 15:31:22 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_PLUNIT" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/plunit/Makefile])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_R" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/R/Makefile])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_RDF" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/RDF/Makefile])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_SEMWEB" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/semweb/Makefile])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_SGML" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/sgml/Makefile])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_ZLIB" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/zlib/Makefile])
|
2012-05-23 14:45:02 +01:00
|
|
|
fi
|
|
|
|
|
2012-09-11 14:22:18 +01:00
|
|
|
if test "$ENABLE_LIBARCHIVE" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/archive/Makefile])
|
|
|
|
fi
|
|
|
|
|
2012-10-23 00:45:13 +01:00
|
|
|
if test "$ENABLE_ODBC" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/odbc/Makefile])
|
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
|
|
|
|
if test "$ENABLE_CUDD" = ""; then
|
2012-03-22 21:37:20 +00:00
|
|
|
AC_CONFIG_FILES([packages/bdd/Makefile])
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile])
|
2011-07-13 15:31:22 +01:00
|
|
|
AC_CONFIG_FILES([packages/ProbLog/simplecudd_lfi/Makefile])
|
2010-09-27 21:59:13 +01:00
|
|
|
fi
|
|
|
|
|
2011-07-13 15:31:22 +01:00
|
|
|
if test "$ENABLE_MINISAT" = ""; then
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_CONFIG_FILES([packages/swi-minisat2/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/swi-minisat2/C/Makefile])
|
|
|
|
fi
|
|
|
|
|
2012-01-31 15:11:39 +00:00
|
|
|
if test "$ENABLE_REAL" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/real/Makefile])
|
2011-07-13 15:31:22 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_CLPBN_BP" = ""; then
|
2012-05-23 14:45:02 +01:00
|
|
|
AC_CONFIG_FILES([packages/CLPBN/horus/Makefile])
|
2011-07-13 15:31:22 +01:00
|
|
|
fi
|
|
|
|
|
2011-08-08 14:21:36 +01:00
|
|
|
if test "$ENABLE_GECODE" = ""; then
|
|
|
|
AC_CONFIG_FILES([library/gecode/Makefile])
|
|
|
|
fi
|
|
|
|
|
2011-11-10 12:26:23 +00:00
|
|
|
if test "$ENABLE_PRISM" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/prism/src/c/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/prism/src/prolog/Makefile])
|
|
|
|
fi
|
|
|
|
|
2010-09-27 21:59:13 +01:00
|
|
|
AC_OUTPUT()
|
|
|
|
|