improve android compilation and fix readline 6.3

This commit is contained in:
Vítor Santos Costa 2014-05-28 00:07:08 +01:00
parent 0b2dff96d3
commit 042b3e4343
3 changed files with 350 additions and 283 deletions

507
configure vendored
View File

@ -752,6 +752,8 @@ SHLIB_CFLAGS
MERGE_DLL_OBJS MERGE_DLL_OBJS
INSTALL_DLLS INSTALL_DLLS
EXTRAYAPLIBS EXTRAYAPLIBS
STARTUP_DEFAULT
STARTUP_ANDROID
ARCH ARCH
M4GENHDRS M4GENHDRS
M4 M4
@ -839,6 +841,7 @@ SHELL'
ac_subst_files='' ac_subst_files=''
ac_user_opts=' ac_user_opts='
enable_option_checking enable_option_checking
with_sysroot
enable_abi enable_abi
enable_tabling enable_tabling
enable_or_parallelism enable_or_parallelism
@ -1550,6 +1553,7 @@ Optional Features:
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-sysroot=DIR set sysroot in compiler
--with-gmp=DIR use GNU Multiple Precision in DIR --with-gmp=DIR use GNU Multiple Precision in DIR
--with-R=DIR interface to R language --with-R=DIR interface to R language
--with-judy=DIR UDI needs judy library --with-judy=DIR UDI needs judy library
@ -1824,6 +1828,133 @@ fi
} # ac_fn_c_try_link } # ac_fn_c_try_link
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof ($2))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof (($2)))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# ------------------------------------------------------- # -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using # Tests whether HEADER exists, giving a warning if it cannot be compiled using
@ -1915,79 +2046,6 @@ fi
} # ac_fn_c_check_header_mongrel } # ac_fn_c_check_header_mongrel
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
# ac_fn_c_check_func LINENO FUNC VAR # ac_fn_c_check_func LINENO FUNC VAR
# ---------------------------------- # ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly # Tests whether FUNC exists, setting the cache variable VAR accordingly
@ -2294,60 +2352,6 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member } # ac_fn_c_check_member
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof ($2))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof (($2)))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
cat >config.log <<_ACEOF cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
@ -2703,6 +2707,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
DOC_VERSION=4.2.9 DOC_VERSION=4.2.9
# Check whether --with-sysroot was given.
if test "${with_sysroot+set}" = set; then :
withval=$with_sysroot; SYSROOT="$withval"
CPPFLAGS="$CPPFLAGS --sysroot=$SYSROOT"
CFLAGS="$CFLAGS --sysroot=$SYSROOT"
CPPFLAGS="$CPPFLAGS --sysroot=$SYSROOT"
LDFLAGS="$LDFLAGS --sysroot=$SYSROOT"
else
yap_cv_gmp=yes
fi
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -6445,104 +6462,6 @@ See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi
if test "$yap_cv_gmp" != "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
$as_echo_n "checking for main in -lgmp... " >&6; }
if ${ac_cv_lib_gmp_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_gmp_main=yes
else
ac_cv_lib_gmp_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
$as_echo "$ac_cv_lib_gmp_main" >&6; }
if test "x$ac_cv_lib_gmp_main" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGMP 1
_ACEOF
LIBS="-lgmp $LIBS"
fi
fi
if test "$yap_cv_judy" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Judy1Set in -lJudy" >&5
$as_echo_n "checking for Judy1Set in -lJudy... " >&6; }
if ${ac_cv_lib_Judy_Judy1Set+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lJudy $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Judy1Set ();
int
main ()
{
return Judy1Set ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Judy_Judy1Set=yes
else
ac_cv_lib_Judy_Judy1Set=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Judy_Judy1Set" >&5
$as_echo "$ac_cv_lib_Judy_Judy1Set" >&6; }
if test "x$ac_cv_lib_Judy_Judy1Set" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJUDY 1
_ACEOF
LIBS="-lJudy $LIBS"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: libJudy not found, UDI will only work with one Index at a time" >&5
$as_echo "libJudy not found, UDI will only work with one Index at a time" >&6; }
fi
fi
if test "$threads" = yes
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; } $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
@ -6803,7 +6722,115 @@ fi
done done
for ac_header in pthread.h ac_fn_c_check_type "$LINENO" "rl_hook_func_t" "ac_cv_type_rl_hook_func_t" "$ac_includes_default"
if test "x$ac_cv_type_rl_hook_func_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_RL_HOOK_FUNC_T 1
_ACEOF
fi
fi
if test "$yap_cv_gmp" != "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
$as_echo_n "checking for main in -lgmp... " >&6; }
if ${ac_cv_lib_gmp_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_gmp_main=yes
else
ac_cv_lib_gmp_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
$as_echo "$ac_cv_lib_gmp_main" >&6; }
if test "x$ac_cv_lib_gmp_main" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGMP 1
_ACEOF
LIBS="-lgmp $LIBS"
fi
fi
if test "$yap_cv_judy" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Judy1Set in -lJudy" >&5
$as_echo_n "checking for Judy1Set in -lJudy... " >&6; }
if ${ac_cv_lib_Judy_Judy1Set+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lJudy $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Judy1Set ();
int
main ()
{
return Judy1Set ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Judy_Judy1Set=yes
else
ac_cv_lib_Judy_Judy1Set=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Judy_Judy1Set" >&5
$as_echo "$ac_cv_lib_Judy_Judy1Set" >&6; }
if test "x$ac_cv_lib_Judy_Judy1Set" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJUDY 1
_ACEOF
LIBS="-lJudy $LIBS"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: libJudy not found, UDI will only work with one Index at a time" >&5
$as_echo "libJudy not found, UDI will only work with one Index at a time" >&6; }
fi
fi
if test "$threads" = yes
then
for ac_header in pthread.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
if test "x$ac_cv_header_pthread_h" = xyes; then : if test "x$ac_cv_header_pthread_h" = xyes; then :
@ -8612,6 +8639,19 @@ if test "x$ARCH" = "x"; then
fi fi
case "$host" in
*android*)
STARTUP_ANDROID=""
STARTUP_DEFAULT="x"
;;
**)
STARTUP_ANDROID="x"
STARTUP_DEFAULT=""
;;
esac
CMDEXT=sh CMDEXT=sh
@ -12432,7 +12472,7 @@ else
JAVA_TEST=Test.java JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* #line 12435 "configure" */ /* #line 12475 "configure" */
public class Test { public class Test {
} }
EOF EOF
@ -12608,7 +12648,7 @@ EOF
if uudecode$EXEEXT Test.uue; then if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes ac_cv_prog_uudecode_base64=yes
else else
echo "configure: 12611: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: 12651: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5 echo "configure: failed file was:" >&5
cat Test.uue >&5 cat Test.uue >&5
ac_cv_prog_uudecode_base64=no ac_cv_prog_uudecode_base64=no
@ -12739,7 +12779,7 @@ else
JAVA_TEST=Test.java JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* #line 12742 "configure" */ /* #line 12782 "configure" */
public class Test { public class Test {
} }
EOF EOF
@ -12774,7 +12814,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
TEST=Test TEST=Test
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* [#]line 12777 "configure" */ /* [#]line 12817 "configure" */
public class Test { public class Test {
public static void main (String args[]) { public static void main (String args[]) {
System.exit (0); System.exit (0);
@ -15427,14 +15467,13 @@ if test "$PKG_SWIG" != ""; then
mkdir -p packages/swig/python mkdir -p packages/swig/python
mkdir -p packages/swig/R mkdir -p packages/swig/R
mkdir -p packages/swig/java mkdir -p packages/swig/java
mkdir -p packages/swig/src mkdir -p packages/swig/fli
mkdir -p packages/swig/jni
ac_config_files="$ac_config_files packages/swig/Makefile packages/swig/jni/Android.mk" ac_config_files="$ac_config_files packages/swig/Makefile packages/swig/Android.mk"
fi fi
@ -16773,7 +16812,7 @@ do
"library/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES library/matlab/Makefile" ;; "library/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES library/matlab/Makefile" ;;
"packages/python/Makefile") CONFIG_FILES="$CONFIG_FILES packages/python/Makefile" ;; "packages/python/Makefile") CONFIG_FILES="$CONFIG_FILES packages/python/Makefile" ;;
"packages/swig/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swig/Makefile" ;; "packages/swig/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swig/Makefile" ;;
"packages/swig/jni/Android.mk") CONFIG_FILES="$CONFIG_FILES packages/swig/jni/Android.mk" ;; "packages/swig/Android.mk") CONFIG_FILES="$CONFIG_FILES packages/swig/Android.mk" ;;
"packages/cuda/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cuda/Makefile" ;; "packages/cuda/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cuda/Makefile" ;;
"packages/gecode/Makefile") CONFIG_FILES="$CONFIG_FILES packages/gecode/Makefile" ;; "packages/gecode/Makefile") CONFIG_FILES="$CONFIG_FILES packages/gecode/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;

View File

@ -4,7 +4,7 @@ dnl
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl VARIABLES EXPORTED dnl VARIABLES EXPORTED
dnl dnl
dnl ARCH dnl ARCH
dnl dnl
@ -40,6 +40,15 @@ AC_INIT(YAP, 6.3.4, yap-users@sf.net, yap )
DOC_VERSION=4.2.9 DOC_VERSION=4.2.9
AC_ARG_WITH(sysroot,
[ --with-sysroot[=DIR] set sysroot in compiler],
[ SYSROOT="$withval"
CPPFLAGS="$CPPFLAGS --sysroot=$SYSROOT"
CFLAGS="$CFLAGS --sysroot=$SYSROOT"
CPPFLAGS="$CPPFLAGS --sysroot=$SYSROOT"
LDFLAGS="$LDFLAGS --sysroot=$SYSROOT" ],
[yap_cv_gmp=yes])
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
AC_PROG_CXX AC_PROG_CXX
@ -193,7 +202,7 @@ AC_ARG_WITH(gmp,
CFLAGS="$CFLAGS -I${yap_cv_gmp}/include" CFLAGS="$CFLAGS -I${yap_cv_gmp}/include"
fi, fi,
[yap_cv_gmp=yes]) [yap_cv_gmp=yes])
AC_ARG_WITH(R, AC_ARG_WITH(R,
[ --with-R[=DIR] interface to R language], [ --with-R[=DIR] interface to R language],
if test "$withval" = yes; then if test "$withval" = yes; then
@ -204,7 +213,7 @@ AC_ARG_WITH(R,
yap_cv_R=$withval yap_cv_R=$withval
fi, fi,
[yap_cv_R=no]) [yap_cv_R=no])
AC_ARG_WITH(judy, AC_ARG_WITH(judy,
[ --with-judy[=DIR] UDI needs judy library], [ --with-judy[=DIR] UDI needs judy library],
if test "$withval" = yes; then if test "$withval" = yes; then
@ -317,7 +326,7 @@ AC_ARG_WITH(max-threads,
[yap_cv_max_threads="1024"]) [yap_cv_max_threads="1024"])
AC_DEFINE(MinHeapSpace, (2048*SIZEOF_INT_P), [at least 2M Cells for Heap]) AC_DEFINE(MinHeapSpace, (2048*SIZEOF_INT_P), [at least 2M Cells for Heap])
AC_DEFINE(MinStackSpace,(1024*SIZEOF_INT_P), [at least 1M Cells for Stack]) AC_DEFINE(MinStackSpace,(1024*SIZEOF_INT_P), [at least 1M Cells for Stack])
AC_DEFINE(MinTrailSpace,(256*SIZEOF_INT_P), [at least 1/2M Cells for Trail]) AC_DEFINE(MinTrailSpace,(256*SIZEOF_INT_P), [at least 1/2M Cells for Trail])
if test "$orparallelism" = threads if test "$orparallelism" = threads
then then
@ -352,7 +361,7 @@ fi
AC_DEFINE_UNQUOTED(MAX_THREADS,$yap_cv_max_threads,[max number of threads, default 1 or 1024]) AC_DEFINE_UNQUOTED(MAX_THREADS,$yap_cv_max_threads,[max number of threads, default 1 or 1024])
if test "$yap_cv_prism" = no if test "$yap_cv_prism" = no
then then
INSTALL_PRISM="" INSTALL_PRISM=""
else else
@ -373,7 +382,7 @@ if test "$yap_cv_clpbn_bp"="yes"; then
AC_LANG_POP() AC_LANG_POP()
fi fi
if test "$yap_cv_clpbn_bp" = no if test "$yap_cv_clpbn_bp" = no
then then
PKG_CLPBN="packages/CLPBN" PKG_CLPBN="packages/CLPBN"
else else
@ -383,7 +392,7 @@ fi
dnl condor universe does not like dynamic linking on Linux, DEC, and HP-UX platforms. dnl condor universe does not like dynamic linking on Linux, DEC, and HP-UX platforms.
if test "$use_condor" = yes if test "$use_condor" = yes
then then
static_compilation="yes" static_compilation="yes"
use_malloc="yes" use_malloc="yes"
@ -403,7 +412,7 @@ fi
dnl Compilation Flags dnl Compilation Flags
if test "$GCC" = "yes" if test "$GCC" = "yes"
then then
if test "$debugyap" = "yes" if test "$debugyap" = "yes"
then then
CXXFLAGS="-O -g -Wall $CXXFLAGS" CXXFLAGS="-O -g -Wall $CXXFLAGS"
C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS" C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
@ -413,9 +422,9 @@ then
C_INTERF_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS" C_INTERF_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS" C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS" CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
case "`$CC --version < /dev/null`" in case "`$CC --version < /dev/null`" in
*3.4*) *3.4*)
CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS"
;; ;;
esac esac
case "$target_cpu" in case "$target_cpu" in
@ -425,7 +434,7 @@ then
;; ;;
sparc*) sparc*)
case "$target_os" in case "$target_os" in
*solaris[2-9]*) dnl *solaris[2-9]*) dnl
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS" CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
CXXFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CXXFLAGS" CXXFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CXXFLAGS"
;; ;;
@ -576,10 +585,10 @@ then
esac esac
fi fi
WINDOWS="" WINDOWS=""
PKG_WINCONSOLE="swi/console" PKG_WINCONSOLE="swi/console"
else else
WINDOWS="#" WINDOWS="#"
PKG_WINCONSOLE="" PKG_WINCONSOLE=""
LIBS="-lcygwin" LIBS="-lcygwin"
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll" EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows" EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
@ -636,6 +645,7 @@ then
[--with-readline was given, but test for readline failed]) [--with-readline was given, but test for readline failed])
fi fi
]) ])
AC_CHECK_TYPES([rl_hook_func_t])
fi fi
if test "$yap_cv_gmp" != "no" if test "$yap_cv_gmp" != "no"
@ -649,7 +659,7 @@ fi
if test "$threads" = yes if test "$threads" = yes
then then
AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(pthread.h)
AC_CHECK_FUNCS(pthread_mutexattr_setkind_np pthread_mutexattr_settype) AC_CHECK_FUNCS(pthread_mutexattr_setkind_np pthread_mutexattr_settype)
if test "$pthreadlocking" = yes if test "$pthreadlocking" = yes
then then
@ -698,7 +708,7 @@ else
fi fi
if test "$use_clpqr" = no; then if test "$use_clpqr" = no; then
PKG_CLPQR="" PKG_CLPQR=""
elif test -e "$srcdir"/packages/clpqr/Makefile.in; then elif test -e "$srcdir"/packages/clpqr/Makefile.in; then
PKG_CLPQR="packages/clpqr" PKG_CLPQR="packages/clpqr"
else else
@ -781,7 +791,7 @@ then
AC_MSG_CHECKING([whether ld supports --enable-new-dtags]) AC_MSG_CHECKING([whether ld supports --enable-new-dtags])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])], AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no]) [AC_MSG_RESULT([no])
LDFLAGS="$OLDLDFLAGS"] LDFLAGS="$OLDLDFLAGS"]
) )
fi fi
@ -793,7 +803,7 @@ fi
else else
AC_SYS_RESTARTABLE_SYSCALLS AC_SYS_RESTARTABLE_SYSCALLS
fi fi
dnl defaults dnl defaults
INSTALL_DLLS="no" INSTALL_DLLS="no"
EXTRA_OBJS="" EXTRA_OBJS=""
@ -803,10 +813,10 @@ fi
M4="m4" M4="m4"
MERGE_DLL_OBJS="#" MERGE_DLL_OBJS="#"
IN_UNIX="" IN_UNIX=""
dnl This has to be before $target_os dnl This has to be before $target_os
YAPLIB="libYap.a" YAPLIB="libYap.a"
dnl now this is where things get nasty. dnl now this is where things get nasty.
dnl trying to get the libraries dnl trying to get the libraries
case "$target_os" in case "$target_os" in
@ -853,7 +863,7 @@ fi
LIBS="$LIBS -lnsl" LIBS="$LIBS -lnsl"
fi fi
if test "$dynamic_loading" = "yes" if test "$dynamic_loading" = "yes"
then then
YAPLIB_LD="\$(CC) -shared" YAPLIB_LD="\$(CC) -shared"
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-rpath=\$(YAPLIBDIR) -Wl,-rpath=\$(LIBDIR)" EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-rpath=\$(YAPLIBDIR) -Wl,-rpath=\$(LIBDIR)"
INSTALL_ENV="LD_LIBRARY_PATH=:\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" INSTALL_ENV="LD_LIBRARY_PATH=:\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
@ -978,14 +988,14 @@ dnl Linux has both elf and a.out, in this case we found elf
have_dl=no) have_dl=no)
if test ${have_dl} = yes if test ${have_dl} = yes
then then
LIBS="$LIBS -ldl" LIBS="$LIBS -ldl"
fi fi
fi fi
SO="dylib" SO="dylib"
SOPATH="DYLD_LIBRARY_PATH" SOPATH="DYLD_LIBRARY_PATH"
DO_SECOND_LD="" DO_SECOND_LD=""
if test "$dynamic_loading" = "yes" if test "$dynamic_loading" = "yes"
then then
SHLIB_LD="$CC -dynamiclib" SHLIB_LD="$CC -dynamiclib"
SHLIB_CXX_LD="$CXX -dynamiclib" SHLIB_CXX_LD="$CXX -dynamiclib"
EXTRA_LIBS_FOR_DLLS="-L\$(abs_top_builddir) $LIBS $EXTRA_LIBS_FOR_DLLS -lYap -Wl,-install_name,\$(YAPLIBDIR)/\$@" EXTRA_LIBS_FOR_DLLS="-L\$(abs_top_builddir) $LIBS $EXTRA_LIBS_FOR_DLLS -lYap -Wl,-install_name,\$(YAPLIBDIR)/\$@"
@ -1013,7 +1023,7 @@ dnl Linux has both elf and a.out, in this case we found elf
*netbsd*|*openbsd*|*freebsd*|*dragonfly*) *netbsd*|*openbsd*|*freebsd*|*dragonfly*)
if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__ if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__
then then
#an a.out system #an a.out system
SHLIB_CFLAGS="$CFLAGS" SHLIB_CFLAGS="$CFLAGS"
SHLIB_CXXFLAGS="$CXXFLAGS" SHLIB_CXXFLAGS="$CXXFLAGS"
SO="o" SO="o"
@ -1053,7 +1063,7 @@ dnl Linux has both elf and a.out, in this case we found elf
DYNYAPLIB=libYap."$SO" DYNYAPLIB=libYap."$SO"
SONAMEFLAG="-Wl,--soname=$DYNYAPLIB" SONAMEFLAG="-Wl,--soname=$DYNYAPLIB"
if test "$dynamic_loading" = "yes" if test "$dynamic_loading" = "yes"
then then
YAPLIB_LD="\$(CC)" YAPLIB_LD="\$(CC)"
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)"
PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir):\$(abs_top_builddir)/library/system:$LD_LIBRARY_PATH" PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir):\$(abs_top_builddir)/library/system:$LD_LIBRARY_PATH"
@ -1124,7 +1134,7 @@ dnl use the current files, even if older
PRE_INSTALL_ENV="$PRE_INSTALL_ENV YAPLIBDIR=\$(abs_top_builddir):\$(abs_top_builddir)/library/system:\$(abs_top_builddir)/packages/clib " PRE_INSTALL_ENV="$PRE_INSTALL_ENV YAPLIBDIR=\$(abs_top_builddir):\$(abs_top_builddir)/library/system:\$(abs_top_builddir)/packages/clib "
if test "$dynamic_loading" = "yes" if test "$dynamic_loading" = "yes"
then then
YAPLIB_CFLAGS="$SHLIB_CFLAGS" YAPLIB_CFLAGS="$SHLIB_CFLAGS"
YAPLIB="$DYNYAPLIB" YAPLIB="$DYNYAPLIB"
else else
@ -1147,29 +1157,29 @@ if test "$eam" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DBEAM" YAP_EXTRAS="$YAP_EXTRAS -DBEAM"
fi fi
if test "$wamprofile" = "yes" if test "$wamprofile" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DANALYST=1" YAP_EXTRAS="$YAP_EXTRAS -DANALYST=1"
fi fi
if test "$depthlimit" = "yes" if test "$depthlimit" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1" YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1"
fi fi
if test "$use_april" = "yes" if test "$use_april" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1 -DAPRIL" YAP_EXTRAS="$YAP_EXTRAS -DDEPTH_LIMIT=1 -DAPRIL"
LDFLAGS="$LDFLAGS -L." LDFLAGS="$LDFLAGS -L."
LIBS="$LIBS -lApril" LIBS="$LIBS -lApril"
fi fi
if test "$lowleveltracer" = "yes" if test "$lowleveltracer" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DLOW_LEVEL_TRACER=1" YAP_EXTRAS="$YAP_EXTRAS -DLOW_LEVEL_TRACER=1"
fi fi
if test "$threads" = "yes" if test "$threads" = "yes"
then then
YAP_EXTRAS="$YAP_EXTRAS -DTHREADS=1" YAP_EXTRAS="$YAP_EXTRAS -DTHREADS=1"
@ -1256,7 +1266,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_rl_catch=yes,yap_cv_rl_catch=no ) ] ) yap_cv_rl_catch=yes,yap_cv_rl_catch=no ) ] )
AC_MSG_RESULT($yap_cv_rl_catch) AC_MSG_RESULT($yap_cv_rl_catch)
if test "$yap_cv_rl_catch" = yes if test "$yap_cv_rl_catch" = yes
then then
AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1, [Defined if you can turn off readline's signal handling.]) AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1, [Defined if you can turn off readline's signal handling.])
fi fi
@ -1306,7 +1316,7 @@ AC_TRY_RUN(
, ,
yap_cv_gcc=yes,yap_cv_gcc=no,yap_cv_gcc=yes)]) yap_cv_gcc=yes,yap_cv_gcc=no,yap_cv_gcc=yes)])
AC_MSG_RESULT($yap_cv_gcc) AC_MSG_RESULT($yap_cv_gcc)
if test "$yap_cv_gcc" = yes if test "$yap_cv_gcc" = yes
then then
M4GENHDRS=m4/gcc_genhdrs.m4 M4GENHDRS=m4/gcc_genhdrs.m4
AC_DEFINE(HAVE_GCC,1,[Old m4 auto-heder generation, not really useful now]) AC_DEFINE(HAVE_GCC,1,[Old m4 auto-heder generation, not really useful now])
@ -1335,6 +1345,19 @@ fi
changequote([,])dnl changequote([,])dnl
AC_SUBST(ARCH) AC_SUBST(ARCH)
case "$host" in
*android*)
STARTUP_ANDROID=""
STARTUP_DEFAULT="x"
;;
**)
STARTUP_ANDROID="x"
STARTUP_DEFAULT=""
;;
esac
AC_SUBST(STARTUP_ANDROID)
AC_SUBST(STARTUP_DEFAULT)
CMDEXT=sh CMDEXT=sh
dnl System stuff for dynamic linking. dnl System stuff for dynamic linking.
@ -1417,7 +1440,7 @@ if test "$yap_cv_threaded_code" = yes && test "$yap_cv_gcc" = yes
then then
AC_DEFINE(USE_THREADED_CODE,1,[threaded emulator]) AC_DEFINE(USE_THREADED_CODE,1,[threaded emulator])
M4GENABSMI=gen_gcc.m4 M4GENABSMI=gen_gcc.m4
else else
M4GENABSMI=gen_ansi.m4 M4GENABSMI=gen_ansi.m4
fi fi
@ -1437,7 +1460,7 @@ AC_TRY_RUN(
, ,
yap_cv_ffieee=yes,yap_cv_ffieee=no,yap_cv_ffieee=yes)]) yap_cv_ffieee=yes,yap_cv_ffieee=no,yap_cv_ffieee=yes)])
AC_MSG_RESULT($yap_cv_ffieee) AC_MSG_RESULT($yap_cv_ffieee)
if test "$yap_cv_ffieee" = yes if test "$yap_cv_ffieee" = yes
then then
AC_DEFINE(FFIEEE,1,[IEEE floating-point, basically everyone except old VAXEN]) AC_DEFINE(FFIEEE,1,[IEEE floating-point, basically everyone except old VAXEN])
fi fi
@ -1454,7 +1477,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_sigsetjmp=yes,yap_cv_sigsetjmp=no)]) yap_cv_sigsetjmp=yes,yap_cv_sigsetjmp=no)])
AC_MSG_RESULT($yap_cv_sigsetjmp) AC_MSG_RESULT($yap_cv_sigsetjmp)
if test "$yap_cv_sigsetjmp" = yes if test "$yap_cv_sigsetjmp" = yes
then then
AC_DEFINE(HAVE_SIGSETJMP,1,[support for sigsetjmp]) AC_DEFINE(HAVE_SIGSETJMP,1,[support for sigsetjmp])
fi fi
@ -1470,7 +1493,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_sigsegv=yes,yap_cv_sigsegv=no)]) yap_cv_sigsegv=yes,yap_cv_sigsegv=no)])
AC_MSG_RESULT($yap_cv_sigsegv) AC_MSG_RESULT($yap_cv_sigsegv)
if test "$yap_cv_sigsegv" = yes if test "$yap_cv_sigsegv" = yes
then then
AC_DEFINE(HAVE_SIGSEGV,1,[UNIX signal SEGV]) AC_DEFINE(HAVE_SIGSEGV,1,[UNIX signal SEGV])
fi fi
@ -1486,7 +1509,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_sigprof=yes,yap_cv_sigprof=no)]) yap_cv_sigprof=yes,yap_cv_sigprof=no)])
AC_MSG_RESULT($yap_cv_sigprof) AC_MSG_RESULT($yap_cv_sigprof)
if test "$yap_cv_sigsegv" = yes if test "$yap_cv_sigsegv" = yes
then then
AC_DEFINE(HAVE_SIGPROF,1, [UNIX Signal SIGPROF]) AC_DEFINE(HAVE_SIGPROF,1, [UNIX Signal SIGPROF])
fi fi
@ -1502,7 +1525,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_siginfo=yes,yap_cv_siginfo=no)]) yap_cv_siginfo=yes,yap_cv_siginfo=no)])
AC_MSG_RESULT($yap_cv_siginfo) AC_MSG_RESULT($yap_cv_siginfo)
if test "$yap_cv_siginfo" = yes if test "$yap_cv_siginfo" = yes
then then
AC_DEFINE(HAVE_SIGINFO,1, [Unix SIGINFO]) AC_DEFINE(HAVE_SIGINFO,1, [Unix SIGINFO])
fi fi
@ -1518,7 +1541,7 @@ AC_TRY_COMPILE(
, ,
yap_cv_sigfpe=yes,yap_cv_sigfpe=no)]) yap_cv_sigfpe=yes,yap_cv_sigfpe=no)])
AC_MSG_RESULT($yap_cv_sigfpe) AC_MSG_RESULT($yap_cv_sigfpe)
if test "$yap_cv_sigfpe" = yes if test "$yap_cv_sigfpe" = yes
then then
AC_DEFINE(HAVE_SIGFPE,1, [Unix SIGFPE]) AC_DEFINE(HAVE_SIGFPE,1, [Unix SIGFPE])
fi fi
@ -1558,7 +1581,7 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff,
dnl this is copied from the Tcl code dnl this is copied from the Tcl code
dnl this code checks whether the system defines an union wait dnl this code checks whether the system defines an union wait
AC_MSG_CHECKING([union wait]) AC_MSG_CHECKING([union wait])
AC_TRY_LINK([#include <sys/types.h> AC_TRY_LINK([#include <sys/types.h>
#include <sys/wait.h>], [ #include <sys/wait.h>], [
union wait x; union wait x;
wait(&x); /* make sure we can compile wait */ wait(&x); /* make sure we can compile wait */
@ -1627,7 +1650,7 @@ then
AC_CHECK_FUNCS(alarm mmap popen shmat sleep system ttyname waitpid) AC_CHECK_FUNCS(alarm mmap popen shmat sleep system ttyname waitpid)
fi fi
if test "$target_os" != "mingw32" if test "$target_os" != "mingw32"
then then
AC_CHECK_FUNCS(fetestexcept snprintf) AC_CHECK_FUNCS(fetestexcept snprintf)
fi fi
@ -1644,12 +1667,12 @@ AC_TRY_LINK(
, ,
yap_cv_mpz_xor=yes,yap_cv_mpz_xor=no)]) yap_cv_mpz_xor=yes,yap_cv_mpz_xor=no)])
AC_MSG_RESULT($yap_cv_mpz_xor) AC_MSG_RESULT($yap_cv_mpz_xor)
if test "$yap_cv_mpz_xor" = yes if test "$yap_cv_mpz_xor" = yes
then then
AC_DEFINE(HAVE_MPZ_XOR,1,[Older versions of MPZ didn't have XOR]) AC_DEFINE(HAVE_MPZ_XOR,1,[Older versions of MPZ didn't have XOR])
fi fi
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes" if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
then then
maxmemory="no" maxmemory="no"
fi fi
@ -1824,7 +1847,7 @@ AC_TRY_COMPILE(
AC_MSG_RESULT(yes), AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
if test "$yap_cv_minisat" = no -a "$INSTALL_DLLS" = "no" if test "$yap_cv_minisat" = no -a "$INSTALL_DLLS" = "no"
then then
PKG_MINISAT="" PKG_MINISAT=""
else else
@ -1925,7 +1948,7 @@ dnl
if test "$yap_cv_java" = no if test "$yap_cv_java" = no
then then
PKG_JPL="" PKG_JPL=""
elif test -e "$srcdir"/packages/jpl/Makefile.in elif test -e "$srcdir"/packages/jpl/Makefile.in
then then
PKG_JPL="packages/jpl" PKG_JPL="packages/jpl"

View File

@ -454,10 +454,15 @@ Sread_readline(void *handle, char *buf, size_t size)
#endif #endif
#ifdef HAVE_RL_EVENT_HOOK #ifdef HAVE_RL_EVENT_HOOK
if ( PL_dispatch(0, PL_DISPATCH_INSTALLED) ) if ( PL_dispatch(0, PL_DISPATCH_INSTALLED) ) {
#if HAVE_RL_HOOK_FUNC_T
rl_event_hook = event_hook;
#else
rl_event_hook = (Function *)event_hook; rl_event_hook = (Function *)event_hook;
else #endif
} else {
rl_event_hook = NULL; rl_event_hook = NULL;
}
#endif #endif
prompt = PL_prompt_string(fd); prompt = PL_prompt_string(fd);