2001-04-09 20:54:03 +01:00
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
2002-01-15 17:55:50 +00:00
|
|
|
|
|
|
|
AC_PREREQ(2.13)
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
AC_ARG_ENABLE(rational-trees,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-rational-trees support infinite rational trees ],
|
2001-04-09 20:54:03 +01:00
|
|
|
rationaltrees="$enableval" ; rationaltrees=no)
|
|
|
|
AC_ARG_ENABLE(coroutining,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-coroutining support co-routining, attributed variables and constraints],
|
2001-04-09 20:54:03 +01:00
|
|
|
rationaltrees="$enableval";coroutining="$enableval", coroutining=no)
|
|
|
|
AC_ARG_ENABLE(wam-profile,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-wam-profile support low level profiling of abstract machine ],
|
2001-04-09 20:54:03 +01:00
|
|
|
wamprofile="$enableval", wamprofile=no)
|
|
|
|
AC_ARG_ENABLE(depth-limit,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-depth-limit support depth-bound computation ],
|
2001-04-09 20:54:03 +01:00
|
|
|
depthlimit="$enableval", depthlimit=no)
|
|
|
|
AC_ARG_ENABLE(or-parallelism,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-or-parallelism support or-parallelism as: env-copy,sba,a-cow ],
|
2001-04-09 20:54:03 +01:00
|
|
|
orparallelism="$enableval", orparallelism=no)
|
|
|
|
AC_ARG_ENABLE(low-level-tracer,
|
|
|
|
[ --enable-low-level-tracer support support for procedure-call tracing ],
|
|
|
|
lowleveltracer="$enableval", lowleveltracer=no)
|
|
|
|
AC_ARG_ENABLE(tabling,
|
2002-01-15 17:55:50 +00:00
|
|
|
[ --enable-tabling support tabling as: batched,local ],
|
2001-04-09 20:54:03 +01:00
|
|
|
tabling="$enableval", tabling=no)
|
|
|
|
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)
|
|
|
|
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)
|
2002-03-07 05:13:21 +00:00
|
|
|
AC_ARG_ENABLE(cygwin,
|
|
|
|
[ --enable-cygwin use cygwin library in WIN32 ],
|
|
|
|
cygwin="$enableval", cygwin=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],
|
2001-04-09 20:54:03 +01:00
|
|
|
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"
|
|
|
|
CPPFLAGS="$CPPFLAGS -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])
|
|
|
|
|
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],
|
2001-06-22 18:53:36 +01:00
|
|
|
if test $withval = yes; then
|
|
|
|
yap_cv_readline=yes
|
|
|
|
elif test $withval = no; then
|
|
|
|
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])
|
|
|
|
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_ARG_WITH(mpi,
|
|
|
|
[ --with-mpi[=DIR] use MPI library in DIR],
|
2002-02-11 20:46:41 +00:00
|
|
|
if test $withval = yes; then
|
2002-02-22 14:31:45 +00:00
|
|
|
yap_cv_mpi=yes
|
2002-02-11 20:46:41 +00: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
|
|
|
|
|
|
|
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,
|
2002-03-12 04:08:52 +00:00
|
|
|
[yap_cv_mpe=no])
|
2002-02-11 20:46:41 +00:00
|
|
|
|
2002-01-15 17:55:50 +00: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])
|
|
|
|
|
2002-01-28 15:30:26 +00:00
|
|
|
if test $tabling = yes -o $orparallelism = yes
|
2002-01-15 17:55:50 +00:00
|
|
|
then
|
2002-01-23 02:44:55 +00:00
|
|
|
AC_DEFINE(MinHeapSpace, (400*SIZEOF_INT_P))
|
2002-01-15 17:55:50 +00:00
|
|
|
AC_DEFINE(MinStackSpace,(300*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinTrailSpace,( 48*SIZEOF_INT_P))
|
|
|
|
else
|
|
|
|
AC_DEFINE(MinHeapSpace, (200*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinStackSpace,(200*SIZEOF_INT_P))
|
|
|
|
AC_DEFINE(MinTrailSpace,( 32*SIZEOF_INT_P))
|
|
|
|
fi
|
|
|
|
|
2002-02-12 12:22:31 +00:00
|
|
|
eval "AC_DEFINE(DefHeapSpace,($yap_cv_heap_space))"
|
|
|
|
eval "AC_DEFINE(DefStackSpace,($yap_cv_stack_space))"
|
|
|
|
eval "AC_DEFINE(DefTrailSpace,($yap_cv_trail_space))"
|
2002-01-15 17:55:50 +00:00
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
2002-02-11 20:22:15 +00:00
|
|
|
AC_DEFINE_UNQUOTED(HOST_ALIAS,"${host}")
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
dnl Compilation Flags
|
|
|
|
if test "$GCC" = "yes"
|
|
|
|
then
|
|
|
|
if test -z "${mycflags}"
|
|
|
|
then
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
|
|
|
CFLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
|
|
|
C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
|
|
|
else
|
|
|
|
CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
|
|
|
C_INTERF_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
2001-08-11 00:07:00 +01:00
|
|
|
C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
2001-04-09 20:54:03 +01:00
|
|
|
case "$target_cpu" in
|
|
|
|
i*86*)
|
|
|
|
CFLAGS="-DBP_FREE $CFLAGS"
|
|
|
|
;;
|
|
|
|
sparc*)
|
|
|
|
case "$target_os" in
|
2001-11-18 21:00:57 +00:00
|
|
|
*solaris[2-9]*)
|
2001-04-09 20:54:03 +01:00
|
|
|
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test "$maxperformance" = "yes"
|
|
|
|
then
|
|
|
|
case "$target_cpu" in
|
|
|
|
i686*)
|
|
|
|
CFLAGS="-march=pentiumpro $CFLAGS"
|
|
|
|
;;
|
|
|
|
i586*)
|
|
|
|
CFLAGS="-march=pentium $CFLAGS"
|
|
|
|
;;
|
|
|
|
i486*)
|
|
|
|
CFLAGS="-march=i486 $CFLAGS"
|
|
|
|
;;
|
|
|
|
i386*)
|
|
|
|
CFLAGS="-march=i386 $CFLAGS"
|
|
|
|
;;
|
|
|
|
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"
|
|
|
|
CROSS_SIMULATOR="sim-fast"
|
|
|
|
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"
|
|
|
|
then
|
|
|
|
CFLAGS="-A -A"
|
|
|
|
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"
|
2001-04-09 20:54:03 +01:00
|
|
|
else
|
2001-09-03 18:30:53 +01:00
|
|
|
CFLAGS="-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
|
|
|
AC_SUBST(INSTALL_COMMAND)
|
2001-07-05 17:14:15 +01:00
|
|
|
AC_SUBST(CROSS_SIMULATOR)
|
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
|
2002-03-17 06:11:29 +00:00
|
|
|
if test "$target_os" = "cygwin"
|
2001-04-09 20:54:03 +01:00
|
|
|
then
|
2002-03-17 06:11:29 +00:00
|
|
|
INSTALL_COMMAND=install_win32
|
|
|
|
if test "$cygwin" = "no"
|
|
|
|
then
|
|
|
|
CC="gcc -mno-cygwin"
|
|
|
|
AC_CHECK_LIB(wsock32,main)
|
|
|
|
prefix="c:/Program\\ Files/Yap"
|
|
|
|
DLL_LIBS="-L /usr/lib/mingw -lmsvcrt -lmingw32 -lkernel32"
|
|
|
|
else
|
|
|
|
DLL_LIBS=""
|
|
|
|
LIBS="-lgcc -lcygwin -lkernel32 -lgcc"
|
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
else
|
2002-03-17 06:11:29 +00:00
|
|
|
DLL_LIBS=""
|
2001-04-09 20:54:03 +01:00
|
|
|
INSTALL_COMMAND="install_unix"
|
|
|
|
AC_CHECK_LIB(m,sin)
|
|
|
|
AC_CHECK_LIB(socket,socket)
|
|
|
|
AC_CHECK_LIB(nsl,main,
|
|
|
|
have_nsl=yes
|
|
|
|
,
|
|
|
|
have_nsl=no)
|
|
|
|
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)
|
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(termcap,tgetent)
|
|
|
|
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
|
|
|
|
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
|
|
|
|
MPI_CC=${CC}
|
2002-02-11 20:46:41 +00:00
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
|
2002-03-04 10:02:03 +00:00
|
|
|
MPI_LIBS=
|
2002-02-22 14:31:45 +00:00
|
|
|
if test "$yap_cv_mpe" != "no"
|
|
|
|
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
|
|
|
|
|
|
|
|
AC_SUBST(YAPMPILIB)
|
2002-02-26 18:58:35 +00:00
|
|
|
AC_SUBST(MPI_OBJS)
|
|
|
|
AC_SUBST(MPI_LIBS)
|
2002-02-22 14:31:45 +00:00
|
|
|
|
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 System stuff for dynamic linking.
|
|
|
|
dnl
|
|
|
|
dnl Exports:
|
|
|
|
dnl
|
|
|
|
dnl "" if we can do dynamic linking, "#" otherwise
|
|
|
|
AC_SUBST(INSTALL_DLLS)
|
|
|
|
dnl C-flags used to compile a file that will be loaded dynamically
|
|
|
|
AC_SUBST(SHLIB_CFLAGS)
|
|
|
|
dnl suffix for loadable binary (.so,.dll,.o)
|
|
|
|
AC_SUBST(SHLIB_SUFFIX)
|
|
|
|
dnl how to call the loader
|
2001-11-18 21:00:57 +00:00
|
|
|
AC_SUBST(DO_SECOND_LD)
|
2001-04-09 20:54:03 +01:00
|
|
|
AC_SUBST(SHLIB_LD)
|
|
|
|
dnl makefile target for building YAP library or dll
|
|
|
|
AC_SUBST(NEWSHOBJ)
|
|
|
|
dnl objects in YAP library
|
|
|
|
AC_SUBST(YAPLIB)
|
|
|
|
dnl install_info
|
|
|
|
AC_SUBST(INSTALL_INFO)
|
|
|
|
dnl let YAP_EXTRAS fall through configure, from the env into Makefile
|
|
|
|
AC_SUBST(YAP_EXTRAS)
|
2002-03-17 06:11:29 +00:00
|
|
|
AC_SUBST(DLL_LIBS)
|
|
|
|
AC_SUBST(NO_BUILTIN_REGEXP)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
dnl defaults
|
|
|
|
INSTALL_DLLS="#"
|
|
|
|
SHLIB_LD="@#"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD="#"
|
2001-04-09 20:54:03 +01:00
|
|
|
NEWSHOBJ="sobjs"
|
|
|
|
YAPLIB="libYap.a"
|
|
|
|
M4="m4"
|
|
|
|
|
|
|
|
case $target_os in
|
|
|
|
*linux*)
|
|
|
|
if test $have_dl = yes
|
|
|
|
then
|
|
|
|
SHLIB_SUFFIX=".so"
|
|
|
|
SHLIB_LD="ld -shared"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2001-04-09 20:54:03 +01:00
|
|
|
LIBS="$LIBS -ldl"
|
|
|
|
case $host_cpu in
|
|
|
|
alpha*)
|
|
|
|
LDFLAGS="-export-dynamic $LDFLAGS"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test "$CC" != "lcc"
|
|
|
|
then
|
|
|
|
LDFLAGS="-rdynamic $LDFLAGS"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
if test $have_nsl = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
|
|
|
if test $CC = gcc
|
|
|
|
then
|
|
|
|
SHLIB_CFLAGS="-shared -fPIC"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*sunos4*)
|
|
|
|
M4="/usr/5bin/m4"
|
|
|
|
LDFLAGS="$LDFLAGS -N"
|
|
|
|
if test $have_nsl = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
|
|
|
SHLIB_SUFFIX=".o"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
;;
|
|
|
|
*hpux*)
|
|
|
|
#do not use the first memory quadrant
|
|
|
|
AC_DEFINE(FORCE_SECOND_QUADRANT)
|
|
|
|
M4="/usr/bin/m4"
|
2002-01-15 17:55:50 +00:00
|
|
|
SHLIB_INTERFACE="load_shl.o"
|
2001-04-09 20:54:03 +01:00
|
|
|
if test $CC = cc -o $CC = c89
|
|
|
|
then
|
2002-01-15 17:55:50 +00:00
|
|
|
#this tells ld to export all non-static symbols,
|
|
|
|
#otherwise no external predicates.
|
2001-09-06 16:40:33 +01:00
|
|
|
SHLIB_LD="ld -b -E ${LDFLAGS}"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2001-04-09 20:54:03 +01:00
|
|
|
SHLIB_SUFFIX=".sl"
|
|
|
|
SHLIB_CFLAGS="+z"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
else
|
|
|
|
INSTALL_DLLS="#"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*aix*)
|
|
|
|
# To actually use dlls in AIX I'd need to build YAP as a DLL first.
|
|
|
|
# I won't bother for now.
|
|
|
|
#
|
|
|
|
# SHLIB_SUFFIX=".a"
|
|
|
|
#SHLIB_LD="\$(srcdir)/../../ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
|
|
|
|
#INSTALL_DLLS=""
|
|
|
|
;;
|
|
|
|
*osf*)
|
|
|
|
SHLIB_SUFFIX=".so"
|
|
|
|
SHLIB_LD="ld -shared -expect_unresolved '*'"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*irix6*)
|
|
|
|
SHLIB_CFLAGS=""
|
|
|
|
SHLIB_SUFFIX=".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"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
;;
|
2002-04-23 15:37:56 +01:00
|
|
|
*darwin*)
|
|
|
|
SHLIB_CFLAGS="-fno-common"
|
|
|
|
SHLIB_SUFFIX=".so"
|
|
|
|
DO_SECOND_LD=""
|
|
|
|
SHLIB_LD="cc -bundle -flat_namespace -undefined suppress"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
;;
|
2001-04-09 20:54:03 +01:00
|
|
|
*netbsd*|*freebsd*)
|
|
|
|
if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__
|
|
|
|
then
|
|
|
|
#an a.out system
|
|
|
|
SHLIB_CFLAGS=""
|
|
|
|
SHLIB_SUFFIX=".o"
|
|
|
|
else
|
|
|
|
#an elf system
|
|
|
|
LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
|
|
|
|
SHLIB_CFLAGS="-fPIC"
|
|
|
|
SHLIB_LD="ld -Bshareable -x"
|
2001-11-18 21:00:57 +00:00
|
|
|
DO_SECOND_LD=""
|
2001-04-09 20:54:03 +01:00
|
|
|
SHLIB_SUFFIX=".so"
|
|
|
|
INSTALL_DLLS=""
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*cyg*)
|
2001-08-11 00:07:00 +01:00
|
|
|
# gcc on cygwin seems to have trouble with longjmp
|
|
|
|
# and -fomit-frame-point -DBP_FREE
|
2002-03-17 06:11:29 +00:00
|
|
|
YAPLIB="libWYap.a"
|
|
|
|
SHLIB_SUFFIX=".dll"
|
|
|
|
NEWSHOBJ="dll"
|
2001-08-11 00:07:00 +01:00
|
|
|
C_PARSER_FLAGS="$C_INTERF_FLAGS"
|
2001-04-09 20:54:03 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test $have_dl = yes
|
|
|
|
then
|
|
|
|
SHLIB_SUFFIX=".o"
|
|
|
|
LIBS="$LIBS -ldl"
|
2001-11-18 21:00:57 +00:00
|
|
|
INSTALL_DLLS=""
|
2001-04-09 20:54:03 +01:00
|
|
|
if test $CC = gcc
|
|
|
|
then
|
|
|
|
SHLIB_CFLAGS="-fPIC"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test $have_nsl = yes
|
|
|
|
then
|
|
|
|
LIBS="$LIBS -lnsl"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
if test "$debugyap" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DDEBUG=1"
|
|
|
|
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 "$lowleveltracer" = "yes"
|
|
|
|
then
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DLOW_LEVEL_TRACER=1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
case "$tabling" in
|
|
|
|
local)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTABLING_LOCAL_SCHEDULING=1"
|
|
|
|
;;
|
|
|
|
yes|batched)
|
|
|
|
YAP_EXTRAS="$YAP_EXTRAS -DTABLING_BATCHED_SCHEDULING=1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2002-04-23 15:37:56 +01:00
|
|
|
AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h)
|
|
|
|
AC_CHECK_HEADERS(errno.h fcntl.h)
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_HEADERS(fenv.h fpu_control.h ieeefp.h io.h limits.h memory.h)
|
|
|
|
AC_CHECK_HEADERS(netdb.h netinet/in.h regex.h)
|
2002-01-16 20:18:28 +00:00
|
|
|
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h stropts.h)
|
|
|
|
AC_CHECK_HEADERS(sys/conf.h sys/file.h)
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_HEADERS(sys/mman.h sys/param.h 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)
|
|
|
|
AC_CHECK_HEADERS(time.h unistd.h winsock.h winsock2.h)
|
2001-04-09 20:54:03 +01:00
|
|
|
if test "$yap_cv_gmp" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(gmp.h)
|
|
|
|
fi
|
2001-06-22 18:53:36 +01:00
|
|
|
if test "$yap_cv_readline" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS( readline/readline.h)
|
|
|
|
fi
|
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 *)
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
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_sigsetjmp,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <setjmp.h>
|
|
|
|
,
|
|
|
|
sigjmp_buf RestartEnv;
|
|
|
|
|
|
|
|
siglongjmp (RestartEnv, 1);
|
|
|
|
,
|
|
|
|
yap_sigsetjmp=yes,yap_sigsetjmp=no)])
|
|
|
|
AC_MSG_RESULT($yap_sigsetjmp)
|
|
|
|
if test $yap_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_sigsegv,[
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
,
|
|
|
|
printf("Signal value is %d\n", SIGSEGV);
|
|
|
|
,
|
|
|
|
yap_sigsegv=yes,yap_sigsegv=no)])
|
|
|
|
AC_MSG_RESULT($yap_sigsegv)
|
|
|
|
if test $yap_sigsegv = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_SIGSEGV,0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_FUNCS(acosh alarm asinh atanh chdir dup2)
|
|
|
|
AC_CHECK_FUNCS(fetestexcept finite getcwd getenv)
|
|
|
|
AC_CHECK_FUNCS(gethostbyname gethostid gethostname)
|
|
|
|
AC_CHECK_FUNCS(gethrtime getpwnam getrusage gettimeofday getwd)
|
|
|
|
AC_CHECK_FUNCS(isatty isnan kill labs link localtime lstat)
|
|
|
|
AC_CHECK_FUNCS(memcpy memmove mkstemp mktemp mmap opendir)
|
2002-03-17 06:11:29 +00:00
|
|
|
AC_CHECK_FUNCS(popen putenv rand random regexec)
|
|
|
|
AC_CHECK_FUNCS(rename rint rl_set_prompt sbrk select)
|
2001-06-22 18:53:36 +01:00
|
|
|
AC_CHECK_FUNCS(setbuf setlinebuf shmat sigaction siggetmask siginterrupt)
|
|
|
|
AC_CHECK_FUNCS(signal sigprocmask sleep snprintf socket stat)
|
|
|
|
AC_CHECK_FUNCS(strchr strerror strncat strncpy strtod system)
|
|
|
|
AC_CHECK_FUNCS(time times tmpnam usleep vsnprintf waitpid)
|
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=""])
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
dnl check for mpz_xor
|
|
|
|
AC_MSG_CHECKING(for mpz_xor)
|
|
|
|
AC_CACHE_VAL(yap_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_mpz_xor=yes,yap_mpz_xor=no)])
|
|
|
|
AC_MSG_RESULT($yap_mpz_xor)
|
|
|
|
if test $yap_mpz_xor = yes
|
|
|
|
then
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_MPZ_XOR,0)
|
|
|
|
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
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
mkdir -p library/regex
|
2001-05-21 21:00:05 +01:00
|
|
|
mkdir -p library/system
|
2002-02-22 14:31:45 +00:00
|
|
|
mkdir -p library/mpi
|
2001-06-06 20:10:51 +01:00
|
|
|
mkdir -p CHR
|
|
|
|
mkdir -p CLPQR
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2002-02-22 14:31:45 +00:00
|
|
|
AC_OUTPUT(Makefile library/regex/Makefile library/system/Makefile library/random/Makefile library/mpi/Makefile .depend library/Makefile CHR/Makefile CLPQR/Makefile)
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
make depend
|
|
|
|
|