diff --git a/config.h.in b/config.h.in index c05893a18..9c1341c81 100755 --- a/config.h.in +++ b/config.h.in @@ -10,6 +10,10 @@ /* Should we use lib readline ? */ #undef HAVE_LIBREADLINE +/* Should we use lib readline ? */ +#undef HAVE_LIBSOCKET +#undef HAVE_LIBNSL + /* Should we use gmp ? */ #undef HAVE_LIBGMP @@ -50,13 +54,16 @@ #undef HAVE_SYS_WAIT_H #undef NO_UNION_WAIT +#undef HAVE_ALLOCA_H #undef HAVE_ARPA_INET_H #undef HAVE_CTYPE_H +#undef HAVE_CRYPT_H #undef HAVE_CUDD_H #undef HAVE_DIRECT_H #undef HAVE_DIRENT_H #undef HAVE_DLFCN_H #undef HAVE_ERRNO_H +#undef HAVE_EXECINFO_H #undef HAVE_FCNTL_H #undef HAVE_FENV_H #undef HAVE_FLOAT_H @@ -74,6 +81,7 @@ #undef HAVE_MPI_H #undef HAVE_NETDB_H #undef HAVE_NETINET_IN_H +#undef HAVE_NETINET_TCP_H #undef HAVE_PTHREAD_H #undef HAVE_PWD_H #undef HAVE_READLINE_READLINE_H @@ -102,6 +110,7 @@ #undef HAVE_SYS_WAIT_H #undef HAVE_TIME_H #undef HAVE_UNISTD_H +#undef HAVE_UTIME_H #undef HAVE_WCTYPE_H #undef HAVE_WINSOCK_H #undef HAVE_WINSOCK2_H @@ -153,9 +162,11 @@ /* Define return type for signal */ #undef RETSIGTYPE +#undef HAVE__NSGETENVIRON #undef HAVE_ACCESS #undef HAVE_ACOSH #undef HAVE_ALARM +#undef HAVE_ALLOCA #undef HAVE_ASINH #undef HAVE_ATANH #undef HAVE_CHDIR @@ -173,6 +184,7 @@ #undef HAVE_GETCWD #undef HAVE_GETENV #undef HAVE_GETHOSTBYNAME +#undef HAVE_GETHOSTENT #undef HAVE_GETHOSTID #undef HAVE_GETHOSTNAME #undef HAVE_GETHRTIME @@ -218,6 +230,7 @@ #undef HAVE_SETITIMER #undef HAVE_SETLINEBUF #undef HAVE_SETLOCALE +#undef HAVE_SETSID #undef HAVE_SHMAT #undef HAVE_SIGACTION #undef HAVE_SIGGETMASK diff --git a/configure b/configure index c9cc40886..d07fb2121 100755 --- a/configure +++ b/configure @@ -593,6 +593,10 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +CLIB_CRYPTLIBS +CLIB_NETLIBS +CLIB_PLTARGETS +CLIB_TARGETS CHR_TARGETS PLTARGETS TARGETS @@ -2103,6 +2107,60 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int + +# 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -5304,6 +5362,45 @@ else have_nsl=no fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5 +$as_echo_n "checking for main in -lcrypt... " >&6; } +if test "${ac_cv_lib_crypt_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $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_crypt_main=yes +else + ac_cv_lib_crypt_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_crypt_main" >&5 +$as_echo "$ac_cv_lib_crypt_main" >&6; } +if test "x$ac_cv_lib_crypt_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 +_ACEOF + + LIBS="-lcrypt $LIBS" + +fi + fi if test "$yap_cv_readline" != "no" @@ -6829,10 +6926,8 @@ fi SHLIB_CFLAGS="-fno-common" SO="dylib" DO_SECOND_LD="" -# SHLIB_LD="$CC -bundle -bundle_loader \$(abs_top_builddir)/yap -L\$(abs_top_builddir) -lYap -undefined dynamic_lookup -Wl,-x -dead-strip -dead_strip_dylibs" -# LDFLAGS="-Wl,-x -dead_strip -dead_strip_dylibs $LDFLAGS" - SHLIB_LD="$CC -bundle -flat_namespace -undefined suppress" - SHLIB_CXX_LD="$CXX -bundle -flat_namespace -undefined suppress" + SHLIB_LD="$CC -dynamiclib" + SHLIB_CXX_LD="$CXX -dynamiclib" INSTALL_DLLS="" CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2" ;; @@ -6958,14 +7053,15 @@ then YAPLIB="$DYNYAPLIB" DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib" PRE_INSTALL_ENV="DYLD_LIBRARY_PATH=\$(abs_top_builddir)" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-install_name,\$(DESTDIR)\$(YAPLIBDIR)/\$@" INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" # CROSS_SIMULATOR="DYLD_LIBRARY_PATH=." ;; *) - LDFLAGS="$LDFLAGS -L \$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)" + LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)" DYNYAPLIB=libYap."$SO" YAPLIB="$DYNYAPLIB" - EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L \$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)" PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ;; @@ -6975,7 +7071,7 @@ else DYNYAPLIB=libYap.notused fi -EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS -L \$(abs_top_builddir)/packages/PLStream -lplstream" +EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir)/packages/PLStream -lplstream" if test "$coroutining" = "yes" then @@ -7519,7 +7615,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -for ac_header in arpa/inet.h ctype.h direct.h dirent.h dlfcn.h +for ac_header in arpa/inet.h alloca.h crypt.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -7533,7 +7629,21 @@ fi done -for ac_header in errno.h fcntl.h fenv.h +for ac_header in ctype.h direct.h dirent.h dlfcn.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in errno.h execinfo.h fcntl.h fenv.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -7575,7 +7685,7 @@ fi done -for ac_header in netdb.h netinet/in.h pwd.h regex.h +for ac_header in netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -7687,7 +7797,7 @@ fi done -for ac_header in time.h unistd.h wctype.h winsock.h winsock2.h +for ac_header in time.h unistd.h utime.h wctype.h winsock.h winsock2.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -8598,18 +8708,20 @@ cat >>confdefs.h <<_ACEOF _ACEOF -for ac_func in access +for ac_func in _NSGetEnviron access acosh do : - ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" -if test "x$ac_cv_func_access" = x""yes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_ACCESS 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in acosh asinh atanh chdir ctime dlopen dup2 +for ac_func in alloca asinh atanh chdir ctime dlopen dup2 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -8648,7 +8760,7 @@ _ACEOF fi done -for ac_func in gethostbyname gethostid gethostname +for ac_func in gethostbyname gethostent gethostid gethostname do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -8674,7 +8786,7 @@ _ACEOF fi done -for ac_func in getpwnam getrusage gettimeofday getwd +for ac_func in getpwnam getrlimit getrusage gettimeofday getwd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -8776,7 +8888,7 @@ _ACEOF fi done -for ac_func in setbuf setitimer setlinebuf sigaction +for ac_func in setbuf setitimer setsid setlinebuf sigaction do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -8828,7 +8940,7 @@ _ACEOF fi done -for ac_func in time times tmpnam usleep vsnprintf +for ac_func in time times tmpnam usleep utime vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -9039,6 +9151,248 @@ CHR_TARGETS=chr_support."$SO" + + + + + +CLIB_TARGETS="random.$SO unix.$SO socket.$SO cgi.$SO memfile.$SO files.$SO mime.$SO crypt.$SO" + +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = x""yes; then : + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_socket+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=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_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = x""yes; then : + CLIB_NETLIBS="$CLIB_NETLIBS -lsocket" + +$as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h + +fi + +fi + +ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent" +if test "x$ac_cv_func_gethostent" = x""yes; then : + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostent in -lnsl" >&5 +$as_echo_n "checking for gethostent in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostent+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $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 gethostent (); +int +main () +{ +return gethostent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostent=yes +else + ac_cv_lib_nsl_gethostent=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_nsl_gethostent" >&5 +$as_echo "$ac_cv_lib_nsl_gethostent" >&6; } +if test "x$ac_cv_lib_nsl_gethostent" = x""yes; then : + CLIB_NETLIBS="$CLIB_NETLIBS -lnsl" + +$as_echo "#define HAVE_LIBNSL 1" >>confdefs.h + +fi + +fi + + +oldlibs="$LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 +$as_echo_n "checking for crypt in -lcrypt... " >&6; } +if test "${ac_cv_lib_crypt_crypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $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 crypt (); +int +main () +{ +return crypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypt_crypt=yes +else + ac_cv_lib_crypt_crypt=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_crypt_crypt" >&5 +$as_echo "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 +_ACEOF + + LIBS="-lcrypt $LIBS" + +fi + +CRYPTLIBS="$LIBS" +for ac_func in crypt +do : + ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" +if test "x$ac_cv_func_crypt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CRYPT 1 +_ACEOF + +fi +done + +LIBS="$oldlibs" + +ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +#include +#include + +" +if test "x$ac_cv_type_socklen_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" " +#include +#include + +" +if test "x$ac_cv_type_ssize_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SSIZE_T 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking _XOPEN_SOURCE" >&5 +$as_echo_n "checking _XOPEN_SOURCE... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _XOPEN_SOURCE +#include + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define DEFINE_XOPEN_SOURCE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test "$with_time" = yes; then + if test "$ac_cv_func_setitimer" = "yes"; then + TARGETS="$TARGETS time.$SO" + else + echo "WARNING: no setitimer(); dropping time.pl from targets" + fi +fi + +if test "$ac_cv_func_getrlimit" = "yes"; then + TARGETS="$TARGETS rlimit.$SO" +else + "WARNING: no getrlimit(); dropping rlimit.pl from targets" +fi + + + mkdir -p library/matrix mkdir -p library/matlab mkdir -p library/mpi diff --git a/configure.in b/configure.in index 3e178ca31..44c0c64e5 100755 --- a/configure.in +++ b/configure.in @@ -594,6 +594,7 @@ else have_nsl=yes , have_nsl=no) + AC_CHECK_LIB(crypt,main) fi if test "$yap_cv_readline" != "no" @@ -969,10 +970,8 @@ dnl Linux has both elf and a.out, in this case we found elf SHLIB_CFLAGS="-fno-common" SO="dylib" DO_SECOND_LD="" -# SHLIB_LD="$CC -bundle -bundle_loader \$(abs_top_builddir)/yap -L\$(abs_top_builddir) -lYap -undefined dynamic_lookup -Wl,-x -dead-strip -dead_strip_dylibs" -# LDFLAGS="-Wl,-x -dead_strip -dead_strip_dylibs $LDFLAGS" - SHLIB_LD="$CC -bundle -flat_namespace -undefined suppress" - SHLIB_CXX_LD="$CXX -bundle -flat_namespace -undefined suppress" + SHLIB_LD="$CC -dynamiclib" + SHLIB_CXX_LD="$CXX -dynamiclib" INSTALL_DLLS="" CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2" ;; @@ -1059,14 +1058,15 @@ then YAPLIB="$DYNYAPLIB" DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib" PRE_INSTALL_ENV="DYLD_LIBRARY_PATH=\$(abs_top_builddir)" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-install_name,\$(DESTDIR)\$(YAPLIBDIR)/\$@" INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" # CROSS_SIMULATOR="DYLD_LIBRARY_PATH=." ;; *) - LDFLAGS="$LDFLAGS -L \$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)" + LDFLAGS="$LDFLAGS -L\$(abs_top_builddir) -Wl,-R,\$(DESTDIR)\$(LIBDIR) -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR)" DYNYAPLIB=libYap."$SO" YAPLIB="$DYNYAPLIB" - EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L \$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(DESTDIR)\$(YAPLIBDIR) -Wl,-R,\$(DESTDIR)\$(LIBDIR)" PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ;; @@ -1076,7 +1076,7 @@ else DYNYAPLIB=libYap.notused fi -EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS -L \$(abs_top_builddir)/packages/PLStream -lplstream" +EXTRA_LIBS_FOR_SWIDLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir)/packages/PLStream -lplstream" if test "$coroutining" = "yes" then @@ -1205,11 +1205,12 @@ CC=${OLD_CC} dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h) -AC_CHECK_HEADERS(errno.h fcntl.h fenv.h) +AC_CHECK_HEADERS(arpa/inet.h alloca.h crypt.h) +AC_CHECK_HEADERS(ctype.h direct.h dirent.h dlfcn.h) +AC_CHECK_HEADERS(errno.h execinfo.h fcntl.h fenv.h) AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h io.h limits.h) AC_CHECK_HEADERS(locale.h malloc.h math.h memory.h mpi.h) -AC_CHECK_HEADERS(netdb.h netinet/in.h pwd.h regex.h) +AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h) AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h stropts.h) AC_CHECK_HEADERS(sys/conf.h sys/dir.h sys/file.h) AC_CHECK_HEADERS(sys/mman.h sys/ndir.h sys/param.h) @@ -1217,7 +1218,7 @@ AC_CHECK_HEADERS(sys/resource.h sys/select.h) AC_CHECK_HEADERS(sys/shm.h sys/socket.h sys/stat.h) AC_CHECK_HEADERS(sys/time.h sys/times.h sys/types.h) AC_CHECK_HEADERS(sys/ucontext.h sys/un.h sys/wait.h) -AC_CHECK_HEADERS(time.h unistd.h wctype.h winsock.h winsock2.h) +AC_CHECK_HEADERS(time.h unistd.h utime.h wctype.h winsock.h winsock2.h) AC_CHECK_HEADERS(mach-o/dyld.h) if test "$yap_cv_gmp" != "no" then @@ -1513,13 +1514,13 @@ fi dnl Checks for library functions. AC_TYPE_SIGNAL -AC_CHECK_FUNCS(access) -AC_CHECK_FUNCS(acosh asinh atanh chdir ctime dlopen dup2) +AC_CHECK_FUNCS(_NSGetEnviron access acosh) +AC_CHECK_FUNCS(alloca asinh atanh chdir ctime dlopen dup2) AC_CHECK_FUNCS(erf feclearexcept) AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv) -AC_CHECK_FUNCS(gethostbyname gethostid gethostname) +AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname) AC_CHECK_FUNCS(gethrtime getpagesize) -AC_CHECK_FUNCS(getpwnam getrusage gettimeofday getwd) +AC_CHECK_FUNCS(getpwnam getrlimit getrusage gettimeofday getwd) AC_CHECK_FUNCS(isatty isnan isinf kill labs link lgamma) AC_CHECK_FUNCS(localtime lstat mallinfo) AC_CHECK_FUNCS(mbsnrtowcs) @@ -1527,11 +1528,11 @@ AC_CHECK_FUNCS(memcpy memmove mkstemp mktemp) AC_CHECK_FUNCS(nanosleep mktime opendir) AC_CHECK_FUNCS(putenv rand random readlink regexec) AC_CHECK_FUNCS(rename rint rl_set_prompt sbrk select) -AC_CHECK_FUNCS(setbuf setitimer setlinebuf sigaction) +AC_CHECK_FUNCS(setbuf setitimer setsid setlinebuf sigaction) AC_CHECK_FUNCS(siggetmask siginterrupt) AC_CHECK_FUNCS(signal sigprocmask socket stat) AC_CHECK_FUNCS(strchr strerror stricmp strncat strncpy strtod) -AC_CHECK_FUNCS(time times tmpnam usleep vsnprintf) +AC_CHECK_FUNCS(time times tmpnam usleep utime vsnprintf) AC_CHECK_FUNC(regexec, [NO_BUILTIN_REGEXP="#"], [NO_BUILTIN_REGEXP=""]) @@ -1654,6 +1655,69 @@ AC_SUBST(TARGETS) AC_SUBST(PLTARGETS) AC_SUBST(CHR_TARGETS) +AC_SUBST(CLIB_TARGETS) +AC_SUBST(CLIB_PLTARGETS) +AC_SUBST(CLIB_NETLIBS) +AC_SUBST(CLIB_CRYPTLIBS) + +CLIB_TARGETS="random.$SO unix.$SO socket.$SO cgi.$SO memfile.$SO files.$SO mime.$SO crypt.$SO" + +AC_CHECK_FUNC(socket, [], [ + AC_CHECK_LIB(socket, socket, + [CLIB_NETLIBS="$CLIB_NETLIBS -lsocket"] + AC_DEFINE(HAVE_LIBSOCKET, 1, + "Define if you have the socket library (-lsocket)."))]) +AC_CHECK_FUNC(gethostent, [], [ + AC_CHECK_LIB(nsl, gethostent, + [CLIB_NETLIBS="$CLIB_NETLIBS -lnsl"] + AC_DEFINE(HAVE_LIBNSL, 1, + "Define if you have the nsl library (-lnsl)."))]) + +oldlibs="$LIBS" +AC_CHECK_LIB(crypt, crypt) +CRYPTLIBS="$LIBS" +AC_CHECK_FUNCS(crypt) +LIBS="$oldlibs" + +AC_CHECK_TYPES(socklen_t, [], [], +[ +#include +#include +]) +AC_CHECK_TYPES(ssize_t, [], [], +[ +#include +#include +]) + +AC_MSG_CHECKING(_XOPEN_SOURCE) +AC_TRY_COMPILE( +[ +#define _XOPEN_SOURCE +#include +], +[ +], AC_DEFINE(DEFINE_XOPEN_SOURCE, 1, + "Define if _XOPEN_SOURCE is needed") + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + +if test "$with_time" = yes; then + if test "$ac_cv_func_setitimer" = "yes"; then + TARGETS="$TARGETS time.$SO" + else + echo "WARNING: no setitimer(); dropping time.pl from targets" + fi +fi + +if test "$ac_cv_func_getrlimit" = "yes"; then + TARGETS="$TARGETS rlimit.$SO" +else + "WARNING: no getrlimit(); dropping rlimit.pl from targets" +fi + + + mkdir -p library/matrix mkdir -p library/matlab mkdir -p library/mpi diff --git a/packages/clib/Makefile.in b/packages/clib/Makefile.in index 0b8708ac9..08a5d0f9d 100644 --- a/packages/clib/Makefile.in +++ b/packages/clib/Makefile.in @@ -33,6 +33,8 @@ LN_S=@LN_S@ CC=@CC@ CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -DHAVE_CONFIG_H=1 -I$(srcdir) -I../.. -I$(srcdir)/../../include -I. -I$(srcdir)/maildrop/rfc2045 -I$(srcdir)/maildrop/rfc822 @SHLIB_CFLAGS@ MKINDEX=true +NETLIBS=@CLIB_NETLIBS@ +CRYPTLIBS=@CLIB_CRYPTLIBS@ LD=@DO_SECOND_LD@ @SHLIB_CXX_LD@ LDFLAGS=@EXTRA_LIBS_FOR_SWIDLLS@ @@ -98,11 +100,8 @@ LIBPL= @PLTARGETS@ $(srcdir)/streaminfo.pl $(srcdir)/process.pl \ $(srcdir)/prolog_server.pl $(srcdir)/sha.pl \ $(srcdir)/socket.pl \ $(srcdir)/uri.pl -TARGETS= @TARGETS@ readutil.@SO@ streaminfo.@SO@ process.@SO@ \ - sha4pl.@SO@ uri.@SO@ memfile.@SO@ mime.@SO@ time.@SO@ \ - files.@SO@ rlimit.@SO@ random.@SO@ cgi.@SO@ socket.@SO@ \ - crypt.@SO@ - +TARGETS= @CLIB_TARGETS@ readutil.@SO@ streaminfo.@SO@ process.@SO@ \ + sha4pl.@SO@ uri.@SO@ UNXOBJ= error.o unix.o SOCKOBJ= error.o socket.o nonblockio.o CGIOBJ= error.o form.o cgi.o diff --git a/packages/clib/config.h b/packages/clib/config.h deleted file mode 100644 index c9bb71c61..000000000 --- a/packages/clib/config.h +++ /dev/null @@ -1,156 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* "Define if _XOPEN_SOURCE is needed" */ -#define DEFINE_XOPEN_SOURCE 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the `crypt' function. */ -#define HAVE_CRYPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CRYPT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_EXECINFO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define of h_errno is provided */ -#define HAVE_H_ERRNO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `crypt' library (-lcrypt). */ -#define HAVE_LIBCRYPT 1 - -/* "Define if you have the nsl library (-lnsl)." */ -/* #undef HAVE_LIBNSL */ - -/* "Define if you have the socket library (-lsocket)." */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the `setitimer' function. */ -#define HAVE_SETITIMER 1 - -/* Define to 1 if you have the `setsid' function. */ -#define HAVE_SETSID 1 - -/* Define to 1 if the system has the type `socklen_t'. */ -#define HAVE_SOCKLEN_T 1 - -/* Define to 1 if the system has the type `ssize_t'. */ -#define HAVE_SSIZE_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define for multi-thread support */ -/* #undef _REENTRANT */ diff --git a/packages/jpl b/packages/jpl index 1804608c8..2dd29ce11 160000 --- a/packages/jpl +++ b/packages/jpl @@ -1 +1 @@ -Subproject commit 1804608c80cbc053a3d7c5a6b70777b1e2f809b9 +Subproject commit 2dd29ce1118b5706f40c8559d6208bf01f36853b