2006-03-20 19:51:44 +00:00
|
|
|
dnl
|
2001-04-09 20:54:03 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
2002-01-15 17:55:50 +00:00
|
|
|
|
2009-03-23 12:23:00 +00:00
|
|
|
AC_PREREQ([2.50])
|
2002-01-15 17:55:50 +00:00
|
|
|
|
2010-06-04 22:59:31 +01:00
|
|
|
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
|
2010-06-14 10:36:13 +01:00
|
|
|
dnl SO= suffix for loadable binary (.so,.dll,.o)
|
2010-06-04 22:59:31 +01:00
|
|
|
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
|
2010-06-21 11:54:21 +01:00
|
|
|
dnl YAPLIB_LD= construct libYap.DLL
|
2010-06-04 22:59:31 +01:00
|
|
|
dnl SHLIB_LD= dll ld (C)
|
|
|
|
dnl SHLIB_CXX_LD= dll ld (C++)
|
2010-06-21 11:54:21 +01:00
|
|
|
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
|
2010-06-04 22:59:31 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_INIT(console/yap.c)
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl store the environment's compilation flags
|
|
|
|
mycflags="$CFLAGS"
|
|
|
|
|
|
|
|
AC_PROG_CC
|
2009-11-18 09:53:38 +00:00
|
|
|
AC_PROG_CXX
|
2009-10-23 09:09:16 +01:00
|
|
|
AC_PROG_AWK
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_SUBST(GCC)
|
|
|
|
AC_SUBST(C_INTERF_FLAGS)
|
2001-08-11 00:07:00 +01:00
|
|
|
AC_SUBST(C_PARSER_FLAGS)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2005-06-06 06:02:08 +01:00
|
|
|
AC_ARG_ENABLE(tabling,
|
|
|
|
[ --enable-tabling support tabling ],
|
|
|
|
tabling="$enableval", tabling=no)
|
|
|
|
AC_ARG_ENABLE(or-parallelism,
|
|
|
|
[ --enable-or-parallelism support or-parallelism as: env-copy,sba,a-cow ],
|
|
|
|
orparallelism="$enableval", orparallelism=no)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(rational-trees,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-rational-trees support infinite rational trees ],
|
2005-10-30 01:32:55 +01:00
|
|
|
rationaltrees="$enableval" , rationaltrees=yes)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(coroutining,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-coroutining support co-routining, attributed variables and constraints],
|
2005-05-26 18:26:55 +01:00
|
|
|
rationaltrees="$enableval";coroutining="$enableval", coroutining=yes)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(depth-limit,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-depth-limit support depth-bound computation ],
|
2005-05-26 18:26:55 +01:00
|
|
|
depthlimit="$enableval", depthlimit=yes)
|
2005-06-06 06:02:08 +01:00
|
|
|
AC_ARG_ENABLE(wam-profile,
|
|
|
|
[ --enable-wam-profile support low level profiling of abstract machine ],
|
|
|
|
wamprofile="$enableval", wamprofile=no)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(low-level-tracer,
|
|
|
|
[ --enable-low-level-tracer support support for procedure-call tracing ],
|
|
|
|
lowleveltracer="$enableval", lowleveltracer=no)
|
2002-10-21 23:14:29 +01:00
|
|
|
AC_ARG_ENABLE(threads,
|
|
|
|
[ --enable-threads support system threads ],
|
|
|
|
threads="$enableval", threads=no)
|
2004-02-12 17:09:17 +00:00
|
|
|
AC_ARG_ENABLE(pthread-locking,
|
2007-11-26 23:43:10 +00:00
|
|
|
[ --enable-pthread-locking use pthread locking primitives for internal locking (requires threads) ],
|
2004-02-12 17:09:17 +00:00
|
|
|
pthreadlocking="$enableval", pthreadlocking=no)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(max-performance,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-max-performance try using the best flags for specific architecture ],
|
2001-04-09 20:54:03 +01:00
|
|
|
maxperformance="$enableval", maxperformance=no)
|
2004-10-06 20:40:22 +01:00
|
|
|
AC_ARG_ENABLE(max-memory,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-max-memory try using the best flags for using the memory to the most ],
|
2005-10-29 12:22:43 +01:00
|
|
|
maxmemory="$enableval", maxmemory=yes)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_ENABLE(debug-yap,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-debug-yap enable C-debugging for YAP ],
|
2001-04-09 20:54:03 +01:00
|
|
|
debugyap="$enableval", debugyap=no)
|
2005-09-08 22:59:58 +01:00
|
|
|
AC_ARG_ENABLE(eam,
|
|
|
|
[ --enable-eam enable EAM on YAP ],
|
|
|
|
eam="$enableval", eam=no)
|
2002-03-07 05:13:21 +00:00
|
|
|
AC_ARG_ENABLE(cygwin,
|
|
|
|
[ --enable-cygwin use cygwin library in WIN32 ],
|
|
|
|
cygwin="$enableval", cygwin=no)
|
2002-05-14 19:21:33 +01:00
|
|
|
AC_ARG_ENABLE(dynamic_loading,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-dynamic-loading compile Yap as a DLL ],
|
2002-05-14 19:21:33 +01:00
|
|
|
dynamic_loading="$enableval", dynamic_loading=no)
|
2005-04-10 05:01:15 +01:00
|
|
|
AC_ARG_ENABLE(use-malloc,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-use-malloc use malloc to allocate memory ],
|
2002-05-19 20:04:33 +01:00
|
|
|
use_malloc="$enableval", use_malloc=no)
|
2002-08-19 00:18:18 +01:00
|
|
|
AC_ARG_ENABLE(condor,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-condor allow Yap to be used from condor ],
|
2002-08-19 00:18:18 +01:00
|
|
|
use_condor="$enableval", use_condor=no)
|
2008-09-05 05:22:19 +01:00
|
|
|
AC_ARG_ENABLE(chr,
|
|
|
|
[ --enable-chr install chr library ],
|
|
|
|
use_chr="$enableval", use_chr=yes)
|
2009-03-23 12:23:00 +00:00
|
|
|
AC_ARG_ENABLE(clpqr,
|
|
|
|
[ --enable-clpqr install clpqr library ],
|
|
|
|
use_clpqr="$enableval", use_clpqr=yes)
|
2010-05-06 15:00:44 +01:00
|
|
|
AC_ARG_ENABLE(win64,
|
|
|
|
[ --enable-win64 compile YAP for win64 ],
|
|
|
|
target_win64="$enableval", target_win64=no)
|
2010-01-06 13:24:55 +00:00
|
|
|
|
2002-09-25 05:29:01 +01:00
|
|
|
AC_ARG_ENABLE(april,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-april compile Yap to support April ILP system],
|
2002-09-25 05:29:01 +01:00
|
|
|
use_april="$enableval", use_april=no)
|
2002-10-20 19:43:11 +01:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(dlcompat,
|
2005-09-08 22:59:58 +01:00
|
|
|
[ --enable-dlcompat use dlcompat library for dynamic loading on Mac OS X],
|
2002-10-20 19:43:11 +01:00
|
|
|
use_dlcompat="$enableval", use_dlcompat=no)
|
2007-11-07 13:02:37 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(cplint,
|
2007-11-08 13:26:13 +00:00
|
|
|
[ --enable-cplint[=DIR] enable the cplint library using the glu library in DIR/lib],
|
2007-11-07 13:02:37 +00:00
|
|
|
yap_cv_cplint=$enableval, yap_cv_cplint=no)
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_ARG_WITH(gmp,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --with-gmp[=DIR] use GNU Multiple Precision in DIR],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2001-04-09 20:54:03 +01:00
|
|
|
yap_cv_gmp=yes
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2001-04-09 20:54:03 +01:00
|
|
|
yap_cv_gmp=no
|
|
|
|
else
|
|
|
|
yap_cv_gmp=$with_gmp
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_gmp}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_gmp}/include"
|
2010-07-19 14:54:51 +01:00
|
|
|
CFLAGS="$CFLAGS -I${yap_cv_gmp}/include"
|
2001-11-26 19:55:44 +00:00
|
|
|
fi,
|
2001-04-09 20:54:03 +01:00
|
|
|
[yap_cv_gmp=yes])
|
|
|
|
|
2010-01-06 13:24:55 +00:00
|
|
|
dnl best test we could do.
|
|
|
|
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])
|
|
|
|
|
2009-03-09 00:43:18 +00:00
|
|
|
AC_ARG_WITH(cudd,
|
|
|
|
[ --with-cudd[=DIR] use CUDD package in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_cudd=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_cudd=no
|
|
|
|
else
|
|
|
|
yap_cv_cudd=$with_cudd
|
|
|
|
CUDD_LDFLAGS="$yap_cv_cudd/cudd/libcudd.a $yap_cv_cudd/mtr/libmtr.a $yap_cv_cudd/st/libst.a $yap_cv_cudd/util/libutil.a $yap_cv_cudd/epd/libepd.a "
|
|
|
|
CUDD_CPPFLAGS="-I $yap_cv_cudd/include"
|
|
|
|
fi,
|
2009-03-10 14:19:10 +00:00
|
|
|
[yap_cv_cudd=no])
|
2009-03-09 00:43:18 +00:00
|
|
|
|
2006-03-07 17:27:51 +00:00
|
|
|
AC_ARG_ENABLE(myddas,
|
2007-06-04 01:56:47 +01:00
|
|
|
[ --enable-myddas[[=DIR]] enable the MYDDAS library],
|
2006-03-07 17:27:51 +00:00
|
|
|
if test "$enableval" = yes; then
|
2007-06-04 01:56:47 +01:00
|
|
|
yap_cv_myddas=/usr/
|
2006-03-07 17:27:51 +00:00
|
|
|
elif test "$enableval" = no; then
|
2006-03-06 13:25:11 +00:00
|
|
|
yap_cv_myddas=no
|
|
|
|
else
|
2006-03-07 17:27:51 +00:00
|
|
|
yap_cv_myddas=$enable_myddas
|
2007-06-04 01:56:47 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_myddas}/lib "
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include "
|
2006-03-06 13:25:11 +00:00
|
|
|
fi,
|
2006-03-07 11:06:40 +00:00
|
|
|
[yap_cv_myddas=no])
|
2006-03-06 13:25:11 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(myddas-stats,
|
2007-06-04 01:56:47 +01:00
|
|
|
[ --enable-myddas-stats enable the MYDDAS library statistics support],
|
2006-05-04 19:16:08 +01:00
|
|
|
if test "$yap_cv_myddas" = no; then
|
|
|
|
myddasstats=no
|
|
|
|
else
|
|
|
|
myddasstats="$enableval"
|
|
|
|
fi, myddasstats=no)
|
2006-03-06 13:25:11 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(myddas-top-level,
|
2007-06-04 01:56:47 +01:00
|
|
|
[ --enable-myddas-top-level enable the MYDDAS top-level support to MySQL],
|
2006-05-04 19:16:08 +01:00
|
|
|
if test "$yap_cv_myddas" = no; then
|
|
|
|
myddastoplevel=no
|
|
|
|
else
|
|
|
|
myddastoplevel="$enableval"
|
|
|
|
fi, myddastoplevel=no)
|
2006-03-06 13:25:11 +00:00
|
|
|
|
2010-06-01 00:38:42 +01:00
|
|
|
AC_ARG_WITH(java,
|
|
|
|
[ --with-java=JAVA_HOME use Java instalation in JAVA_HOME],
|
2004-07-23 04:37:17 +01:00
|
|
|
if test "$withval" = yes; then
|
2010-06-01 00:38:42 +01:00
|
|
|
yap_cv_java="$JAVA_HOME"
|
2004-07-23 04:37:17 +01:00
|
|
|
dynamic_loading=yes
|
2005-04-10 05:01:15 +01:00
|
|
|
maxmemory=yes
|
|
|
|
dnl threads=yes
|
2004-07-23 04:37:17 +01:00
|
|
|
elif test "$withval" = no; then
|
2010-06-01 00:38:42 +01:00
|
|
|
yap_cv_java=no
|
2004-07-23 04:37:17 +01:00
|
|
|
else
|
2010-06-01 00:38:42 +01:00
|
|
|
yap_cv_java=$with_java
|
2004-07-23 04:37:17 +01:00
|
|
|
dynamic_loading=yes
|
2005-04-10 05:01:15 +01:00
|
|
|
maxmemory=yes
|
|
|
|
dnl threads=yes
|
2004-07-23 04:37:17 +01:00
|
|
|
fi,
|
2010-06-01 00:38:42 +01:00
|
|
|
[yap_cv_java=no])
|
2004-07-23 04:37:17 +01:00
|
|
|
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_ARG_WITH(readline,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --with-readline[=DIR] use GNU Readline Library in DIR],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2001-06-22 18:53:36 +01:00
|
|
|
yap_cv_readline=yes
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2001-06-22 18:53:36 +01:00
|
|
|
yap_cv_readline=no
|
|
|
|
else
|
|
|
|
yap_cv_readline=$with_readline
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_readline}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_readline}/include"
|
2001-11-26 19:52:44 +00:00
|
|
|
fi,
|
2001-06-22 18:53:36 +01:00
|
|
|
[yap_cv_readline=yes])
|
|
|
|
|
2007-05-24 16:11:46 +01:00
|
|
|
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])
|
|
|
|
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_ARG_WITH(mpi,
|
|
|
|
[ --with-mpi[=DIR] use MPI library in DIR],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2002-02-22 14:31:45 +00:00
|
|
|
yap_cv_mpi=yes
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2002-02-22 14:31:45 +00:00
|
|
|
yap_cv_mpi=no
|
2002-02-11 20:46:41 +00:00
|
|
|
else
|
2002-02-22 14:31:45 +00:00
|
|
|
yap_cv_mpi=$with_mpi
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_mpi}/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_mpi}/include"
|
2002-02-11 20:46:41 +00:00
|
|
|
fi,
|
2002-03-12 04:08:52 +00:00
|
|
|
[yap_cv_mpi=no])
|
2002-02-22 14:31:45 +00:00
|
|
|
|
2006-06-04 19:43:38 +01:00
|
|
|
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_ARG_WITH(mpe,
|
|
|
|
[ --with-mpe[=DIR] use MPE library in DIR],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2002-02-22 14:31:45 +00:00
|
|
|
yap_cv_mpe=yes
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2002-02-22 14:31:45 +00:00
|
|
|
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,
|
2002-03-12 04:08:52 +00:00
|
|
|
[yap_cv_mpe=no])
|
2002-02-11 20:46:41 +00:00
|
|
|
|
2006-06-04 19:43:38 +01:00
|
|
|
AC_ARG_WITH(lam,
|
|
|
|
[ --with-lam[=DIR] use LAM MPI library in DIR],
|
|
|
|
if test "$withval" = yes; then
|
|
|
|
yap_cv_lam=yes
|
|
|
|
elif test "$withval" = no; then
|
|
|
|
yap_cv_lam=no
|
|
|
|
else
|
|
|
|
yap_cv_lam=$with_lam
|
|
|
|
LDFLAGS="$LDFLAGS -L${yap_cv_lam}/lib/lam"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I${yap_cv_lam}/include"
|
|
|
|
fi,
|
|
|
|
[yap_cv_lam=no])
|
|
|
|
|
2002-01-15 17:55:50 +00:00
|
|
|
AC_ARG_WITH(heap-space,
|
|
|
|
[ --with-heap-space[=space] default heap size in Kbytes],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2002-01-15 17:55:50 +00:00
|
|
|
yap_cv_heap_space=0
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2002-01-15 17:55:50 +00:00
|
|
|
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],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2002-01-15 17:55:50 +00:00
|
|
|
yap_cv_stack_space=0
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2002-01-15 17:55:50 +00:00
|
|
|
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],
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$withval" = yes; then
|
2002-01-15 17:55:50 +00:00
|
|
|
yap_cv_trail_space=0
|
2002-08-19 00:18:18 +01:00
|
|
|
elif test "$withval" = no; then
|
2002-01-15 17:55:50 +00:00
|
|
|
yap_cv_trail_space=0
|
|
|
|
else
|
|
|
|
yap_cv_trail_space=$withval
|
|
|
|
fi,
|
|
|
|
[yap_cv_trail_space=0])
|
|
|
|
|
2007-01-29 10:18:15 +00:00
|
|
|
AC_ARG_WITH(max-workers,
|
2008-04-02 16:41:50 +01:00
|
|
|
[ --with-max-workers[=integer] maximum number of or-parallel processes],
|
2007-01-29 10:18:15 +00:00
|
|
|
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)"])
|
|
|
|
|
2008-04-02 16:41:50 +01:00
|
|
|
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"])
|
|
|
|
|
2009-03-23 12:23:00 +00:00
|
|
|
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])
|
|
|
|
|
2010-06-18 13:08:34 +01:00
|
|
|
AC_DEFINE(MinHeapSpace, (1000*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinStackSpace,(300*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinTrailSpace,( 48*SIZEOF_INT_P))
|
2002-01-15 17:55:50 +00:00
|
|
|
|
2009-11-11 10:55:36 +00:00
|
|
|
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)
|
2002-01-15 17:55:50 +00:00
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
2007-01-24 17:28:28 +00:00
|
|
|
AC_DEFINE_UNQUOTED(HOST_ALIAS,"${target}")
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2008-04-02 16:41:50 +01:00
|
|
|
if test "$or-parallelism" = no
|
2007-01-29 10:18:15 +00:00
|
|
|
then
|
|
|
|
AC_DEFINE(MAX_WORKERS,1)
|
|
|
|
else
|
2009-11-11 12:34:58 +00:00
|
|
|
AC_DEFINE_UNQUOTED(MAX_WORKERS,$yap_cv_max_workers)
|
2007-01-29 10:18:15 +00:00
|
|
|
fi
|
|
|
|
|
2008-04-02 16:41:50 +01:00
|
|
|
if test "$threads" = no
|
|
|
|
then
|
|
|
|
AC_DEFINE(MAX_THREADS,1)
|
|
|
|
else
|
2009-11-11 10:55:36 +00:00
|
|
|
AC_DEFINE_UNQUOTED(MAX_THREADS,$yap_cv_max_threads)
|
2008-04-02 16:41:50 +01:00
|
|
|
fi
|
|
|
|
|
2007-01-29 10:18:15 +00:00
|
|
|
|
2007-05-24 16:11:46 +01:00
|
|
|
dnl condor does not like dynamic linking on Linux, DEC, and HP-UX platforms.
|
|
|
|
if test "$yap_cv_matlab" = no
|
|
|
|
then
|
2009-03-24 01:03:50 +00:00
|
|
|
INSTALL_MATLAB="@# "
|
2007-05-24 16:11:46 +01:00
|
|
|
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
|
|
|
|
|
2009-03-09 00:43:18 +00:00
|
|
|
if test "$yap_cv_cudd" = no
|
|
|
|
then
|
2009-03-24 01:03:50 +00:00
|
|
|
USE_CUDD="@# "
|
2009-03-09 00:43:18 +00:00
|
|
|
else
|
|
|
|
USE_CUDD=""
|
|
|
|
fi
|
|
|
|
|
2010-01-06 13:24:55 +00:00
|
|
|
if test "$yap_cv_minisat" = no
|
|
|
|
then
|
|
|
|
USE_MINISAT="@# "
|
|
|
|
elif test "$INSTALL_DLLS" = "#"
|
|
|
|
then
|
|
|
|
USE_MINISAT="@# "
|
|
|
|
else
|
|
|
|
USE_MINISAT=""
|
|
|
|
fi
|
|
|
|
|
2002-08-19 00:18:18 +01:00
|
|
|
dnl condor does not like dynamic linking on Linux, DEC, and HP-UX platforms.
|
|
|
|
if test "$use_condor" = yes
|
|
|
|
then
|
|
|
|
use_malloc="yes"
|
|
|
|
CC="condor_compile $CC"
|
2002-10-10 06:58:49 +01:00
|
|
|
dnl no readline with condor.
|
|
|
|
yap_cv_readline="no"
|
2004-01-23 02:23:51 +00:00
|
|
|
AC_DEFINE(SUPPORT_CONDOR, 1)
|
2007-03-14 13:01:29 +00:00
|
|
|
STATIC_MODE=""
|
|
|
|
else
|
|
|
|
STATIC_MODE="# "
|
2002-08-19 00:18:18 +01:00
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
dnl Compilation Flags
|
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
if test -z "${mycflags}"
|
|
|
|
then
|
2005-09-08 22:59:58 +01:00
|
|
|
if test "$debugyap" = "yes"
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
2010-07-19 14:54:51 +01:00
|
|
|
CFLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-O -g -Wall"
|
2010-07-19 14:54:51 +01:00
|
|
|
C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
else
|
2010-07-19 14:54:51 +01:00
|
|
|
CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
CXXFLAGS="-O3 -fomit-frame-pointer -Wall $CFLAGS"
|
2005-08-23 19:09:57 +01:00
|
|
|
case "`$CC --version < /dev/null`" in
|
|
|
|
*3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;;
|
|
|
|
esac
|
2010-07-19 14:54:51 +01:00
|
|
|
C_INTERF_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
|
|
|
C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
CFLAGS="-DBP_FREE $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-DBP_FREE $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
case "$target_os" in
|
2007-01-24 17:28:28 +00:00
|
|
|
*solaris[2-9]*) dnl
|
2001-04-09 20:54:03 +01:00
|
|
|
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFPPLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
2003-07-21 20:13:30 +01:00
|
|
|
if test "$tcpu"; then
|
|
|
|
target_cpu=$tcpu
|
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
if test "$maxperformance" = "yes"
|
|
|
|
then
|
|
|
|
case "$target_cpu" in
|
2003-07-21 20:13:30 +01:00
|
|
|
athlon)
|
|
|
|
CFLAGS="-march=athlon $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-march=athlon $CXXFLAGS"
|
2003-07-21 20:13:30 +01:00
|
|
|
;;
|
2001-04-09 20:54:03 +01:00
|
|
|
i686*)
|
2003-07-21 20:13:30 +01:00
|
|
|
CFLAGS="-march=i686 $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-march=i686 $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
i586*)
|
2003-07-21 20:13:30 +01:00
|
|
|
CFLAGS="-march=i586 $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-march=i586 $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
i486*)
|
|
|
|
CFLAGS="-march=i486 $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-march=i486 $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
i386*)
|
|
|
|
CFLAGS="-march=i386 $CFLAGS"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-march=i386 $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2001-07-05 17:14:15 +01:00
|
|
|
if test "$CC" = "sslittle-na-sstrix-gcc"
|
|
|
|
then
|
|
|
|
RANLIB="sslittle-na-sstrix-ranlib"
|
|
|
|
AR="sslittle-na-sstrix-ar"
|
2010-06-04 22:59:31 +01:00
|
|
|
PRE_INSTALL_ENV="sim-fast"
|
|
|
|
INSTALL_ENV="sim-fast"
|
2001-07-05 17:14:15 +01:00
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
else
|
|
|
|
if test -z "${mycflags}"
|
|
|
|
then
|
|
|
|
case "$target_cpu" in
|
|
|
|
i?86*)
|
|
|
|
if test "$CC" = "lcc"
|
2002-12-10 19:09:50 +00:00
|
|
|
then
|
|
|
|
CFLAGS="-A -A"
|
|
|
|
elif test "$CC" = "cl"
|
|
|
|
then
|
|
|
|
CFLAGS="/nologo"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-/nologo"
|
2002-12-10 19:09:50 +00:00
|
|
|
CPP="/nologo /E"
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
hppa*)
|
|
|
|
if test "$CC" = "cc" -o $CC = c89
|
|
|
|
then
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
2001-09-03 18:30:53 +01:00
|
|
|
CFLAGS="-Ae -g -O"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-Ae -g -O"
|
2001-04-09 20:54:03 +01:00
|
|
|
else
|
2001-09-03 18:30:53 +01:00
|
|
|
CFLAGS="-Ae +O3 +Onolimit"
|
2009-11-18 09:53:38 +00:00
|
|
|
CXXFLAGS="-Ae +O3 +Onolimit"
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
|
|
|
fi
|
2002-02-11 20:46:41 +00:00
|
|
|
dnl LDFLAGS="+e UserCPredicate $LDFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
esac
|
2001-09-03 18:30:53 +01:00
|
|
|
fi
|
|
|
|
C_INTERF_FLAGS="$CFLAGS"
|
|
|
|
C_PARSER_FLAGS="$CFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
|
|
|
|
2001-07-05 17:14:15 +01:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_RANLIB
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_CHECK_TOOL(INDENT,indent,:)
|
|
|
|
AC_CHECK_TOOL(AR,ar,:)
|
|
|
|
AC_CHECK_TOOL(MPI_CC,mpicc,:)
|
2001-07-05 17:14:15 +01:00
|
|
|
AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_PATH_PROG(SHELL,sh)
|
2001-07-05 17:14:15 +01:00
|
|
|
|
2001-04-09 20:54:03 +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
|
2010-02-10 09:01:30 +00:00
|
|
|
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
2002-11-20 05:29:43 +00:00
|
|
|
INSTALL_COMMAND=install_win32
|
2010-02-10 09:01:30 +00:00
|
|
|
if test "$cygwin" = "no" -o "$target_os" = "mingw32"
|
2002-03-17 06:11:29 +00:00
|
|
|
then
|
2010-05-06 15:00:44 +01:00
|
|
|
if test "$target_win64" = yes
|
2010-02-10 09:01:30 +00:00
|
|
|
then
|
2010-05-06 15:00:44 +01:00
|
|
|
AC_CHECK_LIB(ws2_32,main)
|
2010-06-05 00:51:24 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="-lws2_32 \$(abs_top_builddir)/yap.dll"
|
2010-06-04 22:59:31 +01:00
|
|
|
elif test "$target_os" = "cygwin"
|
|
|
|
then
|
|
|
|
CC="${CC} -mno-cygwin"
|
|
|
|
CXX="${CXX} -mno-cygwin"
|
|
|
|
AC_CHECK_LIB(wsock32,main)
|
2010-05-06 15:00:44 +01:00
|
|
|
else
|
|
|
|
AC_CHECK_LIB(wsock32,main)
|
2010-06-04 22:59:31 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
2010-02-10 09:01:30 +00:00
|
|
|
fi
|
2006-08-30 02:06:30 +01:00
|
|
|
AC_CHECK_LIB(psapi,main)
|
2002-11-13 15:29:44 +00:00
|
|
|
yap_cv_readline=no
|
2002-10-23 18:10:33 +01:00
|
|
|
if test "$prefix" = "NONE"
|
|
|
|
then
|
2010-05-10 10:22:42 +01:00
|
|
|
if test "$target_win64" = yes
|
|
|
|
then
|
|
|
|
prefix="\${SYSTEMDRIVE}/Yap64"
|
2010-07-20 22:54:20 +01:00
|
|
|
CLIB_NETLIBS="-lwsock32 -lpsapi -lgdi32"
|
2010-05-10 10:22:42 +01:00
|
|
|
else
|
|
|
|
prefix="\${SYSTEMDRIVE}/Yap"
|
2010-07-20 22:58:09 +01:00
|
|
|
CLIB_NETLIBS="-lws2_32 -lpsapi -lgdi32"
|
2010-05-10 10:22:42 +01:00
|
|
|
fi
|
2002-10-23 18:10:33 +01:00
|
|
|
fi
|
2009-05-29 20:36:49 +01:00
|
|
|
ENABLE_WINCONSOLE=""
|
2002-03-17 06:11:29 +00:00
|
|
|
else
|
2009-05-29 20:36:49 +01:00
|
|
|
ENABLE_WINCONSOLE="#"
|
2002-11-20 05:29:43 +00:00
|
|
|
LIBS="-lcygwin"
|
2010-05-06 15:00:44 +01:00
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
else
|
2001-04-09 20:54:03 +01:00
|
|
|
INSTALL_COMMAND="install_unix"
|
2009-04-23 03:35:05 +01:00
|
|
|
ENABLE_WINCONSOLE="#"
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_CHECK_LIB(m,sin)
|
|
|
|
AC_CHECK_LIB(socket,socket)
|
2002-06-13 19:24:04 +01:00
|
|
|
dnl X/Open Networking is sometimes a separate library
|
|
|
|
AC_CHECK_LIB(xnet,getsockname)
|
2009-11-11 10:55:36 +00:00
|
|
|
AC_CHECK_LIB(stdc++,main)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_CHECK_LIB(nsl,main,
|
|
|
|
have_nsl=yes
|
|
|
|
,
|
|
|
|
have_nsl=no)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_LIB(crypt,main)
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
2002-08-19 00:18:18 +01:00
|
|
|
|
2001-06-22 18:53:36 +01:00
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(termcap,tgetent)
|
2003-07-21 20:13:30 +01:00
|
|
|
AC_CHECK_LIB(ncurses,main)
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_LIB(readline,readline)
|
|
|
|
fi
|
|
|
|
if test "$yap_cv_gmp" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(gmp,main)
|
|
|
|
fi
|
2002-02-22 14:31:45 +00:00
|
|
|
|
2009-10-20 09:11:10 +01:00
|
|
|
dnl if test "$yap_cv_cudd" != "no"
|
|
|
|
dnl then
|
|
|
|
dnl AC_CHECK_LIB(cudd,Cudd_Init)
|
|
|
|
dnl fi
|
2009-03-09 00:43:18 +00:00
|
|
|
|
2006-03-06 13:25:11 +00:00
|
|
|
if test "$yap_cv_myddas" != "no"
|
|
|
|
then
|
|
|
|
dnl check for mysql
|
|
|
|
AC_MSG_CHECKING(for main in -lmysqlclient)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_mysql,[
|
2006-03-06 13:25:11 +00:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <mysql/mysql.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
MYSQL *conn;
|
|
|
|
conn = mysql_init(NULL);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_mysql=yes,yap_cv_mysql=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_mysql)
|
|
|
|
if test "$yap_cv_mysql" = yes
|
2006-03-06 13:25:11 +00:00
|
|
|
then
|
2007-06-04 01:56:47 +01:00
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL"
|
|
|
|
LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv "
|
2006-03-06 13:25:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for odbc
|
|
|
|
AC_MSG_CHECKING(for main in -lodbc)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_odbc,[
|
2006-03-06 13:25:11 +00:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <sql.h>
|
|
|
|
#include <sqlucode.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
SQLHENV henv;
|
|
|
|
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_odbc=yes,yap_cv_odbc=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_odbc)
|
|
|
|
if test "$yap_cv_odbc" = yes
|
2006-03-06 13:25:11 +00:00
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC"
|
|
|
|
LIBS="$LIBS -lodbc "
|
|
|
|
fi
|
|
|
|
|
2009-10-16 08:08:45 +01:00
|
|
|
if test "$yap_cv_mysql" = no -a "$yap_cv_odbc" = no
|
2006-03-06 13:25:11 +00:00
|
|
|
then
|
|
|
|
echo "-------------------------------"
|
|
|
|
echo "--"
|
|
|
|
echo "--"
|
|
|
|
echo "--"
|
|
|
|
echo "-- There\'s no devel libraries for MySQL or ODBC"
|
|
|
|
echo "--"
|
|
|
|
echo "--"
|
|
|
|
echo "--"
|
|
|
|
echo "-------------------------------"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$myddasstats" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_STATS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$myddastoplevel" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_TOP_LEVEL"
|
|
|
|
fi
|
|
|
|
|
2004-01-23 02:23:51 +00:00
|
|
|
if test "$threads" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(SUPPORT_THREADS, 1)
|
|
|
|
AC_CHECK_LIB(pthread,pthread_create)
|
|
|
|
AC_CHECK_HEADERS(pthread.h)
|
|
|
|
AC_CHECK_FUNCS(pthread_mutexattr_setkind_np pthread_mutexattr_settype)
|
2004-02-12 17:09:17 +00:00
|
|
|
if test "$pthreadlocking" = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(USE_PTHREAD_LOCKING, 1)
|
|
|
|
fi
|
2004-09-07 17:29:16 +01:00
|
|
|
use_malloc=yes
|
2004-01-23 02:23:51 +00:00
|
|
|
fi
|
|
|
|
|
2009-03-23 12:23:00 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
if test "$use_chr" = no; then
|
|
|
|
ENABLE_CHR="@# "
|
2009-03-23 15:27:59 +00:00
|
|
|
elif test -e "$srcdir"/packages/chr/Makefile.in; then
|
2009-03-23 12:23:00 +00:00
|
|
|
ENABLE_CHR=""
|
2004-07-23 04:37:17 +01:00
|
|
|
else
|
2009-03-23 12:23:00 +00:00
|
|
|
ENABLE_CHR="@# "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$use_clpqr" = no; then
|
2009-03-23 15:27:59 +00:00
|
|
|
ENABLE_CLPQR="@# "
|
|
|
|
elif test -e "$srcdir"/packages/clpqr/Makefile.in; then
|
2009-03-23 12:23:00 +00:00
|
|
|
ENABLE_CLPQR=""
|
|
|
|
else
|
|
|
|
ENABLE_CLPQR="@# "
|
|
|
|
fi
|
|
|
|
|
2010-06-05 00:51:24 +01:00
|
|
|
dnl
|
|
|
|
dnl java is hard
|
|
|
|
dnl
|
2010-06-01 00:38:42 +01:00
|
|
|
if test "$yap_cv_java" = no; then
|
2009-03-23 12:23:00 +00:00
|
|
|
ENABLE_JPL="@#"
|
2009-03-23 15:27:59 +00:00
|
|
|
elif test -e "$srcdir"/packages/jpl/Makefile.in; then
|
2004-09-07 17:29:16 +01:00
|
|
|
ENABLE_JPL=""
|
2009-06-15 23:44:13 +01:00
|
|
|
JAVA=java
|
2010-06-01 00:38:42 +01:00
|
|
|
JAVA_HOME="$yap_cv_java"
|
2010-06-04 22:59:31 +01:00
|
|
|
case "$target_os" in
|
2010-02-10 09:01:30 +00:00
|
|
|
*cygwin*|*mingw*)
|
2010-07-20 14:33:33 +01:00
|
|
|
if test $threads = yes; then
|
|
|
|
JAVALIBPATH="\"$JAVA_HOME\"/lib/jvm.lib -lpthread"
|
|
|
|
else
|
|
|
|
JAVALIBPATH="\"$JAVA_HOME\"/lib/jvm.lib"
|
|
|
|
fi
|
2010-06-05 00:51:24 +01:00
|
|
|
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/win32"
|
2010-02-10 09:01:30 +00:00
|
|
|
;;
|
2009-03-23 12:23:00 +00:00
|
|
|
*darwin*)
|
2010-06-05 00:51:24 +01:00
|
|
|
LIBS="$LIBS -framework JavaVM"
|
|
|
|
JAVALIBPATH="-L/System/Library/Frameworks/JavaVM.framework/Libraries -Wl,-framework,JavaVM"
|
|
|
|
JAVAINCPATH="-I/System/Library/Frameworks/JavaVM.framework/Headers"
|
2009-03-23 12:23:00 +00:00
|
|
|
;;
|
|
|
|
*)
|
2010-06-05 00:51:24 +01:00
|
|
|
case "$target_os" in
|
|
|
|
*linux*)
|
|
|
|
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/linux"
|
|
|
|
;;
|
|
|
|
*solaris*)
|
|
|
|
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/solaris"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
JAVA_TARGET=i386
|
|
|
|
;;
|
|
|
|
x86*)
|
|
|
|
JAVA_TARGET=amd64
|
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
JAVA_TARGET=sparc
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
JAVALIBPATH="-L$JAVA_HOME/jre/lib/$JAVA_TARGET -L$JAVA_HOME/jre/lib/$JAVA_TARGET/client -L$JAVA_HOME/jre/lib/$JAVA_TARGET/server -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET -ljava -lverify -ljvm "
|
2009-03-23 12:23:00 +00:00
|
|
|
;;
|
2010-06-04 22:59:31 +01:00
|
|
|
esac
|
2010-06-01 00:38:42 +01:00
|
|
|
if test "$yap_cv_java" = ""; then
|
2009-06-15 23:44:13 +01:00
|
|
|
JAVA=java
|
2009-04-18 23:53:36 +01:00
|
|
|
JAR=jar
|
|
|
|
JAVAC=javac
|
|
|
|
JAVADOC=javadoc
|
|
|
|
else
|
2010-06-01 00:38:42 +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
|
2009-04-18 23:53:36 +01:00
|
|
|
fi
|
2009-03-23 12:23:00 +00:00
|
|
|
else
|
|
|
|
ENABLE_JPL="@#"
|
2004-07-23 04:37:17 +01:00
|
|
|
fi
|
|
|
|
|
2006-06-06 15:58:42 +01:00
|
|
|
LAM_MPI_CC=${MPI_CC}
|
2002-03-04 10:02:03 +00:00
|
|
|
MPI_OBJS=
|
2002-02-22 14:31:45 +00:00
|
|
|
if test "$yap_cv_mpi" != "no"
|
2002-02-11 20:46:41 +00:00
|
|
|
then
|
2002-02-22 14:31:45 +00:00
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${MPI_CC}
|
2002-02-26 15:33:16 +00:00
|
|
|
AC_CHECK_LIB(mpi,MPI_Init,
|
|
|
|
[AC_DEFINE(HAVE_LIBMPI, 1)],
|
|
|
|
[AC_DEFINE(HAVE_LIBMPI, 0)])
|
2002-02-22 14:31:45 +00:00
|
|
|
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
2002-02-11 20:46:41 +00:00
|
|
|
then
|
2002-02-26 18:58:35 +00:00
|
|
|
#YAPMPILIB=YapMPI.a
|
|
|
|
MPI_OBJS=mpi.o
|
2002-02-22 14:31:45 +00:00
|
|
|
else
|
2002-02-26 15:33:16 +00:00
|
|
|
AC_CHECK_LIB(mpich,MPI_Init,
|
|
|
|
[AC_DEFINE(HAVE_LIBMPICH, 1)],
|
|
|
|
[AC_DEFINE(HAVE_LIBMPICH, 0)])
|
2002-02-28 18:58:30 +00:00
|
|
|
if test "$ac_cv_lib_mpich_MPI_Init" = yes
|
2002-02-22 14:31:45 +00:00
|
|
|
then
|
2002-02-26 18:58:35 +00:00
|
|
|
#YAPMPILIB=YapMPI.a
|
|
|
|
MPI_OBJS=mpi.o
|
2002-02-22 14:31:45 +00:00
|
|
|
else
|
2002-02-26 18:58:35 +00:00
|
|
|
#YAPMPILIB=
|
2002-03-07 11:00:57 +00:00
|
|
|
MPI_CC=${CC}
|
2002-02-22 14:31:45 +00:00
|
|
|
fi
|
2002-02-11 20:46:41 +00:00
|
|
|
fi
|
2002-02-22 14:31:45 +00:00
|
|
|
CC=${OLD_CC}
|
2002-03-12 04:08:52 +00:00
|
|
|
else
|
2006-06-06 15:58:42 +01:00
|
|
|
# MPI_CC=${MPI_CC}
|
|
|
|
MPI_CC=${CC}
|
2002-02-11 20:46:41 +00:00
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
|
2006-06-04 19:43:38 +01:00
|
|
|
|
2002-03-04 10:02:03 +00:00
|
|
|
MPI_LIBS=
|
2002-06-13 19:24:04 +01:00
|
|
|
if test "$yap_cv_mpi" != "no" -a "$yap_cv_mpe" != "no"
|
2002-02-22 14:31:45 +00:00
|
|
|
then
|
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${MPI_CC}
|
2002-02-26 18:58:35 +00:00
|
|
|
AC_CHECK_LIB(mpe,MPE_Init_log,
|
|
|
|
[AC_DEFINE(HAVE_LIBMPE, 1)],
|
|
|
|
[AC_DEFINE(HAVE_LIBMPE, 0)])
|
|
|
|
if test "$ac_cv_lib_mpe_MPE_Init_log" = yes
|
|
|
|
then
|
|
|
|
MPI_LIBS="-lmpe"
|
|
|
|
MPI_OBJS="$MPI_OBJS mpe.o"
|
|
|
|
fi
|
2002-02-22 14:31:45 +00:00
|
|
|
CC=${OLD_CC}
|
|
|
|
fi
|
|
|
|
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_PROG_CPP
|
|
|
|
|
|
|
|
if test "$cross_compiling" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS=
|
|
|
|
else
|
|
|
|
AC_SYS_RESTARTABLE_SYSCALLS
|
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
dnl defaults
|
|
|
|
INSTALL_DLLS="#"
|
2005-12-05 17:16:12 +00:00
|
|
|
EXTRA_OBJS=""
|
2009-03-24 01:03:50 +00:00
|
|
|
SHLIB_LD="#"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="#"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD="#"
|
2001-04-09 20:54:03 +01:00
|
|
|
M4="m4"
|
2002-11-13 15:29:44 +00:00
|
|
|
MERGE_DLL_OBJS="#"
|
2004-09-07 17:29:16 +01:00
|
|
|
IN_UNIX=""
|
|
|
|
|
|
|
|
dnl This has to be before $target_os
|
2005-03-09 06:35:52 +00:00
|
|
|
YAPLIB="libYap.a"
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2010-06-21 11:54:21 +01:00
|
|
|
dnl now this is where things get nasty.
|
|
|
|
dnl trying to get the libraries
|
2002-08-19 00:18:18 +01:00
|
|
|
case "$target_os" in
|
2001-04-09 20:54:03 +01:00
|
|
|
*linux*)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$use_condor" = "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
if test "$have_dl" = "yes"
|
|
|
|
then
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="so"
|
2009-10-16 08:08:45 +01:00
|
|
|
SHLIB_LD="$CC -shared -export-dynamic"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="$CXX -shared -export-dynamic"
|
2002-08-19 00:18:18 +01:00
|
|
|
DO_SECOND_LD=""
|
|
|
|
LIBS="$LIBS -ldl"
|
2009-06-15 23:44:13 +01:00
|
|
|
case "$target_cpu" in
|
2002-08-19 00:18:18 +01:00
|
|
|
alpha*)
|
2006-01-26 19:13:24 +00:00
|
|
|
LDFLAGS="-dynamic $LDFLAGS"
|
2002-08-19 00:18:18 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test "$CC" != "lcc"
|
|
|
|
then
|
|
|
|
LDFLAGS="-rdynamic $LDFLAGS"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2004-09-07 17:29:16 +01:00
|
|
|
if test "$ac_cv_prog_gcc" = "yes"
|
2002-08-19 00:18:18 +01:00
|
|
|
then
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="-shared -fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-shared -fPIC $CXXFLAGS"
|
2002-08-19 00:18:18 +01:00
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$have_nsl" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-06-20 00:18:38 +01:00
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
2010-06-21 11:54:21 +01:00
|
|
|
YAPLIB_LD="\$(CC) -shared"
|
2010-06-20 00:18:38 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-06-21 11:54:21 +01:00
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2010-06-20 00:18:38 +01:00
|
|
|
else
|
2010-06-21 11:54:21 +01:00
|
|
|
YAPLIB_LD="\$(CC)"
|
2010-06-20 00:18:38 +01:00
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2010-06-21 11:54:21 +01:00
|
|
|
PRE_INSTALL_ENV=""
|
2010-06-20 00:18:38 +01:00
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*sunos4*)
|
|
|
|
M4="/usr/5bin/m4"
|
|
|
|
LDFLAGS="$LDFLAGS -N"
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$have_nsl" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="o"
|
2001-04-09 20:54:03 +01:00
|
|
|
INSTALL_DLLS=""
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*hpux*)
|
|
|
|
#do not use the first memory quadrant
|
|
|
|
AC_DEFINE(FORCE_SECOND_QUADRANT)
|
|
|
|
M4="/usr/bin/m4"
|
2002-08-19 00:18:18 +01:00
|
|
|
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.
|
2009-10-16 08:08:45 +01:00
|
|
|
SHLIB_LD="$CC -shared -export-dynamic"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="$CXX -shared -export-dynamic"
|
2002-08-19 00:18:18 +01:00
|
|
|
DO_SECOND_LD=""
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="sl"
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="+z $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="+z $CXXFLAGS"
|
2002-08-19 00:18:18 +01:00
|
|
|
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
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
2002-10-03 18:27:52 +01:00
|
|
|
#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-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +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.
|
|
|
|
#
|
2010-06-14 10:36:13 +01:00
|
|
|
# SO="a"
|
2001-04-09 20:54:03 +01:00
|
|
|
#SHLIB_LD="\$(srcdir)/../../ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
|
|
|
|
#INSTALL_DLLS=""
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*osf*)
|
2002-08-19 00:18:18 +01:00
|
|
|
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)
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="so"
|
2002-08-19 00:18:18 +01:00
|
|
|
SHLIB_LD="ld -shared -expect_unresolved '*'"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
fi
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*irix6*)
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="so"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2001-04-09 20:54:03 +01:00
|
|
|
SHLIB_LD="ld -n32 -shared -rdata_shared"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="$SHLIB_LD"
|
2001-04-09 20:54:03 +01:00
|
|
|
INSTALL_DLLS=""
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
2002-04-23 15:37:56 +01:00
|
|
|
*darwin*)
|
2002-10-20 19:43:11 +01:00
|
|
|
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
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="dylib"
|
2002-04-23 15:37:56 +01:00
|
|
|
DO_SECOND_LD=""
|
2010-06-20 00:12:02 +01:00
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_LD="$CC -dynamiclib"
|
|
|
|
SHLIB_CXX_LD="$CXX -dynamiclib"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-install_name,\$(DESTDIR)\$(YAPLIBDIR)/\$@"
|
|
|
|
INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
else
|
|
|
|
SHLIB_LD="$CC -dynamiclib -Wl,-undefined,dynamic_lookup"
|
|
|
|
SHLIB_CXX_LD="$CXX -dynamiclib -Wl,-undefined,dynamic_lookup"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-install_name,\$(DESTDIR)\$(YAPLIBDIR)/\$@"
|
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
fi
|
2010-06-30 16:51:28 +01:00
|
|
|
if test "$ac_cv_prog_gcc" = "yes"
|
|
|
|
then
|
|
|
|
SHLIB_CFLAGS="-shared -fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-shared -fPIC $CXXFLAGS"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2009-05-02 16:35:29 +01:00
|
|
|
CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2"
|
2010-06-20 00:12:02 +01:00
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-06-21 11:54:21 +01:00
|
|
|
YAPLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib"
|
2010-06-20 00:12:02 +01:00
|
|
|
PRE_INSTALL_ENV="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
2002-04-23 15:37:56 +01:00
|
|
|
;;
|
2001-04-09 20:54:03 +01:00
|
|
|
*netbsd*|*freebsd*)
|
|
|
|
if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__
|
|
|
|
then
|
|
|
|
#an a.out system
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="o"
|
2001-04-09 20:54:03 +01:00
|
|
|
else
|
|
|
|
#an elf system
|
|
|
|
LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="-fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
SHLIB_LD="ld -Bshareable -x"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="$SHLIB_LD"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="so"
|
2001-04-09 20:54:03 +01:00
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
2009-06-17 05:31:45 +01:00
|
|
|
*solaris*)
|
|
|
|
#an elf system
|
|
|
|
LDFLAGS="-dynamic $LDFLAGS"
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="-fPIC $CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
2009-10-16 08:08:45 +01:00
|
|
|
SHLIB_LD="$CC -shared"
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_CXX_LD="$CXX -shared"
|
2009-06-17 05:31:45 +01:00
|
|
|
DO_SECOND_LD=""
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="so"
|
2009-06-17 05:31:45 +01:00
|
|
|
INSTALL_DLLS=""
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
2010-06-21 11:54:21 +01:00
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
|
|
|
YAPLIB_LD="\$(CC)"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
else
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV=""
|
|
|
|
YAPLIB_LD="\$(CC) -shared"
|
|
|
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
fi
|
2009-06-17 05:31:45 +01:00
|
|
|
;;
|
2002-11-13 15:29:44 +00:00
|
|
|
*cyg*|*mingw*)
|
2002-09-17 00:01:59 +01:00
|
|
|
# gcc on cygwin seems to have trouble with longjmp
|
|
|
|
# and -fomit-frame-point -DBP_FREE
|
2010-05-06 15:00:44 +01:00
|
|
|
YAPLIB="yap.dll"
|
2010-07-20 12:14:57 +01:00
|
|
|
DYNYAPLIB="yap.dll"
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CFLAGS="$CFLAGS"
|
|
|
|
SHLIB_CXXFLAGS="$CXXFLAGS"
|
2010-05-06 15:00:44 +01:00
|
|
|
if test "$target_win64" = no
|
|
|
|
then
|
|
|
|
LDFLAGS="-Wl,--large-address-aware $LDFLAGS"
|
|
|
|
fi
|
2010-06-04 22:59:31 +01:00
|
|
|
SHLIB_LD="\$(CC) -shared -Wl,--export-all-symbols"
|
|
|
|
SHLIB_CXX_LD="\$(CXX) -shared -Wl,--export-all-symbols"
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="dll"
|
2010-05-06 15:52:03 +01:00
|
|
|
C_PARSER_FLAGS="$C_INTERF_FLAGS"
|
2002-11-12 04:36:59 +00:00
|
|
|
EXEC_SUFFIX=".exe"
|
|
|
|
INSTALL_DLLS=""
|
2002-11-13 15:29:44 +00:00
|
|
|
DO_SECOND_LD=""
|
|
|
|
MERGE_DLL_OBJS=""
|
2004-09-07 17:29:16 +01:00
|
|
|
IN_UNIX="#"
|
2010-06-21 11:54:21 +01:00
|
|
|
YAPLIB_LD="\$(CC) -shared -Wl,--export-all-symbols"
|
2010-06-20 00:12:02 +01:00
|
|
|
PRE_INSTALL_ENV=""
|
|
|
|
INSTALL_ENV=""
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*)
|
2002-08-19 00:18:18 +01:00
|
|
|
AC_CHECK_LIB(dl,dlopen,
|
|
|
|
have_dl=yes
|
|
|
|
,
|
|
|
|
have_dl=no)
|
|
|
|
if test "$have_dl" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
2010-06-14 10:36:13 +01:00
|
|
|
SO="o"
|
2001-04-09 20:54:03 +01:00
|
|
|
LIBS="$LIBS -ldl"
|
2001-11-18 21:00:57 +00:00
|
|
|
INSTALL_DLLS=""
|
2009-10-16 08:08:45 +01:00
|
|
|
if test "$GCC" = "yes"
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
2010-06-21 11:54:21 +01:00
|
|
|
SHLIB_CXXFLAGS="-fPIC $CXXFLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
fi
|
|
|
|
fi
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$have_nsl" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
2010-06-20 00:12:02 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)"
|
|
|
|
DYNYAPLIB=libYap."$SO"
|
|
|
|
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)"
|
|
|
|
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
|
|
|
INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2010-06-20 00:12:02 +01:00
|
|
|
EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir)/packages/PLStream -lplstream"
|
|
|
|
|
|
|
|
|
2005-03-09 06:35:52 +00:00
|
|
|
if test "$dynamic_loading" = "yes"
|
|
|
|
then
|
2010-06-21 11:54:21 +01:00
|
|
|
YAPLIB_CFLAGS="$SHLIB_CFLAGS"
|
2010-06-20 00:12:02 +01:00
|
|
|
YAPLIB="$DYNYAPLIB"
|
2010-06-21 11:54:21 +01:00
|
|
|
else
|
2010-06-23 11:52:34 +01:00
|
|
|
YAPLIB_CFLAGS="$CFLAGS"
|
2005-03-09 06:35:52 +00:00
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
if test "$coroutining" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$rationaltrees" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1"
|
|
|
|
fi
|
2005-10-31 12:44:29 +00:00
|
|
|
|
|
|
|
if test "$rationaltrees" = "yes" -a "$coroutining" = "yes"
|
|
|
|
then
|
|
|
|
INSTALLCLP=""
|
|
|
|
else
|
2009-03-24 01:03:50 +00:00
|
|
|
INSTALLCLP="@#"
|
2005-10-31 12:44:29 +00:00
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEBUG=1"
|
|
|
|
fi
|
2005-09-08 22:59:58 +01:00
|
|
|
|
|
|
|
if test "$eam" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DBEAM"
|
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2002-09-25 05:29:01 +01:00
|
|
|
if test "$use_april" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1 -DAPRIL"
|
2002-09-25 05:31:13 +01:00
|
|
|
LDFLAGS="$LDFLAGS -L."
|
2002-09-25 05:29:01 +01:00
|
|
|
LIBS="$LIBS -lApril"
|
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
if test "$lowleveltracer" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DLOW_LEVEL_TRACER=1"
|
|
|
|
fi
|
|
|
|
|
2002-10-21 23:14:29 +01:00
|
|
|
if test "$threads" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTHREADS=1"
|
2004-02-12 17:09:17 +00:00
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -D_GNU_SOURCE"
|
|
|
|
fi
|
2002-10-21 23:14:29 +01:00
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
case "$orparallelism" in
|
|
|
|
sba)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DSBA=1"
|
|
|
|
;;
|
|
|
|
a-cow)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DACOW=1"
|
|
|
|
;;
|
|
|
|
yes|env-copy)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DENV_COPY=1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-03-03 14:33:01 +00:00
|
|
|
if test "$cutc" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1"
|
|
|
|
fi
|
|
|
|
|
2005-04-07 18:56:58 +01:00
|
|
|
if test "$tabling" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTABLING=1"
|
|
|
|
fi
|
2007-11-07 13:02:37 +00:00
|
|
|
if test ! "$yap_cv_cplint" = "no"
|
|
|
|
then
|
2008-06-19 22:09:56 +01:00
|
|
|
GLIBS=`pkg-config --libs glib-2.0`
|
|
|
|
GFLAGS=`pkg-config --cflags glib-2.0`
|
2007-12-09 22:46:38 +00:00
|
|
|
CPLINT_LIBS=${CPLINT_LIBS}$GLIBS
|
2007-11-07 13:02:37 +00:00
|
|
|
CPLINT_CFLAGS=" $GFLAGS "
|
2008-06-19 22:09:56 +01:00
|
|
|
CPLINT_LDFLAGS=" `echo $GLIBS | awk '{print $1}'` -L$pefic/lib/"
|
|
|
|
LDFLAGS=${LDFLAGS}" `echo $GLIBS | awk '{print $1}'` -L$prefix/lib/"
|
2007-11-07 13:02:37 +00:00
|
|
|
if test ! "$yap_cv_cplint" = "yes"
|
|
|
|
then
|
2010-07-27 16:55:52 +01:00
|
|
|
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 "
|
2007-11-07 13:02:37 +00:00
|
|
|
CPLINT_CFLAGS+=" -I${yap_cv_cplint}/include"
|
2010-07-27 16:55:52 +01:00
|
|
|
CPLINT_LIBS="-lcudd -lmtr -lst -lutil -lepd -lm "$CPLINT_LIBS
|
2007-11-07 13:02:37 +00:00
|
|
|
fi
|
2010-07-27 16:55:52 +01:00
|
|
|
#AC_SEARCH_LIBS([g_hash_table_new], [glib-2.0], [], [AC_MSG_ERROR([This package needs glib >=2.0.], [1])], [])
|
|
|
|
#AC_SEARCH_LIBS([Cudd_Init], [cudd], [], [AC_MSG_ERROR([This package needs CUDD.], [1])], [-lcudd -lmtr -lst -lutil -lepd -lm])
|
|
|
|
#AC_SEARCH_LIBS([pow], [m], [], [AC_MSG_ERROR([This package needs m.], [1])], [-lm])
|
2010-03-18 15:11:21 +00:00
|
|
|
ENABLE_CPLINT=""
|
2010-02-10 09:01:30 +00:00
|
|
|
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
2007-11-07 13:02:37 +00:00
|
|
|
then
|
2010-07-27 10:35:22 +01:00
|
|
|
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
|
|
|
|
SHLIB_SUFFIX="dll"
|
2007-11-07 13:02:37 +00:00
|
|
|
else
|
|
|
|
CPLINT_SHLIB_LD=$SHLIB_LD
|
2010-07-27 11:14:33 +01:00
|
|
|
SHLIB_SUFFIX="so"
|
2007-11-07 13:02:37 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(CPLINT_LIBS)
|
|
|
|
AC_SUBST(CPLINT_CFLAGS)
|
|
|
|
AC_SUBST(CPLINT_LDFLAGS)
|
|
|
|
AC_SUBST(CPLINT_SHLIB_LD)
|
2010-07-27 11:14:33 +01:00
|
|
|
AC_SUBST(SHLIB_SUFFIX)
|
2007-11-07 13:02:37 +00:00
|
|
|
else
|
2009-03-24 01:03:50 +00:00
|
|
|
ENABLE_CPLINT="@#"
|
2007-11-07 13:02:37 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_CPLINT)
|
2010-06-04 22:59:31 +01:00
|
|
|
|
|
|
|
AC_SUBST(INSTALL_ENV)
|
|
|
|
AC_SUBST(PRE_INSTALL_ENV)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2007-10-09 11:50:51 +01:00
|
|
|
# LAM
|
|
|
|
OLD_CC=${CC}
|
|
|
|
CC=${LAM_MPI_CC}
|
|
|
|
AC_CHECK_LIB([lam], [main],
|
2010-06-14 10:36:13 +01:00
|
|
|
LAMOBJS=yap_mpi."$SO",
|
2007-10-09 11:50:51 +01:00
|
|
|
LAMOBJS=no)
|
|
|
|
CC=${OLD_CC}
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_HEADERS(arpa/inet.h alloca.h crypt.h)
|
|
|
|
AC_CHECK_HEADERS(ctype.h direct.h dirent.h dlfcn.h)
|
|
|
|
AC_CHECK_HEADERS(errno.h execinfo.h fcntl.h fenv.h)
|
2009-10-20 09:11:10 +01:00
|
|
|
AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h io.h limits.h)
|
2008-12-22 12:03:14 +00:00
|
|
|
AC_CHECK_HEADERS(locale.h malloc.h math.h memory.h mpi.h)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h)
|
2002-01-16 20:18:28 +00:00
|
|
|
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h stropts.h)
|
2010-05-04 14:56:08 +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)
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_HEADERS(sys/shm.h sys/socket.h sys/stat.h)
|
|
|
|
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/types.h)
|
2008-12-22 12:03:14 +00:00
|
|
|
AC_CHECK_HEADERS(sys/ucontext.h sys/un.h sys/wait.h)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_HEADERS(time.h unistd.h utime.h wctype.h winsock.h winsock2.h)
|
2002-09-24 15:18:56 +01:00
|
|
|
AC_CHECK_HEADERS(mach-o/dyld.h)
|
2001-04-09 20:54:03 +01:00
|
|
|
if test "$yap_cv_gmp" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(gmp.h)
|
|
|
|
fi
|
2009-03-09 00:43:18 +00:00
|
|
|
if test "$yap_cv_cudd" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(cudd.h)
|
|
|
|
fi
|
2006-03-06 13:25:11 +00:00
|
|
|
if test "$yap_cv_myddas" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(mysql/mysql.h)
|
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS( readline/readline.h)
|
|
|
|
fi
|
2006-09-28 12:42:51 +01:00
|
|
|
AC_CHECK_HEADERS(mpi.h)
|
|
|
|
AC_CHECK_HEADERS(mpe.h)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
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 *)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$yap_cv_malloct" = void
|
2001-04-09 20:54:03 +01:00
|
|
|
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)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$yap_cv_gcc" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
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)
|
|
|
|
|
2009-10-23 09:09:16 +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)
|
|
|
|
|
2005-04-15 16:20:52 +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
|
2009-11-18 09:53:38 +00:00
|
|
|
AC_SUBST(CXXFLAGS)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(SHLIB_CFLAGS)
|
2010-06-21 11:54:21 +01:00
|
|
|
AC_SUBST(SHLIB_CXXFLAGS)
|
2005-04-15 16:20:52 +01:00
|
|
|
dnl suffix for loadable binary (.so,.dll,.o)
|
2010-06-14 10:36:13 +01:00
|
|
|
AC_SUBST(SO)
|
2005-04-15 16:20:52 +01:00
|
|
|
dnl suffix for executable (.exe)
|
|
|
|
AC_SUBST(EXEC_SUFFIX)
|
|
|
|
dnl how to call the loader
|
|
|
|
AC_SUBST(DO_SECOND_LD)
|
|
|
|
AC_SUBST(SHLIB_LD)
|
2010-06-04 22:59:31 +01:00
|
|
|
AC_SUBST(SHLIB_CXX_LD)
|
2010-06-21 11:54:21 +01:00
|
|
|
AC_SUBST(YAPLIB_LD)
|
|
|
|
AC_SUBST(YAPLIB_CFLAGS)
|
2010-05-10 10:22:42 +01:00
|
|
|
AC_SUBST(EXTRA_LIBS_FOR_DLLS)
|
2010-06-04 22:59:31 +01:00
|
|
|
AC_SUBST(EXTRA_LIBS_FOR_SWIDLLS)
|
2005-04-15 16:20:52 +01:00
|
|
|
dnl objects in YAP library
|
|
|
|
AC_SUBST(YAPLIB)
|
2006-05-19 18:49:25 +01:00
|
|
|
AC_SUBST(DYNYAPLIB)
|
2006-05-19 14:48:11 +01:00
|
|
|
AC_SUBST(LDFLAGS)
|
2005-04-15 16:20:52 +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)
|
2009-03-23 12:23:00 +00:00
|
|
|
AC_SUBST(ENABLE_CHR)
|
|
|
|
AC_SUBST(ENABLE_CLPQR)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(ENABLE_JPL)
|
2009-06-15 23:44:13 +01:00
|
|
|
AC_SUBST(JAVA)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(JAVA_HOME)
|
2009-03-23 12:23:00 +00:00
|
|
|
AC_SUBST(JUNIT)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(JAVAC)
|
2009-03-23 12:23:00 +00:00
|
|
|
AC_SUBST(JAVADOC)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(JAR)
|
|
|
|
AC_SUBST(IN_UNIX)
|
|
|
|
AC_SUBST(YAPMPILIB)
|
2006-06-06 15:58:42 +01:00
|
|
|
AC_SUBST(LAM_MPI_CC)
|
2005-04-15 16:20:52 +01:00
|
|
|
AC_SUBST(MPI_OBJS)
|
|
|
|
AC_SUBST(MPI_LIBS)
|
|
|
|
AC_SUBST(INSTALL_COMMAND)
|
2005-10-31 12:44:29 +00:00
|
|
|
AC_SUBST(INSTALLCLP)
|
2006-05-19 14:48:11 +01:00
|
|
|
AC_SUBST(JAVALIBPATH)
|
|
|
|
AC_SUBST(JAVAINCPATH)
|
2006-06-04 19:43:38 +01:00
|
|
|
AC_SUBST(LAMOBJS)
|
2007-01-29 10:18:15 +00:00
|
|
|
AC_SUBST(MAX_WORKERS)
|
2007-03-14 13:01:29 +00:00
|
|
|
AC_SUBST(STATIC_MODE)
|
2008-05-23 23:29:52 +01:00
|
|
|
AC_SUBST(ENABLE_WINCONSOLE)
|
2005-04-15 16:20:52 +01:00
|
|
|
|
2009-03-09 00:43:18 +00:00
|
|
|
AC_SUBST(USE_CUDD)
|
|
|
|
AC_SUBST(CUDD_LDFLAGS)
|
|
|
|
AC_SUBST(CUDD_CPPFLAGS)
|
2010-01-06 13:24:55 +00:00
|
|
|
AC_SUBST(USE_MINISAT)
|
2007-05-24 16:11:46 +01:00
|
|
|
AC_SUBST(INSTALL_MATLAB)
|
|
|
|
AC_SUBST(MATLAB_INCLUDE)
|
2001-04-09 20:54:03 +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)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$yap_cv_threaded_code" = yes && test "$yap_cv_gcc" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
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)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$yap_cv_ffieee" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(FFIEEE,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(FFIEEE,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for sigsetjmp
|
|
|
|
AC_MSG_CHECKING(for sigsetjmp)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_sigsetjmp,[
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <setjmp.h>
|
|
|
|
,
|
|
|
|
sigjmp_buf RestartEnv;
|
|
|
|
|
|
|
|
siglongjmp (RestartEnv, 1);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_sigsetjmp=yes,yap_cv_sigsetjmp=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigsetjmp)
|
|
|
|
if test "$yap_cv_sigsetjmp" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGSETJMP,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGSETJMP,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl check for sigsegv
|
|
|
|
AC_MSG_CHECKING(for sigsegv)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_sigsegv,[
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("Signal value is %d\n", SIGSEGV);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_sigsegv=yes,yap_cv_sigsegv=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigsegv)
|
|
|
|
if test "$yap_cv_sigsegv" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,0)
|
|
|
|
fi
|
|
|
|
|
2003-05-20 20:11:59 +01:00
|
|
|
dnl check for sigsegv
|
|
|
|
AC_MSG_CHECKING(for sigprof)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_sigprof,[
|
2003-05-20 20:11:59 +01:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("Signal value is %d\n", SIGPROF);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_sigprof=yes,yap_cv_sigprof=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_sigprof)
|
|
|
|
if test "$yap_cv_sigsegv" = yes
|
2003-05-20 20:11:59 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGPROF,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGPROF,0)
|
|
|
|
fi
|
|
|
|
|
2002-05-28 17:23:53 +01:00
|
|
|
dnl check for siginfo
|
|
|
|
AC_MSG_CHECKING(for siginfo)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_siginfo,[
|
2002-05-28 17:23:53 +01:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("SIGINFO value is %d\n", SA_SIGINFO);
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_siginfo=yes,yap_cv_siginfo=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_siginfo)
|
|
|
|
if test "$yap_cv_siginfo" = yes
|
2002-05-28 17:23:53 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGINFO,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGINFO,0)
|
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +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)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$union_wait_ok" = no; then
|
2001-04-09 20:54:03 +01:00
|
|
|
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)
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$environ_ok" = yes; then
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_DEFINE(HAVE_ENVIRON)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_TYPE_SIGNAL
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_FUNCS(_NSGetEnviron access acosh)
|
|
|
|
AC_CHECK_FUNCS(alloca asinh atanh chdir ctime dlopen dup2)
|
2010-03-05 00:01:04 +00:00
|
|
|
AC_CHECK_FUNCS(erf feclearexcept)
|
2009-06-15 21:00:31 +01:00
|
|
|
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname)
|
2009-04-21 14:28:10 +01:00
|
|
|
AC_CHECK_FUNCS(gethrtime getpagesize)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_FUNCS(getpwnam getrlimit getrusage gettimeofday getwd)
|
2009-06-15 21:00:31 +01:00
|
|
|
AC_CHECK_FUNCS(isatty isnan isinf kill labs link lgamma)
|
2006-05-18 17:33:05 +01:00
|
|
|
AC_CHECK_FUNCS(localtime lstat mallinfo)
|
2009-02-09 21:56:40 +00:00
|
|
|
AC_CHECK_FUNCS(mbsnrtowcs)
|
2006-05-25 17:28:28 +01:00
|
|
|
AC_CHECK_FUNCS(memcpy memmove mkstemp mktemp)
|
|
|
|
AC_CHECK_FUNCS(nanosleep mktime opendir)
|
2002-08-19 00:18:18 +01:00
|
|
|
AC_CHECK_FUNCS(putenv rand random readlink regexec)
|
2002-10-23 18:10:33 +01:00
|
|
|
AC_CHECK_FUNCS(rename rint rl_set_prompt sbrk select)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_FUNCS(setbuf setitimer setsid setlinebuf sigaction)
|
2007-05-21 00:00:38 +01:00
|
|
|
AC_CHECK_FUNCS(siggetmask siginterrupt)
|
2002-09-17 00:01:59 +01:00
|
|
|
AC_CHECK_FUNCS(signal sigprocmask socket stat)
|
2009-11-23 13:41:07 +00:00
|
|
|
AC_CHECK_FUNCS(strchr strerror stricmp strncat strncpy strtod)
|
2010-06-18 10:38:11 +01:00
|
|
|
AC_CHECK_FUNCS(time times tmpnam usleep utime vsnprintf)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2002-03-17 06:11:29 +00:00
|
|
|
AC_CHECK_FUNC(regexec, [NO_BUILTIN_REGEXP="#"], [NO_BUILTIN_REGEXP=""])
|
|
|
|
|
2002-09-24 16:38:17 +01:00
|
|
|
AC_CHECK_FUNCS(NSLinkModule)
|
2002-09-24 15:18:56 +01:00
|
|
|
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$use_condor" = "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_FUNCS(alarm mmap popen shmat sleep system ttyname waitpid)
|
|
|
|
fi
|
|
|
|
|
2002-09-24 21:06:22 +01:00
|
|
|
if test "$target_os" != "mingw32"
|
2002-09-17 00:01:59 +01:00
|
|
|
then
|
|
|
|
AC_CHECK_FUNCS(fetestexcept snprintf)
|
|
|
|
fi
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
dnl check for mpz_xor
|
|
|
|
AC_MSG_CHECKING(for mpz_xor)
|
2009-10-16 08:08:45 +01:00
|
|
|
AC_CACHE_VAL(yap_cv_mpz_xor,[
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_TRY_LINK(
|
|
|
|
#include <gmp.h>
|
|
|
|
void check(mpz_t rop,mpz_t op1,mpz_t op2) {
|
|
|
|
mpz_xor(rop,op1,op2);
|
|
|
|
}
|
|
|
|
,
|
|
|
|
,
|
2009-10-16 08:08:45 +01:00
|
|
|
yap_cv_mpz_xor=yes,yap_cv_mpz_xor=no)])
|
|
|
|
AC_MSG_RESULT($yap_cv_mpz_xor)
|
|
|
|
if test "$yap_cv_mpz_xor" = yes
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,0)
|
|
|
|
fi
|
|
|
|
|
2005-05-25 19:18:02 +01:00
|
|
|
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
|
|
|
|
then
|
2005-10-31 12:27:54 +00:00
|
|
|
maxmemory="no"
|
2005-05-25 19:18:02 +01:00
|
|
|
fi
|
|
|
|
|
2001-07-11 08:10:17 +01:00
|
|
|
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
|
|
|
|
|
2002-05-19 20:04:33 +01:00
|
|
|
dnl disable smart memory management
|
2002-08-19 00:18:18 +01:00
|
|
|
if test "$use_malloc" = yes
|
2002-05-19 20:04:33 +01:00
|
|
|
then
|
2005-08-18 20:25:40 +01:00
|
|
|
AC_DEFINE(USE_SYSTEM_MALLOC,1)
|
2004-10-06 20:40:22 +01:00
|
|
|
AC_DEFINE(GC_NO_TAGS,1)
|
|
|
|
fi
|
|
|
|
|
2004-10-28 21:12:23 +01:00
|
|
|
dnl large memory configuration, don't trust Yap allocation routines
|
2005-10-31 12:27:54 +00:00
|
|
|
if test "$maxmemory" = yes
|
2004-10-06 20:40:22 +01:00
|
|
|
then
|
|
|
|
AC_DEFINE(GC_NO_TAGS,1)
|
2004-10-28 21:12:23 +01:00
|
|
|
AC_DEFINE(USE_DL_MALLOC,1)
|
2002-05-19 20:04:33 +01:00
|
|
|
fi
|
|
|
|
|
2008-08-26 00:18:06 +01:00
|
|
|
dnl SWI compatibility support!
|
|
|
|
PROLOG_SYSTEM=yap
|
|
|
|
IN_YAP=
|
|
|
|
IN_SWI="#"
|
2010-06-14 10:36:13 +01:00
|
|
|
CHR_TARGETS=chr_support."$SO"
|
2008-08-26 00:18:06 +01:00
|
|
|
|
|
|
|
AC_SUBST(PROLOG_SYSTEM)
|
|
|
|
AC_SUBST(IN_YAP)
|
|
|
|
AC_SUBST(IN_SWI)
|
2010-06-14 10:36:13 +01:00
|
|
|
AC_SUBST(TARGETS)
|
|
|
|
AC_SUBST(PLTARGETS)
|
2008-08-26 00:18:06 +01:00
|
|
|
AC_SUBST(CHR_TARGETS)
|
|
|
|
|
2010-07-20 22:54:20 +01:00
|
|
|
CLIB_TARGETS="random.$SO socket.$SO cgi.$SO memfile.$SO files.$SO mime.$SO crypt.$SO"
|
|
|
|
CLIB_PLTARGETS="\$(srcdir)/random.pl \$(srcdir)/socket.pl \$(srcdir)/cgi.pl \$(srcdir)/memfile.pl \$(srcdir)/filesex.pl \$(srcdir)/mime.pl \$(srcdir)/crypt.pl"
|
2010-06-18 10:38:11 +01:00
|
|
|
|
2010-07-20 22:54:20 +01:00
|
|
|
if test "$IN_UNIX" = ""; then
|
|
|
|
CLIB_TARGETS="unix.$SO $CLIB_TARGETS"
|
|
|
|
CLIB_PLTARGETS="\$(srcdir)/unix.pl $CLIB_PLTARGETS"
|
|
|
|
CLIB_NETLIBS=
|
|
|
|
else
|
2010-06-18 10:38:11 +01:00
|
|
|
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)."))])
|
2010-07-20 22:54:20 +01:00
|
|
|
fi
|
|
|
|
|
2010-06-18 10:38:11 +01:00
|
|
|
|
|
|
|
oldlibs="$LIBS"
|
|
|
|
AC_CHECK_LIB(crypt, crypt)
|
|
|
|
CRYPTLIBS="$LIBS"
|
|
|
|
AC_CHECK_FUNCS(crypt)
|
|
|
|
LIBS="$oldlibs"
|
|
|
|
|
2010-07-20 22:54:20 +01:00
|
|
|
AC_SUBST(CLIB_TARGETS)
|
|
|
|
AC_SUBST(CLIB_PLTARGETS)
|
|
|
|
AC_SUBST(CLIB_NETLIBS)
|
|
|
|
AC_SUBST(CLIB_CRYPTLIBS)
|
|
|
|
|
2010-06-18 10:38:11 +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>
|
|
|
|
])
|
|
|
|
|
2010-07-19 14:54:51 +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>])
|
|
|
|
|
2010-06-18 10:38:11 +01:00
|
|
|
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
|
2010-07-20 12:14:57 +01:00
|
|
|
echo "WARNING: no getrlimit(); dropping rlimit.pl from targets"
|
2010-06-18 10:38:11 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-23 11:52:34 +01:00
|
|
|
mkdir -p library/lammpi
|
2007-01-24 10:01:40 +00:00
|
|
|
mkdir -p library/matrix
|
2007-05-24 16:11:46 +01:00
|
|
|
mkdir -p library/matlab
|
2002-05-23 13:44:18 +01:00
|
|
|
mkdir -p library/mpi
|
|
|
|
mkdir -p library/random
|
2001-04-09 20:54:03 +01:00
|
|
|
mkdir -p library/regex
|
2001-05-21 21:00:05 +01:00
|
|
|
mkdir -p library/system
|
2007-05-02 16:23:00 +01:00
|
|
|
mkdir -p library/tries
|
2008-03-27 14:59:29 +00:00
|
|
|
mkdir -p library/rltree
|
2002-05-23 13:44:18 +01:00
|
|
|
mkdir -p library/yap2swi
|
2005-10-28 18:38:50 +01:00
|
|
|
mkdir -p LGPL/clp
|
2008-03-27 00:41:33 +00:00
|
|
|
mkdir -p LGPL/swi_console
|
2008-02-12 17:03:59 +00:00
|
|
|
mkdir -p GPL
|
2010-06-17 00:41:11 +01:00
|
|
|
mkdir -p packages/
|
|
|
|
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
|
2009-03-10 18:07:50 +00:00
|
|
|
mkdir -p packages/CLPBN
|
2009-03-23 12:23:00 +00:00
|
|
|
mkdir -p packages/clpqr
|
2009-02-16 17:19:43 +00:00
|
|
|
mkdir -p packages/cplint
|
2010-03-18 15:11:21 +00:00
|
|
|
mkdir -p packages/cplint/approx
|
|
|
|
mkdir -p packages/cplint/approx/simplecuddLPADs
|
2010-06-23 11:52:34 +01:00
|
|
|
mkdir -p packages/http
|
2009-03-23 12:23:00 +00:00
|
|
|
mkdir -p packages/jpl
|
|
|
|
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-07-19 14:54:51 +01:00
|
|
|
mkdir -p packages/tai
|
|
|
|
mkdir -p packages/tai/libtai
|
2009-03-23 12:23:00 +00:00
|
|
|
mkdir -p packages/PLStream
|
2009-11-23 10:55:10 +00:00
|
|
|
mkdir -p packages/plunit
|
2009-03-09 00:43:18 +00:00
|
|
|
mkdir -p packages/ProbLog
|
|
|
|
mkdir -p packages/ProbLog/simplecudd
|
2010-07-14 00:18:14 +01:00
|
|
|
mkdir -p packages/semweb
|
2009-03-13 19:40:56 +00:00
|
|
|
mkdir -p packages/sgml
|
2009-03-09 00:43:18 +00:00
|
|
|
|
2009-04-18 23:53:36 +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([library/yap2swi/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/clp/Makefile])
|
|
|
|
AC_CONFIG_FILES([LGPL/swi_console/Makefile])
|
2010-06-17 00:41:11 +01:00
|
|
|
AC_CONFIG_FILES([packages/clib/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/clib/maildrop/rfc822/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/clib/maildrop/rfc2045/Makefile])
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_CONFIG_FILES([packages/CLPBN/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/cplint/Makefile])
|
2010-03-18 15:11:21 +00:00
|
|
|
AC_CONFIG_FILES([packages/cplint/approx/simplecuddLPADs/Makefile])
|
2010-06-23 11:52:34 +01:00
|
|
|
AC_CONFIG_FILES([packages/http/Makefile])
|
2010-07-19 14:54:51 +01:00
|
|
|
AC_CONFIG_FILES([packages/tai/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/tai/libtai/Makefile])
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_CONFIG_FILES([packages/PLStream/Makefile])
|
2009-11-23 10:55:10 +00:00
|
|
|
AC_CONFIG_FILES([packages/plunit/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/ProbLog/Makefile ])
|
2010-07-14 00:18:14 +01:00
|
|
|
AC_CONFIG_FILES([packages/semweb/Makefile])
|
2009-11-23 10:55:10 +00:00
|
|
|
AC_CONFIG_FILES([packages/sgml/Makefile])
|
2009-03-23 12:40:34 +00:00
|
|
|
|
|
|
|
if test "$ENABLE_CHR" = ""; then
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_CONFIG_FILES([packages/chr/Makefile])
|
2009-03-23 12:40:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_CLPQR" = ""; then
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_CONFIG_FILES([packages/clpqr/Makefile])
|
2009-03-23 12:40:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$ENABLE_JPL" = ""; then
|
2010-06-01 00:38:42 +01:00
|
|
|
AC_CONFIG_FILES([packages/jpl/Makefile packages/jpl/jpl_paths.yap packages/jpl/src/java/Makefile packages/pyswip/Makefile ])
|
2009-03-23 12:40:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$USE_CUDD" = ""; then
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile])
|
2009-03-23 12:40:34 +00:00
|
|
|
fi
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2010-01-06 13:24:55 +00:00
|
|
|
if test "$USE_MINISAT" = ""; then
|
|
|
|
AC_CONFIG_FILES([packages/swi-minisat2/Makefile])
|
|
|
|
AC_CONFIG_FILES([packages/swi-minisat2/C/Makefile])
|
|
|
|
fi
|
|
|
|
|
2009-04-18 23:53:36 +01:00
|
|
|
AC_OUTPUT()
|
|
|
|
|