From ff977fbad8c26fe8a40122941fe5d4061a36eaa6 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 4 Dec 2014 07:59:30 +0000 Subject: [PATCH] cmake support: first cut from David Vaz work.i --- C/absmi.c | 2 + C/c_interface.c | 8 +- C/pl-yap.c | 15 +- C/stdpreds.c | 1 + C/sysbits.c | 29 +- C/yap-args.c | 55 +- CMakeLists.txt | 604 +++++++ H/CMakeLists.txt | 0 H/dglobals.h | 1 + H/hglobals.h | 1 + H/iglobals.h | 1 + H/rglobals.h | 1 + OPTYap/CMakeLists.txt | 0 YapTermConfig.h.cmake | 23 + cmake/CheckPrototypeExists.cmake | 39 + cmake/Config.cmake | 324 ++++ cmake/ConfigureChecks.cmake | 159 ++ cmake/FindGMP.cmake | 23 + cmake/FindGecode.cmake | 59 + cmake/FindMySQL.cmake | 47 + cmake/FindODBC.cmake | 57 + cmake/FindR.cmake | 99 ++ cmake/FindRAPTOR.cmake | 106 ++ cmake/FindReadline.cmake | 21 + cmake/FindSqlite3.cmake | 56 + cmake/MacroLogFeature.cmake | 157 ++ cmake/MacroOptionalAddSubdirectory.cmake | 41 + cmake/MacroOptionalFindPackage.cmake | 48 + cmake/TestForHighBitCharacters.cmake | 45 + cmake/TestSTDC.cmake | 36 + cmake/TestSignalType.cmake | 47 + cmake/x.cmake | 148 ++ config.h.cmake | 1985 ++++++++++++++++++++++ configure | 18 +- configure.in | 10 +- docs/CMakeLists.txt | 18 + library/CMakeLists.txt | 9 + library/lammpi/CMakeLists.txt | 31 + library/matlab/CMakeLists.txt | 12 + library/matrix/CMakeLists.txt | 0 library/mpi/CMakeLists.txt | 0 library/random/CMakeLists.txt | 0 library/regex/CMakeLists.txt | 0 library/rltree/CMakeLists.txt | 0 library/system/CMakeLists.txt | 0 library/tries/CMakeLists.txt | 0 misc/GLOBALS | 3 + os/SWI-Stream.h | 5 - os/pl-prologflag.c | 2 +- packages/R | 2 +- packages/clib | 2 +- packages/cuda/CMakeLists.txt | 52 + packages/gecode/CMakeLists.txt | 18 + packages/myddas/CMakeLists.txt | 44 + packages/prosqlite/CMakeLists.txt | 12 + packages/python/CMakeLists.txt | 34 + packages/swig/CMakeLists.txt | 16 + pl/boot.yap | 7 + 58 files changed, 4486 insertions(+), 47 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 H/CMakeLists.txt create mode 100644 OPTYap/CMakeLists.txt create mode 100644 YapTermConfig.h.cmake create mode 100644 cmake/CheckPrototypeExists.cmake create mode 100644 cmake/Config.cmake create mode 100644 cmake/ConfigureChecks.cmake create mode 100644 cmake/FindGMP.cmake create mode 100644 cmake/FindGecode.cmake create mode 100644 cmake/FindMySQL.cmake create mode 100644 cmake/FindODBC.cmake create mode 100644 cmake/FindR.cmake create mode 100755 cmake/FindRAPTOR.cmake create mode 100644 cmake/FindReadline.cmake create mode 100644 cmake/FindSqlite3.cmake create mode 100644 cmake/MacroLogFeature.cmake create mode 100644 cmake/MacroOptionalAddSubdirectory.cmake create mode 100644 cmake/MacroOptionalFindPackage.cmake create mode 100644 cmake/TestForHighBitCharacters.cmake create mode 100644 cmake/TestSTDC.cmake create mode 100644 cmake/TestSignalType.cmake create mode 100644 cmake/x.cmake create mode 100644 config.h.cmake create mode 100644 docs/CMakeLists.txt create mode 100644 library/CMakeLists.txt create mode 100644 library/lammpi/CMakeLists.txt create mode 100644 library/matlab/CMakeLists.txt create mode 100644 library/matrix/CMakeLists.txt create mode 100644 library/mpi/CMakeLists.txt create mode 100644 library/random/CMakeLists.txt create mode 100644 library/regex/CMakeLists.txt create mode 100644 library/rltree/CMakeLists.txt create mode 100644 library/system/CMakeLists.txt create mode 100644 library/tries/CMakeLists.txt create mode 100644 packages/cuda/CMakeLists.txt create mode 100644 packages/gecode/CMakeLists.txt create mode 100644 packages/myddas/CMakeLists.txt create mode 100644 packages/prosqlite/CMakeLists.txt create mode 100644 packages/python/CMakeLists.txt create mode 100644 packages/swig/CMakeLists.txt diff --git a/C/absmi.c b/C/absmi.c index 5e8f35d35..53d3d773d 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -2982,7 +2982,9 @@ Yap_absmi(int inp) PELOCK(5, ((PredEntry *)(PREG->y_u.Otapl.p))); PREG = (yamop *)(&(((PredEntry *)(PREG->y_u.Otapl.p))->OpcodeOfPred)); UNLOCKPE(11,(PredEntry *)(PREG->y_u.Otapl.p)); + saveregs(); spy_goal( PASS_REGS1 ); + setregs(); ENDBOp(); /* try_and_mark Label,NArgs */ diff --git a/C/c_interface.c b/C/c_interface.c index 65b8b5a54..63b60b7b6 100755 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -341,15 +341,11 @@ #include "Foreign.h" #include "attvar.h" #include "SWI-Stream.h" +#include +#include #if HAVE_STDARG_H #include #endif -#if HAVE_STDINT_H -#include -#endif -#if HAVE_STRING_H -#include -#endif #if _MSC_VER || defined(__MINGW32__) #include #endif diff --git a/C/pl-yap.c b/C/pl-yap.c index 171c60cf4..0adb0f247 100755 --- a/C/pl-yap.c +++ b/C/pl-yap.c @@ -858,8 +858,9 @@ char * Yap_TermToString(Term t, char *s, size_t sz, size_t *length, int *encoding, int flags) { CACHE_REGS - Int l, CurSlot; - + Int l, CurSlot; + Int myASP = LCL0-ASP; + CurSlot = Yap_StartSlots( PASS_REGS1 ); l = Yap_InitSlot(t PASS_REGS ); @@ -898,12 +899,17 @@ Yap_TermToString(Term t, char *s, size_t sz, size_t *length, int *encoding, int /* found, just check if using local space */ if (r == buf) { char *bf = malloc(*length+1); - if (!bf) + if (!bf) { + LOCAL_CurSlot = CurSlot; + ASP = LCL0-myASP; return NULL; + } strncpy(bf,buf,*length+1); r = bf; } - return r; + LOCAL_CurSlot = CurSlot; + ASP = LCL0-myASP; + return r; } else { Sclose(fd); } @@ -914,6 +920,7 @@ Yap_TermToString(Term t, char *s, size_t sz, size_t *length, int *encoding, int } } LOCAL_CurSlot = CurSlot; + ASP = LCL0-myASP; return NULL; } diff --git a/C/stdpreds.c b/C/stdpreds.c index 2027c0fac..9b7f33c0d 100644 --- a/C/stdpreds.c +++ b/C/stdpreds.c @@ -935,6 +935,7 @@ static Int init_current_predicate(USES_REGS1) { else cut_fail(); } + return FALSE; } else if (IsPairTerm(t3)) { f = FunctorDot; at = AtomDot; diff --git a/C/sysbits.c b/C/sysbits.c index f4332d3bc..f3c550905 100644 --- a/C/sysbits.c +++ b/C/sysbits.c @@ -158,7 +158,7 @@ is_directory(const char *FileName) { #ifdef __WINDOWS__ char s[YAP_FILENAME_MAX+1]; - const char *s0 = FileName; + char *s0 = (char *)FileName; char *s1 = s; int ch; @@ -192,7 +192,7 @@ is_directory(const char *FileName) } else if (ch == '/') s1[-1] = '\\'; } - if (ExpandEnvironmentStrings(s, FileName, YAP_FILENAME_MAX) == 0) + if (ExpandEnvironmentStrings(s, (LPSTR)FileName, YAP_FILENAME_MAX) == 0) return FALSE; DWORD dwAtts = GetFileAttributes( FileName ); @@ -1774,7 +1774,7 @@ TrueFileName (char *source, char *root, char *result, int in_lib, int expand_roo { CACHE_REGS char *work; - char ares1[YAP_FILENAME_MAX]; + char ares1[YAP_FILENAME_MAX+1]; result[0] = '\0'; if (strlen(source) >= YAP_FILENAME_MAX) { @@ -2703,17 +2703,32 @@ p_yap_home( USES_REGS1 ) { static Int p_yap_paths( USES_REGS1 ) { Term out1, out2, out3; - if (strlen(DESTDIR)) { - out1 = MkAtomTerm(Yap_LookupAtom(DESTDIR "/" YAP_LIBDIR)); - out2 = MkAtomTerm(Yap_LookupAtom(DESTDIR "/" YAP_SHAREDIR)); - out3 = MkAtomTerm(Yap_LookupAtom(DESTDIR "/" YAP_BINDIR)); + const char *env_destdir = getenv("DESTDIR"); + char destdir[YAP_FILENAME_MAX+1]; + + if (env_destdir) { + strncat(destdir, env_destdir, YAP_FILENAME_MAX ); + strncat(destdir, "/" YAP_LIBDIR, YAP_FILENAME_MAX ); + out1 = MkAtomTerm(Yap_LookupAtom(destdir)); } else { out1 = MkAtomTerm(Yap_LookupAtom(YAP_LIBDIR)); + } + if (env_destdir) { + strncat(destdir, env_destdir, YAP_FILENAME_MAX ); + strncat(destdir, "/" YAP_SHAREDIR, YAP_FILENAME_MAX ); + out2 = MkAtomTerm(Yap_LookupAtom(destdir)); + } else { #if __ANDROID__ out2 = MkAtomTerm(Yap_LookupAtom("/assets/share")); #else out2 = MkAtomTerm(Yap_LookupAtom(YAP_SHAREDIR)); #endif + } + if (env_destdir) { + strncat(destdir, env_destdir, YAP_FILENAME_MAX ); + strncat(destdir, "/" YAP_BINDIR, YAP_FILENAME_MAX ); + out3 = MkAtomTerm(Yap_LookupAtom(destdir)); + } else { out3 = MkAtomTerm(Yap_LookupAtom(YAP_BINDIR)); } return(Yap_unify(out1,ARG1) && diff --git a/C/yap-args.c b/C/yap-args.c index 8da768354..2dc2cd173 100755 --- a/C/yap-args.c +++ b/C/yap-args.c @@ -35,6 +35,12 @@ #if HAVE_STRING_H #include #endif +#if HAVE_ERRNO_H +#include +#endif +#if HAVE_DIRECT_H +#include +#endif void YAP_SetOutputMessage(void); int YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap); @@ -459,8 +465,49 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap) break; } break; - case 'p': - if ((*argv)[0] == '\0') + case '-': + if (!strcmp("-nosignals", p)) { + iap->PrologShouldHandleInterrupts = FALSE; + break; + } else if (!strncmp("-home=",p,strlen("-home="))) { + GLOBAL_Home = p+strlen("-home="); + } else if (!strncmp("-cwd=",p,strlen("-cwd="))) { +#if __WINDOWS__ + if (_chdir( p+strlen("-cwd=") ) < 0) { +#else + if (chdir( p+strlen("-cwd=") ) < 0) { +#endif + fprintf(stderr," [ YAP unrecoverable error in setting cwd: %s ]\n", strerror(errno)); + } + } else if (!strncmp("-stack=",p,strlen("-stack="))) { + ssize = &(iap->StackSize); + p+=strlen("-stack="); + goto GetSize; + } else if (!strncmp("-trail=",p,strlen("-trail="))) { + ssize = &(iap->TrailSize); + p+=strlen("-trail="); + goto GetSize; + } else if (!strncmp("-heap=",p,strlen("-heap="))) { + ssize = &(iap->HeapSize); + p+=strlen("-heap="); + goto GetSize; + } else if (!strncmp("-goal=",p,strlen("-goal="))) { + iap->YapPrologGoal = p+strlen("-goal="); + } else if (!strncmp("-top-level=",p,strlen("-top-level="))) { + iap->YapPrologTopLevelGoal = p+strlen("-top-level="); + } else if (!strncmp("-table=",p,strlen("-table="))) { + ssize = &(iap->MaxTableSpaceSize); + p +=strlen( "-table="); + goto GetSize; + } else if (!strncmp("-",p,strlen("-="))) { + ssize = &(iap->MaxTableSpaceSize); + p +=strlen( "-table="); + /* skip remaining arguments */ + argc = 1; + } + break; + case 'p': + if ((*argv)[0] == '\0') iap->YapPrologAddPath = *argv; else { argc--; @@ -494,10 +541,6 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap) break; } /* End preprocessor code */ - case '-': - /* skip remaining arguments */ - argc = 1; - break; default: { fprintf(stderr,"[ YAP unrecoverable error: unknown switch -%c ]\n", *p); diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..1dea082ec --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,604 @@ +cmake_minimum_required(VERSION 2.8) + +project(YAP C CXX) + +set(YAP_MAJOR_VERSION 6) +set(YAP_MINOR_VERSION 3) +set(YAP_PATCH_VERSION 4) +set(YAP_FULL_VERSION + ${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}.${YAP_PATCH_VERSION}) +set(YAP_NUMERIC_VERSION + ${YAP_MAJOR_VERSION}*10000+${YAP_MINOR_VERSION}100+${YAP_PATCH_VERSION}) +set(MYDDAS_VERSION MYDDAS-0.9.1) + +message(STATUS "Building YAP version ${YAP_VERSION}") + +# set path to additional CMake modules +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build}) + +set(YAP_PL_SRCDIR ${CMAKE_SOURCE_DIR}/pl) + +# Compatibility vars with autotols +set ( prefix "${CMAKE_INSTALL_PREFIX}") +set ( exec_prefix "${prefix}") +set ( libdir "${exec_prefix}/lib") +set ( dlls "${exec_prefix}/lib/Yap") +set ( includedir "${prefix}/include") +set ( datarootdir "${prefix}/share") +set ( libpl "${prefix}/share") +set ( datadir "${datarootdir}") +set ( mandir "${datarootdir}/man") +set ( bindir "${exec_prefix}/bin") + +set(YAP_ROOTDIR ${prefix}) +set(YAP_SHAREDIR ${datarootdir}) + +set ( _GNU_SOURCE 1 ) + + +if (WIN32) + set (YAP_ARCH $ENV{PROCESSOR_ARCHITECTURE}) +endif() +if (UNIX) + find_program (UNAME uname) + execute_process ( + COMMAND ${UNAME} -m + OUTPUT_VARIABLE YAP_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ) +endif() + +# erootdir -> rootdir +# bindir defined above +# libdir defined above +set(YAPLIBDIR "${libdir}/Yap") + +# Compilation Flags +if (CMAKE_COMPILER_IS_GNUCC) + message(STATUS "Original CMAKE_C_FLAGS ${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wstrict-prototypes -Wmissing-prototypes") + message(STATUS "Running with CMAKE_C_FLAGS ${CMAKE_C_FLAGS}") + message(STATUS "Original CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -O -g") + message(STATUS "Runing with CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}") + message(STATUS "Original CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer") + message(STATUS "Running with CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}") +endif() + +add_definitions(-D_YAP_NOT_INSTALLED_=1 -DHAVE_CONFIG_H) + +set(YAP_YAPLIB libYap.${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(YAP_STARTUP startup.yss) +set(YAP_TIMESTAMP string(TIMESTAMP _output "%d/%m/%Y")) + +# +# Optional libraries that affect compilation +# +include (ConfigureChecks) +include (MacroOptionalAddSubdirectory) +include (MacroOptionalFindPackage) +include (MacroLogFeature) + +# +# Optional Components +# + +include (CMakeDependentOption) +include (CheckSymbolExists) + +set ( USE_SYSTEM_MALLOC 1) +set ( MALLOC_T void *) +set ( USE_THREADED_CODE 1) +set ( MIN_STACKSPACE 1024*SIZEOF_INT_P ) +set ( MIN_HEAPSPACE 2*1024*SIZEOF_INT_P ) +set ( MIN_TRAILSPACE 512*SIZEOF_INT_P ) +set ( DEF_STACKSPACE 1024*SIZEOF_INT_P ) +set ( DEF_HEAPSPACE 2*1024*SIZEOF_INT_P ) +set ( DEF_TRAILSPACE 512*SIZEOF_INT_P ) +set ( HAVE_GCC 1 ) + +# option (WITH_RATIONAL_TREES "support infinite rational trees" ON) +add_definitions (-DRATIONAL_TREES=1) + +# option (WITH_COROUTINING +# "support co-routining, attributed variables and constraints" ON) +add_definitions (-DCOROUTINING=1) +# if (WITH_RATIONAL_TREES and WITH_COROUTINING) +#TODO: install (cd LGPL/clp ; $(MAKE) install) +# endif (WITH_RATIONAL_TREES and WITH_COROUTINING) + +# option (WITH_DEPTH_LIMIT +# "support depth-bound computation" ON) +add_definitions (-DDEPTH_LIMIT=1) + +option (WITH_TABLING "Support tabling" ON) +if (WITH_TABLING) + #this depends on DEPTH_LIMIT define it after + + #this macro should realy be in config.h or other like it + #and it is used across several files outside OPTYap + add_definitions (-DTABLING=1) + add_definitions (-DGC_NO_TAGS=1) + include_directories (OPTYap) + add_subdirectory (OPTYap) +endif(WITH_TABLING) + +option (WITH_EAM "enable EAM (Extended Andorra Model)" OFF) +if (WITH_EAM) + #this macro should realy be in config.h or other like it + add_definitions (-DBEAM=1) + include_directories (BEAM) + add_subdirectory (BEAM) + set (EXTRALIBS ${EXTRALIBS} beam) +endif (WITH_EAM) + +#TODO: option (or-parallelism) + + +# option (WITH_WAM_Profile +# "support low level profiling of abstract machine" OFF) + +option (WITH_Low_Level_Tracer + "support for procedure-call tracing" OFF) +#TODO: + +option (System_Threads + "support system threads" OFF) +#TODO: + +option (WITH_Dynamic_BDD + "dynamic bdd library" OFF) +#TODO: + +cmake_dependent_option (WITH_PThreadLocking + "use pthread locking primitives for internal locking" ON + System_Threads OFF) +#TODO: + +include_directories (H include os ${CMAKE_CURRENT_BINARY_DIR}) + +# +# Arch checks +# +#include(ConfigureChecks) +include (Config) + +macro_optional_find_package (GMP ON) +macro_log_feature (GMP_FOUND "libgmp" + "GNU Multiple Precision" + "http://gmplib.org") +if (GMP_FOUND) + include_directories (${GMP_INCLUDE_DIR}) + set (EXTRALIBS ${EXTRALIBS} ${GMP_LIBRARIES}) + #config.h needs this (TODO: change in code latter) + set (USE_GMP 1) +endif (GMP_FOUND) + +set (CURSES_NEED_NCURSES TRUE) +macro_optional_find_package (Curses ON) +macro_log_feature (CURSES_FOUND "libncurses" + "NCurses Library" + "") +if (CURSES_FOUND) + include_directories (${CURSES_INCLUDE_DIR}) + set (EXTRALIBS ${EXTRALIBS} ${CURSES_NCURSES_LIBRARY}) +endif (CURSES_FOUND) + +macro_optional_find_package (Readline OFF) +macro_log_feature (READLINE_FOUND "libreadline" + "GNU Readline Library (or similar)" + "http://www.gnu.org/software/readline") +if (READLINE_FOUND) + include_directories (${READLINE_INCLUDE_DIR}) + set (EXTRALIBS ${EXTRALIBS} ${READLINE_LIBRARIES}) + set (HAVE_READLINE_READLINE_H 1) + + check_function_exists( add_history HAVE_ADD_HISTORY ) + check_function_exists( rl_ HAVE_RL_DISCARD_ARGUMENT) + check_function_exists( rl_begin_undo_group HAVE_RL_BEGIN_UNDO_GROUP) + check_function_exists( rl_clear_pending_input HAVE_RL_CLEAR_PENDING_INPUT) + check_function_exists( rl_discard_argument HAVE_RL_DISCARD_ARGUMENT) + check_function_exists( rl_filename_completion_function HAVE_RL_FILENAME_COMPLETION_FUNCTION) + check_function_exists( rl_free_line_state HAVE_RL_FREE_LINE_STATE ) + check_function_exists( rl_insert_close HAVE_RL_INSERT_CLOSE ) + check_function_exists( rl_reset_after_signal HAVE_RL_RESET_AFTER_SIGNAL ) + check_function_exists( rl_set_keyboard_input_timeout HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT ) + check_function_exists( rl_set_prompt HAVE_RL_SET_PROMPT) + check_symbol_exists( rl_catch_signals readline/readline.h HAVE_DECL_RL_CATCH_SIGNALS_ ) + check_symbol_exists( rl_completion_func_t readline/readline.h HAVE_DECL_RL_COMPLETION_FUNC_T_ ) + check_symbol_exists( rl_done readline/readline.h HAVE_DECL_RL_DONE ) + check_symbol_exists( rl_hook_func_t readline/readline.h HAVE_DECL_RL_HOOK_FUNC_T_ ) + check_symbol_exists( rl_event_hook readline/readline.h HAVE_DECL_RL_EVENT_HOOK ) + check_symbol_exists( rl_readline_state readline/readline.h HAVE_DECL_RL_READLINE_STATE ) +endif (READLINE_FOUND) + + +macro_optional_find_package (Threads ON) +macro_log_feature (THREADS_FOUND "Threads Support" + "GNU Threads Library (or similar)" + "http://www.gnu.org/software/threads") +if (THREADS_FOUND) + # + # CMAKE_THREAD_LIBS_INIT - the thread library + # CMAKE_USE_SPROC_INIT - are we using sproc? + # CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads? + # CMAKE_USE_PTHREADS_INIT - are we using pthreads + # CMAKE_HP_PTHREADS_INIT - are we using hp pthreads + # + # The following import target is created + # + # :: + # + # Threads::Threads + # + # For systems with multiple thread libraries, caller can set + # + # :: + # + # CMAKE_THREAD_PREFER_PTHREAD + # + # If the use of the -pthread compiler and linker flag is prefered then the + # caller can set + # + # :: + # + set( THREADS_PREFER_PTHREAD_FLAG 1) + check_function_exists( pthread_mutexattr_setkind_np HAVE_PTHREAD_MUTEXATTR_SETKIND_NP ) +check_function_exists( pthread_mutexattr_settype HAVE_PTHREAD_MUTEXATTR_SETTYPE ) +check_function_exists( pthread_setconcurrency HAVE_PTHREAD_SETCONCURRENCY ) + + # + # Please note that the compiler flag can only be used with the imported + # target. Use of both the imported target as well as this switch is highly + # recommended for new code. +endif (THREADS_FOUND) + +macro_optional_add_subdirectory (library) + +add_subdirectory (docs) + +macro_optional_add_subdirectory (packages/swig) + +macro_optional_add_subdirectory (packages/myddas) + +macro_optional_add_subdirectory (packages/gecode) + +macro_optional_add_subdirectory (packages/real) + +macro_optional_add_subdirectory (packages/python) + +macro_optional_add_subdirectory (packages/cuda) + +macro_optional_add_subdirectory (packages/archive) + +macro_optional_add_subdirectory (packages/jpl) + +macro_optional_add_subdirectory (packages/prosqlite) + +macro_optional_add_subdirectory (packages/zlib) + +#todo: use cmake target builds +# option (MAXPERFORMANCE +# "try using the best flags for specific architecture" OFF) + +# option (MAXMEMORY +# "try using the best flags for using the memory to the most" ON) +#TODO: check MAXMEMORY + +#TODO: use cmake target builds +# option (DEBUGYAP +# "enable C-debugging for YAP" OFF) + +#TODO: use cmake arch/compiler +# option (CYGWIN +# "use cygwin library in WIN32" OFF) + +option (WITH_PRISM + "use PRISM system in YAP" ON) +#TODO: + +option (WITH_Dynamic_Loading + "compile YAP as a DLL" ON) +#TODO: + +option (WITH_Static_compilation + "compile YAP statically" OFF) +#TODO: + +option (Use_MALLOC + "use malloc to allocate memory" ON) +#TODO: + +option(CONDOR + "allow YAP to be used from condor" OFF) +#TODO: + +#TODO: detect arch before allow this option +# OPTION(WIN64 +# "compile YAP for win64" OFF) + +# option (WITH_APRIL +# "compile Yap to support April ILP system" OFF) +# option (DLCOMPAT +# "use dlcompat library for dynamic loading on Mac OS X" OFF) + +# find_package(R) +# if (R_FOUND) +# MESSAGE(STATUS "RFOUND ${R_LIBRARIES} ${R_DEFINITIONS} ${R_EXECUTABLE}") +# endif (R_FOUND) +#TODO: check REAL_TARGET ENABLE_REAL + +#TODO: Switch to feature detection +# OPTION(CHR +# "install chr library" ON) +# OPTION(CLPQR +# "install clpqr library" ON) +# OPTION(CPLINT +# "enable the cplint library using the CUDD library in DIR/lib" OFF) +# OPTION(yap_cv_clpbn_bp +# "enable belief propagation solver in CLPBN." OFF) +# OPTION( + +# SHARED PACKAGES with SWI +# swi packages have both Makefile.in which we will use and +# Makefile.mak, we will use the later to identify this packages +# while we keep both autotools amd cmake working side by side +# Search for available packages which all have a Makefile.mak +#file (GLOB PACKAGES packages/*/Makefile.mak) + +# needed by this packages +#configure_file(packages/Makefile.defs.cmake packages/Makefile.defs) +#configure_file(packages/Dialect.defs.cmake packages/Dialect.defs) + +# +# Sources Section +# + +set(IOLIB_SOURCES + os/pl-buffer.c + os/pl-codelist.c + os/pl-ctype.c + os/pl-dtoa.c + os/pl-error.c + os/pl-file.c + os/pl-files.c + os/pl-fmt.c + os/pl-glob.c + os/pl-option.c + os/pl-nt.c + os/pl-os.c + os/pl-privitf.c + os/pl-prologflag.c + os/pl-read.c + os/pl-rl.c + os/pl-stream.c + os/pl-string.c + os/pl-table.c + os/pl-tai.c + os/pl-text.c + os/pl-utf8.c + os/pl-write.c + C/pl-yap.c +) +if (WIN32) + set(IOLIBS_SOURCES + ${IOLIBS_SOURCES} + os/windows/uxnt.c + ) +endif (WIN32) + +set (ENGINE_SOURCES + C/agc.c + C/absmi.c + C/adtdefs.c + C/alloc.c + C/amasm.c + C/analyst.c + C/arrays.c + C/arith0.c + C/arith1.c + C/arith2.c + C/atomic.c + C/attvar.c + C/bignum.c + C/bb.c + C/cdmgr.c + C/cmppreds.c + C/compiler.c + C/computils.c + C/corout.c + C/cut_c.c + C/dbase.c + C/dlmalloc.c + C/errors.c + C/eval.c + C/exec.c + C/exo.c + C/exo_udi.c + C/globals.c + C/gmp_support.c + C/gprof.c + C/grow.c + C/heapgc.c + C/index.c + C/init.c + C/inlines.c + C/iopreds.c + C/depth_bound.c + C/mavar.c + C/modules.c + C/other.c + C/parser.c + C/qlyr.c + C/qlyw.c + C/range.c + C/save.c + C/scanner.c + C/signals.c + C/sort.c + C/stdpreds.c + C/sysbits.c + C/text.c + C/threads.c + C/tracer.c + C/unify.c + C/userpreds.c + C/utilpreds.c + C/yap-args.c + C/write.c + C/ypstdio.c + library/dialect/swi/fli/swi.c + library/dialect/swi/fli/blobs.c + + C/udi.c + #packages/udi/rtree.c + #packages/udi/rtree_udi.c + +# ${IOLIB_SOURCES} +# MPI_SOURCES +) + +set(LIBTAI_SOURCES + os/libtai/tai_add.c + os/libtai/tai_now.c + os/libtai/tai_pack.c + os/libtai/tai_sub.c + os/libtai/tai_unpack.c + os/libtai/taia_add.c + os/libtai/taia_approx.c + os/libtai/taia_fmtfrac.c + os/libtai/taia_frac.c + os/libtai/taia_half.c + os/libtai/taia_less.c + os/libtai/taia_now.c + os/libtai/taia_pack.c + os/libtai/taia_sub.c + os/libtai/taia_tai.c + os/libtai/taia_unpack.c + os/libtai/caldate_fmt.c + os/libtai/caldate_scan.c + os/libtai/caldate_fmjd.c + os/libtai/caldate_mjd.c + os/libtai/caldate_norm.c + os/libtai/caldate_ster.c + os/libtai/leapsecs_read.c + os/libtai/leapsecs_init.c + os/libtai/leapsecs_add.c + os/libtai/leapsecs_sub.c + os/libtai/caltime_fmt.c + os/libtai/caltime_scan.c + os/libtai/caltime_tai.c + os/libtai/caltime_utc.c +) + +set(C_INTERFACE_SOURCES + C/load_foreign.c + C/load_dl.c + C/load_dld.c + C/load_dyld.c + C/load_none.c + C/load_aout.c + C/load_aix.c + C/load_dll.c + C/load_shl.c + C/c_interface.c + C/clause_list.c + ) + +SET(OPTYAP_SOURCES + OPTYap/or.memory.c + OPTYap/opt.init.c + OPTYap/opt.preds.c + OPTYap/or.copy_engine.c + OPTYap/or.cow_engine.c + OPTYap/or.sba_engine.c + OPTYap/or.thread_engine.c + OPTYap/or.scheduler.c + OPTYap/or.cut.c + OPTYap/tab.tries.c + OPTYap/tab.completion.c + ) + +set(STATIC_SOURCES +#NOT INCLUDED FOR NOW +) + +set(CONSOLE_SOURCES console/yap.c) + +#MPI STUFF + # library/mpi/mpi.c library/mpi/mpe.c + # library/lammpi/yap_mpi.c library/lammpi/hash.c library/lammpi/prologterms2c.c + # ) + +#WIN STUFF +# SET(PLCONS_SOURCES +# console/LGPL/pl-nt.c +# console/LGPL/pl-ntcon.c +# console/LGPL/pl-ntconsole.c +# console/LGPL/pl-ntmain.c +# ) + +# ADD_SUBDIRECTORY(GPL) +# ADD_SUBDIRECTORY(LGPL) +# ADD_SUBDIRECTORY(library) +# ADD_SUBDIRECTORY(os) +# ADD_SUBDIRECTORY(packages) + +# +# include subdirecetories configuration +## after we have all functionality in +# +add_subdirectory (H) + +configure_file ("${PROJECT_SOURCE_DIR}/config.h.cmake" + "${PROJECT_BINARY_DIR}/config.h" ) +configure_file ("${PROJECT_SOURCE_DIR}/YapTermConfig.h.cmake" + "${PROJECT_BINARY_DIR}/YapTermConfig.h" ) + + + +add_library(libYap SHARED + ${ENGINE_SOURCES} + ${IOLIB_SOURCES} + ${C_INTERFACE_SOURCES} + ${STATIC_SOURCES} + ${OPTYAP_SOURCES} + ${LIBTAI_SOURCES}) + +target_link_libraries(libYap + m resolv stdc++ ${EXTRALIBS} ) + +set_target_properties(libYap + PROPERTIES INSTALL_RPATH ${libdir} VERSION ${YAP_FULL_VERSION} SOVERSION ${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION} + ) + +add_executable (yap-bin ${CONSOLE_SOURCES}) + +set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap depends libYap) + +target_link_libraries(yap-bin libYap ) + +#add_custom_target (main ALL DEPENDS ${YAP_STARTUP} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) + +#add_custom_command (TARGET ${YAP_STARTUP} +# COMMAND yap-bin -b ${CMAKE_SOURCE_DIR}/pl/boot.yap < /usr/bin/echo "bootstrap -- ${CMAKE_SOURCE_DIR}/pl/init.yap" +# DEPENDS yap-bin +#ŧ ) +# if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +# set(ORIGINAL_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "Default prefix path" FORCE) +# endif() +# mark_as_advanced(ORIGINAL_INSTALL_PREFIX) + +# if( not( YAP_VERSION VERSION_EQUAL PROJECT_VERSION) ) +# set(CMAKE_INSTALL_PREFIX "${ORIGINAL_INSTALL_PREFIX}-${VERSION}" CACHE STRING "Install path" FORCE) +# set(PROJECT_VERSION ${YAP_VERSION}) +# endif() + +install ( + TARGETS yap-bin libYap + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +macro_display_feature_log() diff --git a/H/CMakeLists.txt b/H/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/H/dglobals.h b/H/dglobals.h index 8e9db9c00..ea902e864 100644 --- a/H/dglobals.h +++ b/H/dglobals.h @@ -130,4 +130,5 @@ #define GLOBAL_mutex_backbone Yap_global->mutex_backbone_ #define GLOBAL_MUT_ACCESS Yap_global->MUT_ACCESS_ #endif +#define GLOBAL_Home Yap_global->Home_ diff --git a/H/hglobals.h b/H/hglobals.h index 4b026a72b..5750f4070 100644 --- a/H/hglobals.h +++ b/H/hglobals.h @@ -130,4 +130,5 @@ typedef struct global_data { struct swi_mutex* mutex_backbone_; lockvar MUT_ACCESS_; #endif + char* Home_; } w_shared; diff --git a/H/iglobals.h b/H/iglobals.h index 55be20c76..c081917e4 100644 --- a/H/iglobals.h +++ b/H/iglobals.h @@ -130,4 +130,5 @@ static void InitGlobal(void) { GLOBAL_mutex_backbone = NULL; INIT_LOCK(GLOBAL_MUT_ACCESS); #endif + GLOBAL_Home = NULL; } diff --git a/H/rglobals.h b/H/rglobals.h index aee512d84..183b04c27 100644 --- a/H/rglobals.h +++ b/H/rglobals.h @@ -130,4 +130,5 @@ static void RestoreGlobal(void) { REINIT_LOCK(GLOBAL_MUT_ACCESS); #endif + } diff --git a/OPTYap/CMakeLists.txt b/OPTYap/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/YapTermConfig.h.cmake b/YapTermConfig.h.cmake new file mode 100644 index 000000000..0e83d1de2 --- /dev/null +++ b/YapTermConfig.h.cmake @@ -0,0 +1,23 @@ + +#ifndef YAP_TERM_CONFIG + +#define YAP_TERM_CONFIG 1 + +/* Define sizes of some basic types */ +#undef SIZEOF_INT_P +#undef SIZEOF_INT +#undef SIZEOF_SHORT_INT +#undef SIZEOF_LONG_INT +#undef SIZEOF_LONG_LONG_INT +#undef SIZEOF_FLOAT +#undef SIZEOF_DOUBLE + +#ifndef HAVE_INTTYPES_H +#undef HAVE_INTTYPES_H +#endif + +#ifndef HAVE_STDINT_H +#undef HAVE_STDINT_H +#endif + +#endif diff --git a/cmake/CheckPrototypeExists.cmake b/cmake/CheckPrototypeExists.cmake new file mode 100644 index 000000000..b7441ff72 --- /dev/null +++ b/cmake/CheckPrototypeExists.cmake @@ -0,0 +1,39 @@ +# AWI, downloaded from KDE repository since has not yet been transferred +# to cmake repository as of 2006-07-31. +# http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/CheckPrototypeExists.cmake?rev=505849&view=markup +# +# - Check if the prototype for a function exists. +# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) +# +# FUNCTION - the name of the function you are looking for +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# + +# AWI further change from C++ to C since that is the core PLplot language. +INCLUDE(CheckCSourceCompiles) + +MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH(it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH(it) + + SET(_CHECK_PROTO_EXISTS_SOURCE_CODE " +${_INCLUDE_FILES} +void cmakeRequireSymbol(int dummy,...){(void)dummy;} +int main() +{ +#ifndef ${_SYMBOL} +#ifndef _MSC_VER + cmakeRequireSymbol(0,&${_SYMBOL}); +#else + char i = sizeof(&${_SYMBOL}); +#endif +#endif + return 0; +} +") + CHECK_C_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) +ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + diff --git a/cmake/Config.cmake b/cmake/Config.cmake new file mode 100644 index 000000000..043ffdbd9 --- /dev/null +++ b/cmake/Config.cmake @@ -0,0 +1,324 @@ +include(CheckIncludeFile) +include(CheckIncludeFileCXX) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckFunctionExists) +include(CheckTypeSize) +include(CheckCXXSourceCompiles) +include(TestBigEndian) + +# Test signal handler return type (mimics AC_TYPE_SIGNAL) +include(TestSignalType) #check if this is really needed as c89 defines this as void + +# Test standard headers (mimics AC_HEADER_STDC) +include(TestSTDC) + +check_include_file( alloca.h HAVE_ALLOCA_H ) +check_include_file( direct.h HAVE_DIRECT_H ) +check_include_file( dirent.h HAVE_DIRENT_H ) +check_include_file( dlfcn.h HAVE_DLFCN_H ) +check_include_file( errno.h HAVE_ERRNO_H ) +check_include_file( execinfo.h HAVE_EXECINFO_H ) +check_include_file( fcntl.h HAVE_FCNTL_H ) +check_include_file( fenv.h HAVE_FENV_H ) +check_include_file( fpu_control.h HAVE_FPU_CONTROL_H ) +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( LibLoaderAPI.h HAVE_LIBLOADERAPI_H ) +check_include_file( limits.h HAVE_LIMITS_H ) +check_include_file( locale.h HAVE_LOCALE_H ) +check_include_file( mach-o/dyld.h HAVE_MACH_O_DYLD_H ) +check_include_file( malloc.h HAVE_MALLOC_H ) +check_include_file( math.h HAVE_MATH_H ) +check_include_file( memory.h HAVE_MEMORY_H ) +check_include_file( mpe.h HAVE_MPE_H ) +check_include_file( mpi.h HAVE_MPI_H ) +check_include_file( mysql/mysql.h HAVE_MYSQL_MYSQL_H ) +check_include_file( netdb.h HAVE_NETDB_H ) +check_include_file( netinet/in.h HAVE_NETINET_IN_H ) +check_include_file( netinet/tcp.h HAVE_NETINET_TCP_H ) +check_include_file( pthread.h HAVE_PTHREAD_H ) +check_include_file( pwd.h HAVE_PWD_H ) +check_include_file( regex.h HAVE_REGEX_H ) +check_include_file( setjmp.h HAVE_SETJMP_H ) +check_include_file( shlobj.h HAVE_SHLOBJ_H ) +check_include_file( siginfo.h HAVE_SIGINFO_H ) +check_include_file( signal.h HAVE_SIGNAL_H ) +check_include_file( sqlite3.h HAVE_SQLITE3_H ) +check_include_file( sql.h HAVE_SQL_H ) +check_include_file( stdbool.h HAVE_STDBOOL_H ) +check_include_file( stdint.h HAVE_STDINT_H ) +check_include_file( strings.h HAVE_STRINGS_H ) +check_include_file( stropts.h HAVE_STROPTS_H ) +check_include_file( syslog.h HAVE_SYSLOG_H ) +check_include_file( sys/conf.h HAVE_SYS_CONF_H ) +check_include_file( sys/dir.h HAVE_SYS_DIR_H ) +check_include_file( sys/file.h HAVE_SYS_FILE_H ) +check_include_file( sys/mman.h HAVE_SYS_MMAN_H ) +check_include_file( sys/ndir.h HAVE_SYS_NDIR_H ) +check_include_file( sys/param.h HAVE_SYS_PARAM_H ) +check_include_file( sys/resource.h HAVE_SYS_RESOURCE_H ) +check_include_file( sys/select.h HAVE_SYS_SELECT_H ) +check_include_file( sys/shm.h HAVE_SYS_SHM_H ) +check_include_file( sys/socket.h HAVE_SYS_SOCKET_H ) +check_include_file( sys/stat.h HAVE_SYS_STAT_H ) +check_include_file( sys/times.h HAVE_SYS_TIMES_H ) +check_include_file( sys/time.h HAVE_SYS_TIME_H ) +check_include_file( sys/types.h HAVE_SYS_TYPES_H ) +check_include_file( sys/ucontext.h HAVE_SYS_UCONTEXT_H ) +check_include_file( sys/un.h HAVE_SYS_UN_H ) +check_include_file( sys/wait.h HAVE_SYS_WAIT_H ) +check_include_file( time.h HAVE_TIME_H ) +check_include_file( ucontext.h HAVE_UCONTEXT_H ) +check_include_file( unistd.h HAVE_UNISTD_H ) +check_include_file( util.h HAVE_UTIL_H ) +check_include_file( utime.h HAVE_UTIME_H ) +check_include_file( wchar.h HAVE_WCHAR_H ) +check_include_file( wctype.h HAVE_WCTYPE_H ) +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_type_size( "short int" SIZEOF_SHORT_INT ) +check_type_size( "int" SIZEOF_INT ) +check_type_size( "long int" SIZEOF_LONG ) +check_type_size( "long int" SIZEOF_LONG_INT ) +check_type_size( "long long int" SIZEOF_LONG_LONG ) +check_type_size( "long long int" SIZEOF_LONG_LONG_INT ) +check_type_size( "float" SIZEOF_FLOAT ) +check_type_size( "double" SIZEOF_DOUBLE ) +check_type_size( "void *" SIZEOF_VOID_P ) +check_type_size( "void *" SIZEOF_VOIDP ) +check_type_size( "int *" SIZEOF_INT_P ) +check_type_size( "uintptr_t" CELLSIZE ) +check_type_size( "wchar_t" SIZEOF_WCHAR_T ) + +check_library_exists( android main "" HAVE_LIBANDROID ) +if (HAVE_LIBANDROID) +set (EXTRALIBS ${EXTRALIBS} android) +endif (HAVE_LIBANDROID) + +check_library_exists( m logf "" HAVE_LIBM ) +if (HAVE_LIBM) + set(EXTRALIBS ${EXTRALIBS} m) +endif (HAVE_LIBM) + +check_library_exists( dl dlopen "" HAVE_LIBDL ) +if (HAVE_LIBDL) + set(EXTRALIBS ${EXTRALIBS} dl) + set(HAVE_DLOPEN 1) +endif (HAVE_LIBDL) + +if (WIN32) + check_library_exists( comdlg32 FindText "" HAVE_LIBCOMDLG32 ) + if (HAVE_LIBCOMDLG32) + set(EXTRALIBS ${EXTRALIBS} comdlg32) + endif (HAVE_LIBCOMDLG32) + check_library_exists( msvcrt strtok "" HAVE_LIBMSCRT ) + if (HAVE_LIBMSCRT) + set(EXTRALIBS ${EXTRALIBS} mscrt) + endif (HAVE_LIBMSCRT) + check_library_exists( shell32 main "" HAVE_LIBSHELL32 ) + if (HAVE_LIBSHELL32) + set(EXTRALIBS ${EXTRALIBS} shell32) + endif (HAVE_LIBSHELL32) + check_library_exists( wsock32 main "" HAVE_LIBWSOCK32 ) + if (HAVE_LIBWSOCK32) + set(EXTRALIBS ${EXTRALIBS} wsock32) + endif (HAVE_LIBWSOCK32) +endif() + +check_library_exists( crypt crypt "" HAVE_LIBCRYPT ) +if (HAVE_LIBCRYPT) + set(EXTRALIBS ${EXTRALIBS} crypt) +endif (HAVE_LIBCRYPT) + +check_library_exists( judy Judy1Set "" HAVE_LIBJUDY ) +if (HAVE_LIBJUDY) + set(EXTRALIBS ${EXTRALIBS} judy) +endif (HAVE_LIBJUDY) + +check_library_exists( log main "" HAVE_LIBLOG ) +if (HAVE_LIBLOG) + set(EXTRALIBS ${EXTRALIBS} log) +endif (HAVE_LIBLOG) + + +check_library_exists( nsl nis_add "" HAVE_LIBNSL ) +if (HAVE_LIBNSL) + set(EXTRALIBS ${EXTRALIBS} nsl) +endif (HAVE_LIBNSL) + +check_library_exists( nss_dns main "" HAVE_LIBNSS_DNS ) +if (HAVE_LIBNSS_DNS) + set(EXTRALIBS ${EXTRALIBS} nss_dns) +endif (HAVE_LIBNSS_DNS) + +check_library_exists( nss_files main "" HAVE_LIBNSS_FILES ) +if (HAVE_LIBNSS_FILES) + set(EXTRALIBS ${EXTRALIBS} nss_files) +endif (HAVE_LIBNSS_FILES) + +check_library_exists( psapi main "" HAVE_LIBPSAPI ) +if (HAVE_LIBPSAPI) + set(EXTRALIBS ${EXTRALIBS} psapi) +endif (HAVE_LIBPSAPI) + +check_library_exists( resolv main "" HAVE_LIBRESOLV ) +if (HAVE_LIBRESOLV) + set(EXTRALIBS ${EXTRALIBS} resolv) +endif (HAVE_LIBRESOLV) + + +check_library_exists( socket main "" HAVE_LIBSOCKET ) +if (HAVE_LIBSOCKET) + set(EXTRALIBS ${EXTRALIBS} socket) +endif (HAVE_LIBSOCKET) + +check_library_exists( stdc__ main "" HAVE_LIBSTDC__ ) +if (HAVE_LIBSTDC__) + set(EXTRALIBS ${EXTRALIBS} stdc__) +endif (HAVE_LIBSTDC__) + +check_library_exists( unicode main "" HAVE_LIBUNICODE ) +if (HAVE_LIBUNICODE) + set(EXTRALIBS ${EXTRALIBS} unicode) +endif (HAVE_LIBUNICODE) + + + + +check_library_exists( ws2_32 main "" HAVE_LIBWS2_32 ) +if (HAVE_LIBWS2_32) + set(EXTRALIBS ${EXTRALIBS} ws2_32) +endif (HAVE_LIBWS2_32) + +check_library_exists( xnet main "" HAVE_LIBXNET ) +if (HAVE_LIBXNET) + set(EXTRALIBS ${EXTRALIBS} xnet) +endif (HAVE_LIBXNET) + + +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( chdir HAVE_CHDIR ) +check_function_exists( clock HAVE_CLOCK ) +check_function_exists( clock_gettime HAVE_CLOCK_GETTIME ) +check_function_exists( crypt HAVE_CRYPT ) +check_function_exists( ctime HAVE_CTIME ) +check_function_exists( dup2 HAVE_DUP2 ) +check_function_exists( dynarray HAVE_DYNARRAY ) +check_function_exists( environ HAVE_ENVIRON ) +check_function_exists( erf HAVE_ERF ) +check_function_exists( feclearexcept HAVE_FECLEAREXCEPT ) +check_function_exists( feenableexcept HAVE_FEENABLEEXCEPT ) +check_function_exists( fesetexceptflag HAVE_FESETEXCEPTFLAG ) +check_function_exists( fesetround HAVE_FESETROUND ) +check_function_exists( fesettrapenable HAVE_FESETTRAPENABLE ) +check_function_exists( fetestexcept HAVE_FETESTEXCEPT ) +check_symbol_exists( ffsl HAVE_FFSL ) +check_symbol_exists( ffsll HAVE_FFSLL ) +check_function_exists( __builtin_ffsll HAVE___BUILTIN_FFSLL ) +check_function_exists( fgetpos HAVE_FGETPOS ) +check_function_exists( finite HAVE_FINITE ) +check_symbol_exists( flsl HAVE_FLSL ) +check_symbol_exists( flsll HAVE_FLSLL ) +check_function_exists( fpclass HAVE_FPCLASS ) +check_function_exists( ftime HAVE_FTIME ) +check_function_exists( ftruncate HAVE_FTRUNCATE ) +check_function_exists( gcc HAVE_GCC ) +check_function_exists( getcwd HAVE_GETCWD ) +check_function_exists( getenv HAVE_GETENV ) +check_function_exists( getexecname HAVE_GETEXECNAME ) +check_function_exists( gethostbyname HAVE_GETHOSTBYNAME ) +check_function_exists( gethostent HAVE_GETHOSTENT ) +check_function_exists( gethostid HAVE_GETHOSTID ) +check_function_exists( gethostname HAVE_GETHOSTNAME ) +check_function_exists( gethrtime HAVE_GETHRTIME ) +check_function_exists( getpagesize HAVE_GETPAGESIZE ) +check_function_exists( getpid HAVE_GETPID ) +check_function_exists( getpwnam HAVE_GETPWNAM ) +check_function_exists( getrlimit HAVE_GETRLIMIT ) +check_function_exists( getrusage HAVE_GETRUSAGE ) +check_function_exists( gettimeofday HAVE_GETTIMEOFDAY ) +check_function_exists( getwd HAVE_GETWD ) +check_function_exists( gmtime HAVE_GMTIME ) +check_function_exists( h_errno HAVE_H_ERRNO ) +check_function_exists( isatty HAVE_ISATTY ) +check_function_exists( isfinite HAVE_ISFINITE ) +check_function_exists( isinf HAVE_ISINF ) +check_function_exists( isnan HAVE_ISNAN ) +check_function_exists( kill HAVE_KILL ) +check_function_exists( labs HAVE_LABS ) +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( regexec HAVE_REGEXEC ) +check_function_exists( rename HAVE_RENAME ) +check_function_exists( restartable_syscalls HAVE_RESTARTABLE_SYSCALLS ) +check_function_exists( rint HAVE_RINT ) +check_function_exists( sbrk HAVE_SBRK ) +check_function_exists( select HAVE_SELECT ) +check_function_exists( setbuf HAVE_SETBUF ) +check_function_exists( setitimer HAVE_SETITIMER ) +check_function_exists( setlinebuf HAVE_SETLINEBUF ) +check_function_exists( setlocale HAVE_SETLOCALE ) +check_function_exists( setsid HAVE_SETSID ) +check_function_exists( shmat HAVE_SHMAT ) +check_function_exists( sigaction HAVE_SIGACTION ) +check_symbol_exists( SIGFPE signal.h HAVE_SIGFPE ) +check_function_exists( siggetmask HAVE_SIGGETMASK ) +check_symbol_exists( SIGINFO signal.h HAVE_SIGINFO ) +check_function_exists( siginterrupt HAVE_SIGINTERRUPT ) +check_function_exists( signal HAVE_SIGNAL ) +check_function_exists( sigprocmask HAVE_SIGPROCMASK ) +check_symbol_exists( SIGPROF signal.h HAVE_SIGPROF ) +check_symbol_exists( SIGSEGV signal.h HAVE_SIGSEGV ) +check_symbol_exists( sigsetjmp setjmp.h HAVE_SIGSETJMP ) +check_function_exists( sleep HAVE_SLEEP ) +check_function_exists( snprintf HAVE_SNPRINTF ) +check_function_exists( socket HAVE_SOCKET ) +check_function_exists( socklen_t HAVE_SOCKLEN_T ) +check_function_exists( sqllen HAVE_SQLLEN ) +check_function_exists( sqlulen HAVE_SQLULEN ) +check_function_exists( srand HAVE_SRAND ) +check_function_exists( srandom HAVE_SRANDOM ) +check_function_exists( ssize_t HAVE_SSIZE_T ) +check_function_exists( stat HAVE_STAT ) +check_function_exists( strcasecmp HAVE_STRCASECMP ) +check_function_exists( strcasestr HAVE_STRCASESTR ) +check_function_exists( strchr HAVE_STRCHR ) +check_function_exists( strerror HAVE_STRERROR ) +check_function_exists( stricmp HAVE_STRICMP ) +check_function_exists( strlwr HAVE_STRLWR ) +check_function_exists( strncasecmp HAVE_STRNCASECMP ) +check_function_exists( strncat HAVE_STRNCAT ) +check_function_exists( strncpy HAVE_STRNCPY ) +check_function_exists( strnlen HAVE_STRNLEN ) +check_function_exists( strtod HAVE_STRTOD ) +check_function_exists( struct_time_tm_gmtoff HAVE_STRUCT_TIME_TM_GMTOFF ) +check_function_exists( system HAVE_SYSTEM ) +check_function_exists( time HAVE_TIME ) +check_function_exists( timegm HAVE_TIMEGM ) +check_function_exists( times HAVE_TIMES ) +check_symbol_exists( timezone time.h HAVE_VAR_TIMEZONE ) +check_function_exists( tmpnam HAVE_TMPNAM ) +check_function_exists( ttyname HAVE_TTYNAME ) +check_function_exists( usleep HAVE_USLEEP ) +check_function_exists( utime HAVE_UTIME ) +check_function_exists( var_timezone HAVE_VAR_TIMEZONE ) +check_function_exists( vfork HAVE_VFORK ) +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( _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 new file mode 100644 index 000000000..430ebcb29 --- /dev/null +++ b/cmake/ConfigureChecks.cmake @@ -0,0 +1,159 @@ +include(CheckIncludeFiles) +include(CheckFunctionExists) +include(CheckPrototypeExists) + +# Test signal handler return type (mimics AC_TYPE_SIGNAL) +include(TestSignalType) #check if this is really needed as c89 defines this as void + +# Test standard headers (mimics AC_HEADER_STDC) +include(TestSTDC) + +# +# Check header files +# +check_include_files(alloca.h HAVE_ALLOCA_H) +# check_include_files(arpa/inet.h HAVE_ARPA_INET_H) +check_include_files(ctype.h HAVE_CTYPE_H) +check_include_files(crypt.h HAVE_CRYPT_H) +check_include_files(direct.h HAVE_DIRECT_H) +check_include_files(dirent.h HAVE_DIRENT_H) +# check_include_files(dlfcn.h HAVE_DLFCN_H) +check_include_files(errno.h HAVE_ERRNO_H) +check_include_files(execinfo.h HAVE_EXECINFO_H) +check_include_files(fcntl.h HAVE_FCNTL_H) +check_include_files(fenv.h HAVE_FENV_H) +check_include_files(float.h HAVE_FLOAT_H) +check_include_files(fpu_control.h HAVE_FPU_CONTROL_H) +check_include_files(ieeefp.h HAVE_IEEEFP_H) +check_include_files(io.h HAVE_IO_H) +check_include_files(limits.h HAVE_LIMITS_H) +check_include_files(locale.h HAVE_LOCALE_H) +# check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) +check_include_files(malloc.h HAVE_MALLOC_H) +check_include_files(math.h HAVE_MATH_H) +check_include_files(memory.h HAVE_MEMORY_H) +# check_include_files(netdb.h HAVE_NETDB_H) +# check_include_files(netinet/in.h HAVE_NETINET_IN_H) +check_include_files(netinet/tcp.h HAVE_NETINET_TCP_H) +check_include_files(pwd.h HAVE_PWD_H) +# check_include_files(regex.h HAVE_REGEX_H) +check_include_files(siginfo.h HAVE_SIGINFO_H) +check_include_files(signal.h HAVE_SIGNAL_H) +check_include_files(stdarg.h HAVE_STDARG_H) +check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(string.h HAVE_STRING_H) +# check_include_files(stropts.h HAVE_STROPTS_H) +# check_include_files(sys/conf.h HAVE_SYS_CONF_H) +check_include_files(sys/dir.h HAVE_SYS_DIR_H) +check_include_files(sys/file.h HAVE_SYS_FILE_H) +check_include_files(sys/mman.h HAVE_SYS_MMAN_H) +check_include_files(sys/ndir.h HAVE_SYS_NDIR_H) +check_include_files(sys/param.h HAVE_SYS_PARAM_H) +check_include_files(sys/resource.h HAVE_SYS_RESOURCE_H) +check_include_files(sys/select.h HAVE_SYS_SELECT_H) +check_include_files(sys/shm.h HAVE_SYS_SHM_H) +# check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) +check_include_files(sys/stat.h HAVE_SYS_STAT_H) +check_include_files(sys/time.h HAVE_SYS_TIME_H) +check_include_files(sys/times.h HAVE_SYS_TIMES_H) +check_include_files(sys/types.h HAVE_SYS_TYPES_H) +check_include_files(sys/ucontext.h HAVE_SYS_UCONTEXT_H) +# check_include_files(sys/un.h HAVE_SYS_UN_H) +check_include_files(sys/wait.h HAVE_SYS_WAIT_H) +check_include_files(time.h HAVE_TIME_H) +check_include_files(unistd.h HAVE_UNISTD_H) +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 Function Exists +# +check_function_exists(_NSGetEnviron HAVE__NSGETENVIRON) +check_function_exists(_chsize_s HAVE__CHSIZE_S) +check_function_exists(access HAVE_ACCESS) +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(chdir HAVE_CHDIR) +check_function_exists(clock HAVE_CLOCK) +check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) +# check_function_exists(ctime HAVE_CTIME) +check_function_exists(dlopen HAVE_DLOPEN) +# check_function_exists(dup2 HAVE_DUP2) +check_function_exists(erf HAVE_ERF) +# check_function_exists(feclearexcept HAVE_FECLEAREXCEPT) +check_function_exists(fesettrapenable HAVE_FESETTRAPENABLE) +# check_function_exists(fgetpos HAVE_FGETPOS) +check_function_exists(finite HAVE_FINITE) +check_function_exists(fpclass HAVE_FPCLASS) +check_function_exists(ftime HAVE_FTIME) +check_function_exists(getcwd HAVE_GETCWD) +check_function_exists(getenv HAVE_GETENV) +# check_function_exists(gethostbyname HAVE_GETHOSTBYNAME) +# check_function_exists(gethostent HAVE_GETHOSTENT) +check_function_exists(gethostid HAVE_GETHOSTID) +check_function_exists(gethostname HAVE_GETHOSTNAME) +check_function_exists(gethrtime HAVE_GETHRTIME) +check_function_exists(getpagesize HAVE_GETPAGESIZE) +check_function_exists(getpwnam HAVE_GETPWNAM) +check_function_exists(getrlimit HAVE_GETRLIMIT) +check_function_exists(getrusage HAVE_GETRUSAGE) +check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) +check_function_exists(getwd HAVE_GETWD) +check_function_exists(isatty HAVE_ISATTY) +check_function_exists(isnan HAVE_ISNAN) +check_function_exists(isinf HAVE_ISINF) +# check_function_exists(kill HAVE_KILL) +# check_function_exists(labs HAVE_LABS) +check_function_exists(link HAVE_LINK) +check_function_exists(lgamma HAVE_LGAMMA) +check_function_exists(localtime HAVE_LOCALTIME) +check_function_exists(lstat HAVE_LSTAT) +check_function_exists(mallinfo HAVE_MALLINFO) +check_function_exists(mbscoll HAVE_MBSCOLL) +check_function_exists(mbscasecoll HAVE_MBSCASECOLL) +check_function_exists(mbsnrtowcs HAVE_MBSNRTOWCS) +check_function_exists(memcpy HAVE_MEMCPY) +check_function_exists(memmove HAVE_MEMMOVE) +check_function_exists(mkstemp HAVE_MKSTEMP) +check_function_exists(mktemp HAVE_MKTEMP) +check_function_exists(nanosleep HAVE_NANOSLEEP) +check_function_exists(mktime HAVE_MKTIME) +check_function_exists(opendir HAVE_OPENDIR) +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(regexec HAVE_REGEXEC) +check_function_exists(rename HAVE_RENAME) +check_function_exists(rint HAVE_RINT) +# check_function_exists(sbrk HAVE_SBRK) +check_function_exists(select HAVE_SELECT) +check_function_exists(setbuf HAVE_SETBUF) +check_function_exists(setitimer HAVE_SETITIMER) +check_function_exists(setlocale HAVE_SETLOCALE) +check_function_exists(setsid HAVE_SETSID) +# check_function_exists(setlinebuf HAVE_SETLINEBUF) +check_function_exists(sigaction HAVE_SIGACTION) +# check_function_exists(siggetmask HAVE_SIGGETMASK) +# check_function_exists(siginterrupt HAVE_SIGINTERRUPT) +check_function_exists(signal HAVE_SIGNAL) +check_function_exists(sigprocmask HAVE_SIGPROCMASK) +# check_function_exists(socket HAVE_SOCKET) +check_function_exists(stat HAVE_STAT) +# check_function_exists(strchr HAVE_STRCHR) +check_function_exists(strerror HAVE_STRERROR) +check_function_exists(stricmp HAVE_STRICMP) +check_function_exists(strlwr HAVE_STRLWR) +check_function_exists(strncat HAVE_STRNCAT) +check_function_exists(strncpy HAVE_STRNCPY) +# check_function_exists(strtod HAVE_STRTOD) +check_function_exists(time HAVE_TIME) +check_function_exists(times HAVE_TIMES) +check_function_exists(tmpnam HAVE_TMPNAM) +check_function_exists(usleep HAVE_USLEEP) +check_function_exists(utime HAVE_UTIME) +check_function_exists(vsnprintf HAVE_VSNPRINTF) diff --git a/cmake/FindGMP.cmake b/cmake/FindGMP.cmake new file mode 100644 index 000000000..17d175c6a --- /dev/null +++ b/cmake/FindGMP.cmake @@ -0,0 +1,23 @@ +# Try to find the GMP librairies +# GMP_FOUND - system has GMP lib +# GMP_INCLUDE_DIR - the GMP include directory +# GMP_LIBRARIES - Libraries needed to use GMP + +# Copyright (c) 2006, Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + # Already in cache, be silent + set(GMP_FIND_QUIETLY TRUE) +endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + +find_path(GMP_INCLUDE_DIR NAMES gmp.h ) +find_library(GMP_LIBRARIES NAMES gmp libgmp) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES) + +mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES) diff --git a/cmake/FindGecode.cmake b/cmake/FindGecode.cmake new file mode 100644 index 000000000..318c76d56 --- /dev/null +++ b/cmake/FindGecode.cmake @@ -0,0 +1,59 @@ +#source from http://code.google.com/p/cpfloat-gecode/source/browse/trunk/cmake-support/FindGecode.cmake?r=9 + +#Works under the assumption than when gecode is installed at least the kernel component exists +# Look for the header file +find_path(GECODE_INCLUDE_DIR NAMES gecode/kernel.hh) +find_file(GECODE_CONFIG gecode/support/config.hpp) +# Look for the library +find_library(GECODE_LIBRARY NAMES gecodekernel) +find_library(GECODE_SUPPORT_LIBRARY NAMES gecodesupport) + +if(GECODE_CONFIG) + file(STRINGS ${GECODE_CONFIG} GECODE_LINE_VERSION REGEX "^#define GECODE_VERSION .*") + string(REGEX MATCH "[0-9].[0-9].[0-9]" GECODE_VERSION ${GECODE_LINE_VERSION}) +endif() + +if(GECODE_INCLUDE_DIR AND GECODE_LIBRARY AND GECODE_SUPPORT_LIBRARY) + set(GECODE_FOUND Yes) +endif() + +if(GECODE_FOUND) + set(GECODE_LIBRARIES ${GECODE_LIBRARY} ${GECODE_SUPPORT_LIBRARY}) + set(GECODE_INCLUDE_DIRS ${GECODE_INCLUDE_DIR}) + find_library(GECODE_DRIVER_LIBRARY gecodedriver) + if(GECODE_DRIVER_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_DRIVER_LIBRARY}) + endif() + find_library(GECODE_FZ_LIBRARY gecodeflatzinc) + if(GECODE_FZ_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_FZ_LIBRARY}) + endif() + find_library(GECODE_GIST_LIBRARY gecodegist) + if(GECODE_GIST_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_GIST_LIBRARY}) + endif() + find_library(GECODE_GRAPH_LIBRARY gecodegraph) + if(GECODE_GRAPH_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_GRAPH_LIBRARY}) + endif() + find_library(GECODE_INT_LIBRARY gecodeint) + if(GECODE_INT_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_INT_LIBRARY}) + endif() + find_library(GECODE_MM_LIBRARY gecodeminimodel) + if(GECODE_MM_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_MM_LIBRARY}) + endif() + find_library(GECODE_SCHEDULING_LIBRARY gecodescheduling) + if(GECODE_SCHEDULING_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_SCHEDULING_LIBRARY}) + endif() + find_library(GECODE_SEARCH_LIBRARY gecodesearch) + if(GECODE_SEARCH_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_SEARCH_LIBRARY}) + endif() + find_library(GECODE_SET_LIBRARY gecodeset) + if(GECODE_SET_LIBRARY) + list(APPEND GECODE_LIBRARIES ${GECODE_SET_LIBRARY}) + endif() +endif() diff --git a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake new file mode 100644 index 000000000..233d3ea97 --- /dev/null +++ b/cmake/FindMySQL.cmake @@ -0,0 +1,47 @@ +# - Find mysqlclient +# Find the native MySQL includes and library +# +# MYSQL_INCLUDE_DIR - where to find mysql.h, etc. +# MYSQL_LIBRARIES - List of libraries when using MySQL. +# MYSQL_FOUND - True if MySQL found. + +IF (MYSQL_INCLUDE_DIR) + # Already in cache, be silent + SET(MYSQL_FIND_QUIETLY TRUE) +ENDIF (MYSQL_INCLUDE_DIR) + +FIND_PATH(MYSQL_INCLUDE_DIR mysql.h + /usr/local/include/mysql + /usr/include/mysql +) + +SET(MYSQL_NAMES mysqlclient mysqlclient_r) +FIND_LIBRARY(MYSQL_LIBRARY + NAMES ${MYSQL_NAMES} + PATHS /usr/lib /usr/local/lib + PATH_SUFFIXES mysql +) + +IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + SET(MYSQL_FOUND TRUE) + SET( MYSQL_LIBRARIES ${MYSQL_LIBRARY} ) +ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + SET(MYSQL_FOUND FALSE) + SET( MYSQL_LIBRARIES ) +ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + +IF (MYSQL_FOUND) + IF (NOT MYSQL_FIND_QUIETLY) + MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}") + ENDIF (NOT MYSQL_FIND_QUIETLY) +ELSE (MYSQL_FOUND) + IF (MYSQL_FIND_REQUIRED) + MESSAGE(STATUS "Looked for MySQL libraries named ${MYSQL_NAMES}.") + MESSAGE(FATAL_ERROR "Could NOT find MySQL library") + ENDIF (MYSQL_FIND_REQUIRED) +ENDIF (MYSQL_FOUND) + +MARK_AS_ADVANCED( + MYSQL_LIBRARY + MYSQL_INCLUDE_DIR + ) \ No newline at end of file diff --git a/cmake/FindODBC.cmake b/cmake/FindODBC.cmake new file mode 100644 index 000000000..9348a7163 --- /dev/null +++ b/cmake/FindODBC.cmake @@ -0,0 +1,57 @@ +# +# Find the ODBC driver manager includes and library. +# +# ODBC is an open standard for connecting to different databases in a +# semi-vendor-independent fashion. First you install the ODBC driver +# manager. Then you need a driver for each separate database you want +# to connect to (unless a generic one works). VTK includes neither +# the driver manager nor the vendor-specific drivers: you have to find +# those yourself. +# +# This module defines +# ODBC_INCLUDE_DIRECTORIES, where to find sql.h +# ODBC_LIBRARIES, the libraries to link against to use ODBC +# ODBC_FOUND. If false, you cannot build anything that requires MySQL. + +# also defined, but not for general use is +# ODBC_LIBRARY, where to find the ODBC driver manager library. + +set(ODBC_FOUND FALSE) + +find_path(ODBC_INCLUDE_DIRECTORIES sql.h + /usr/include + /usr/include/odbc + /usr/local/include + /usr/local/include/odbc + /usr/local/odbc/include + "C:/Program Files/ODBC/include" + "C:/Program Files/Microsoft SDKs/Windows/v7.0/include" + "C:/Program Files/Microsoft SDKs/Windows/v6.0a/include" + "C:/ODBC/include" + DOC "Specify the directory containing sql.h." +) + +find_library(ODBC_LIBRARY + NAMES iodbc odbc odbcinst odbc32 + PATHS + /usr/lib + /usr/lib/odbc + /usr/local/lib + /usr/local/lib/odbc + /usr/local/odbc/lib + "C:/Program Files/ODBC/lib" + "C:/ODBC/lib/debug" + "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib" + DOC "Specify the ODBC driver manager library here." +) + +if(ODBC_LIBRARY) + if(ODBC_INCLUDE_DIRECTORIES) + set( ODBC_FOUND 1 ) + endif() +endif() + +set(ODBC_LIBRARIES ${ODBC_LIBRARY}) + +mark_as_advanced(ODBC_FOUND ODBC_LIBRARY ODBC_EXTRA_LIBRARIES ODBC_INCLUDE_DIRECTORIES) + diff --git a/cmake/FindR.cmake b/cmake/FindR.cmake new file mode 100644 index 000000000..5441aff64 --- /dev/null +++ b/cmake/FindR.cmake @@ -0,0 +1,99 @@ +# -*- cmake -*- +# +# FindR.cmake: Try to find R +# +# (C) Copyright 2005-2012 EDF-EADS-Phimeca +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# @author dutka +# @date 2010-02-04 16:44:49 +0100 (Thu, 04 Feb 2010) +# Id Makefile.am 1473 2010-02-04 15:44:49Z dutka +# +# +# - Try to find R +# Once done this will define +# +# R_FOUND - System has R +# R_LIBRARIES - The libraries needed to use R +# R_DEFINITIONS - Compiler switches required for using R +# R_EXECUTABLE - The R interpreter + + +if ( R_EXECUTABLE AND R_LIBRARIES ) + # in cache already + set( R_FIND_QUIETLY TRUE ) +endif ( R_EXECUTABLE AND R_LIBRARIES ) + +#IF (NOT WIN32) +# # use pkg-config to get the directories and then use these values +# # in the FIND_PATH() and FIND_LIBRARY() calls +# FIND_PACKAGE(PkgConfig) +# PKG_CHECK_MODULES(PC_R R) +# SET(R_DEFINITIONS ${PC_R_CFLAGS_OTHER}) +#ENDIF (NOT WIN32) + +find_program ( R_EXECUTABLE + NAMES R R.exe + DOC "Path to the R command interpreter" + ) + +get_filename_component ( _R_EXE_PATH ${R_EXECUTABLE} PATH ) + +if ( R_EXECUTABLE ) + execute_process ( COMMAND ${R_EXECUTABLE} RHOME + OUTPUT_VARIABLE _R_HOME + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif ( R_EXECUTABLE ) + +find_library ( R_LIBRARIES + NAMES R + HINTS + ${PC_R_LIBDIR} + ${PC_R_LIBRARY_DIRS} + ${_R_HOME}/lib + ${_R_HOME}/lib/x86_64 +) + +set ( R_PACKAGES ) +if ( R_EXECUTABLE ) + foreach ( _component ${R_FIND_COMPONENTS} ) + if ( NOT R_${_component}_FOUND ) + execute_process ( COMMAND echo "library(${_component})" + COMMAND ${R_EXECUTABLE} --no-save --silent --no-readline --slave + RESULT_VARIABLE _res + OUTPUT_VARIABLE _trashout + ERROR_VARIABLE _trasherr + ) + if ( NOT _res ) + message ( STATUS "Looking for R package ${_component} - found" ) + set ( R_${_component}_FOUND 1 CACHE INTERNAL "True if R package ${_component} is here" ) + else ( NOT _res ) + message ( STATUS "Looking for R package ${_component} - not found" ) + set ( R_${_component}_FOUND 0 CACHE INTERNAL "True if R package ${_component} is here" ) + endif ( NOT _res ) + list ( APPEND R_PACKAGES R_${_component}_FOUND ) + endif ( NOT R_${_component}_FOUND ) + endforeach ( _component ) +endif ( R_EXECUTABLE ) + +include ( FindPackageHandleStandardArgs ) + +# handle the QUIETLY and REQUIRED arguments and set R_FOUND to TRUE if +# all listed variables are TRUE +find_package_handle_standard_args ( R DEFAULT_MSG R_EXECUTABLE R_LIBRARIES ${R_PACKAGES} ) + +mark_as_advanced ( R_EXECUTABLE R_LIBRARIES ${R_PACKAGES} ) diff --git a/cmake/FindRAPTOR.cmake b/cmake/FindRAPTOR.cmake new file mode 100755 index 000000000..a399d9ccf --- /dev/null +++ b/cmake/FindRAPTOR.cmake @@ -0,0 +1,106 @@ +# Copyright (C) 2012 - 2013 by Pedro Mendes, Virginia Tech Intellectual +# Properties, Inc., University of Heidelberg, and The University +# of Manchester. +# All rights reserved. + +# - Try to find the Raptor RDF parsing library (http://librdf.org/raptor/) +# Once done this will define +# +# RAPTOR_FOUND - system has Raptor +# RAPTOR_LIBRARIES - Link these to use Raptor +# RAPTOR_INCLUDE_DIR - Include directory for using Raptor +# RAPTOR_DEFINITIONS - Compiler switches required for using Raptor +# +# Capabilities +# RAPTOR_HAVE_TRIG - Set if raptor has TRIG + +# (c) 2007-2011 Sebastian Trueg +# (c) 2011 Artem Serebriyskiy +# (c) 2011 Michael Jansen +# +# Based on FindFontconfig Copyright (c) 2006,2007 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +MACRO (FIND_RAPTOR) + +ENDMACRO () + + + +# Check if we have cached results in case the last round was successful. +if (NOT (RAPTOR_INCLUDE_DIR AND RAPTOR_LIBRARIES) OR NOT RAPTOR_FOUND) + + set(RAPTOR_LDFLAGS) + + find_path(RAPTOR_INCLUDE_DIR raptor.h + PATHS $ENV{RAPTOR_DIR}/include + $ENV{RAPTOR_DIR} + ~/Library/Frameworks + /Library/Frameworks + /sw/include # Fink + /opt/local/include # MacPorts + /opt/csw/include # Blastwave + /opt/include + /usr/freeware/include + NO_DEFAULT_PATH) + + if (NOT RAPTOR_INCLUDE_DIR) + find_path(RAPTOR_INCLUDE_DIR raptor.h) + endif () + + find_library(RAPTOR_LIBRARY + NAMES raptor + PATHS $ENV{RAPTOR_DIR}/lib + $ENV{RAPTOR_DIR}/lib-dbg + $ENV{RAPTOR_DIR} + ~/Library/Frameworks + /Library/Frameworks + /sw/lib # Fink + /opt/local/lib # MacPorts + /opt/csw/lib # Blastwave + /opt/lib + /usr/freeware/lib64 + NO_DEFAULT_PATH) + + if (NOT RAPTOR_LIBRARY) + find_library(RAPTOR_LIBRARY NAMES raptor) + endif () + + if (NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_RAPTOR QUIET raptor) + + if (PC_RAPTOR_FOUND) + set(RAPTOR_DEFINITIONS ${PC_RAPTOR_CFLAGS_OTHER}) + set(RAPTOR_VERSION ${PC_RAPTOR_VERSION} CACHE STRING "Raptor Version found" ) + string( REGEX REPLACE "^.*-lraptor;" "" RAPTOR_LDFLAGS "${PC_RAPTOR_STATIC_LDFLAGS}") + string( REGEX REPLACE "-lexpat[;]*" "" RAPTOR_LDFLAGS "${RAPTOR_LDFLAGS}") + endif (PC_RAPTOR_FOUND) + endif (NOT WIN32) + + if (RAPTOR_LDFLAGS) + set(RAPTOR_LIBRARY ${RAPTOR_LIBRARY} ${RAPTOR_LDFLAGS}) + endif (RAPTOR_LDFLAGS) + + mark_as_advanced(RAPTOR_INCLUDE_DIR RAPTOR_LIBRARY) + +endif () # Check for cached values + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + Raptor + VERSION_VAR RAPTOR_VERSION + REQUIRED_VARS RAPTOR_LIBRARY RAPTOR_INCLUDE_DIR) + +mark_as_advanced(RAPTOR_VERSION) + +if (NOT RAPTOR_FOUND AND Raptor_FIND_VERSION_MAJOR EQUAL "2" AND NOT Raptor_FIND_QUIET ) + pkg_check_modules(PC_RAPTOR QUIET raptor) + if (PC_RAPTOR_FOUND) + message( STATUS "You have raptor1 version ${PC_RAPTOR_VERSION} installed. Please update." ) + endif () +endif () diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake new file mode 100644 index 000000000..7c160766e --- /dev/null +++ b/cmake/FindReadline.cmake @@ -0,0 +1,21 @@ +# Find the Readline libraries +# +# READLINE_FOUND - system has Readline lib +# READLINE_INCLUDE_DIR - the Readline include directory +# READLINE_LIBRARIES - Libraries needed to use Readline +# READLINE_HAVE_READLINE_HISTORY_H - true if readline/history.h is available + +if (READLINE_INCLUDE_DIR AND READLINE_LIBRARIES) + # Already in cache, be silent + set(READLINE_FIND_QUIETLY TRUE) +endif (READLINE_INCLUDE_DIR AND READLINE_LIBRARIES) + +find_path(READLINE_INCLUDE_DIR NAMES readline/readline.h ) +find_library(READLINE_LIBRARIES NAMES readline libreadline) + +find_file(READLINE_HAVE_READLINE_HISTORY_H readline/history.h) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(READLINE DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARIES) + +mark_as_advanced(READLINE_INCLUDE_DIR READLINE_LIBRARIES) diff --git a/cmake/FindSqlite3.cmake b/cmake/FindSqlite3.cmake new file mode 100644 index 000000000..729e1f55f --- /dev/null +++ b/cmake/FindSqlite3.cmake @@ -0,0 +1,56 @@ +# - find Sqlite 3 +# SQLITE3_INCLUDE_DIR - Where to find Sqlite 3 header files (directory) +# SQLITE3_LIBRARIES - Sqlite 3 libraries +# SQLITE3_LIBRARY_RELEASE - Where the release library is +# SQLITE3_LIBRARY_DEBUG - Where the debug library is +# SQLITE3_FOUND - Set to TRUE if we found everything (library, includes and executable) + +# Copyright (c) 2010 Pau Garcia i Quiles, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# Generated by CModuler, a CMake Module Generator - http://gitorious.org/cmoduler + +IF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) + SET(SQLITE3_FIND_QUIETLY TRUE) +ENDIF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) + +FIND_PATH( SQLITE3_INCLUDE_DIR sqlite3.h ) + +FIND_LIBRARY(SQLITE3_LIBRARY_RELEASE NAMES sqlite3 ) + +FIND_LIBRARY(SQLITE3_LIBRARY_DEBUG NAMES sqlite3 sqlite3d HINTS /usr/lib/debug/usr/lib/ ) + +IF( SQLITE3_LIBRARY_RELEASE OR SQLITE3_LIBRARY_DEBUG AND SQLITE3_INCLUDE_DIR ) + SET( SQLITE3_FOUND TRUE ) +ENDIF( SQLITE3_LIBRARY_RELEASE OR SQLITE3_LIBRARY_DEBUG AND SQLITE3_INCLUDE_DIR ) + +IF( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE ) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + SET( SQLITE3_LIBRARIES optimized ${SQLITE3_LIBRARY_RELEASE} debug ${SQLITE3_LIBRARY_DEBUG} ) + ELSE( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_RELEASE} ) + ENDIF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) +ELSEIF( SQLITE3_LIBRARY_RELEASE ) + SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_RELEASE} ) +ELSE( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE ) + SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_DEBUG} ) +ENDIF( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE ) + +IF( SQLITE3_FOUND ) + IF( NOT SQLITE3_FIND_QUIETLY ) + MESSAGE( STATUS "Found Sqlite3 header file in ${SQLITE3_INCLUDE_DIR}") + MESSAGE( STATUS "Found Sqlite3 libraries: ${SQLITE3_LIBRARIES}") + ENDIF( NOT SQLITE3_FIND_QUIETLY ) +ELSE(SQLITE3_FOUND) + IF( SQLITE3_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Could not find Sqlite3" ) + ELSE( SQLITE3_FIND_REQUIRED) + MESSAGE( STATUS "Optional package Sqlite3 was not found" ) + ENDIF( SQLITE3_FIND_REQUIRED) +ENDIF(SQLITE3_FOUND) diff --git a/cmake/MacroLogFeature.cmake b/cmake/MacroLogFeature.cmake new file mode 100644 index 000000000..631c7ac02 --- /dev/null +++ b/cmake/MacroLogFeature.cmake @@ -0,0 +1,157 @@ +# This file defines the Feature Logging macros. +# +# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]]) +# Logs the information so that it can be displayed at the end +# of the configure run +# VAR : TRUE or FALSE, indicating whether the feature is supported +# FEATURE: name of the feature, e.g. "libjpeg" +# DESCRIPTION: description what this feature provides +# URL: home page +# REQUIRED: TRUE or FALSE, indicating whether the feature is required +# MIN_VERSION: minimum version number. empty string if unneeded +# COMMENTS: More info you may want to provide. empty string if unnecessary +# +# MACRO_DISPLAY_FEATURE_LOG() +# Call this to display the collected results. +# Exits CMake with a FATAL error message if a required feature is missing +# +# Example: +# +# INCLUDE(MacroLogFeature) +# +# FIND_PACKAGE(JPEG) +# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "") +# ... +# MACRO_DISPLAY_FEATURE_LOG() + +# Copyright (c) 2006, Alexander Neundorf, +# Copyright (c) 2006, Allen Winter, +# Copyright (c) 2009, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +IF (NOT _macroLogFeatureAlreadyIncluded) + SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt) + IF (EXISTS ${_file}) + FILE(REMOVE ${_file}) + ENDIF (EXISTS ${_file}) + + SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) + IF (EXISTS ${_file}) + FILE(REMOVE ${_file}) + ENDIF (EXISTS ${_file}) + + SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) + IF (EXISTS ${_file}) + FILE(REMOVE ${_file}) + ENDIF (EXISTS ${_file}) + + SET(_macroLogFeatureAlreadyIncluded TRUE) + + INCLUDE(FeatureSummary) + +ENDIF (NOT _macroLogFeatureAlreadyIncluded) + + +MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments) + + STRING(TOUPPER "${ARGV4}" _required) + SET(_minvers "${ARGV5}") + SET(_comments "${ARGV6}") + + IF (${_var}) + SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) + ELSE (${_var}) + IF ("${_required}" STREQUAL "TRUE") + SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt) + ELSE ("${_required}" STREQUAL "TRUE") + SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) + ENDIF ("${_required}" STREQUAL "TRUE") + ENDIF (${_var}) + + SET(_logtext " * ${_package}") + + IF (NOT ${_var}) + IF (${_minvers} MATCHES ".*") + SET(_logtext "${_logtext} (${_minvers} or higher)") + ENDIF (${_minvers} MATCHES ".*") + SET(_logtext "${_logtext} <${_url}>\n ") + ELSE (NOT ${_var}) + SET(_logtext "${_logtext} - ") + ENDIF (NOT ${_var}) + + SET(_logtext "${_logtext}${_description}") + + IF (NOT ${_var}) + IF (${_comments} MATCHES ".*") + SET(_logtext "${_logtext}\n ${_comments}") + ENDIF (${_comments} MATCHES ".*") +# SET(_logtext "${_logtext}\n") #double-space missing features? + ENDIF (NOT ${_var}) + + FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n") + + IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3 + SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"") + ENDIF(COMMAND SET_PACKAGE_INFO) + +ENDMACRO(MACRO_LOG_FEATURE) + + +MACRO(MACRO_DISPLAY_FEATURE_LOG) + IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3 + FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt + WHAT ALL) + ENDIF(COMMAND FEATURE_SUMMARY) + + SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt) + SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) + SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) + + IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile}) + SET(_printSummary TRUE) + ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile}) + + IF(_printSummary) + SET(_missingDeps 0) + IF (EXISTS ${_enabledFile}) + FILE(READ ${_enabledFile} _enabled) + FILE(REMOVE ${_enabledFile}) + SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}") + ENDIF (EXISTS ${_enabledFile}) + + + IF (EXISTS ${_disabledFile}) + SET(_missingDeps 1) + FILE(READ ${_disabledFile} _disabled) + FILE(REMOVE ${_disabledFile}) + SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}") + ENDIF (EXISTS ${_disabledFile}) + + + IF (EXISTS ${_missingFile}) + SET(_missingDeps 1) + FILE(READ ${_missingFile} _requirements) + SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}") + FILE(REMOVE ${_missingFile}) + SET(_haveMissingReq 1) + ENDIF (EXISTS ${_missingFile}) + + + IF (NOT ${_missingDeps}) + SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.") + ENDIF (NOT ${_missingDeps}) + + + MESSAGE(${_summary}) + MESSAGE("-----------------------------------------------------------------------------\n") + + + IF(_haveMissingReq) + MESSAGE(FATAL_ERROR "Exiting: Missing Requirements") + ENDIF(_haveMissingReq) + + ENDIF(_printSummary) + +ENDMACRO(MACRO_DISPLAY_FEATURE_LOG) diff --git a/cmake/MacroOptionalAddSubdirectory.cmake b/cmake/MacroOptionalAddSubdirectory.cmake new file mode 100644 index 000000000..ec0ea30a9 --- /dev/null +++ b/cmake/MacroOptionalAddSubdirectory.cmake @@ -0,0 +1,41 @@ +# - MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines ADD_SUBDIRECTORY() with an OPTION() +# MACRO_OPTIONAL_ADD_SUBDIRECTORY( ) +# If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of ADD_SUBDIRECTORY(), +# this will have two effects +# 1 - CMake will not complain if the directory doesn't exist +# This makes sense if you want to distribute just one of the subdirs +# in a source package, e.g. just one of the subdirs in kdeextragear. +# 2 - If the directory exists, it will offer an option to skip the +# subdirectory. +# This is useful if you want to compile only a subset of all +# directories. +# +# If the CMake variable DISABLE_ALL_OPTIONAL_SUBDIRECTORIES is set to TRUE +# for the first CMake run on the project, all optional subdirectories will be disabled +# by default (but can of course be enabled via the respective options). +# E.g. the following will disable all optional subdirectories except the one named "kcalc": +# $ cmake -DDISABLE_ALL_OPTIONAL_SUBDIRECTORIES=TRUE -DBUILD_kcalc=TRUE + +# Copyright (c) 2007, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir ) + GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE) + IF(EXISTS ${_fullPath}/CMakeLists.txt) + IF(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES) + SET(_DEFAULT_OPTION_VALUE FALSE) + ELSE(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES) + SET(_DEFAULT_OPTION_VALUE TRUE) + ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES) + IF(DISABLE_ALL_OPTIONAL_SUBDIRS AND NOT DEFINED BUILD_${_dir}) + SET(_DEFAULT_OPTION_VALUE FALSE) + ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS AND NOT DEFINED BUILD_${_dir}) + OPTION(BUILD_${_dir} "Build directory ${_dir}" ${_DEFAULT_OPTION_VALUE}) + IF(BUILD_${_dir}) + ADD_SUBDIRECTORY(${_dir}) + ENDIF(BUILD_${_dir}) + ENDIF(EXISTS ${_fullPath}/CMakeLists.txt) +ENDMACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY) diff --git a/cmake/MacroOptionalFindPackage.cmake b/cmake/MacroOptionalFindPackage.cmake new file mode 100644 index 000000000..8db7622a1 --- /dev/null +++ b/cmake/MacroOptionalFindPackage.cmake @@ -0,0 +1,48 @@ +# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION() +# MACRO_OPTIONAL_FIND_PACKAGE( [QUIT] ) +# This macro is a combination of OPTION() and FIND_PACKAGE(), it +# works like FIND_PACKAGE(), but additionally it automatically creates +# an option name WITH_, which can be disabled via the cmake GUI. +# or via -DWITH_=OFF +# The standard _FOUND variables can be used in the same way +# as when using the normal FIND_PACKAGE() + +# Copyright (c) 2006-2010 Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# This is just a helper macro to set a bunch of variables empty. +# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both: +macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var) + if(DEFINED ${_name}_${_var}) + set(${_name}_${_var} "") + endif(DEFINED ${_name}_${_var}) + + string(TOUPPER ${_name} _nameUpper) + if(DEFINED ${_nameUpper}_${_var}) + set(${_nameUpper}_${_var} "") + endif(DEFINED ${_nameUpper}_${_var}) +endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var) + + +macro (MACRO_OPTIONAL_FIND_PACKAGE _name _default) + option(WITH_${_name} "Search for ${_name} package" ${_default}) + if (WITH_${_name}) + find_package(${_name} ${ARGN}) + else (WITH_${_name}) + string(TOUPPER ${_name} _nameUpper) + set(${_name}_FOUND FALSE) + set(${_nameUpper}_FOUND FALSE) + + _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS) + _mofp_set_empty_if_defined(${_name} INCLUDE_DIR) + _mofp_set_empty_if_defined(${_name} INCLUDES) + _mofp_set_empty_if_defined(${_name} LIBRARY) + _mofp_set_empty_if_defined(${_name} LIBRARIES) + _mofp_set_empty_if_defined(${_name} LIBS) + _mofp_set_empty_if_defined(${_name} FLAGS) + _mofp_set_empty_if_defined(${_name} DEFINITIONS) + endif (WITH_${_name}) +endmacro (MACRO_OPTIONAL_FIND_PACKAGE) + diff --git a/cmake/TestForHighBitCharacters.cmake b/cmake/TestForHighBitCharacters.cmake new file mode 100644 index 000000000..fd8dea411 --- /dev/null +++ b/cmake/TestForHighBitCharacters.cmake @@ -0,0 +1,45 @@ +# cmake/TestForHighBitCharacters.cmake +# +# Copyright (C) 2006 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with the file PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Check if ctype.h macros work on characters with the high bit set. +if(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS) + message(STATUS + "Check for whether ctype.h macros work on characters with the\n" + " high bit set." + ) + try_compile(CMAKE_HIGH_BIT_CHARACTERS + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/cmake/TestForHighBitCharacters.c + OUTPUT_VARIABLE OUTPUT) + if(CMAKE_HIGH_BIT_CHARACTERS) + message(STATUS "High-bit characters - work") + set(HIGH_BIT_CHARACTERS 1 CACHE INTERNAL + "Do ctype.h macros work on high-bit characters") + file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + "Determining if ctype.h macros work on high-bit characters passed with " + "the following output:\n${OUTPUT}\n\n") + else(CMAKE_HIGH_BIT_CHARACTERS) + message(STATUS "High-bit characters - don't work") + set(HIGH_BIT_CHARACTERS 0 CACHE INTERNAL + "Do ctype.h macros work on high-bit characters") + file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Determining if ctype.h macros work on high-bit characters failed with " + "the following output:\n${OUTPUT}\n\n") + endif(CMAKE_HIGH_BIT_CHARACTERS) +endif(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS) diff --git a/cmake/TestSTDC.cmake b/cmake/TestSTDC.cmake new file mode 100644 index 000000000..e58cd8c3c --- /dev/null +++ b/cmake/TestSTDC.cmake @@ -0,0 +1,36 @@ +# AC_HEADER_STDC is gross overkill since the current PLplot code only uses +# this for whether or not atexit can be used. But implement the full suite +# of AC_HEADER_STDC checks to keep the cmake version in synch with autotools +# and just in case some PLplot developer assumes the complete check for +# standard headers is done for a future programming change. +# +# From info autoconf.... +# Define STDC_HEADERS if the system has ANSI C header files. +# Specifically, this macro checks for stdlib.h', stdarg.h', +# string.h', and float.h'; if the system has those, it probably +# has the rest of the ANSI C header files. This macro also checks +# whether string.h' declares memchr' (and thus presumably the +# other mem' functions), whether stdlib.h' declare free' (and +# thus presumably malloc' and other related functions), and whether +# the ctype.h' macros work on characters with the high bit set, as +# ANSI C requires. + +message(STATUS "Checking whether system has ANSI C header files") +check_include_files("stdlib.h;stdarg.h;string.h;float.h" StandardHeadersExist) +if(StandardHeadersExist) + check_prototype_exists(memchr string.h memchrExists) + if(memchrExists) + check_prototype_exists(free stdlib.h freeExists) + if(freeExists) + include(TestForHighBitCharacters) + if(CMAKE_HIGH_BIT_CHARACTERS) + message(STATUS "ANSI C header files - found") + set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files") + endif(CMAKE_HIGH_BIT_CHARACTERS) + endif(freeExists) + endif(memchrExists) +endif(StandardHeadersExist) +if(NOT STDC_HEADERS) + message(STATUS "ANSI C header files - not found") + set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files") +endif(NOT STDC_HEADERS) diff --git a/cmake/TestSignalType.cmake b/cmake/TestSignalType.cmake new file mode 100644 index 000000000..f01c8fb30 --- /dev/null +++ b/cmake/TestSignalType.cmake @@ -0,0 +1,47 @@ +# cmake/TestSignalType.cmake +# +# Test for the return type of signal defined in +# +# Copyright (C) 2006 Andrew Ross +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with the file PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# If signal.h defines signal as returning a pointer to a function +# returning void RETSIGTYPE is defined as void. Otherwise RETSIGTYPE is +# defined as int. + +IF(NOT DEFINED CMAKE_TEST_SIGNAL_TYPE) + MESSAGE(STATUS "Check for signal return type in ") + TRY_COMPILE(CMAKE_TEST_SIGNAL_TYPE + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/cmake/TestSignalType.c + OUTPUT_VARIABLE OUTPUT) + IF (CMAKE_TEST_SIGNAL_TYPE) + MESSAGE(STATUS "Check for signal handler return type type void - found") + SET (RETSIGTYPE void CACHE INTERNAL + "Signal return type") + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + "Determining if signal handler return type is void passed with " + "the following output:\n${OUTPUT}\n\n") + ELSE (CMAKE_TEST_SIGNAL_TYPE) + MESSAGE(STATUS "Check for signal handler return type type void - not found") + SET (RETSIGTYPE int CACHE INTERNAL + "Signal return type") + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Determining if signal handler return type is void failed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF (CMAKE_TEST_SIGNAL_TYPE) +ENDIF(NOT DEFINED CMAKE_TEST_SIGNAL_TYPE) diff --git a/cmake/x.cmake b/cmake/x.cmake new file mode 100644 index 000000000..911d1b646 --- /dev/null +++ b/cmake/x.cmake @@ -0,0 +1,148 @@ +#include +check_symbol_exists( opendir HAVE_OPENDIR ) + + +# locale.h +check_symbol_exists( localeconv HAVE_LOCALECONV ) +check_symbol_exists( setlocale HAVE_SETLOCALE ) + +#include +check_symbol_exists( NSLinkModule HAVE_NSLINKMODULE ) + +#include +check_symbol_exists( mallinfo HAVE_MALLINFO ) + +#math.h +check_symbol_exists( acosh math.h HAVE_ACOSH ) +check_symbol_exists( asinh math.h HAVE_ASINH ) +check_symbol_exists( atanh math.h HAVE_ATANH ) +check_symbol_exists( erf math.h HAVE_ERF ) +check_symbol_exists( finite math.h HAVE_FINITE ) +check_symbol_exists( ftruncate HAVE_FTRUNCATE ) +check_symbol_exists( isfinite math.h HAVE_ISFINITE ) +check_symbol_exists( lgamma math.h HAVE_LGAMMA ) +check_symbol_exists( rint math.h AVE_RINT ) + +#include +check_symbol_exists( h_errno HAVE_H_ERRNO ) +check_symbol_exists( socklen_t HAVE_SOCKLEN_T )) + + +#include +check_symbol_exists( regexec HAVE_REGEXEC ) + +#include +check_symbol_exists( sigsetjmp HAVE_SIGSETJMP ) +check_symbol_exists( __sigsetjmp HAVE__SIGSETJMP ) +if(HAVE___SIGSETJMP) + set(HAVE_SIGSETJMP 1) +endif(HAVE___SIGSETJMP) + +#include +check_symbol_exists( siggetmask HAVE_SIGGETMASK ) +check_symbol_exists( SIGFPE HAVE_SIGFPE ) +check_symbol_exists( SIGINFO HAVE_SIGINFO ) +check_symbol_exists( SIGPROF HAVE_SIGPROF ) +check_symbol_exists( SIGSEGV HAVE_SIGSEGV ) + +#include +check_symbol_exists( _bool HAVE__BOOL ) + +#include +check_symbol_exists( popen HAVE_POPEN ) +check_symbol_exists( rename HAVE_RENAME ) +check_symbol_exists( setbuf HAVE_SETBUF ) +check_symbol_exists( setlinebuf HAVE_SETLINEBUF ) +check_symbol_exists( snprintf HAVE_SNPRINTF ) +check_symbol_exists( tmpnam HAVE_TMPNAM ) +check_symbol_exists( vsnprintf HAVE_VSNPRINTF ) + +#string.h +check_symbol_exists( memcpy HAVE_MEMCPY ) +check_symbol_exists( memmove HAVE_MEMMOVE ) +check_symbol_exists( strcasestr HAVE_STRCASESTR ) +check_symbol_exists( strerror HAVE_STRERROR ) +check_symbol_exists( strncat HAVE_STRNCAT ) +check_symbol_exists( strncpy HAVE_STRNCPY ) +check_symbol_exists( strnlen HAVE_STRNLEN ) +check_symbol_exists( strchr HAVE_STRCHR ) +check_symbol_exists( strlwr HAVE_STRLWR ) + +#include strings.h +check_symbol_exists( strncasecmp HAVE_STRNCASECMP ) + +#include +check_symbol_exists( mmap HAVE_MMAP ) + +# sys/resource +check_symbol_exists( getrusage sys/resource HAVE_GETRUSAGE ) + +#include +check_symbol_exists( select HAVE_SELECT ) + +#include +check_symbol_exists( shmat HAVE_SHMAT ) + +#include +check_symbol_exists( socket HAVE_SOCKET ) + +# sys/stat.h +check_symbol_exists( lstat HAVE_LSTAT ) +check_symbol_exists( stat HAVE_STAT ) + +#include +check_symbol_exists( gettimeofday HAVE_GETTIMEOFDAY ) + +#include +check_symbol_exists( times HAVE_TIMES ) + +#include +check_symbol_exists( ssize_t HAVE_SSIZE_T ) + +#include +ocheck_symbol_exists( waitpid HAVE_WAITPID ) + +# time.h +check_symbol_exists( localtime HAVE_LOCALTIME ) +check_symbol_exists( nanosleep HAVE_NANOSLEEP ) +check_symbol_exists( setitimer HAVE_SETITIMER ) +check_symbol_exists( timegm HAVE_TIMEGM ) + +# unistd.h +check_symbol_exists( access unistd.h HAVE_ACCESS ) +check_symbol_exists( alarm unistd.h HAVE_ALARM ) +check_symbol_exists( chdir unistd.h HAVE_CHDIR ) +check_symbol_exists( crypt unistd.h HAVE_CRYPT ) +check_symbol_exists( dup2 unistd.h HAVE_DUP2 ) +check_symbol_exists( getcwd unistd.h HAVE_GETCWD ) +check_symbol_exists( gethostid unistd.h HAVE_GETHOSTID ) +check_symbol_exists( gethostname unistd.h HAVE_GETHOSTNAME ) +check_symbol_exists( getpagesize unistd.h HAVE_GETPAGESIZE) +check_symbol_exists( pipe2 unistd.h HAVE_PIPE2 ) +check_symbol_exists( sbrk unistd.h HAVE_SBRK ) + +#include +check_symbol_exists( utime HAVE_UTIME ) + +#include +check_symbol_exists( wcsdup HAVE_WCSDUP ) +check_symbol_exists( wcsnlen HAVE_WCSNLEN ) + +#windows.h +check_symbol_exists( LoadLibrary HAVE_LOADLIBRARY ) +check_symbol_exists( mbscasecoll HAVE_MBSCASECOLL ) +check_symbol_exists( mbscoll HAVE_MBSCOLL ) +check_symbol_exists( mbsnrtowcs HAVE_MBSNRTOWCS ) +check_symbol_exists( stricmp HAVE_STRICMP ) + + +check_symbol_exists( nullptr HAVE_NULLPTR ) +check_symbol_exists( sqllen HAVE_SQLLEN ) +check_symbol_exists( sqlulen HAVE_SQLULEN ) +check_symbol_exists( struct_time_tm_gmtoff HAVE_STRUCT_TIME_TM_GMTOFF ) +check_symbol_exists( var_timezone HAVE_VAR_TIMEZONE ) +check_symbol_exists( _chsize_s HAVE__CHSIZE_S ) +check_symbol_exists( _NSGetEnviron HAVE__NSGETENVIRON ) +check_symbol_exists( __builtin_ffsll HAVE___BUILTIN_FFSLL ) + + diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 000000000..4c3cc091d --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,1985 @@ + +/*-------------------------------------------------------------------------- +* This file is autogenerated from config.h.in +* during the cmake configuration of your project. If you need to make changes +* edit the original file NOT THIS FILE. + * --------------------------------------------------------------------------*/ + #ifndef CONFIG_H + #define CONFIG_H + + /* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#ifndef AC_APPLE_UNIVERSAL_BUILD +#cmakedefine AC_APPLE_UNIVERSAL_BUILD "${AC_APPLE_UNIVERSAL_BUILD}" +#endif + +/* longs should be in addresses that are multiple of four. */ +#ifndef ALIGN_LONGS +#cmakedefine ALIGN_LONGS "${ALIGN_LONGS}" +#endif + +/* if fflush(NULL) clobbers input pipes1 */ +#ifndef BROKEN_FFLUSH_NULL +#cmakedefine BROKEN_FFLUSH_NULL "${BROKEN_FFLUSH_NULL}" +#endif + +/* size of a cell in bytes. */ +#ifndef CELLSIZE +#define CELLSIZE ${CELLSIZE} +#endif + +/* c-compiler used */ +#ifndef C_CC +#define C_CC "${CMAKE_C_COMPILER}" +#endif + +/* compilation flags */ +#ifndef C_CFLAGS +#define C_CFLAGS "${CMAKE_C_CFLAGS}" +#endif + +/* linking flags */ +#ifndef C_LDFLAGS +#define C_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}" +#endif + +/* libs for linking with DLLs */ +#ifndef C_LIBPLSO +#define C_LIBPLSO "${CMAKE_SHARED_LINKER_FLAGS} -lYap" +#endif + +/* main libs for YAP */ +#ifndef C_LIBS +#define C_LIBS "${EXTRALIBS}" +#endif + +/* "Define if _XOPEN_SOURCE is needed" */ +#ifndef DEFINE_XOPEN_SOURCE +#cmakedefine DEFINE_XOPEN_SOURCE "${DEFINE_XOPEN_SOURCE}" +#endif + +/* IEEE floating-point, basically everyone except old VAXEN */ +#ifndef FFIEEE +#cmakedefine FFIEEE "${FFIEEE}" +#endif + +/* old HP-UX VM magic, should be irrelevant now */ +#ifndef FORCE_SECOND_QUADRANT +#cmakedefine FORCE_SECOND_QUADRANT "${FORCE_SECOND_QUADRANT}" +#endif + +/* support GNU extensions */ +#ifndef _GNU_SOURCE +#cmakedefine _GNU_SOURCE "${_GNU_SOURCE}" +#endif + +/* use Barts idea of allocating extra memory */ +#ifndef GC_NO_TAGS +#cmakedefine GC_NO_TAGS "${GC_NO_TAGS}" +#endif + +/* Define if gethostname() is provided */ +#ifndef HAS_GETHOSTNAME +#cmakedefine HAS_GETHOSTNAME "${HAS_GETHOSTNAME}" +#endif + +/* Define to 1 if you have the `access' function. */ +#ifndef HAVE_ACCESS +#cmakedefine HAVE_ACCESS ${HAVE_ACCESS} +#endif + +/* Define to 1 if you have the `acosh' function. */ +#ifndef HAVE_ACOSH +#cmakedefine HAVE_ACOSH ${HAVE_ACOSH} +#endif + +/* Define to 1 if you have the `add_history' function. */ +#ifndef HAVE_ADD_HISTORY +#define HAVE_ADD_HISTORY ${HAVE_ADD_HISTORY} +#endif + +/* Define to 1 if you have the `alarm' function. */ +#ifndef HAVE_ALARM +#cmakedefine HAVE_ALARM ${HAVE_ALARM} +#endif + +/* Define to 1 if you have the `alloca' function. */ +#ifndef HAVE_ALLOCA +#cmakedefine HAVE_ALLOCA ${HAVE_ALLOCA} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_ALLOCA_H +#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H} +#endif + +/* Define to 1 if you have . */ +#ifndef HAVE_ARCHIVE_H +#cmakedefine HAVE_ARCHIVE_H ${HAVE_ARCHIVE_H} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_bzip2' +function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_BZIP2 +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_BZIP2 ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_BZIP2} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_compress' +function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_COMPRESS +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_COMPRESS ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_COMPRESS} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_gzip' +function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_GZIP +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_GZIP ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_GZIP} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_lzma' +function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_LZMA +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_LZMA ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_LZMA} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_none' +function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_NONE +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_NONE ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_NONE} +#endif + +/* Define to 1 if you have the `archive_read_support_compression_xz' function. +*/ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_XZ +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_XZ ${HAVE_ARCHIVE_READ_SUPPORT_COMPRESSION_XZ} +#endif + +/* Define to 1 if you have the `archive_read_support_format_ar' function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_AR +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_AR ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_AR} +#endif + +/* Define to 1 if you have the `archive_read_support_format_cpio' function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_CPIO +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_CPIO ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_CPIO} +#endif + +/* Define to 1 if you have the `archive_read_support_format_empty' function. +*/ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_EMPTY +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_EMPTY ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_EMPTY} +#endif + +/* Define to 1 if you have the `archive_read_support_format_iso9660' function. +*/ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ISO9660 +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ISO9660 ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ISO9660} +#endif + +/* Define to 1 if you have the `archive_read_support_format_mtree' function. +*/ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_MTREE +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_MTREE ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_MTREE} +#endif + +/* Define to 1 if you have the `archive_read_support_format_raw' function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_RAW +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_RAW ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_RAW} +#endif + +/* Define to 1 if you have the `archive_read_support_format_tar' function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_TAR +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_TAR ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_TAR} +#endif + +/* Define to 1 if you have the `archive_read_support_format_zip' function. */ +#ifndef HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ZIP +#cmakedefine HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ZIP ${HAVE_ARCHIVE_READ_SUPPORT_FORMAT_ZIP} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_ARPA_INET_H +#cmakedefine HAVE_ARPA_INET_H ${HAVE_ARPA_INET_H} +#endif + +/* Define to 1 if you have the `asinh' function. */ +#ifndef HAVE_ASINH +#cmakedefine HAVE_ASINH ${HAVE_ASINH} +#endif + +/* Define to 1 if you have the `atanh' function. */ +#ifndef HAVE_ATANH +#cmakedefine HAVE_ATANH ${HAVE_ATANH} +#endif + +/* Define to 1 if you have the `chdir' function. */ +#ifndef HAVE_CHDIR +#cmakedefine HAVE_CHDIR ${HAVE_CHDIR} +#endif + +/* Define to 1 if you have the `clock' function. */ +#ifndef HAVE_CLOCK +#cmakedefine HAVE_CLOCK ${HAVE_CLOCK} +#endif + +/* Define to 1 if you have the `clock_gettime' function. */ +#ifndef HAVE_CLOCK_GETTIME +#cmakedefine HAVE_CLOCK_GETTIME ${HAVE_CLOCK_GETTIME} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CRTDBG_H +#cmakedefine HAVE_CRTDBG_H ${HAVE_CRTDBG_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CRT_EXTERNS_H +#cmakedefine HAVE_CRT_EXTERNS_H ${HAVE_CRT_EXTERNS_H} +#endif + +/* "Define if you have the crypt function." */ +#ifndef HAVE_CRYPT +#cmakedefine HAVE_CRYPT ${HAVE_CRYPT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CRYPT_H +#cmakedefine HAVE_CRYPT_H ${HAVE_CRYPT_H} +#endif + +/* Define to 1 if you have the `ctime' function. */ +#ifndef HAVE_CTIME +#cmakedefine HAVE_CTIME ${HAVE_CTIME} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CTYPE_H +#cmakedefine HAVE_CTYPE_H ${HAVE_CTYPE_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CUDDINT_H +#cmakedefine HAVE_CUDDINT_H ${HAVE_CUDDINT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CUDD_CUDDINT_H +#cmakedefine HAVE_CUDD_CUDDINT_H ${HAVE_CUDD_CUDDINT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CUDD_CUDD_H +#cmakedefine HAVE_CUDD_CUDD_H ${HAVE_CUDD_CUDD_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CUDD_H +#cmakedefine HAVE_CUDD_H ${HAVE_CUDD_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_CUDD_UTIL_H +#cmakedefine HAVE_CUDD_UTIL_H ${HAVE_CUDD_UTIL_H} +#endif + +/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if +you don't. */ +#ifndef HAVE_DECL_RL_CATCH_SIGNALS_ +#cmakedefine HAVE_DECL_RL_CATCH_SIGNALS_ ${HAVE_DECL_RL_CATCH_SIGNALS_} +#endif + +/* Define to 1 if you have the declaration of `rl_done ', and to 0 if you +don't. */ +#ifndef HAVE_DECL_RL_DONE_ +#cmakedefine HAVE_DECL_RL_DONE_ ${HAVE_DECL_RL_DONE_} +#endif + +/* Define to 1 if you have the declaration of `rl_event_hook', and to 0 if you +don't. */ +#ifndef HAVE_DECL_RL_EVENT_HOOK +#cmakedefine HAVE_DECL_RL_EVENT_HOOK ${HAVE_DECL_RL_EVENT_HOOK} +#endif + +/* Define to 1 if you have the declaration of `rl_readline_state', and to 0 if +you don't. */ +#ifndef HAVE_DECL_RL_READLINE_STATE +#cmakedefine HAVE_DECL_RL_READLINE_STATE ${HAVE_DECL_RL_READLINE_STATE} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_DIRECT_H +#cmakedefine HAVE_DIRECT_H ${HAVE_DIRECT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_DIRENT_H +#cmakedefine HAVE_DIRENT_H ${HAVE_DIRENT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_DLFCN_H +#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H} +#endif + +/* Define to 1 if you have the `dlopen' function. */ +#ifndef HAVE_DLOPEN +#define HAVE_DLOPEN ${HAVE_DLOPEN} +#endif + +/* Define to 1 if you have the `dup2' function. */ +#ifndef HAVE_DUP2 +#cmakedefine HAVE_DUP2 ${HAVE_DUP2} +#endif + +/* Define if dynamic arrays are supported */ +#ifndef HAVE_DYNARRAY +#cmakedefine HAVE_DYNARRAY ${HAVE_DYNARRAY} +#endif + +/* environment access */ +#ifndef HAVE_ENVIRON +#cmakedefine HAVE_ENVIRON ${HAVE_ENVIRON} +#endif + +/* Define to 1 if you have the `erf' function. */ +#ifndef HAVE_ERF +#cmakedefine HAVE_ERF ${HAVE_ERF} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_ERRNO_H +#cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_EXECINFO_H +#cmakedefine HAVE_EXECINFO_H ${HAVE_EXECINFO_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_FCNTL_H +#cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H} +#endif + +/* Define to 1 if you have the `feclearexcept' function. */ +#ifndef HAVE_FECLEAREXCEPT +#cmakedefine HAVE_FECLEAREXCEPT ${HAVE_FECLEAREXCEPT} +#endif + +/* Define to 1 if you have the `feenableexcept' function. */ +#ifndef HAVE_FEENABLEEXCEPT +#cmakedefine HAVE_FEENABLEEXCEPT ${HAVE_FEENABLEEXCEPT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_FENV_H +#cmakedefine HAVE_FENV_H ${HAVE_FENV_H} +#endif + +/* Define to 1 if you have the `fesetexceptflag' function. */ +#ifndef HAVE_FESETEXCEPTFLAG +#cmakedefine HAVE_FESETEXCEPTFLAG ${HAVE_FESETEXCEPTFLAG} +#endif + +/* Define to 1 if you have the `fesetround' function. */ +#ifndef HAVE_FESETROUND +#cmakedefine HAVE_FESETROUND ${HAVE_FESETROUND} +#endif + +/* Define to 1 if you have the `fesettrapenable' function. */ +#ifndef HAVE_FESETTRAPENABLE +#cmakedefine HAVE_FESETTRAPENABLE ${HAVE_FESETTRAPENABLE} +#endif + +/* Define to 1 if you have the `fetestexcept' function. */ +#ifndef HAVE_FETESTEXCEPT +#cmakedefine HAVE_FETESTEXCEPT ${HAVE_FETESTEXCEPT} +#endif + +/* Define to 1 if you have the `ffsl' function. */ +#ifndef HAVE_FFSL +#cmakedefine HAVE_FFSL ${HAVE_FFSL} +#endif + +/* Define to 1 if you have the `ffsll' function. */ +#ifndef HAVE_FFSLL +#cmakedefine HAVE_FFSLL ${HAVE_FFSLL} +#endif + +/* Define to 1 if you have the `fgetpos' function. */ +#ifndef HAVE_FGETPOS +#cmakedefine HAVE_FGETPOS ${HAVE_FGETPOS} +#endif + +/* Define to 1 if you have the `finite' function. */ +#ifndef HAVE_FINITE +#cmakedefine HAVE_FINITE ${HAVE_FINITE} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_FLOAT_H +#cmakedefine HAVE_FLOAT_H ${HAVE_FLOAT_H} +#endif + +/* Define to 1 if you have the `flsl' function. */ +#ifndef HAVE_FLSL +#cmakedefine HAVE_FLSL ${HAVE_FLSL} +#endif + +/* Define to 1 if you have the `flsll' function. */ +#ifndef HAVE_FLSLL +#cmakedefine HAVE_FLSLL ${HAVE_FLSLL} +#endif + +/* Define to 1 if you have the `fpclass' function. */ +#ifndef HAVE_FPCLASS +#cmakedefine HAVE_FPCLASS ${HAVE_FPCLASS} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_FPU_CONTROL_H +#cmakedefine HAVE_FPU_CONTROL_H ${HAVE_FPU_CONTROL_H} +#endif + +/* Define to 1 if you have the `ftime' function. */ +#ifndef HAVE_FTIME +#cmakedefine HAVE_FTIME ${HAVE_FTIME} +#endif + +/* Define to 1 if you have the `ftruncate' function. */ +#ifndef HAVE_FTRUNCATE +#cmakedefine HAVE_FTRUNCATE ${HAVE_FTRUNCATE} +#endif + +/* Old m4 auto-heder generation, not really useful now */ +#ifndef HAVE_GCC +#cmakedefine HAVE_GCC ${HAVE_GCC} +#endif + +/* Define to 1 if you have the `getcwd' function. */ +#ifndef HAVE_GETCWD +#cmakedefine HAVE_GETCWD ${HAVE_GETCWD} +#endif + +/* Define to 1 if you have the `getenv' function. */ +#ifndef HAVE_GETENV +#cmakedefine HAVE_GETENV ${HAVE_GETENV} +#endif + +/* Define to 1 if you have the `getexecname' function. */ +#ifndef HAVE_GETEXECNAME +#cmakedefine HAVE_GETEXECNAME ${HAVE_GETEXECNAME} +#endif + +/* Define to 1 if you have the `gethostbyname' function. */ +#ifndef HAVE_GETHOSTBYNAME +#cmakedefine HAVE_GETHOSTBYNAME ${HAVE_GETHOSTBYNAME} +#endif + +/* Define to 1 if you have the `gethostent' function. */ +#ifndef HAVE_GETHOSTENT +#cmakedefine HAVE_GETHOSTENT ${HAVE_GETHOSTENT} +#endif + +/* Define to 1 if you have the `gethostid' function. */ +#ifndef HAVE_GETHOSTID +#cmakedefine HAVE_GETHOSTID ${HAVE_GETHOSTID} +#endif + +/* Define to 1 if you have the `gethostname' function. */ +#ifndef HAVE_GETHOSTNAME +#cmakedefine HAVE_GETHOSTNAME ${HAVE_GETHOSTNAME} +#endif + +/* Define to 1 if you have the `gethrtime' function. */ +#ifndef HAVE_GETHRTIME +#cmakedefine HAVE_GETHRTIME ${HAVE_GETHRTIME} +#endif + +/* Define to 1 if you have the `getpagesize' function. */ +#ifndef HAVE_GETPAGESIZE +#cmakedefine HAVE_GETPAGESIZE ${HAVE_GETPAGESIZE} +#endif + +/* Define to 1 if you have the `getpid' function. */ +#ifndef HAVE_GETPID +#cmakedefine HAVE_GETPID ${HAVE_GETPID} +#endif + +/* Define to 1 if you have the `getpwnam' function. */ +#ifndef HAVE_GETPWNAM +#cmakedefine HAVE_GETPWNAM ${HAVE_GETPWNAM} +#endif + +/* Define to 1 if you have the `getrlimit' function. */ +#ifndef HAVE_GETRLIMIT +#cmakedefine HAVE_GETRLIMIT ${HAVE_GETRLIMIT} +#endif + +/* Define to 1 if you have the `getrusage' function. */ +#ifndef HAVE_GETRUSAGE +#cmakedefine HAVE_GETRUSAGE ${HAVE_GETRUSAGE} +#endif + +/* Define to 1 if you have the `gettimeofday' function. */ +#ifndef HAVE_GETTIMEOFDAY +#cmakedefine HAVE_GETTIMEOFDAY ${HAVE_GETTIMEOFDAY} +#endif + +/* Define to 1 if you have the `getwd' function. */ +#ifndef HAVE_GETWD +#cmakedefine HAVE_GETWD ${HAVE_GETWD} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_GMP_H +#cmakedefine HAVE_GMP_H ${HAVE_GMP_H} +#endif + +/* Define to 1 if you have the `gmtime' function. */ +#ifndef HAVE_GMTIME +#cmakedefine HAVE_GMTIME ${HAVE_GMTIME} +#endif + +/* Define of h_errno is provided */ +#ifndef HAVE_H_ERRNO +#cmakedefine HAVE_H_ERRNO ${HAVE_H_ERRNO} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_IEEEFP_H +#cmakedefine HAVE_IEEEFP_H ${HAVE_IEEEFP_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_INTTYPES_H +#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_IO_H +#cmakedefine HAVE_IO_H ${HAVE_IO_H} +#endif + +/* Define to 1 if you have the `isatty' function. */ +#ifndef HAVE_ISATTY +#cmakedefine HAVE_ISATTY ${HAVE_ISATTY} +#endif + +/* Define to 1 if you have the `isfinite' function. */ +#ifndef HAVE_ISFINITE +#cmakedefine HAVE_ISFINITE ${HAVE_ISFINITE} +#endif + +/* Define to 1 if you have the `isinf' function. */ +#ifndef HAVE_ISINF +#cmakedefine HAVE_ISINF ${HAVE_ISINF} +#endif + +/* Define to 1 if you have the `isnan' function. */ +#ifndef HAVE_ISNAN +#cmakedefine HAVE_ISNAN ${HAVE_ISNAN} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_JUDY_H +#cmakedefine HAVE_JUDY_H ${HAVE_JUDY_H} +#endif + +/* Define to 1 if you have the `kill' function. */ +#ifndef HAVE_KILL +#cmakedefine HAVE_KILL ${HAVE_KILL} +#endif + +/* Define to 1 if you have the `labs' function. */ +#ifndef HAVE_LABS +#cmakedefine HAVE_LABS ${HAVE_LABS} +#endif + +/* Define to 1 if you have the `lgamma' function. */ +#ifndef HAVE_LGAMMA +#cmakedefine HAVE_LGAMMA ${HAVE_LGAMMA} +#endif + +/* Define to 1 if you have the `android' library (-landroid). */ +#ifndef HAVE_LIBANDROID +#cmakedefine HAVE_LIBANDROID ${HAVE_LIBANDROID} +#endif + +/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */ +#ifndef HAVE_LIBCOMDLG32 +#cmakedefine HAVE_LIBCOMDLG32 ${HAVE_LIBCOMDLG32} +#endif + +/* Define to 1 if you have the `crypt' library (-lcrypt). */ +#ifndef HAVE_LIBCRYPT +#cmakedefine HAVE_LIBCRYPT ${HAVE_LIBCRYPT} +#endif + +/* Define to 1 if you have the `gmp' library (-lgmp). */ +#ifndef HAVE_LIBGMP +#cmakedefine HAVE_LIBGMP ${HAVE_LIBGMP} +#endif + +/* Define to 1 if you have the `Judy' library (-lJudy). */ +#ifndef HAVE_LIBJUDY +#cmakedefine HAVE_LIBJUDY ${HAVE_LIBJUDY} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_LIBLOADERAPI_H +#cmakedefine HAVE_LIBLOADERAPI_H ${HAVE_LIBLOADERAPI_H} +#endif + +/* Define to 1 if you have the `log' library (-llog). */ +#ifndef HAVE_LIBLOG +#cmakedefine HAVE_LIBLOG ${HAVE_LIBLOG} +#endif + +/* Define to 1 if you have the `m' library (-lm). */ +#ifndef HAVE_LIBM +#cmakedefine HAVE_LIBM ${HAVE_LIBM} +#endif + +/* MPI Debugging off */ +#ifndef HAVE_LIBMPE +#cmakedefine HAVE_LIBMPE ${HAVE_LIBMPE} +#endif + +/* Define to 1 if you have the `mscrt' library (-lmscrt). */ +#ifndef HAVE_LIBMSCRT +#cmakedefine HAVE_LIBMSCRT ${HAVE_LIBMSCRT} +#endif + +/* "Define if you have the nsl library (-lnsl)." */ +#ifndef HAVE_LIBNSL +#cmakedefine HAVE_LIBNSL ${HAVE_LIBNSL} +#endif + +/* Define to 1 if you have the `nss_dns' library (-lnss_dns). */ +#ifndef HAVE_LIBNSS_DNS +#cmakedefine HAVE_LIBNSS_DNS ${HAVE_LIBNSS_DNS} +#endif + +/* Define to 1 if you have the `nss_files' library (-lnss_files). */ +#ifndef HAVE_LIBNSS_FILES +#cmakedefine HAVE_LIBNSS_FILES ${HAVE_LIBNSS_FILES} +#endif + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +#ifndef HAVE_LIBPSAPI +#cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI} +#endif + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#ifndef HAVE_LIBPTHREAD +#cmakedefine HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD} +#endif + +/* Define to 1 if you have the `raptor' library (-lraptor). */ +#ifndef HAVE_LIBRAPTOR +#cmakedefine HAVE_LIBRAPTOR ${HAVE_LIBRAPTOR} +#endif + +/* Define to 1 if you have the `raptor2' library (-lraptor2). */ +#ifndef HAVE_LIBRAPTOR2 +#cmakedefine HAVE_LIBRAPTOR2 ${HAVE_LIBRAPTOR2} +#endif + +/* Define if you have libreadline */ +#ifndef HAVE_LIBREADLINE +#cmakedefine HAVE_LIBREADLINE ${READLINE_FOUND} +#endif + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +#ifndef HAVE_LIBRESOLV +#cmakedefine HAVE_LIBRESOLV ${HAVE_LIBRESOLV} +#endif + +/* Define to 1 if you have the `shell32' library (-lshell32). */ +#ifndef HAVE_LIBSHELL32 +#cmakedefine HAVE_LIBSHELL32 ${HAVE_LIBSHELL32} +#endif + +/* "Define if you have the socket library (-lsocket)." */ +#ifndef HAVE_LIBSOCKET +#cmakedefine HAVE_LIBSOCKET ${HAVE_LIBSOCKET} +#endif + +/* Define to 1 if you have the `stdc++' library (-lstdc++). */ +#ifndef HAVE_LIBSTDC__ +#cmakedefine HAVE_LIBSTDC__ ${HAVE_LIBSTDC__} +#endif + +/* Whether we have libunicode.a */ +#ifndef HAVE_LIBUNICODE +#cmakedefine HAVE_LIBUNICODE ${HAVE_LIBUNICODE} +#endif + +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#ifndef HAVE_LIBWS2_32 +#cmakedefine HAVE_LIBWS2_32 ${HAVE_LIBWS2_32} +#endif + +/* Define to 1 if you have the `wsock32' library (-lwsock32). */ +#ifndef HAVE_LIBWSOCK32 +#cmakedefine HAVE_LIBWSOCK32 ${HAVE_LIBWSOCK32} +#endif + +/* Define to 1 if you have the `xnet' library (-lxnet). */ +#ifndef HAVE_LIBXNET +#cmakedefine HAVE_LIBXNET ${HAVE_LIBXNET} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_LIMITS_H +#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H} +#endif + +/* Define to 1 if you have the `link' function. */ +#ifndef HAVE_LINK +#cmakedefine HAVE_LINK ${HAVE_LINK} +#endif + +/* Define to 1 if you have the `LoadLibrary' function. */ +#ifndef HAVE_LOADLIBRARY +#cmakedefine HAVE_LOADLIBRARY ${HAVE_LOADLIBRARY} +#endif + +/* Define to 1 if you have the `localeconv' function. */ +#ifndef HAVE_LOCALECONV +#cmakedefine HAVE_LOCALECONV ${HAVE_LOCALECONV} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_LOCALE_H +#cmakedefine HAVE_LOCALE_H ${HAVE_LOCALE_H} +#endif + +/* Define to 1 if you have the `localtime' function. */ +#ifndef HAVE_LOCALTIME +#cmakedefine HAVE_LOCALTIME ${HAVE_LOCALTIME} +#endif + +/* Define to 1 if the system has the type `long long'. */ +#ifndef HAVE_LONG_LONG +#cmakedefine HAVE_LONG_LONG ${HAVE_LONG_LONG} +#endif + +/* Define to 1 if you have the `lstat' function. */ +#ifndef HAVE_LSTAT +#cmakedefine HAVE_LSTAT ${HAVE_LSTAT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MACH_O_DYLD_H +#cmakedefine HAVE_MACH_O_DYLD_H ${HAVE_MACH_O_DYLD_H} +#endif + +/* Define to 1 if you have the `mallinfo' function. */ +#ifndef HAVE_MALLINFO +#cmakedefine HAVE_MALLINFO ${HAVE_MALLINFO} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MALLOC_H +#cmakedefine HAVE_MALLOC_H ${HAVE_MALLOC_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MATH_H +#cmakedefine HAVE_MATH_H ${HAVE_MATH_H} +#endif + +/* Define to 1 if you have the `mbscasecoll' function. */ +#ifndef HAVE_MBSCASECOLL +#cmakedefine HAVE_MBSCASECOLL ${HAVE_MBSCASECOLL} +#endif + +/* Define to 1 if you have the `mbscoll' function. */ +#ifndef HAVE_MBSCOLL +#cmakedefine HAVE_MBSCOLL ${HAVE_MBSCOLL} +#endif + +/* Define to 1 if you have the `mbsnrtowcs' function. */ +#ifndef HAVE_MBSNRTOWCS +#cmakedefine HAVE_MBSNRTOWCS ${HAVE_MBSNRTOWCS} +#endif + +/* Define to 1 if you have the `memcpy' function. */ +#ifndef HAVE_MEMCPY +#cmakedefine HAVE_MEMCPY ${HAVE_MEMCPY} +#endif + +/* Define to 1 if you have the `memmove' function. */ +#ifndef HAVE_MEMMOVE +#cmakedefine HAVE_MEMMOVE ${HAVE_MEMMOVE} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MEMORY_H +#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H} +#endif + +/* Define to 1 if you have the `mkstemp' function. */ +#ifndef HAVE_MKSTEMP +#cmakedefine HAVE_MKSTEMP ${HAVE_MKSTEMP} +#endif + +/* Define to 1 if you have the `mktemp' function. */ +#ifndef HAVE_MKTEMP +#cmakedefine HAVE_MKTEMP ${HAVE_MKTEMP} +#endif + +/* Define to 1 if you have the `mktime' function. */ +#ifndef HAVE_MKTIME +#cmakedefine HAVE_MKTIME ${HAVE_MKTIME} +#endif + +/* Define to 1 if you have the `mmap' function. */ +#ifndef HAVE_MMAP +#cmakedefine HAVE_MMAP ${HAVE_MMAP} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MPE_H +#cmakedefine HAVE_MPE_H ${HAVE_MPE_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MPI_H +#cmakedefine HAVE_MPI_H ${HAVE_MPI_H} +#endif + +/* Older versions of MPZ didn't have XOR */ +#ifndef HAVE_MPZ_XOR +#cmakedefine HAVE_MPZ_XOR ${HAVE_MPZ_XOR} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_MYSQL_MYSQL_H +#cmakedefine HAVE_MYSQL_MYSQL_H ${HAVE_MYSQL_MYSQL_H} +#endif + +/* Define to 1 if you have the `nanosleep' function. */ +#ifndef HAVE_NANOSLEEP +#cmakedefine HAVE_NANOSLEEP ${HAVE_NANOSLEEP} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_NETDB_H +#cmakedefine HAVE_NETDB_H ${HAVE_NETDB_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_NETINET_IN_H +#cmakedefine HAVE_NETINET_IN_H ${HAVE_NETINET_IN_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_NETINET_TCP_H +#cmakedefine HAVE_NETINET_TCP_H ${HAVE_NETINET_TCP_H} +#endif + +/* Define to 1 if you have the `NSLinkModule' function. */ +#ifndef HAVE_NSLINKMODULE +#cmakedefine HAVE_NSLINKMODULE ${HAVE_NSLINKMODULE} +#endif + +/* c++ nullptr support */ +#ifndef HAVE_NULLPTR +#cmakedefine HAVE_NULLPTR ${HAVE_NULLPTR} +#endif + +/* Define to 1 if you have the `opendir' function. */ +#ifndef HAVE_OPENDIR +#cmakedefine HAVE_OPENDIR ${HAVE_OPENDIR} +#endif + +/* Define to 1 if you have the `pipe2' function. */ +#ifndef HAVE_PIPE2 +#cmakedefine HAVE_PIPE2 ${HAVE_PIPE2} +#endif + +/* Define to 1 if you have the `popen' function. */ +#ifndef HAVE_POPEN +#cmakedefine HAVE_POPEN ${HAVE_POPEN} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_PTHREAD_H +#cmakedefine HAVE_PTHREAD_H ${HAVE_PTHREAD_H} +#endif + +/* Define to 1 if you have the `pthread_mutexattr_setkind_np' function. */ +#ifndef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP +#cmakedefine HAVE_PTHREAD_MUTEXATTR_SETKIND_NP ${HAVE_PTHREAD_MUTEXATTR_SETKIND_NP} +#endif + +/* Define to 1 if you have the `pthread_mutexattr_settype' function. */ +#ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE +#cmakedefine HAVE_PTHREAD_MUTEXATTR_SETTYPE ${HAVE_PTHREAD_MUTEXATTR_SETTYPE} +#endif + +/* Define to 1 if you have the `pthread_setconcurrency' function. */ +#ifndef HAVE_PTHREAD_SETCONCURRENCY +#cmakedefine HAVE_PTHREAD_SETCONCURRENCY ${HAVE_PTHREAD_SETCONCURRENCY} +#endif + +/* Define to 1 if you have the `putenv' function. */ +#ifndef HAVE_PUTENV +#cmakedefine HAVE_PUTENV ${HAVE_PUTENV} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_PWD_H +#cmakedefine HAVE_PWD_H ${HAVE_PWD_H} +#endif + +/* Define to 1 if you have the `rand' function. */ +#ifndef HAVE_RAND +#cmakedefine HAVE_RAND ${HAVE_RAND} +#endif + +/* Define to 1 if you have the `random' function. */ +#ifndef HAVE_RANDOM +#cmakedefine HAVE_RANDOM ${HAVE_RANDOM} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_RAPTOR2_RAPTOR2_H +#cmakedefine HAVE_RAPTOR2_RAPTOR2_H ${HAVE_RAPTOR2_RAPTOR2_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_RAPTOR_H +#cmakedefine HAVE_RAPTOR_H ${HAVE_RAPTOR_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_READLINE_HISTORY_H +#cmakedefine HAVE_READLINE_HISTORY_H ${HAVE_READLINE_HISTORY_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_READLINE_READLINE_H +#cmakedefine HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H} +#endif + +/* Define to 1 if you have the `readlink' function. */ +#ifndef HAVE_READLINK +#cmakedefine HAVE_READLINK ${HAVE_READLINK} +#endif + +/* Define to 1 if you have the `regexec' function. */ +#ifndef HAVE_REGEXEC +#cmakedefine HAVE_REGEXEC ${HAVE_REGEXEC} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_REGEX_H +#cmakedefine HAVE_REGEX_H ${HAVE_REGEX_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_REMBEDDED_H +#cmakedefine HAVE_REMBEDDED_H ${HAVE_REMBEDDED_H} +#endif + +/* Define to 1 if you have the `rename' function. */ +#ifndef HAVE_RENAME +#cmakedefine HAVE_RENAME ${HAVE_RENAME} +#endif + +/* Define to 1 if system calls automatically restart after interruption by a +signal. */ +#ifndef HAVE_RESTARTABLE_SYSCALLS +#cmakedefine HAVE_RESTARTABLE_SYSCALLS ${HAVE_RESTARTABLE_SYSCALLS} +#endif + +/* Define to 1 if you have the `rint' function. */ +#ifndef HAVE_RINT +#cmakedefine HAVE_RINT ${HAVE_RINT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_RINTERFACE_H +#cmakedefine HAVE_RINTERFACE_H ${HAVE_RINTERFACE_H} +#endif + +/* Define to 1 if you have the `rl_begin_undo_group' function. */ +#ifndef HAVE_RL_BEGIN_UNDO_GROUP +#cmakedefine HAVE_RL_BEGIN_UNDO_GROUP ${HAVE_RL_BEGIN_UNDO_GROUP} +#endif + +/* Define to 1 if you have the `rl_clear_pending_input' function. */ +#ifndef HAVE_RL_CLEAR_PENDING_INPUT +#cmakedefine HAVE_RL_CLEAR_PENDING_INPUT ${HAVE_RL_CLEAR_PENDING_INPUT} +#endif + +/* Define to 1 if the system has the type `rl_completion_func_t'). */ +#ifndef HAVE_RL_COMPLETION_FUNC_T +#cmakedefine HAVE_RL_COMPLETION_FUNC_T ${HAVE_RL_COMPLETION_FUNC_T} +#endif + +/* Define to 1 if the system has the type `rl_completion_func_t'. */ +#ifndef HAVE_RL_COMPLETION_FUNC_T +#cmakedefine HAVE_RL_COMPLETION_FUNC_T ${HAVE_RL_COMPLETION_FUNC_T} +#endif + +/* Define to 1 if you have the `rl_completion_matches' function. */ +#ifndef HAVE_RL_COMPLETION_MATCHES +#cmakedefine HAVE_RL_COMPLETION_MATCHES ${HAVE_RL_COMPLETION_MATCHES} +#endif + +/* Define to 1 if you have the `rl_discard_argument' function. */ +#ifndef HAVE_RL_DISCARD_ARGUMENT +#cmakedefine HAVE_RL_DISCARD_ARGUMENT ${HAVE_RL_DISCARD_ARGUMENT} +#endif + +/* Define to 1 if you have the `rl_filename_completion_function' function. */ +#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION +#cmakedefine HAVE_RL_FILENAME_COMPLETION_FUNCTION ${HAVE_RL_FILENAME_COMPLETION_FUNCTION} +#endif + +/* Define to 1 if you have the `rl_free_line_state' function. */ +#ifndef HAVE_RL_FREE_LINE_STATE +#cmakedefine HAVE_RL_FREE_LINE_STATE ${HAVE_RL_FREE_LINE_STATE} +#endif + +/* Define to 1 if the system has the type `rl_hook_func_t'. */ +#ifndef HAVE_RL_HOOK_FUNC_T +#cmakedefine HAVE_RL_HOOK_FUNC_T ${HAVE_RL_HOOK_FUNC_T} +#endif + +/* Define to 1 if you have the `rl_insert_close' function. */ +#ifndef HAVE_RL_INSERT_CLOSE +#cmakedefine HAVE_RL_INSERT_CLOSE ${HAVE_RL_INSERT_CLOSE} +#endif + +/* Define to 1 if you have the `rl_reset_after_signal' function. */ +#ifndef HAVE_RL_RESET_AFTER_SIGNAL +#cmakedefine HAVE_RL_RESET_AFTER_SIGNAL ${HAVE_RL_RESET_AFTER_SIGNAL} +#endif + +/* Define to 1 if you have the `rl_set_keyboard_input_timeout' function. */ +#ifndef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT +#cmakedefine HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT ${HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT} +#endif + +/* Define to 1 if you have the `rl_set_prompt' function. */ +#ifndef HAVE_RL_SET_PROMPT +#cmakedefine HAVE_RL_SET_PROMPT ${HAVE_RL_SET_PROMPT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_R_H +#cmakedefine HAVE_R_H ${HAVE_R_H} +#endif + +/* Define to 1 if you have the `sbrk' function. */ +#ifndef HAVE_SBRK +#cmakedefine HAVE_SBRK ${HAVE_SBRK} +#endif + +/* Define to 1 if you have the `select' function. */ +#ifndef HAVE_SELECT +#cmakedefine HAVE_SELECT ${HAVE_SELECT} +#endif + +/* Define to 1 if you have the `setbuf' function. */ +#ifndef HAVE_SETBUF +#cmakedefine HAVE_SETBUF ${HAVE_SETBUF} +#endif + +/* Define to 1 if you have the `setitimer' function. */ +#ifndef HAVE_SETITIMER +#cmakedefine HAVE_SETITIMER ${HAVE_SETITIMER} +#endif + +/* Define to 1 if you have the `setlinebuf' function. */ +#ifndef HAVE_SETLINEBUF +#cmakedefine HAVE_SETLINEBUF ${HAVE_SETLINEBUF} +#endif + +/* Define to 1 if you have the `setlocale' function. */ +#ifndef HAVE_SETLOCALE +#cmakedefine HAVE_SETLOCALE ${HAVE_SETLOCALE} +#endif + +/* Define to 1 if you have the `setsid' function. */ +#ifndef HAVE_SETSID +#cmakedefine HAVE_SETSID ${HAVE_SETSID} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SHLOBJ_H +#cmakedefine HAVE_SHLOBJ_H ${HAVE_SHLOBJ_H} +#endif + +/* Define to 1 if you have the `shmat' function. */ +#ifndef HAVE_SHMAT +#cmakedefine HAVE_SHMAT ${HAVE_SHMAT} +#endif + +/* Define to 1 if you have the `sigaction' function. */ +#ifndef HAVE_SIGACTION +#cmakedefine HAVE_SIGACTION ${HAVE_SIGACTION} +#endif + +/* Unix SIGFPE */ +#ifndef HAVE_SIGFPE +#cmakedefine HAVE_SIGFPE ${HAVE_SIGFPE} +#endif + +/* Define to 1 if you have the `siggetmask' function. */ +#ifndef HAVE_SIGGETMASK +#cmakedefine HAVE_SIGGETMASK ${HAVE_SIGGETMASK} +#endif + +/* Unix SIGINFO */ +#ifndef HAVE_SIGINFO +#cmakedefine HAVE_SIGINFO ${HAVE_SIGINFO} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SIGINFO_H +#cmakedefine HAVE_SIGINFO_H ${HAVE_SIGINFO_H} +#endif + +/* Define to 1 if you have the `siginterrupt' function. */ +#ifndef HAVE_SIGINTERRUPT +#cmakedefine HAVE_SIGINTERRUPT ${HAVE_SIGINTERRUPT} +#endif + +/* Define to 1 if you have the `signal' function. */ +#ifndef HAVE_SIGNAL +#cmakedefine HAVE_SIGNAL ${HAVE_SIGNAL} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SIGNAL_H +#cmakedefine HAVE_SIGNAL_H ${HAVE_SIGNAL_H} +#endif + +/* Define to 1 if you have the `sigprocmask' function. */ +#ifndef HAVE_SIGPROCMASK +#cmakedefine HAVE_SIGPROCMASK ${HAVE_SIGPROCMASK} +#endif + +/* UNIX Signal SIGPROF */ +#ifndef HAVE_SIGPROF +#cmakedefine HAVE_SIGPROF ${HAVE_SIGPROF} +#endif + +/* UNIX signal SEGV */ +#ifndef HAVE_SIGSEGV +#cmakedefine HAVE_SIGSEGV ${HAVE_SIGSEGV} +#endif + +/* support for sigsetjmp */ +#ifndef HAVE_SIGSETJMP +#cmakedefine HAVE_SIGSETJMP ${HAVE_SIGSETJMP} +#endif + +/* Define to 1 if you have the `sleep' function. */ +#ifndef HAVE_SLEEP +#cmakedefine HAVE_SLEEP ${HAVE_SLEEP} +#endif + +/* Define to 1 if you have the `snprintf' function. */ +#ifndef HAVE_SNPRINTF +#cmakedefine HAVE_SNPRINTF ${HAVE_SNPRINTF} +#endif + +/* Define to 1 if you have the `socket' function. */ +#ifndef HAVE_SOCKET +#cmakedefine HAVE_SOCKET ${HAVE_SOCKET} +#endif + +/* Define to 1 if the system has the type `socklen_t'. */ +#ifndef HAVE_SOCKLEN_T +#cmakedefine HAVE_SOCKLEN_T ${HAVE_SOCKLEN_T} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SQLITE3_H +#cmakedefine HAVE_SQLITE3_H ${HAVE_SQLITE3_H} +#endif + +/* Define to 1 if the system has the type `SQLLEN'. */ +#ifndef HAVE_SQLLEN +#cmakedefine HAVE_SQLLEN ${HAVE_SQLLEN} +#endif + +/* Define to 1 if the system has the type `SQLULEN'. */ +#ifndef HAVE_SQLULEN +#cmakedefine HAVE_SQLULEN ${HAVE_SQLULEN} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SQL_H +#cmakedefine HAVE_SQL_H ${HAVE_SQL_H} +#endif + +/* Define to 1 if you have the `srand' function. */ +#ifndef HAVE_SRAND +#cmakedefine HAVE_SRAND ${HAVE_SRAND} +#endif + +/* Define to 1 if you have the `srandom' function. */ +#ifndef HAVE_SRANDOM +#cmakedefine HAVE_SRANDOM ${HAVE_SRANDOM} +#endif + +/* Define to 1 if the system has the type `ssize_t'. */ +#ifndef HAVE_SSIZE_T +#cmakedefine HAVE_SSIZE_T ${HAVE_SSIZE_T} +#endif + +/* Define to 1 if you have the `stat' function. */ +#ifndef HAVE_STAT +#cmakedefine HAVE_STAT ${HAVE_STAT} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STDARG_H +#cmakedefine HAVE_STDARG_H ${HAVE_STDARG_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STDBOOL_H +#cmakedefine HAVE_STDBOOL_H ${HAVE_STDBOOL_H} +#endif + +/* Define to 1 if you have stdc headers. */ +#ifndef STDC_HEADERS +#cmakedefine STDC_HEADERS ${STDC_HEADERS} +#endif +#if STDC_HEADERS +#define HAVE_FLOAT_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDLIB_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STDINT_H +#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STDLIB_H +#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H} +#endif + +/* Define to 1 if you have the `strcasecmp' function. */ +#ifndef HAVE_STRCASECMP +#cmakedefine HAVE_STRCASECMP ${HAVE_STRCASECMP} +#endif + +/* Define to 1 if you have the `strcasestr' function. */ +#ifndef HAVE_STRCASESTR +#cmakedefine HAVE_STRCASESTR ${HAVE_STRCASESTR} +#endif + +/* Define to 1 if you have the `strchr' function. */ +#ifndef HAVE_STRCHR +#cmakedefine HAVE_STRCHR ${HAVE_STRCHR} +#endif + +/* Define to 1 if you have the `strerror' function. */ +#ifndef HAVE_STRERROR +#cmakedefine HAVE_STRERROR ${HAVE_STRERROR} +#endif + +/* Define to 1 if you have the `stricmp' function. */ +#ifndef HAVE_STRICMP +#cmakedefine HAVE_STRICMP ${HAVE_STRICMP} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STRINGS_H +#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STRING_H +#cmakedefine HAVE_STRING_H ${HAVE_STRING_H} +#endif + +/* Define to 1 if you have the `strlwr' function. */ +#ifndef HAVE_STRLWR +#cmakedefine HAVE_STRLWR ${HAVE_STRLWR} +#endif + +/* Define to 1 if you have the `strncasecmp' function. */ +#ifndef HAVE_STRNCASECMP +#cmakedefine HAVE_STRNCASECMP ${HAVE_STRNCASECMP} +#endif + +/* Define to 1 if you have the `strncat' function. */ +#ifndef HAVE_STRNCAT +#cmakedefine HAVE_STRNCAT ${HAVE_STRNCAT} +#endif + +/* Define to 1 if you have the `strncpy' function. */ +#ifndef HAVE_STRNCPY +#cmakedefine HAVE_STRNCPY ${HAVE_STRNCPY} +#endif + +/* Define to 1 if you have the `strnlen' function. */ +#ifndef HAVE_STRNLEN +#cmakedefine HAVE_STRNLEN ${HAVE_STRNLEN} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_STROPTS_H +#cmakedefine HAVE_STROPTS_H ${HAVE_STROPTS_H} +#endif + +/* Define to 1 if you have the `strtod' function. */ +#ifndef HAVE_STRTOD +#cmakedefine HAVE_STRTOD ${HAVE_STRTOD} +#endif + +/* Define is struct tm has tm_gmtoff */ +#ifndef HAVE_STRUCT_TIME_TM_GMTOFF +#cmakedefine HAVE_STRUCT_TIME_TM_GMTOFF ${HAVE_STRUCT_TIME_TM_GMTOFF} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYSLOG_H +#cmakedefine HAVE_SYSLOG_H ${HAVE_SYSLOG_H} +#endif + +/* Define to 1 if you have the `system' function. */ +#ifndef HAVE_SYSTEM +#cmakedefine HAVE_SYSTEM ${HAVE_SYSTEM} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_CONF_H +#cmakedefine HAVE_SYS_CONF_H ${HAVE_SYS_CONF_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_DIR_H +#cmakedefine HAVE_SYS_DIR_H ${HAVE_SYS_DIR_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_FILE_H +#cmakedefine HAVE_SYS_FILE_H ${HAVE_SYS_FILE_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_MMAN_H +#cmakedefine HAVE_SYS_MMAN_H ${HAVE_SYS_MMAN_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_NDIR_H +#cmakedefine HAVE_SYS_NDIR_H ${HAVE_SYS_NDIR_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_PARAM_H +#cmakedefine HAVE_SYS_PARAM_H ${HAVE_SYS_PARAM_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_RESOURCE_H +#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_SELECT_H +#cmakedefine HAVE_SYS_SELECT_H ${HAVE_SYS_SELECT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_SHM_H +#cmakedefine HAVE_SYS_SHM_H ${HAVE_SYS_SHM_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_SOCKET_H +#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_STAT_H +#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_TIMES_H +#cmakedefine HAVE_SYS_TIMES_H ${HAVE_SYS_TIMES_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_TYPES_H +#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_UCONTEXT_H +#cmakedefine HAVE_SYS_UCONTEXT_H ${HAVE_SYS_UCONTEXT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_UN_H +#cmakedefine HAVE_SYS_UN_H ${HAVE_SYS_UN_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_SYS_WAIT_H +#cmakedefine HAVE_SYS_WAIT_H ${HAVE_SYS_WAIT_H} +#endif + +/* Define to 1 if you have the `time' function. */ +#ifndef HAVE_TIME +#cmakedefine HAVE_TIME ${HAVE_TIME} +#endif + +/* Define to 1 if you have the `timegm' function. */ +#ifndef HAVE_TIMEGM +#cmakedefine HAVE_TIMEGM ${HAVE_TIMEGM} +#endif + +/* Define to 1 if you have the `times' function. */ +#ifndef HAVE_TIMES +#cmakedefine HAVE_TIMES ${HAVE_TIMES} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_TIME_H +#cmakedefine HAVE_TIME_H ${HAVE_TIME_H} +#endif +#if HAVE_TIME_H && HAVE_SYS_TIME_H +#ifndef TIME_WITH_SYS_TIME_H +#define TIME_WITH_SYS_TIME_H 1 +#endif +#endif + +/* Define to 1 if you have the `tmpnam' function. */ +#ifndef HAVE_TMPNAM +#cmakedefine HAVE_TMPNAM ${HAVE_TMPNAM} +#endif + +/* Define to 1 if you have the `ttyname' function. */ +#ifndef HAVE_TTYNAME +#cmakedefine HAVE_TTYNAME ${HAVE_TTYNAME} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_UCONTEXT_H +#cmakedefine HAVE_UCONTEXT_H ${HAVE_UCONTEXT_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_UNISTD_H +#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H} +#endif + +/* Define to 1 if you have the `usleep' function. */ +#ifndef HAVE_USLEEP +#cmakedefine HAVE_USLEEP ${HAVE_USLEEP} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_UTIL_H +#cmakedefine HAVE_UTIL_H ${HAVE_UTIL_H} +#endif + +/* Define to 1 if you have the `utime' function. */ +#ifndef HAVE_UTIME +#cmakedefine HAVE_UTIME ${HAVE_UTIME} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_UTIME_H +#cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H} +#endif + +/* Define if tzset sets timezone variable */ +#ifndef HAVE_VAR_TIMEZONE +#define HAVE_VAR_TIMEZONE ${HAVE_VAR_TIMEZONE} +#endif + +/* Define to 1 if you have the `vfork' function. */ +#ifndef HAVE_VFORK +#cmakedefine HAVE_VFORK ${HAVE_VFORK} +#endif + +/* Define to 1 if you have the `vsnprintf' function. */ +#ifndef HAVE_VSNPRINTF +#cmakedefine HAVE_VSNPRINTF ${HAVE_VSNPRINTF} +#endif + +/* Define to 1 if you have the `waitpid' function. */ +#ifndef HAVE_WAITPID +#cmakedefine HAVE_WAITPID ${HAVE_WAITPID} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WCHAR_H +#cmakedefine HAVE_WCHAR_H ${HAVE_WCHAR_H} +#endif + +/* Define to 1 if you have the `wcsdup' function. */ +#ifndef HAVE_WCSDUP +#cmakedefine HAVE_WCSDUP ${HAVE_WCSDUP} +#endif + +/* Define to 1 if you have the `wcsnlen' function. */ +#ifndef HAVE_WCSNLEN +#cmakedefine HAVE_WCSNLEN ${HAVE_WCSNLEN} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WCTYPE_H +#cmakedefine HAVE_WCTYPE_H ${HAVE_WCTYPE_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WINDEF_H +#cmakedefine HAVE_WINDEF_H ${HAVE_WINDEF_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WINDOWS_H +#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WINSOCK2_H +#cmakedefine HAVE_WINSOCK2_H ${HAVE_WINSOCK2_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_WINSOCK_H +#cmakedefine HAVE_WINSOCK_H ${HAVE_WINSOCK_H} +#endif + +/* Define to 1 if you have . */ +#ifndef HAVE_ZLIB_H +#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H} +#endif + +/* Define to 1 if you have the header file. */ +#ifndef HAVE_ZUTIL_H +#cmakedefine HAVE_ZUTIL_H ${HAVE_ZUTIL_H} +#endif + +/* Define to 1 if the system has the type `_Bool'. */ +#ifndef HAVE__BOOL +#cmakedefine HAVE__BOOL ${HAVE__BOOL} +#endif + +/* Define to 1 if you have the `_chsize_s' function. */ +#ifndef HAVE__CHSIZE_S +#cmakedefine HAVE__CHSIZE_S ${HAVE__CHSIZE_S} +#endif + +/* Define to 1 if you have the `_NSGetEnviron' function. */ +#ifndef HAVE__NSGETENVIRON +#cmakedefine HAVE__NSGETENVIRON ${HAVE__NSGETENVIRON} +#endif + +/* Define to 1 if you have the `__builtin_ffsll' function. */ +#ifndef HAVE___BUILTIN_FFSLL +#cmakedefine HAVE___BUILTIN_FFSLL ${HAVE___BUILTIN_FFSLL} +#endif + +/* what is the configure host name */ +#ifndef HOST_ALIAS +#define HOST_ALIAS "${CMAKE_SYSTEM}" +#endif + +/* type of int64_t */ +#ifndef INT64_T_DEFINED +#cmakedefine INT64_T_DEFINED "${INT64_T_DEFINED}" +#endif + +/* malloc_t */ +#ifndef MALLOC_T +#cmakedefine MALLOC_T "${MALLOC_T}" +#endif + +/* max number of threads, default 1 or 1024 */ +#ifndef MAX_THREADS +#cmakedefine MAX_THREADS "${MAX_THREADS}" +#endif + +/* maximum amount of or-parallelism */ +#ifndef MAX_WORKERS +#cmakedefine MAX_WORKERS "${MAX_WORKERS}" +#endif + +/* o not use realloc() from HP-UX 10.20 together with MPI */ +#ifndef MPI_AVOID_REALLOC +#cmakedefine MPI_AVOID_REALLOC "${MPI_AVOID_REALLOC}" +#endif + +/* compiler should shift offsets. */ +#ifndef MSHIFTOFFS +#cmakedefine MSHIFTOFFS "${MSHIFTOFFS}" +#endif + +/* myddas release */ +#ifndef MYDDAS_VERSION +#cmakedefine MYDDAS_VERSION "${MYDDAS_VERSION}" +#endif + +/* at least 2M Cells for Heap */ +#ifndef MinHeapSpace +#define MinHeapSpace ${MIN_HEAPSPACE} +#endif + +/* at least 1M Cells for Stack */ +#ifndef MinStackSpace +#define MinStackSpace ${MIN_STACKSPACE} +#endif + +/* at least 1/2M Cells for Trail */ +#ifndef MinTrailSpace +#define MinTrailSpace ${MIN_TRAILSPACE} +#endif + +/* at least 2M Cells for Heap */ +#ifndef DefHeapSpace +#define DefHeapSpace ${DEF_HEAPSPACE} +#endif + +/* at least 1M Cells for Stack */ +#ifndef DefStackSpace +#define DefStackSpace ${DEF_STACKSPACE} +#endif + +/* at least 1/2M Cells for Trail */ +#ifndef DefTrailSpace +#define DefTrailSpace ${DEF_TRAILSPACE} +#endif + +/* compile wait in UNIX */ +#ifndef NO_UNION_WAIT +#cmakedefine NO_UNION_WAIT "${NO_UNION_WAIT}" +#endif + +/* Define to the address where bug reports for this package should be sent. */ +#ifndef PACKAGE_BUGREPORT +#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}" +#endif + +/* Define to the full name of this package. */ +#ifndef PACKAGE_NAME +#cmakedefine PACKAGE_NAME "${PACKAGE_NAME}" +#endif + +/* Define to the full name and version of this package. */ +#ifndef PACKAGE_STRING +#cmakedefine PACKAGE_STRING "${PACKAGE_STRING}" +#endif + +/* Define to the one symbol short name of this package. */ +#ifndef PACKAGE_TARNAME +#cmakedefine PACKAGE_TARNAME "${PACKAGE_TARNAME}" +#endif + +/* Define to the home page for this package. */ +#ifndef PACKAGE_URL +#cmakedefine PACKAGE_URL "${PACKAGE_URL}" +#endif + +/* Define to the version of this package. */ +#ifndef PACKAGE_VERSION +#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}" +#endif + +/* Define as the return type of signal handlers (`int' or `void'). */ +#ifndef RETSIGTYPE +#cmakedefine RETSIGTYPE ${RETSIGTYPE} +#endif + +/* Specify package */ +#ifndef RFC2045PKG +#cmakedefine RFC2045PKG "${RFC2045PKG}" +#endif + +/* Specify version */ +#ifndef RFC2045VER +#cmakedefine RFC2045VER "${RFC2045VER}" +#endif + +/* The size of `double', as computed by sizeof. */ +#ifndef SIZEOF_DOUBLE +#cmakedefine SIZEOF_DOUBLE ${SIZEOF_DOUBLE} +#endif + +/* The size of `float', as computed by sizeof. */ +#ifndef SIZEOF_FLOAT +#cmakedefine SIZEOF_FLOAT ${SIZEOF_FLOAT} +#endif + +/* The size of `int', as computed by sizeof. */ +#ifndef SIZEOF_INT +#cmakedefine SIZEOF_INT ${SIZEOF_INT} +#endif + +/* The size of `int *', as computed by sizeof. */ +#ifndef SIZEOF_INT_P +#cmakedefine SIZEOF_INT_P ${SIZEOF_INT_P} +#endif + +/* The size of `long', as computed by sizeof. */ +#ifndef SIZEOF_LONG +#cmakedefine SIZEOF_LONG ${SIZEOF_LONG} +#endif + +/* The size of `long int', as computed by sizeof. */ +#ifndef SIZEOF_LONG_INT +#cmakedefine SIZEOF_LONG_INT ${SIZEOF_LONG_INT} +#endif + +/* The size of `long long', as computed by sizeof. */ +#ifndef SIZEOF_LONG_LONG +#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG} +#endif + +/* The size of `long long int', as computed by sizeof. */ +#ifndef SIZEOF_LONG_LONG_INT +#cmakedefine SIZEOF_LONG_LONG_INT ${SIZEOF_LONG_LONG_INT} +#endif + +/* The size of `short int', as computed by sizeof. */ +#ifndef SIZEOF_SHORT_INT +#define SIZEOF_SHORT_INT ${SIZEOF_SHORT_INT} +#endif + +/* The size of `SQLWCHAR', as computed by sizeof. */ +#ifndef SIZEOF_SQLWCHAR +#define SIZEOF_SQLWCHAR ${SIZEOF_SQLWCHAR} +#endif + +/* The size of `void*', as computed by sizeof. */ +#ifndef SIZEOF_VOIDP +#define SIZEOF_VOIDP ${SIZEOF_VOIDP} +#endif + +/* The size of `void *', as computed by sizeof. */ +#ifndef SIZEOF_VOID_P +#define SIZEOF_VOID_P ${SIZEOF_VOID_P} +#endif + +/* The size of `wchar_t', as computed by sizeof. */ +#ifndef SIZEOF_WCHAR_T +#define SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T} +#endif + +/* relocable objects */ +#ifndef SO_EXT +#define SO_EXT "${CMAKE_SHARED_LIBRARY_PREFIX}" +#endif + +/* library search variable */ +#ifndef SO_PATH +#cmakedefine SO_PATH "${SO_PATH}" +#endif + +/* enable condor distributed execution, static compilation */ +#ifndef SUPPORT_CONDOR +#cmakedefine SUPPORT_CONDOR "${SUPPORT_CONDOR}" +#endif + +/* Define to 1 if your declares `struct tm'. */ +#ifndef TM_IN_SYS_TIME +#cmakedefine TM_IN_SYS_TIME "${TM_IN_SYS_TIME}" +#endif + +/* use Doug Lea's malloc for all allocation */ +#ifndef USE_DL_MALLOC +#cmakedefine USE_DL_MALLOC ${USE_DL_MALLOC} +#endif + +/* use bignums/rationals in YAP code. */ +#ifndef USE_GMP +#cmakedefine USE_GMP ${USE_GMP} +#endif + +/* use Judy library for UDI indexing in YAP code. */ +#ifndef USE_JUDY +#cmakedefine USE_JUDY ${USE_JUDY} +#endif + +/* do not use our own locking routines */ +#ifndef USE_PTHREAD_LOCKING +#cmakedefine USE_PTHREAD_LOCKING ${USE_PTHREAD_LOCKING} +#endif + +/* use OS malloc for all allocation */ +#ifndef USE_SYSTEM_MALLOC +#cmakedefine USE_SYSTEM_MALLOC ${USE_SYSTEM_MALLOC} +#endif + +/* use mmap in or-parallel allocation */ +#ifndef USE_SYSTEM_MMAP +#cmakedefine USE_SYSTEM_MMAP ${USE_SYSTEM_MMAP} +#endif + +/* use shm in or-parallel allocation */ +#ifndef USE_SYSTEM_SHM +#cmakedefine USE_SYSTEM_SHM ${USE_SYSTEM_SHM} +#endif + +/* threaded emulator */ +#ifndef USE_THREADED_CODE +#cmakedefine USE_THREADED_CODE ${USE_THREADED_CODE} +#endif + +/* Whether daylight savings time offset is set via the altzone variable */ +#ifndef USE_TIME_ALTZONE +#cmakedefine USE_TIME_ALTZONE ${USE_TIME_ALTZONE} +#endif + +/* Whether daylight savings time offset is set via the tm_isdst member */ +#ifndef USE_TIME_DAYLIGHT +#cmakedefine USE_TIME_DAYLIGHT ${USE_TIME_DAYLIGHT} +#endif + +/* Whether time offset is specified via the tm_gmtoff member */ +#ifndef USE_TIME_GMTOFF +#cmakedefine USE_TIME_GMTOFF ${USE_TIME_GMTOFF} +#endif + +/* Define to name of the UUID header file. */ +#ifndef UUID_H +#cmakedefine UUID_H "${UUID_H}" +#endif + +/* 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 +# define WORDS_BIGENDIAN +#ifndef WORDS_BIGENDIAN +# +# endif +#endif +#endif + +/* architecture */ +#ifndef YAP_ARCH +#define YAP_ARCH "${YAP_ARCH}" +#endif + +/* where the yap executable lives */ +#ifndef YAP_BINDIR +#define YAP_BINDIR "${bindir}" +#endif + +/* YAP version string */ +#ifndef YAP_FULL_VERSION +#define YAP_FULL_VERSION "${YAP_FULL_VERSION}" +#endif + +/* where to look for shared libraries */ +#ifndef YAP_LIBDIR +#define YAP_LIBDIR "${libdir}" +#endif + +/* numerical version */ +#ifndef YAP_NUMERIC_VERSION +#define YAP_NUMERIC_VERSION ${YAP_NUMERIC_VERSION} +#endif + +/* where to look for Prolog sources */ +#ifndef YAP_PL_SRCDIR +#define YAP_PL_SRCDIR "${YAP_PL_SRCDIR}" +#endif + +/* where YAP lives */ +#ifndef YAP_ROOTDIR +#define YAP_ROOTDIR "${YAP_ROOTDIR}" +#endif + +/* where to look for the Prolog library */ +#ifndef YAP_SHAREDIR +#define YAP_SHAREDIR "${YAP_SHAREDIR}" +#endif + +/* saved state file */ +#ifndef YAP_STARTUP +#define YAP_STARTUP "${YAP_STARTUP}" +#endif + +/* date of compilation */ +#ifndef YAP_TIMESTAMP +#define YAP_TIMESTAMP "${YAP_TIMESTAMP}" +#endif + +/* what timezone we are in */ +#ifndef YAP_VAR_TIMEZONE +#define YAP_VAR_TIMEZONE "${YAP_VAR_TIMEZONE}" +#endif + +/* yap version */ +#ifndef YAP_VERSION +#define YAP_VERSION "${YAP_VERSION}" +#endif + +/* name of YAP library */ +#ifndef YAP_YAPLIB +#cmakedefine YAP_YAPLIB "${YAP_YAPLIB}" +#endif + +/* HP-UX old socket stuff */ +#ifndef _XOPEN_SOURCE +#cmakedefine _XOPEN_SOURCE "${_XOPEN_SOURCE}" +#endif + +/* HP-UX old socket stuff */ +#ifndef _XOPEN_SOURCE_EXTENDED +#cmakedefine _XOPEN_SOURCE_EXTENDED "${_XOPEN_SOURCE_EXTENDED}" +#endif + +/* compiling for Windows */ +#ifndef __WINDOWS__ +#cmakedefine __WINDOWS__ "${__WINDOWS__}" +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +#ifndef const +#cmakedefine const "${const}" +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler +calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#ifndef inline +#cmakedefine inline "${inline}" +#endif +#endif + +/* Define to `long int' if does not define. */ +#ifndef off_t +#cmakedefine off_t "${off_t}" +#endif + +/* Define to `int' if does not define. */ +#ifndef pid_t +#cmakedefine pid_t "${pid_t}" +#endif + +#endif diff --git a/configure b/configure index 470963647..03d662ddb 100755 --- a/configure +++ b/configure @@ -6260,9 +6260,7 @@ _ACEOF fi yap_cv_readline=no - if test "$prefix" = "NONE" - then - #mingw64 + #mingw64?? case "$build_os" in *linux*) if test "${WINEPREFIX}x" = x @@ -6273,12 +6271,13 @@ fi fi if test "$target_cpu" = "x86_64" then - prefix="$SYSTEMDRIVE/Yap64" + PRE_INSTALL_ENV="wine64" + prefix="$SYSTEMDRIVE/Yap64" else + PRE_INSTALL_ENV="wine" prefix="$SYSTEMDRIVE/Yap" fi i_am_cross_compiling=yes - PRE_INSTALL_ENV="wine " ;; **) if test "$target_cpu" = "x86_64" @@ -6289,7 +6288,6 @@ fi fi ;; esac - fi WINDOWS="" PKG_WINCONSOLE="swi/console" else @@ -14091,7 +14089,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 14094 "configure" */ +/* #line 14092 "configure" */ public class Test { } EOF @@ -14267,7 +14265,7 @@ EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else - echo "configure: 14270: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: 14268: 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 @@ -14398,7 +14396,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 14401 "configure" */ +/* #line 14399 "configure" */ public class Test { } EOF @@ -14433,7 +14431,7 @@ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST -/* [#]line 14436 "configure" */ +/* [#]line 14434 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); diff --git a/configure.in b/configure.in index 384402855..18e4f3377 100755 --- a/configure.in +++ b/configure.in @@ -636,9 +636,7 @@ then EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll $EXTRA_LIBS_FOR_DLLS" AC_CHECK_LIB(psapi,main) yap_cv_readline=no - if test "$prefix" = "NONE" - then - #mingw64 + #mingw64?? case "$build_os" in *linux*) if test "${WINEPREFIX}x" = x @@ -649,12 +647,13 @@ then fi if test "$target_cpu" = "x86_64" then - prefix="$SYSTEMDRIVE/Yap64" + PRE_INSTALL_ENV="wine64" + prefix="$SYSTEMDRIVE/Yap64" else + PRE_INSTALL_ENV="wine" prefix="$SYSTEMDRIVE/Yap" fi i_am_cross_compiling=yes - PRE_INSTALL_ENV="wine " ;; **) if test "$target_cpu" = "x86_64" @@ -665,7 +664,6 @@ then fi ;; esac - fi WINDOWS="" PKG_WINCONSOLE="swi/console" else diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 000000000..0619c5ee3 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,18 @@ +#CHECK: DOXYGEN +macro_optional_find_package (Doxygen ON) +macro_log_feature (DOXYGEN_FOUND "Doxygen" + "Use DOXYGEN Documentation System " + "http://www.doxygen.org" FALSE) +if (DOXYGEN_FOUND) + # + # DOXYGEN_EXECUTABLE = The path to the doxygen command. + # DOXYGEN_FOUND = Was Doxygen found or not? + # DOXYGEN_VERSION = The version reported by doxygen --version + # + # + # + # :: + # + # DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen. + # DOXYGEN_DOT_FOUND = Was Dot found or not? +endif (DOXYGEN_FOUND) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt new file mode 100644 index 000000000..c2729609b --- /dev/null +++ b/library/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(lammpi) +add_subdirectory(matlab) +add_subdirectory(matrix) +add_subdirectory(mpi) +add_subdirectory(random) +add_subdirectory(regex) +add_subdirectory(rltree) +add_subdirectory(system) +add_subdirectory(tries) diff --git a/library/lammpi/CMakeLists.txt b/library/lammpi/CMakeLists.txt new file mode 100644 index 000000000..2e527377d --- /dev/null +++ b/library/lammpi/CMakeLists.txt @@ -0,0 +1,31 @@ +macro_optional_find_package (MPI OFF) +macro_log_feature (MPI_C_FOUND "mpi" + "MPI Distributed Parallel Programming" + "http://gmplib.org") +if (MPI_C_FOUND) + # This module will set the following variables per language in your + # project, where is one of C, CXX, or Fortran: + # + # :: + # + # MPI__FOUND TRUE if FindMPI found MPI flags for + # MPI__COMPILER MPI Compiler wrapper for + # MPI__COMPILE_FLAGS Compilation flags for MPI programs + # MPI__INCLUDE_PATH Include path(s) for MPI header + # MPI__LINK_FLAGS Linking flags for MPI programs + # MPI__LIBRARIES All libraries to link MPI programs against + # + # Additionally, FindMPI sets the following variables for running MPI + # programs from the command line: + # + # :: + # + # MPIEXEC Executable for running MPI programs + # MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving + # it the number of processors to run on + # MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly + # before the executable to run. + # MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags + # +endif (MPI_C_FOUND) + diff --git a/library/matlab/CMakeLists.txt b/library/matlab/CMakeLists.txt new file mode 100644 index 000000000..9d50040b9 --- /dev/null +++ b/library/matlab/CMakeLists.txt @@ -0,0 +1,12 @@ +macro_optional_find_package (Matlab OFF) +macro_log_feature (MATLAB_FOUND "matlab" + "MATLAB Distributed Parallel Programming" + "http://matlab.com") +if (MATLAB_FOUND) + # MATLAB_INCLUDE_DIR: include path for mex.h, engine.h + # MATLAB_LIBRARIES: required libraries: libmex, etc + # MATLAB_MEX_LIBRARY: path to libmex.lib + # MATLAB_MX_LIBRARY: path to libmx.lib + # MATLAB_ENG_LIBRARY: path to libeng.lib +endif (MATLAB_FOUND) + diff --git a/library/matrix/CMakeLists.txt b/library/matrix/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/mpi/CMakeLists.txt b/library/mpi/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/random/CMakeLists.txt b/library/random/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/regex/CMakeLists.txt b/library/regex/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/rltree/CMakeLists.txt b/library/rltree/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/system/CMakeLists.txt b/library/system/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/library/tries/CMakeLists.txt b/library/tries/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/misc/GLOBALS b/misc/GLOBALS index 4782d203c..c855554f8 100755 --- a/misc/GLOBALS +++ b/misc/GLOBALS @@ -153,5 +153,8 @@ struct swi_mutex* mutex_backbone =NULL lockvar MUT_ACCESS MkLock #endif +char* Home =NULL + + END_GLOBAL_DATA diff --git a/os/SWI-Stream.h b/os/SWI-Stream.h index 9bc1442b7..f1426eed7 100755 --- a/os/SWI-Stream.h +++ b/os/SWI-Stream.h @@ -51,11 +51,6 @@ #define INT64_T_DEFINED 1 typedef __int64 int64_t; typedef unsigned __int64 uint64_t; -#if (_MSC_VER < 1300) -typedef long intptr_t; -typedef unsigned long uintptr_t; -typedef intptr_t ssize_t; /* signed version of size_t */ -#endif #endif #else #include diff --git a/os/pl-prologflag.c b/os/pl-prologflag.c index bf5e23fdc..09756fc59 100755 --- a/os/pl-prologflag.c +++ b/os/pl-prologflag.c @@ -1300,7 +1300,7 @@ setVersionPrologFlag(void) setPrologFlag("version_data", FF_READONLY|FT_TERM, t); PL_discard_foreign_frame(fid); - setGITVersion(); + //setGITVersion(); } diff --git a/packages/R b/packages/R index 87bb48410..304874936 160000 --- a/packages/R +++ b/packages/R @@ -1 +1 @@ -Subproject commit 87bb48410a5c5e9bc36abfde0e718b8bd3e99864 +Subproject commit 3048749364240b506c2c9effba424028eea4ffa7 diff --git a/packages/clib b/packages/clib index dc25a433d..55f1b0d76 160000 --- a/packages/clib +++ b/packages/clib @@ -1 +1 @@ -Subproject commit dc25a433df1f77e6271179664080d338e10c9d6b +Subproject commit 55f1b0d765c607c99b9b9c67f150df64d33128b0 diff --git a/packages/cuda/CMakeLists.txt b/packages/cuda/CMakeLists.txt new file mode 100644 index 000000000..72bbe625b --- /dev/null +++ b/packages/cuda/CMakeLists.txt @@ -0,0 +1,52 @@ +#CHECK: CUDA +macro_optional_find_package (CUDA ON) +macro_log_feature (CUDA_FOUND "CUDA" + "CUDA GGPU Programming " + "http://www.r.org" FALSE) +if (CUDA_FOUND) + # CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc. + # CUDA_VERSION_MINOR -- The minor version. + # CUDA_VERSION + # CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR + # + # CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set). + # CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the + # SDK. This script will not directly support finding + # specific libraries or headers, as that isn't + # supported by NVIDIA. If you want to change + # libraries when the path changes see the + # FindCUDA.cmake script for an example of how to clear + # these variables. There are also examples of how to + # use the CUDA_SDK_ROOT_DIR to locate headers or + # libraries, if you so choose (at your own risk). + # CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically + # for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY. + # CUDA_LIBRARIES -- Cuda RT library. + # CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT + # implementation (alternative to: + # CUDA_ADD_CUFFT_TO_TARGET macro) + # CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS + # implementation (alterative to: + # CUDA_ADD_CUBLAS_TO_TARGET macro). + # CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library. + # Only available for CUDA version 4.0+. + # CUDA_curand_LIBRARY -- CUDA Random Number Generation library. + # Only available for CUDA version 3.2+. + # CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library. + # Only available for CUDA version 3.2+. + # CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib. + # Only available for CUDA version 4.0+. + # CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). + # Only available for CUDA version 5.5+. + # CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + # Only available for CUDA version 5.5+. + # CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). + # Only available for CUDA version 5.5+. + # CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. + # Only available for CUDA version 3.2+. + # Windows only. + # CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library. + # Only available for CUDA version 3.2+. + # Windows only. +endif (CUDA_FOUND) + diff --git a/packages/gecode/CMakeLists.txt b/packages/gecode/CMakeLists.txt new file mode 100644 index 000000000..0596b293c --- /dev/null +++ b/packages/gecode/CMakeLists.txt @@ -0,0 +1,18 @@ +#TODO: change macro_log_feature to check both WITH_{$name} and ${name}_FOUND +#TODO: improve FindGecode.cmake to be similar to other Find*.cmake +#CHECK: GECODE +macro_optional_find_package (Gecode ON) +macro_log_feature (GECODE_FOUND "libgecode" + "Use Generic Constraint Development Environment (GECODE) library" + "http://www.gecode.org" FALSE) +if (GECODE_FOUND) + #DEFINES: + # GECODE_INCLUDE_DIR + # GECODE_VERSION + # GECODE_LIBRARIES + + #set (EXTRALIBS gecode) + + #include_directories (${GECODE_INCLUDE_DIR}) + #set (EXTRALIBS ${EXTRALIBS} ${GECODE_LIBRARIES}) +endif (GECODE_FOUND) diff --git a/packages/myddas/CMakeLists.txt b/packages/myddas/CMakeLists.txt new file mode 100644 index 000000000..a34bb908b --- /dev/null +++ b/packages/myddas/CMakeLists.txt @@ -0,0 +1,44 @@ +macro_optional_find_package(ODBC ON) +if (ODBC_FOUND) + macro_log_feature (ODBC_FOUND "ODBC" + "Use ODBC Data-Base Interface " + "http://www.odbc.org" FALSE) + add_definitions (-DMYDDAS_ODBC=1) + set (EXTRALIBS ${EXTRALIBS} ${ODBC_LIBRARY}) + if (APPLE) + set (EXTRALIBS ${EXTRALIBS} "-framework CoreFoundation") + endif (APPLE) +endif (ODBC_FOUND) + +macro_optional_find_package(MySQL ON) +if (MYSQL_FOUND) + macro_log_feature (MYSQL_FOUND "MySQL" + "Use MYSQL Data-Base Interface " + "http://www.odbc.org" FALSE) + add_definitions (-DMYDDAS_MYSQL=1) +endif (MYSQL_FOUND) + +option (WITH_MYDDAS + "enable the MYDDAS library" ON) +if (WITH_MYDDAS) + if (MYSQL_FOUND) + add_definitions (-DMYDDAS_MYSQL=1) + endif (MYSQL_FOUND) + + if (MYSQL_FOUND OR ODBC_FOUND) + set (EXTRALIBS ${EXTRALIBS} myddas) + else (MYSQL_FOUND OR ODBC_FOUND) + message(SEND_ERROR "MYDDAS needs either MYSQL or ODBC none where found") + endif (MYSQL_FOUND OR ODBC_FOUND) +endif (WITH_MYDDAS) + +cmake_dependent_option (WITH_MYDDAS_Stats + "enable the MYDDAS library statistics support" OFF + WITH_MYDDAS OFF) +#TODO: + +cmake_dependent_option (WITH_MYDDAS_top_level + "enable the MYDDAS top-level support to MySQL" OFF + 'WITH_MYDDAS AND MYSQL_FOUND' OFF) +#TODO: + diff --git a/packages/prosqlite/CMakeLists.txt b/packages/prosqlite/CMakeLists.txt new file mode 100644 index 000000000..5fbfff1f4 --- /dev/null +++ b/packages/prosqlite/CMakeLists.txt @@ -0,0 +1,12 @@ +macro_optional_find_package (Sqlite3 ON) +macro_log_feature (SQLITE3_FOUND "sqlite3" + "SQLITE3 Light Weight Database Manager" + "http://sqlite3.com") +if (SQLITE3_FOUND) +# SQLITE3_INCLUDE_DIR - Where to find Sqlite 3 header files (directory) +# SQLITE3_LIBRARIES - Sqlite 3 libraries +# SQLITE3_LIBRARY_RELEASE - Where the release library is +# SQLITE3_LIBRARY_DEBUG - Where the debug library is +# SQLITE3_FOUND - Set to TRUE if we found everything (library, includes and executable) +endif (SQLITE3_FOUND) + diff --git a/packages/python/CMakeLists.txt b/packages/python/CMakeLists.txt new file mode 100644 index 000000000..c7498c21e --- /dev/null +++ b/packages/python/CMakeLists.txt @@ -0,0 +1,34 @@ +#CHECK: PythonLibs +macro_optional_find_package(PythonInterp ON) +macro_optional_find_package (PythonLibs ON) +macro_log_feature (PYTHONLIBS_FOUND "Python" + "Use Python System" + "http://www.python.org" FALSE) +if (PYTHONLIBS_FOUND) # PYTHONLIBS_FOUND - have the Python libs been found + # PYTHON_LIBRARIES - path to the python library + # PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) + # PYTHON_INCLUDE_DIRS - path to where Python.h is found + # PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated) + # PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8) + # + # + # + # The Python_ADDITIONAL_VERSIONS variable can be used to specify a list + # of version numbers that should be taken into account when searching + # for Python. You need to set this variable before calling + # find_package(PythonLibs). + # + # If you'd like to specify the installation of Python to use, you should + # modify the following cache variables: + # + # :: + # + # PYTHON_LIBRARY - path to the python library + # PYTHON_INCLUDE_DIR - path to where Python.h is found + # + # If also calling find_package(PythonInterp), call find_package(PythonInterp) + # first to get the currently active Python version by default with a consistent + # version of PYTHON_LIBRARIES. + + +endif (PYTHONLIBS_FOUND) diff --git a/packages/swig/CMakeLists.txt b/packages/swig/CMakeLists.txt new file mode 100644 index 000000000..4730e91db --- /dev/null +++ b/packages/swig/CMakeLists.txt @@ -0,0 +1,16 @@ +#CHECK: SWIG +macro_optional_find_package (SWIG ON) +macro_log_feature (SWIG_FOUND "Swig" + "Use SWIG Documentation System " + "http://www.swig.org" FALSE) +if (SWIG_FOUND) + # + # SWIG_FOUND - set to true if SWIG is found + # SWIG_DIR - the directory where swig is installed + # SWIG_EXECUTABLE - the path to the swig executable + # SWIG_VERSION - the version number of the swig executable + # + + +endif (SWIG_FOUND) + diff --git a/pl/boot.yap b/pl/boot.yap index da6bb5232..0be1f4af6 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -1308,6 +1308,12 @@ not(G) :- \+ '$execute'(G). % -p option must be processed after initializing the system '$swi_set_prolog_flag'(verbose_load, OldSilent). +bootstrap :- + '$argv'([F]), + bootstrap(F), + module(user), + qsave_program('startup.yss'). + bootstrap(F) :- % '$open'(F, '$csult', Stream, 0, 0, F), % '$file_name'(Stream,File), @@ -1570,3 +1576,4 @@ log_event( String, Args ) :- /** @} */ +