From b3c0708240d0a9a2d314b797a84b2692220a8e18 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 28 Mar 2015 20:08:33 +0000 Subject: [PATCH] new files --- CMakeLists.txt | 11 +- cmake/Config.cmake | 5 + cmake/ConfigureChecks.cmake | 3 + config.h.cmake | 82 +++++++- config.h.in | 18 ++ configure | 400 ++++++++++++++++++++++++++++-------- configure.in | 42 +++- 7 files changed, 463 insertions(+), 98 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c27bc632b..63f4741a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,8 @@ endif (HAVE_GCC) # set (BUILD_SHARED_LIBS ON) +option (YAP_SWI_IO ON) + # # include libtai package as an independent library # @@ -195,7 +197,6 @@ endif (YAP_EAM) #TODO: option (or-parallelism) - # option (WAM_Profile # "support low level profiling of abstract machine" OFF) @@ -425,7 +426,7 @@ if (GMP_FOUND) set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} ) endif (GMP_FOUND) -macro_optional_find_package (Readline ON) +macro_optional_find_package (Readline ON) macro_log_feature (READLINE_FOUND "libreadline" "GNU Readline Library (or similar)" "http://www.gnu.org/software/readline") @@ -602,11 +603,7 @@ option(YAP_CONDOR # if (R_FOUND) # MESSAGE(STATUS "RFOUND ${R_LIBRARIES} ${R_DEFINITIONS} ${R_EXECUTABLE}") # endif (R_FOUND) -#TODO: check REAL_TARGET REAL#TODO: Switch to feature detection -# OPTION(CHR -# "install chr library" ON) -# OPTION(CLPQR -# "install clpqr library" ON) +#TODO: check REAL_TARGET REAL#TODO: Switch to feature # OPTION(CPLINT # "enable the cplint library using the CUDD library in DIR/lib" OFF) # OPTION(yap_cv_clpbn_bp diff --git a/cmake/Config.cmake b/cmake/Config.cmake index ad447e702..351feb24b 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -26,6 +26,7 @@ check_include_file( ieeefp.h HAVE_IEEEFP_H ) check_include_file( inttypes.h HAVE_INTTYPES_H ) check_include_file( io.h HAVE_IO_H ) check_include_file( Judy.h HAVE_JUDY_H) +check_include_file( libgen.h HAVE_LIBGEN_H ) check_include_file( LibLoaderAPI.h HAVE_LIBLOADERAPI_H ) check_include_file( limits.h HAVE_LIMITS_H ) check_include_file( locale.h HAVE_LOCALE_H ) @@ -81,6 +82,7 @@ check_include_file( windef.h HAVE_WINDEF_H ) check_include_file( windows.h HAVE_WINDOWS_H ) check_include_file( winsock2.h HAVE_WINSOCK2_H ) check_include_file( winsock.h HAVE_WINSOCK_H ) +check_include_file( wordexp.h HAVE_WORDEXP_H ) check_type_size( "short int" SIZEOF_SHORT_INT ) check_type_size( "int" SIZEOF_INT ) @@ -199,6 +201,7 @@ check_function_exists( access HAVE_ACCESS ) check_function_exists( acosh HAVE_ACOSH ) check_function_exists( asinh HAVE_ASINH ) check_function_exists( atanh HAVE_ATANH ) +check_function_exists( basename HAVE_BASENAME ) check_function_exists( chdir HAVE_CHDIR ) check_function_exists( clock HAVE_CLOCK ) check_function_exists( clock_gettime HAVE_CLOCK_GETTIME ) @@ -252,6 +255,7 @@ check_function_exists( lgamma HAVE_LGAMMA ) check_function_exists( rand HAVE_RAND ) check_function_exists( random HAVE_RANDOM ) check_function_exists( readlink HAVE_READLINK ) +check_function_exists( realpath HAVE_REALPATH ) check_function_exists( regexec HAVE_REGEXEC ) check_function_exists( rename HAVE_RENAME ) check_function_exists( restartable_syscalls HAVE_RESTARTABLE_SYSCALLS ) @@ -311,6 +315,7 @@ check_function_exists( vsnprintf HAVE_VSNPRINTF ) check_function_exists( waitpid HAVE_WAITPID ) check_function_exists( wcsdup HAVE_WCSDUP ) check_function_exists( wcsnlen HAVE_WCSNLEN ) +check_function_exists( wordexp HAVE_WORDEXP ) check_function_exists( _bool HAVE__BOOL ) check_function_exists( _chsize_s HAVE__CHSIZE_S ) check_function_exists( _NSGetEnviron HAVE__NSGETENVIRON ) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 430ebcb29..f20f305e3 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -66,6 +66,7 @@ check_include_files(utime.h HAVE_UTIME_H) check_include_files(wctype.h HAVE_WCTYPE_H) #check_include_files(winsock.h HAVE_WINSOCK_H) #check_include_files(winsock2.h HAVE_WINSOCK2_H) +check_include_files(wordexp.h HAVE_WORDEXP_H) # # Check Function Exists @@ -77,6 +78,7 @@ check_function_exists(acosh HAVE_ACOSH) check_function_exists(alloca HAVE_ALLOCA) check_function_exists(asinh HAVE_ASINH) check_function_exists(atanh HAVE_ATANH) +check_function_exists(basename HAVE_BASENAME) # check_function_exists(chdir HAVE_CHDIR) check_function_exists(clock HAVE_CLOCK) check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) @@ -127,6 +129,7 @@ check_function_exists(putenv HAVE_PUTENV) check_function_exists(rand HAVE_RAND) check_function_exists(random HAVE_RANDOM) check_function_exists(readlink HAVE_READLINK) +check_function_exists(realpath HAVE_REALPATH) check_function_exists(regexec HAVE_REGEXEC) check_function_exists(rename HAVE_RENAME) check_function_exists(rint HAVE_RINT) diff --git a/config.h.cmake b/config.h.cmake index 8fbcf1155..feaae829b 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -205,6 +205,11 @@ function. */ #cmakedefine HAVE_ATANH ${HAVE_ATANH} #endif +/* Define to 1 if you have the `basename' function. */ +#ifndef HAVE_BASENAME +#cmakedefine HAVE_BASENAME ${HAVE_BASENAME} +#endif + /* Define to 1 if you have the `chdir' function. */ #ifndef HAVE_CHDIR #cmakedefine HAVE_CHDIR ${HAVE_CHDIR} @@ -609,6 +614,12 @@ you don't. */ #define HAVE_LIBCRYPT ${HAVE_LIBCRYPT} #endif +/* Define to 1 if you have the `basename' function. */ +#ifndef HAVE_CRYPT +#cmakedefine HAVE_CRYPT ${HAVE_CRYPT} +#endif + + /* Define to 1 if you have the `gmp' library (-lgmp). */ #ifndef HAVE_LIBGMP #define HAVE_LIBGMP ${HAVE_LIBGMP} @@ -664,6 +675,66 @@ you don't. */ #define HAVE_LIBPSAPI ${HAVE_LIBPSAPI} #endif +#ifndef HAVE_CRYPT +#cmakedefine HAVE_CRYPT ${HAVE_CRYPT} +#endif + + +/* Define to 1 if you have the `gmp' library (-lgmp). */ +#ifndef HAVE_LIBGMP +#define HAVE_LIBGMP ${HAVE_LIBGMP} +#endif + +/* Define to 1 if you have the `Judy' library (-lJudy). */ +#ifndef HAVE_LIBJUDY +#define HAVE_LIBJUDY ${HAVE_LIBJUDY} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_LIBLOADERAPI_H +#define HAVE_LIBLOADERAPI_H ${HAVE_LIBLOADERAPI_H} +#endif + +/* Define to 1 if you have the `log' library (-llog). */ +#ifndef HAVE_LIBLOG +#define HAVE_LIBLOG ${HAVE_LIBLOG} +#endif + +/* Define to 1 if you have the `m' library (-lm). */ +#ifndef HAVE_LIBM +#define HAVE_LIBM ${HAVE_LIBM} +#endif + +/* MPI Debugging off */ +#ifndef HAVE_LIBMPE +#define HAVE_LIBMPE ${HAVE_LIBMPE} +#endif + +/* Define to 1 if you have the `mscrt' library (-lmscrt). */ +#ifndef HAVE_LIBMSCRT +#define HAVE_LIBMSCRT ${HAVE_LIBMSCRT} +#endif + +/* "Define if you have the nsl library (-lnsl)." */ +#ifndef HAVE_LIBNSL +#define HAVE_LIBNSL ${HAVE_LIBNSL} +#endif + +/* Define to 1 if you have the `nss_dns' library (-lnss_dns). */ +#ifndef HAVE_LIBNSS_DNS +#define HAVE_LIBNSS_DNS ${HAVE_LIBNSS_DNS} +#endif + +/* Define to 1 if you have the `nss_files' library (-lnss_files). */ +#ifndef HAVE_LIBNSS_FILES +#define HAVE_LIBNSS_FILES ${HAVE_LIBNSS_FILES} +#endif + +/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */ +#ifndef HAVE_LIBSHLWAPI +#define HAVE_LIBSHLWAPI ${HAVE_LIBSHLWAPI} +#endif + /* Define to 1 if you have the `pthread' library (-lpthread). */ #ifndef HAVE_LIBPTHREAD #define HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD} @@ -964,6 +1035,11 @@ you don't. */ #cmakedefine HAVE_READLINK ${HAVE_READLINK} #endif +/* Define to 1 if you have the `realpath' function. */ +#ifndef HAVE_REALPATH +#cmakedefine HAVE_REALPATH ${HAVE_REALPATH} +#endif + /* Define to 1 if you have the `regexec' function. */ #ifndef HAVE_REGEXEC #cmakedefine HAVE_REGEXEC ${HAVE_REGEXEC} @@ -1563,8 +1639,8 @@ signal. */ #endif /* Define to 1 if you have the header file. */ -#ifndef HAVE_WINSOCK_H -#cmakedefine HAVE_WINSOCK_H ${HAVE_WINSOCK_H} +#ifndef HAVE_WORDEXP_H +#cmakedefine HAVE_WORDEXP_H ${HAVE_WORDEXP_H} #endif /* Define to 1 if you have . */ @@ -1767,7 +1843,7 @@ signal. */ #define SIZEOF_SQLWCHAR ${SIZEOF_SQLWCHAR} #endif -/* The size of `void*', as computed by sizeof. */ +/* The Size Of` `void*', as computed by sizeof. */ #ifndef SIZEOF_VOIDP #define SIZEOF_VOIDP ${SIZEOF_VOIDP} #endif diff --git a/config.h.in b/config.h.in index bdbb06efe..dcf4b04e5 100644 --- a/config.h.in +++ b/config.h.in @@ -132,6 +132,9 @@ /* Define to 1 if you have the `atanh' function. */ #undef HAVE_ATANH +/* Define to 1 if you have the `basename' function. */ +#undef HAVE_BASENAME + /* Define to 1 if you have the `chdir' function. */ #undef HAVE_CHDIR @@ -376,6 +379,9 @@ /* Define to 1 if you have the `crypt' library (-lcrypt). */ #undef HAVE_LIBCRYPT +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGEN_H + /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP @@ -430,6 +436,9 @@ /* Define to 1 if you have the `shell32' library (-lshell32). */ #undef HAVE_LIBSHELL32 +/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */ +#undef HAVE_LIBSHLWAPI + /* "Define if you have the socket library (-lsocket)." */ #undef HAVE_LIBSOCKET @@ -592,6 +601,9 @@ /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK +/* Define to 1 if you have the `realpath' function. */ +#undef HAVE_REALPATH + /* Define to 1 if you have the `regexec' function. */ #undef HAVE_REGEXEC @@ -941,6 +953,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK_H +/* Define to 1 if you have the `wordexp' function. */ +#undef HAVE_WORDEXP + +/* Define to 1 if you have the header file. */ +#undef HAVE_WORDEXP_H + /* Define to 1 if you have . */ #undef HAVE_ZLIB_H diff --git a/configure b/configure index 3aa8ce5ad..d124cb158 100755 --- a/configure +++ b/configure @@ -700,7 +700,6 @@ ARCHIVE_CPPFLAGS ARCHIVE_LIBS ARCHIVE_PLTARGETS ARCHIVE_TARGETS -CLIB_CPPFLAGS CLIB_LIBUUID CLIB_CRYPTOBJ CLIB_CRYPTLIBS @@ -814,6 +813,7 @@ build_os build_vendor build_cpu build +ECPP C_PARSER_FLAGS C_INTERF_FLAGS RCFLAGS @@ -4158,6 +4158,7 @@ done + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5589,6 +5590,115 @@ else AR="$ac_cv_prog_AR" fi + +case "$CC" in + *gcc*) + ECPP=${s/CC/gcc/pp} + ;; + *icc*) + ECPP=${s/CC/icc/cpp} + ;; + *cc*) + ECPP=${s/CC/cc/cpp} + ;; + **) + ECPP=cpp + ;; + esac + echo $ECPP +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$ECPP", so it can be a program name with args. +set dummy ${ac_tool_prefix}$ECPP; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ECPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ECPP"; then + ac_cv_prog_ECPP="$ECPP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ECPP="${ac_tool_prefix}$ECPP" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ECPP=$ac_cv_prog_ECPP +if test -n "$ECPP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECPP" >&5 +$as_echo "$ECPP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_ECPP"; then + ac_ct_ECPP=$ECPP + # Extract the first word of "$ECPP", so it can be a program name with args. +set dummy $ECPP; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_ECPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_ECPP"; then + ac_cv_prog_ac_ct_ECPP="$ac_ct_ECPP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_ECPP="$ECPP" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_ECPP=$ac_cv_prog_ac_ct_ECPP +if test -n "$ac_ct_ECPP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_ECPP" >&5 +$as_echo "$ac_ct_ECPP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_ECPP" = x; then + ECPP="cpp" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + ECPP=$ac_ct_ECPP + fi +else + ECPP="$ac_cv_prog_ECPP" +fi + + # Extract the first word of "install-info", so it can be a program name with args. set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5631,7 +5741,7 @@ $as_echo "no" >&6; } fi -for ac_header in winsock.h winsock2.h windows.h Shlobj.h +for ac_header in winsock.h winsock2.h windows.h shlobj.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" @@ -5986,6 +6096,45 @@ _ACEOF LIBS="-lshell32 $LIBS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lshlwapi" >&5 +$as_echo_n "checking for main in -lshlwapi... " >&6; } +if ${ac_cv_lib_shlwapi_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lshlwapi $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_shlwapi_main=yes +else + ac_cv_lib_shlwapi_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_shlwapi_main" >&5 +$as_echo "$ac_cv_lib_shlwapi_main" >&6; } +if test "x$ac_cv_lib_shlwapi_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSHLWAPI 1 +_ACEOF + + LIBS="-lshlwapi $LIBS" + fi EXTRA_LIBS_FOR_DLLS="-lws2_32" @@ -6109,7 +6258,46 @@ _ACEOF fi - else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lshlwapi" >&5 +$as_echo_n "checking for main in -lshlwapi... " >&6; } +if ${ac_cv_lib_shlwapi_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lshlwapi $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_shlwapi_main=yes +else + ac_cv_lib_shlwapi_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_shlwapi_main" >&5 +$as_echo "$ac_cv_lib_shlwapi_main" >&6; } +if test "x$ac_cv_lib_shlwapi_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSHLWAPI 1 +_ACEOF + + LIBS="-lshlwapi $LIBS" + +fi + + else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5 $as_echo_n "checking for main in -lwsock32... " >&6; } if ${ac_cv_lib_wsock32_main+:} false; then : @@ -6225,6 +6413,45 @@ _ACEOF LIBS="-lshell32 $LIBS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lshlwapi" >&5 +$as_echo_n "checking for main in -lshlwapi... " >&6; } +if ${ac_cv_lib_shlwapi_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lshlwapi $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_shlwapi_main=yes +else + ac_cv_lib_shlwapi_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_shlwapi_main" >&5 +$as_echo "$ac_cv_lib_shlwapi_main" >&6; } +if test "x$ac_cv_lib_shlwapi_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSHLWAPI 1 +_ACEOF + + LIBS="-lshlwapi $LIBS" + fi fi @@ -8132,7 +8359,20 @@ fi done -for ac_header in float.h fpu_control.h ieeefp.h inttypes.h io.h limits.h +for ac_header in float.h fpu_control.h ieeefp.h inttypes.h io.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in libgen.h limits.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" @@ -8288,12 +8528,13 @@ fi done -for ac_header in wctype.h +for ac_header in wctype.h wordexp.h do : - ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" -if test "x$ac_cv_header_wctype_h" = xyes; then : + 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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_WCTYPE_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -9610,7 +9851,7 @@ _ACEOF fi done -for ac_func in alloca asinh atanh chdir clock clock_gettime +for ac_func in alloca asinh atanh basename chdir clock clock_gettime 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" @@ -9809,7 +10050,19 @@ _ACEOF fi done -for ac_func in putenv rand random readlink regexec +for ac_func in putenv rand random +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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in readlink realpath regexec 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" @@ -9893,7 +10146,19 @@ _ACEOF fi done -for ac_func in time times tmpnam usleep utime vsnprintf wcsdup wcsnlen +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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in wordexp wcsdup wcsnlen 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" @@ -11950,7 +12215,6 @@ fi - CLIB_TARGETS="socket.$SO cgi.$SO memfile.$SO files.$SO mime.$SO crypt.$SO time.$SO" case "$PLARCH" in @@ -12130,69 +12394,7 @@ fi fi -dl to be installed in various places. -# brew in OSX -if test -d /usr/local/opt/ossp-uuid; then - CPPFLAGS="$CPPFLAGS -I /usr/local/opt/ossp-uuid/include" - UUID_LIB_PATH="-L /usr/local/opt/ossp-uuid/lib" -fi - -# /opt -if test -d /opt/include/ossp; then - CPPFLAGS="$CPPFLAGS -I /opt/include" - UUID_LIB_PATH="-L /opt/lib" -fi - -# /usr/local -if test -d /opt/include/ossp; then - CPPFLAGS="$CPPFLAGS -I /opt/include" - UUID_LIB_PATH="-L /opt/lib" -fi - -if test x"$UUID_H" = "x"; then - ac_fn_c_check_header_compile "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "/*first*/ -" -if test "x$ac_cv_header_ossp_uuid_h" = xyes; then : - UUID_H=ossp/uuid.h - has_uuid=true -fi - - -fi -if test x"$UUID_H" = "x" -a ! -d /usr/include/uuid; then - ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "/*first*/ -" -if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : - UUID_H=uuid/uuid.h - has_uuid=true -fi - - -fi -if test x"$UUID_H" = "x"; then - ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "/*first*/ -" -if test "x$ac_cv_header_uuid_h" = xyes; then : - UUID_H=uuid.h - has_uuid=true -fi - - -fi -if test x"$UUID_H" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find uuid.h -- dropping uuid.pl" >&5 -$as_echo "$as_me: WARNING: Cannot find uuid.h -- dropping uuid.pl" >&2;} -else - -cat >>confdefs.h <<_ACEOF -#define UUID_H <$UUID_H> -_ACEOF - - has_uuid=true -fi - -if test x"$has_uuid" != "x"; then ac_fn_c_check_func "$LINENO" "uuid_create" "ac_cv_func_uuid_create" if test "x$ac_cv_func_uuid_create" = xyes; then : has_uuid=true @@ -12236,7 +12438,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_create" >&5 $as_echo "$ac_cv_lib_uuid_uuid_create" >&6; } if test "x$ac_cv_lib_uuid_uuid_create" = xyes; then : - CLIB_LIBUUID="$UUID_LIB_PATH -luuid" + CLIB_LIBUUID=-luuid has_uuid=true fi @@ -12250,6 +12452,45 @@ $as_echo "$as_me: WARNING: Cannot find libossp-uuid or libuuid -- dropping uuid fi +if test x"$has_uuid" != "x"; then + if test x"$UUID_H" = "x"; then + ac_fn_c_check_header_compile "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "/*first*/ +" +if test "x$ac_cv_header_ossp_uuid_h" = xyes; then : + UUID_H=ossp/uuid.h +fi + + + fi + if test x"$UUID_H" = "x" -a ! -d /usr/include/uuid; then + ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "/*first*/ +" +if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : + UUID_H=uuid/uuid.h +fi + + + fi + if test x"$UUID_H" = "x"; then + ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "/*first*/ +" +if test "x$ac_cv_header_uuid_h" = xyes; then : + UUID_H=uuid.h +fi + + + fi + if test x"$UUID_H" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find uuid.h -- dropping uuid.pl" >&5 +$as_echo "$as_me: WARNING: Cannot find uuid.h -- dropping uuid.pl" >&2;} + else + +cat >>confdefs.h <<_ACEOF +#define UUID_H <$UUID_H> +_ACEOF + + CLIB_TARGETS="$CLIB_TARGETS uuid.$SO" + fi fi @@ -12594,7 +12835,6 @@ if echo "$CLIB_PLTARGETS" | grep socket.pl 2>&1 >/dev/null; then CLIB_PLTARGETS="$CLIB_PLTARGETS streampool.pl" fi -CLIB_CPPFLAGS="$CPPFLAGS" @@ -14491,7 +14731,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 14494 "configure" */ +/* #line 14734 "configure" */ public class Test { } EOF @@ -14667,7 +14907,7 @@ EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else - echo "configure: 14670: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: 14910: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no @@ -14798,7 +15038,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 14801 "configure" */ +/* #line 15041 "configure" */ public class Test { } EOF @@ -14833,7 +15073,7 @@ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST -/* [#]line 14836 "configure" */ +/* [#]line 15076 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); diff --git a/configure.in b/configure.in index 4f9266161..d7a574b96 100755 --- a/configure.in +++ b/configure.in @@ -73,6 +73,7 @@ AC_SUBST(RC) AC_SUBST(RCFLAGS) AC_SUBST(C_INTERF_FLAGS) AC_SUBST(C_PARSER_FLAGS) +AC_SUBST(ECPP) AC_LANG(C) AC_CANONICAL_SYSTEM @@ -589,9 +590,28 @@ AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_RANLIB AC_CHECK_TOOL(AR,[ar],:) + +dnl ECPP: cpp calls for non-C programs. +case "$CC" in + *gcc*) + ECPP=${s/CC/gcc/pp} + ;; + *icc*) + ECPP=${s/CC/icc/cpp} + ;; + *cc*) + ECPP=${s/CC/cc/cpp} + ;; + **) + ECPP=cpp + ;; + esac + echo $ECPP +AC_CHECK_TOOL(ECPP,[$ECPP],[cpp]) + AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin) dnl do this before windows.h -AC_CHECK_HEADERS(winsock.h winsock2.h windows.h Shlobj.h ) +AC_CHECK_HEADERS(winsock.h winsock2.h windows.h shlobj.h ) AC_PATH_PROG(SHELL,sh) AC_CHECK_TOOL([INDENT], [indent], [:]) @@ -619,7 +639,8 @@ then YAP_TARGET=amd64 AC_CHECK_LIB(ws2_32,main) AC_CHECK_LIB(comdlg32,main) - AC_CHECK_LIB(shell32,main) + AC_CHECK_LIB(shell32,main) + AC_CHECK_LIB(shlwapi,main) EXTRA_LIBS_FOR_DLLS="-lws2_32" elif test "$target_os" = "cygwin"; then CC="${CC} -mno-cygwin" @@ -627,10 +648,12 @@ then AC_CHECK_LIB(comdlg32,main) AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(shell32,main) - else + AC_CHECK_LIB(shlwapi,main) + else AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(comdlg32,main) AC_CHECK_LIB(shell32,main) + AC_CHECK_LIB(shlwapi,main) fi AC_DEFINE(__WINDOWS__, 1, [compiling for Windows]) EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll $EXTRA_LIBS_FOR_DLLS" @@ -1306,7 +1329,8 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(arpa/inet.h alloca.h crtdbg.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 inttypes.h io.h limits.h) +AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h inttypes.h io.h) +AC_CHECK_HEADERS(libgen.h limits.h) AC_CHECK_HEADERS(malloc.h math.h memory.h) AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h shlobj.h) AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h stdbool.h) @@ -1318,7 +1342,7 @@ 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/uio.h sys/un.h sys/wait.h) AC_CHECK_HEADERS(time.h ucontext.h unistd.h utime.h) -AC_CHECK_HEADERS(wctype.h) +AC_CHECK_HEADERS(wctype.h wordexp.h) AC_CHECK_HEADERS(zlib.h zutil.h) AC_CHECK_HEADERS(mach-o/dyld.h LibLoaderAPI.h) @@ -1728,7 +1752,7 @@ fi dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(_NSGetEnviron _chsize_s access acosh) -AC_CHECK_FUNCS(alloca asinh atanh chdir clock clock_gettime) +AC_CHECK_FUNCS(alloca asinh atanh basename chdir clock clock_gettime) AC_CHECK_FUNCS(ctime dlopen dup2) AC_CHECK_FUNCS(erf feclearexcept) AC_CHECK_FUNCS(feenableexcept fesetexceptflag fesettrapenable fesetround ffsl ffsll __builtin_ffsll fgetpos finite) @@ -1745,14 +1769,16 @@ AC_CHECK_FUNCS(mbscasecoll) AC_CHECK_FUNCS(mbsnrtowcs) AC_CHECK_FUNCS(memcpy memmove mkstemp mktemp) AC_CHECK_FUNCS(nanosleep mktime opendir) -AC_CHECK_FUNCS(putenv rand random readlink regexec) +AC_CHECK_FUNCS(putenv rand random) +AC_CHECK_FUNCS(readlink realpath regexec) AC_CHECK_FUNCS(rename rint sbrk select setbuf setlinebuf) AC_CHECK_FUNCS(setitimer setsid setlinebuf sigaction) AC_CHECK_FUNCS(siggetmask siginterrupt) AC_CHECK_FUNCS(signal sigprocmask socket srand srandom stat) AC_CHECK_FUNCS(strchr strerror stricmp) AC_CHECK_FUNCS(strnlen strlwr strncat strncpy strtod) -AC_CHECK_FUNCS(time times tmpnam usleep utime vsnprintf wcsdup wcsnlen) +AC_CHECK_FUNCS(time times tmpnam usleep utime vsnprintf) +AC_CHECK_FUNCS(wordexp wcsdup wcsnlen) # android does not really have locale stuff.. case "$host" in