The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

177 lines
6.1 KiB

2 months ago
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT([cudd], [3.0.0], [Fabio@Colorado.EDU])
  5. AC_CONFIG_AUX_DIR([build-aux])
  6. AC_CONFIG_MACRO_DIR([m4])
  7. AC_CANONICAL_HOST
  8. AM_INIT_AUTOMAKE(
  9. [1.13.4 -Wall -Werror foreign subdir-objects color-tests silent-rules]
  10. )
  11. AC_REQUIRE_AUX_FILE([tap-driver.sh])
  12. AC_ARG_ENABLE([dddmp],
  13. [AS_HELP_STRING([--enable-dddmp],[include libdddmp in libcudd])])
  14. AM_CONDITIONAL([DDDMP], [test x$enable_dddmp = xyes])
  15. AC_ARG_ENABLE([obj],
  16. [AS_HELP_STRING([--enable-obj],[include libobj in libcudd])])
  17. AM_CONDITIONAL([OBJ], [test x$enable_obj = xyes])
  18. AC_ARG_WITH([system-qsort],
  19. [AS_HELP_STRING([--with-system-qsort],
  20. [use system qsort instead of portable one])],
  21. [],[with_system_qsort=no])
  22. if test x$with_system_qsort != xno ; then
  23. AC_DEFINE([USE_SYSTEM_QSORT], [1], [Define to 1 to use system qsort])
  24. fi
  25. # Set our own default (instead of "-g -O2") unless CFLAGS is already defined.
  26. : ${CFLAGS="-Wall -Wextra -g -O3"}
  27. : ${CXXFLAGS="-Wall -Wextra -std=c++0x -g -O3"}
  28. AC_PROG_CC
  29. AM_PROG_CC_C_O
  30. AC_PROG_CXX
  31. AM_PROG_AR
  32. LT_PREREQ([2.4])
  33. LT_INIT([win32-dll disable-shared])
  34. AC_CONFIG_SRCDIR([st/st.c])
  35. AC_CONFIG_HEADERS([config.h])
  36. # Checks for programs.
  37. AC_C_BIGENDIAN
  38. AM_CONDITIONAL([CROSS_COMPILING],[test x$cross_compiling = xyes])
  39. # Building documentation requires doxygen, pdflatex, and makeindex.
  40. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  41. if test -z "$DOXYGEN"; then
  42. AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  43. fi
  44. AM_CONDITIONAL([HAVE_DOXYGEN],[test -n "$DOXYGEN"])
  45. AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([Doxyfile])])
  46. AC_CHECK_PROGS([PDFLATEX], [pdflatex])
  47. if test -z "$PDFLATEX"; then
  48. AC_MSG_WARN([pdflatex not found - unable to compile manual to PDF])
  49. fi
  50. AC_CHECK_PROGS([MAKEINDEX], [makeindex])
  51. if test -z "$MAKEINDEX"; then
  52. AC_MSG_WARN([makeindex not found - unable to compile manual to PDF])
  53. fi
  54. AM_CONDITIONAL([HAVE_PDFLATEX],[test -n "$PDFLATEX" && test -n "$MAKEINDEX"])
  55. AM_COND_IF([HAVE_PDFLATEX], [AC_CONFIG_FILES([doc/cudd.tex])])
  56. # Checks for libraries.
  57. #AC_CHECK_LIB([m],[pow])
  58. AC_SEARCH_LIBS([pow],[m])
  59. AC_CHECK_LIB([pthread],[pthread_create],[have_pthreads=yes],[have_pthreads=no])
  60. AM_CONDITIONAL([HAVE_PTHREADS],[test x$have_pthreads = xyes])
  61. # Check for Windows API functions.
  62. AC_SEARCH_LIBS([WSAStartup],[ws2_32])
  63. AC_SEARCH_LIBS([GetProcessMemoryInfo],[psapi])
  64. # Checks for header files.
  65. # First check for mandatory headers...
  66. AC_CHECK_HEADERS([float.h inttypes.h limits.h stddef.h stdlib.h string.h assert.h math.h], [], [have_mandatory_headers=no])
  67. if test "x${have_mandatory_headers}" = xno; then
  68. AC_MSG_ERROR([One or more mandatory headers missing. Check 'config.log'.])
  69. fi
  70. # ...then check for optional C headers.
  71. AC_CHECK_HEADERS([unistd.h sys/time.h sys/times.h sys/resource.h sys/wait.h])
  72. # Finally, check C++ optional headers.
  73. AC_MSG_CHECKING([for working C++ thread header])
  74. AC_LANG_PUSH([C++])
  75. AC_COMPILE_IFELSE(
  76. [AC_LANG_PROGRAM([#include <thread>], [[ std::thread([] {}).join()]])],
  77. [have_working_thread=yes],[have_working_thread=no])
  78. AC_LANG_POP([C++])
  79. if test x$have_working_thread = xyes ; then
  80. AC_MSG_RESULT(yes)
  81. AC_DEFINE([HAVE_WORKING_THREAD], [1], [Define to 1 if C++ thread header is usable])
  82. else
  83. AC_MSG_RESULT(no)
  84. fi
  85. # Checks for typedefs, structures, and compiler characteristics.
  86. AC_CHECK_HEADER_STDBOOL
  87. AC_C_INLINE
  88. AC_TYPE_SIZE_T
  89. AC_TYPE_UINT16_T
  90. AC_TYPE_UINT32_T
  91. AC_CHECK_TYPES([ptrdiff_t])
  92. AC_CHECK_SIZEOF([int])
  93. AC_CHECK_SIZEOF([long])
  94. AC_CHECK_SIZEOF([void *])
  95. AC_CHECK_SIZEOF([long double])
  96. MINGW_AC_WIN32_NATIVE_HOST
  97. AM_CONDITIONAL([MINGW64], [test x$mingw_cv_win32_host = xyes])
  98. if test x$mingw_cv_win32_host = xyes ; then
  99. AC_DEFINE([__USE_MINGW_ANSI_STDIO], [1], [Define to 1 to enable C99-compliant printf on MinGW-w64])
  100. fi
  101. MODERN_CXX
  102. if test x$ac_cv_have_modern_cxx = xyes ; then
  103. AC_DEFINE([HAVE_MODERN_CXX], [1], [Define to 1 if your compiler supports enough C++11])
  104. fi
  105. # Checks for library functions.
  106. # First the mandatory functions...
  107. AC_CHECK_FUNCS([pow sqrt strchr strstr],
  108. [], [have_mandatory_functions=no])
  109. if test "x${have_mandatory_functions}" = xno; then
  110. AC_MSG_ERROR([One or more mandatory functions missing. Check 'config.log'.])
  111. fi
  112. # ...then check for optional functions.
  113. AC_CHECK_FUNCS([powl gethostname getrlimit getrusage sysconf])
  114. # Check for a working implementation of IEEE 754 floating point
  115. # Specifically, check for correct treatment of +Infinity
  116. AC_MSG_CHECKING([for +Infinity (IEEE 754 floating point)])
  117. AC_CACHE_VAL(ac_cv_have_ieee_754,
  118. [ AC_TRY_RUN([
  119. #include <math.h>
  120. main(void)
  121. {
  122. if (HUGE_VAL != HUGE_VAL * 3 || HUGE_VAL != HUGE_VAL / 3) return 1;
  123. return 0;
  124. }
  125. ],ac_cv_have_ieee_754=yes,ac_cv_have_ieee_754=no,ac_cv_have_ieee_754=maybe)])
  126. if test x$ac_cv_have_ieee_754 = xmaybe ; then
  127. AC_COMPILE_IFELSE(
  128. [AC_LANG_PROGRAM([#include <math.h>], [ double x = INFINITY])],
  129. [ac_cv_have_ieee_754=yes],[ac_cv_have_ieee_754=no])
  130. fi
  131. if test x$ac_cv_have_ieee_754 = xyes ; then
  132. AC_MSG_RESULT(yes)
  133. AC_DEFINE([HAVE_IEEE_754], [1], [Define to 1 if you have working floating-point infinities])
  134. else
  135. AC_MSG_RESULT(no)
  136. fi
  137. AC_CONFIG_FILES([Makefile])
  138. AC_CONFIG_FILES([dddmp/exp/test1.sh], [chmod +x dddmp/exp/test1.sh])
  139. AC_CONFIG_FILES([dddmp/exp/test2.sh], [chmod +x dddmp/exp/test2.sh])
  140. AC_CONFIG_FILES([dddmp/exp/test3.sh], [chmod +x dddmp/exp/test3.sh])
  141. AC_CONFIG_FILES([dddmp/exp/test4.sh], [chmod +x dddmp/exp/test4.sh])
  142. AC_CONFIG_FILES([dddmp/exp/test5.sh], [chmod +x dddmp/exp/test5.sh])
  143. AC_CONFIG_FILES([dddmp/exp/test6.sh], [chmod +x dddmp/exp/test6.sh])
  144. AC_CONFIG_FILES([dddmp/exp/test7.sh], [chmod +x dddmp/exp/test7.sh])
  145. AC_OUTPUT
  146. echo \
  147. "--------------------------------------------------
  148. Configuration summary for ${PACKAGE_NAME} ${PACKAGE_VERSION}
  149. Build system : ${build}
  150. Host system : ${host}
  151. Prefix : '${prefix}'
  152. Compilers : '${CC} ${AM_CPPFLAGS} ${CPPFLAGS} ${AM_CFLAGS} ${CFLAGS}'
  153. : '${CXX} ${AM_CPPFLAGS} ${CPPFLAGS} ${AM_CXXFLAGS} ${CXXFLAGS}'
  154. Shared library : ${enable_shared}
  155. dddmp enabled : ${enable_dddmp:-no}
  156. obj enabled : ${enable_obj:-no}
  157. --------------------------------------------------"