diff --git a/C/absmi.c b/C/absmi.c
index b5a6451c7..158053c94 100644
--- a/C/absmi.c
+++ b/C/absmi.c
@@ -5686,7 +5686,7 @@ absmi(int inp)
saveregs();
save_machine_regs();
- SREG = (CELL *) YapExecute((CPredicate)(((PredEntry *)p)->CodeOfPred));
+ SREG = (CELL *) YapExecute((CPredicate)(((PredEntry *)p)->TrueCodeOfPred));
}
restore_machine_regs();
diff --git a/changes4.3.html b/changes4.3.html
index 46ba59a8d..8e3c4b745 100644
--- a/changes4.3.html
+++ b/changes4.3.html
@@ -16,6 +16,7 @@
Yap-4.3.20:
+ - FIXED: create DLs even when you don't need .so.
- FIXED: abolish/1.
- NEW: try to make module system really compatible.
- CLEANUP: don't use state of Pred.
diff --git a/configure b/configure
index 4d13ed54a..37915e2fe 100755
--- a/configure
+++ b/configure
@@ -1008,7 +1008,7 @@ then
;;
sparc*)
case "$target_os" in
- *solaris2*|*solaris3*|*sunos5*|*sunos6*)
+ *solaris2-9*)
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
;;
esac
@@ -1965,8 +1965,10 @@ fi
+
INSTALL_DLLS="#"
SHLIB_LD="@#"
+DO_SECOND_LD="#"
NEWSHOBJ="sobjs"
YAPLIB="libYap.a"
M4="m4"
@@ -1977,6 +1979,7 @@ case $target_os in
then
SHLIB_SUFFIX=".so"
SHLIB_LD="ld -shared"
+ DO_SECOND_LD=""
LIBS="$LIBS -ldl"
case $host_cpu in
alpha*)
@@ -2022,6 +2025,7 @@ EOF
if test $CC = cc -o $CC = c89
then
SHLIB_LD="ld -b -E ${LDFLAGS}"
+ DO_SECOND_LD=""
SHLIB_SUFFIX=".sl"
SHLIB_CFLAGS="+z"
INSTALL_DLLS=""
@@ -2040,10 +2044,12 @@ EOF
*osf*)
SHLIB_SUFFIX=".so"
SHLIB_LD="ld -shared -expect_unresolved '*'"
+ DO_SECOND_LD=""
;;
*irix6*)
SHLIB_CFLAGS=""
SHLIB_SUFFIX=".so"
+ DO_SECOND_LD=""
SHLIB_LD="ld -n32 -shared -rdata_shared"
INSTALL_DLLS=""
;;
@@ -2058,6 +2064,7 @@ EOF
LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
+ DO_SECOND_LD=""
SHLIB_SUFFIX=".so"
INSTALL_DLLS=""
fi
@@ -2077,6 +2084,7 @@ EOF
then
SHLIB_SUFFIX=".o"
LIBS="$LIBS -ldl"
+ INSTALL_DLLS=""
if test $CC = gcc
then
SHLIB_CFLAGS="-fPIC"
@@ -2141,12 +2149,12 @@ case "$tabling" in
esac
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2145: checking for ANSI C header files" >&5
+echo "configure:2153: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2154,7 +2162,7 @@ else
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2171,7 +2179,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
@@ -2189,7 +2197,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
@@ -2210,7 +2218,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2221,7 +2229,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2245,12 +2253,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2249: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2257: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2266,7 +2274,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:2270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2290,17 +2298,17 @@ for ac_hdr in arpa/inet.h ctype.h direct.h dirent.h errno.h fcntl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2294: checking for $ac_hdr" >&5
+echo "configure:2302: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2330,17 +2338,17 @@ for ac_hdr in fenv.h fpu_control.h ieeefp.h io.h limits.h memory.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2334: checking for $ac_hdr" >&5
+echo "configure:2342: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2370,17 +2378,17 @@ for ac_hdr in netdb.h netinet/in.h regex.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2374: checking for $ac_hdr" >&5
+echo "configure:2382: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2410,17 +2418,17 @@ for ac_hdr in siginfo.h signal.h stdarg.h string.h sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2414: checking for $ac_hdr" >&5
+echo "configure:2422: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2450,17 +2458,17 @@ for ac_hdr in sys/mman.h sys/param.h sys/resource.h sys/select.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2454: checking for $ac_hdr" >&5
+echo "configure:2462: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2490,17 +2498,17 @@ for ac_hdr in sys/shm.h sys/socket.h sys/stat.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2494: checking for $ac_hdr" >&5
+echo "configure:2502: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2530,17 +2538,17 @@ for ac_hdr in sys/time.h sys/times.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2534: checking for $ac_hdr" >&5
+echo "configure:2542: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2570,17 +2578,17 @@ for ac_hdr in sys/ucontext.h sys/un.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2574: checking for $ac_hdr" >&5
+echo "configure:2582: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2610,17 +2618,17 @@ for ac_hdr in time.h unistd.h winsock.h winsock2.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2614: checking for $ac_hdr" >&5
+echo "configure:2622: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2652,17 +2660,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2656: checking for $ac_hdr" >&5
+echo "configure:2664: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2695,17 +2703,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_hdr" >&5
+echo "configure:2707: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2734,21 +2742,21 @@ done
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2738: checking for inline" >&5
+echo "configure:2746: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2774,12 +2782,12 @@ EOF
esac
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2778: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2786: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -2787,7 +2795,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:2791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -2808,7 +2816,7 @@ EOF
fi
echo $ac_n "checking size of int *""... $ac_c" 1>&6
-echo "configure:2812: checking size of int *" >&5
+echo "configure:2820: checking size of int *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2816,7 +2824,7 @@ else
ac_cv_sizeof_int_p=4
else
cat > conftest.$ac_ext <
main()
@@ -2827,7 +2835,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int_p=`cat conftestval`
else
@@ -2847,7 +2855,7 @@ EOF
echo $ac_n "checking size of short int""... $ac_c" 1>&6
-echo "configure:2851: checking size of short int" >&5
+echo "configure:2859: checking size of short int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2855,7 +2863,7 @@ else
ac_cv_sizeof_short_int=2
else
cat > conftest.$ac_ext <
main()
@@ -2866,7 +2874,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short_int=`cat conftestval`
else
@@ -2886,7 +2894,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2890: checking size of int" >&5
+echo "configure:2898: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2894,7 +2902,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <
main()
@@ -2905,7 +2913,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -2925,7 +2933,7 @@ EOF
echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:2929: checking size of long int" >&5
+echo "configure:2937: checking size of long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2933,7 +2941,7 @@ else
ac_cv_sizeof_long_int=4
else
cat > conftest.$ac_ext <
main()
@@ -2944,7 +2952,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_int=`cat conftestval`
else
@@ -2964,7 +2972,7 @@ EOF
echo $ac_n "checking size of long long int""... $ac_c" 1>&6
-echo "configure:2968: checking size of long long int" >&5
+echo "configure:2976: checking size of long long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2972,7 +2980,7 @@ else
ac_cv_sizeof_long_long_int=8
else
cat > conftest.$ac_ext <
main()
@@ -2983,7 +2991,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long_int=`cat conftestval`
else
@@ -3003,7 +3011,7 @@ EOF
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:3007: checking size of float" >&5
+echo "configure:3015: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3011,7 +3019,7 @@ else
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <
main()
@@ -3022,7 +3030,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_float=`cat conftestval`
else
@@ -3042,7 +3050,7 @@ EOF
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:3046: checking size of double" >&5
+echo "configure:3054: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3050,7 +3058,7 @@ else
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <
main()
@@ -3061,7 +3069,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_double=`cat conftestval`
else
@@ -3082,7 +3090,7 @@ EOF
echo $ac_n "checking for type of malloc""... $ac_c" 1>&6
-echo "configure:3086: checking for type of malloc" >&5
+echo "configure:3094: checking for type of malloc" >&5
if eval "test \"`echo '$''{'yap_cv_malloct'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3091,7 +3099,7 @@ if test "$cross_compiling" = yes; then
yap_cv_malloct=void
else
cat > conftest.$ac_ext <
char *malloc(size_t);
@@ -3101,7 +3109,7 @@ else
}
EOF
-if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
yap_cv_malloct=char
else
@@ -3129,7 +3137,7 @@ fi
echo $ac_n "checking for gcc inline""... $ac_c" 1>&6
-echo "configure:3133: checking for gcc inline" >&5
+echo "configure:3141: checking for gcc inline" >&5
if eval "test \"`echo '$''{'yap_cv_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3138,14 +3146,14 @@ if test "$cross_compiling" = yes; then
yap_cv_gcc=yes
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
yap_cv_gcc=yes
else
@@ -3179,7 +3187,7 @@ fi
echo $ac_n "checking for gcc threaded code""... $ac_c" 1>&6
-echo "configure:3183: checking for gcc threaded code" >&5
+echo "configure:3191: checking for gcc threaded code" >&5
if eval "test \"`echo '$''{'yap_cv_threaded_code'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3188,7 +3196,7 @@ if test "$cross_compiling" = yes; then
yap_cv_threaded_code=yes
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
yap_cv_threaded_code=yes
else
@@ -3231,7 +3239,7 @@ fi
echo $ac_n "checking for IEEE floats""... $ac_c" 1>&6
-echo "configure:3235: checking for IEEE floats" >&5
+echo "configure:3243: checking for IEEE floats" >&5
if eval "test \"`echo '$''{'yap_cv_ffieee'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3240,7 +3248,7 @@ if test "$cross_compiling" = yes; then
yap_cv_ffieee=yes
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
yap_cv_ffieee=yes
else
@@ -3279,13 +3287,13 @@ EOF
fi
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:3283: checking for sigsetjmp" >&5
+echo "configure:3291: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'yap_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
@@ -3296,7 +3304,7 @@ sigjmp_buf RestartEnv;
; return 0; }
EOF
-if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
yap_sigsetjmp=yes
else
@@ -3323,13 +3331,13 @@ EOF
fi
echo $ac_n "checking for sigsegv""... $ac_c" 1>&6
-echo "configure:3327: checking for sigsegv" >&5
+echo "configure:3335: checking for sigsegv" >&5
if eval "test \"`echo '$''{'yap_sigsegv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -3339,7 +3347,7 @@ printf("Signal value is %d\n", SIGSEGV);
; return 0; }
EOF
-if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
yap_sigsegv=yes
else
@@ -3366,9 +3374,9 @@ EOF
fi
echo $ac_n "checking union wait""... $ac_c" 1>&6
-echo "configure:3370: checking union wait" >&5
+echo "configure:3378: checking union wait" >&5
cat > conftest.$ac_ext <
#include
@@ -3381,7 +3389,7 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED
; return 0; }
EOF
-if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
union_wait_ok=yes
else
@@ -3400,9 +3408,9 @@ EOF
fi
echo $ac_n "checking environ""... $ac_c" 1>&6
-echo "configure:3404: checking environ" >&5
+echo "configure:3412: checking environ" >&5
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
environ_ok=yes
else
@@ -3430,12 +3438,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3434: checking return type of signal handlers" >&5
+echo "configure:3442: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
@@ -3452,7 +3460,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3473,12 +3481,12 @@ EOF
for ac_func in acosh alarm asinh atanh chdir dup2
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3477: checking for $ac_func" >&5
+echo "configure:3485: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3528,12 +3536,12 @@ done
for ac_func in fetestexcept finite getcwd getenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3532: checking for $ac_func" >&5
+echo "configure:3540: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3583,12 +3591,12 @@ done
for ac_func in gethostbyname gethostid gethostname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3587: checking for $ac_func" >&5
+echo "configure:3595: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3638,12 +3646,12 @@ done
for ac_func in gethrtime getpwnam getrusage gettimeofday getwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3642: checking for $ac_func" >&5
+echo "configure:3650: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3693,12 +3701,12 @@ done
for ac_func in isatty isnan kill labs link localtime lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3697: checking for $ac_func" >&5
+echo "configure:3705: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3748,12 +3756,12 @@ done
for ac_func in memcpy memmove mkstemp mktemp mmap opendir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3752: checking for $ac_func" >&5
+echo "configure:3760: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3803,12 +3811,12 @@ done
for ac_func in popen putenv rand random rename rint rl_set_prompt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3807: checking for $ac_func" >&5
+echo "configure:3815: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3858,12 +3866,12 @@ done
for ac_func in sbrk select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3862: checking for $ac_func" >&5
+echo "configure:3870: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3913,12 +3921,12 @@ done
for ac_func in setbuf setlinebuf shmat sigaction siggetmask siginterrupt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_func" >&5
+echo "configure:3925: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3968,12 +3976,12 @@ done
for ac_func in signal sigprocmask sleep snprintf socket stat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3972: checking for $ac_func" >&5
+echo "configure:3980: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4023,12 +4031,12 @@ done
for ac_func in strchr strerror strncat strncpy strtod system
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4027: checking for $ac_func" >&5
+echo "configure:4035: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4078,12 +4086,12 @@ done
for ac_func in time times tmpnam usleep vsnprintf waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4082: checking for $ac_func" >&5
+echo "configure:4090: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4132,13 +4140,13 @@ done
echo $ac_n "checking for mpz_xor""... $ac_c" 1>&6
-echo "configure:4136: checking for mpz_xor" >&5
+echo "configure:4144: checking for mpz_xor" >&5
if eval "test \"`echo '$''{'yap_mpz_xor'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
void check(mpz_t rop,mpz_t op1,mpz_t op2) {
@@ -4149,7 +4157,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
yap_mpz_xor=yes
else
@@ -4176,7 +4184,7 @@ EOF
fi
echo $ac_n "checking if fflush(NULL) clobbers input pipes""... $ac_c" 1>&6
-echo "configure:4180: checking if fflush(NULL) clobbers input pipes" >&5
+echo "configure:4188: checking if fflush(NULL) clobbers input pipes" >&5
if eval "test \"`echo '$''{'yap_cv_broken_fflush_null'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4202,11 +4210,11 @@ else
}
}
EOF
- { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+ { (eval echo configure:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test "$?" = 0
then
cat conftest.$ac_ext | ./conftest$ac_exeext > conftest.out
- { ac_try='cmp conftest.$ac_ext conftest.out'; { (eval echo configure:4210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
+ { ac_try='cmp conftest.$ac_ext conftest.out'; { (eval echo configure:4218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if test "$?" = 0
then
echo "$ac_t""no" 1>&6
@@ -4407,6 +4415,7 @@ s%@CPP@%$CPP%g
s%@INSTALL_DLLS@%$INSTALL_DLLS%g
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
+s%@DO_SECOND_LD@%$DO_SECOND_LD%g
s%@SHLIB_LD@%$SHLIB_LD%g
s%@NEWSHOBJ@%$NEWSHOBJ%g
s%@YAPLIB@%$YAPLIB%g
diff --git a/configure.in b/configure.in
index 5e29da29f..3945ca153 100644
--- a/configure.in
+++ b/configure.in
@@ -89,7 +89,7 @@ then
;;
sparc*)
case "$target_os" in
- *solaris2*|*solaris3*|*sunos5*|*sunos6*)
+ *solaris[2-9]*)
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
;;
esac
@@ -218,6 +218,7 @@ AC_SUBST(SHLIB_CFLAGS)
dnl suffix for loadable binary (.so,.dll,.o)
AC_SUBST(SHLIB_SUFFIX)
dnl how to call the loader
+AC_SUBST(DO_SECOND_LD)
AC_SUBST(SHLIB_LD)
dnl makefile target for building YAP library or dll
AC_SUBST(NEWSHOBJ)
@@ -231,6 +232,7 @@ AC_SUBST(YAP_EXTRAS)
dnl defaults
INSTALL_DLLS="#"
SHLIB_LD="@#"
+DO_SECOND_LD="#"
NEWSHOBJ="sobjs"
YAPLIB="libYap.a"
M4="m4"
@@ -241,6 +243,7 @@ case $target_os in
then
SHLIB_SUFFIX=".so"
SHLIB_LD="ld -shared"
+ DO_SECOND_LD=""
LIBS="$LIBS -ldl"
case $host_cpu in
alpha*)
@@ -283,6 +286,7 @@ case $target_os in
if test $CC = cc -o $CC = c89
then
SHLIB_LD="ld -b -E ${LDFLAGS}"
+ DO_SECOND_LD=""
SHLIB_SUFFIX=".sl"
SHLIB_CFLAGS="+z"
INSTALL_DLLS=""
@@ -301,10 +305,12 @@ case $target_os in
*osf*)
SHLIB_SUFFIX=".so"
SHLIB_LD="ld -shared -expect_unresolved '*'"
+ DO_SECOND_LD=""
;;
*irix6*)
SHLIB_CFLAGS=""
SHLIB_SUFFIX=".so"
+ DO_SECOND_LD=""
SHLIB_LD="ld -n32 -shared -rdata_shared"
INSTALL_DLLS=""
;;
@@ -319,6 +325,7 @@ case $target_os in
LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
+ DO_SECOND_LD=""
SHLIB_SUFFIX=".so"
INSTALL_DLLS=""
fi
@@ -338,6 +345,7 @@ case $target_os in
then
SHLIB_SUFFIX=".o"
LIBS="$LIBS -ldl"
+ INSTALL_DLLS=""
if test $CC = gcc
then
SHLIB_CFLAGS="-fPIC"
diff --git a/library/random/Makefile.in b/library/random/Makefile.in
index 5c6a07655..0135835f9 100644
--- a/library/random/Makefile.in
+++ b/library/random/Makefile.in
@@ -45,11 +45,11 @@ dll: random@SHLIB_SUFFIX@
random.o: $(srcdir)/random.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/random.c -o random.o
-%@SHLIB_SUFFIX@: %.o
- @SHLIB_LD@ -o $@ $<
+@DO_SECOND_LD@%@SHLIB_SUFFIX@: %.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $<
-random@SHLIB_SUFFIX@: random.o
- @SHLIB_LD@ -o random@SHLIB_SUFFIX@ random.o
+@DO_SECOND_LD@random@SHLIB_SUFFIX@: random.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o random@SHLIB_SUFFIX@ random.o
#
# create a new DLL library on cygwin environments
diff --git a/library/regex/Makefile.in b/library/regex/Makefile.in
index 34869d22e..cc11e669a 100644
--- a/library/regex/Makefile.in
+++ b/library/regex/Makefile.in
@@ -57,23 +57,23 @@ regfree.o: $(srcdir)/regfree.c
regexec.o: $(srcdir)/regexec.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/regexec.c -o regexec.o
-%@SHLIB_SUFFIX@: %.o
- @SHLIB_LD@ -o $@ $<
+@DO_SECOND_LD@%@SHLIB_SUFFIX@: %.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $<
-regexp@SHLIB_SUFFIX@: regexp.o
- @SHLIB_LD@ -o regexp@SHLIB_SUFFIX@ regexp.o
+@DO_SECOND_LD@regexp@SHLIB_SUFFIX@: regexp.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o regexp@SHLIB_SUFFIX@ regexp.o
-regcomp@SHLIB_SUFFIX@: regcomp.o
- @SHLIB_LD@ -o regcomp@SHLIB_SUFFIX@ regcomp.o
+@DO_SECOND_LD@regcomp@SHLIB_SUFFIX@: regcomp.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o regcomp@SHLIB_SUFFIX@ regcomp.o
-regerror@SHLIB_SUFFIX@: regerror.o
- @SHLIB_LD@ -o regerror@SHLIB_SUFFIX@ regerror.o
+@DO_SECOND_LD@regerror@SHLIB_SUFFIX@: regerror.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o regerror@SHLIB_SUFFIX@ regerror.o
-regfree@SHLIB_SUFFIX@: regfree.o
- @SHLIB_LD@ -o regfree@SHLIB_SUFFIX@ regfree.o
+@DO_SECOND_LD@regfree@SHLIB_SUFFIX@: regfree.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o regfree@SHLIB_SUFFIX@ regfree.o
-regexec@SHLIB_SUFFIX@: regexec.o
- @SHLIB_LD@ -o regexec@SHLIB_SUFFIX@ regexec.o
+@DO_SECOND_LD@regexec@SHLIB_SUFFIX@: regexec.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o regexec@SHLIB_SUFFIX@ regexec.o
#
# create a new DLL library on cygwin environments
diff --git a/library/system.yap b/library/system.yap
index 929e92dd8..db22b02cb 100644
--- a/library/system.yap
+++ b/library/system.yap
@@ -147,10 +147,22 @@ file_property(File, Type, Size, Date) :-
file_property(File, Type, Size, Date, _Permissions, Error),
handle_system_error(Error, off, file_property(File)).
+file_exists(File) :-
+ var(File), !,
+ throw(error(instantiation_error,file_exists(File))).
+file_exists(File) :-
+ \+ atom(File), !,
+ throw(error(type_error(atom,File),file_exists(File))).
file_exists(File) :-
file_property(File, _Type, _Size, _Date, _Permissions, Error),
var(Error).
+file_exists(File, Permissions) :-
+ var(File), !,
+ throw(error(instantiation_error,file_exists(File, Permissions))).
+file_exists(File, Permissions) :-
+ \+ atom(File), !,
+ throw(error(type_error(atom,File),file_exists(File, Permissions))).
file_exists(File, Permissions) :-
file_property(File, _Type, _Size, _Date, FPermissions, Error),
var(Error),
diff --git a/library/system/Makefile.in b/library/system/Makefile.in
index fcb8b2d25..8b4744299 100644
--- a/library/system/Makefile.in
+++ b/library/system/Makefile.in
@@ -45,11 +45,11 @@ dll: sys@SHLIB_SUFFIX@
sys.o: $(srcdir)/sys.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/sys.c -o sys.o
-%@SHLIB_SUFFIX@: %.o
- @SHLIB_LD@ -o $@ $<
+@DO_SECOND_LD@@DO_SECOND_LD@%@SHLIB_SUFFIX@: %.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $<
-sys@SHLIB_SUFFIX@: sys.o
- @SHLIB_LD@ -o sys@SHLIB_SUFFIX@ sys.o
+@DO_SECOND_LD@sys@SHLIB_SUFFIX@: sys.o
+@DO_SECOND_LD@ @SHLIB_LD@ -o sys@SHLIB_SUFFIX@ sys.o
#
# create a new DLL library on cygwin environments