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.

162 lines
4.7 KiB

4 weeks ago
  1. dnl Process this file with autoconf to produce a configure script.
  2. dnl ------------------------------------------------------------------------
  3. dnl initialisation
  4. dnl ------------------------------------------------------------------------
  5. dnl ./configure: sh internal 2K buffer overflow on HP-UX 9.xx
  6. dnl thus, updating cache ./config.cache avoided.
  7. define([AC_CACHE_LOAD], )dnl
  8. define([AC_CACHE_SAVE], )dnl
  9. AC_INIT(gmm, 5.2)
  10. AC_CONFIG_HEADERS(config.h)
  11. AC_PREREQ(2.56)
  12. AC_ARG_PROGRAM
  13. PACKAGE="gmm"
  14. MAJOR_VERSION="5"
  15. MINOR_VERSION="2"
  16. dnl VERSION=$MAJOR_VERSION.$MINOR_VERSION
  17. VERSION=$MAJOR_VERSION.$MINOR_VERSION
  18. echo "configuring $PACKAGE $VERSION..."
  19. dnl ------------------------------------------------------------------------
  20. dnl init automake
  21. dnl ------------------------------------------------------------------------
  22. AM_INIT_AUTOMAKE([1.11 parallel-tests])
  23. dnl -----------------------------------------------
  24. dnl test du c++
  25. dnl -----------------------------------------------
  26. USER_CXXFLAGS="$CXXFLAGS"
  27. AC_PROG_CXX(cxx KCC CC cc++ xlC aCC g++ c++ icc)
  28. AC_PROG_CXXCPP
  29. CXXFLAGS="${USER_CXXFLAGS}"
  30. SUPLDFLAGS=""
  31. AC_LANG_CPLUSPLUS
  32. if test "x$prefix" = "xNONE"; then
  33. GFPREFIX=/usr/local;
  34. else
  35. GFPREFIX="$prefix";
  36. fi;
  37. dnl AC_CXX_FULL_SPECIALIZATION_SYNTAX (c)Luc Maisonobe v 1.1.1.1 (2001/07/26)
  38. dnl with some modification to test partial specialization
  39. AC_CACHE_CHECK(whether the compiler recognizes the partial specialization syntax,
  40. ac_cv_cxx_partial_specialization_syntax,
  41. [AC_LANG_SAVE
  42. AC_LANG_CPLUSPLUS
  43. AC_TRY_COMPILE([
  44. template<class T> class A { public : int f () const { return 1; } };
  45. template<class T> class A<T*> { public: int f () const { return 0; } };],[
  46. A<float*> a; return a.f();],
  47. ac_cv_cxx_partial_specialization_syntax=yes, ac_cv_cxx_partial_specialization_s
  48. yntax=no)
  49. AC_LANG_RESTORE
  50. ])
  51. if test "$ac_cv_cxx_partial_specialization_syntax" != yes; then
  52. echo "Your compiler ($CXX) does not support partial template specialization, trash it"
  53. exit 1;
  54. fi
  55. AC_CANONICAL_HOST
  56. echo "you are compiling gmm on a $host"
  57. case $CXX in
  58. cxx)
  59. echo "Using Compaq cxx compiler"
  60. echo "WARNING : Control that you have at least Compaq C++ V6.3"
  61. here=`pwd`
  62. cd $srcdir
  63. dnl il faut utiliser -tweak au lieu des repositories ...
  64. CXXFLAGS="$CXXFLAGS -tweak -std strict_ansi -fast -Wl,-S -nopure_cname"
  65. dnl CXXFLAGS="$CXXFLAGS -ptr `pwd`/cxx_repository -std strict_ansi -O3"
  66. cd $here
  67. ;;
  68. CC)
  69. case $host in
  70. *irix*)
  71. echo "Using MIPSPRO CC on IRIX (LD is set to CC)"
  72. LD=CC
  73. dnl CXXFLAGS="$CXXFLAGS -LANG:std -O3 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed -TARG:platform=ip25"
  74. CXXFLAGS="$CXXFLAGS -LANG:std -O3 "
  75. dnl CXXFLAGS="$CXXFLAGS -LANG:std -O3 -ansiW "
  76. SUPLDFLAGS="-lCio"
  77. ;;
  78. *sun*)
  79. echo "Using SUN C++ WorkShop Compiler"
  80. CXXFLAGS="$CXXFLAGS +w2 -O3"
  81. ;;
  82. esac
  83. ;;
  84. aCC)
  85. echo "Using HP ANSI C++ Compiler aCC"
  86. CXXFLAGS="$CXXFLAGS -AA -fast"
  87. ;;
  88. g++* | c++)
  89. GCCVER=`$CXX --version | head -1 | cut -d ' ' -f3`
  90. echo "Using the GNU g++ compiler $GCCVER"
  91. case $GCCVER in
  92. 2.95*)
  93. WSHADOW=""
  94. ;;
  95. *)
  96. WSHADOW="-Wshadow"
  97. ;;
  98. esac
  99. CXXFLAGS="$CXXFLAGS -ftemplate-depth-40 -pedantic -O3 -Wall -W $WSHADOW -Wpointer-arith -Wcast-qual -Wwrite-strings -Wconversion -Wredundant-decls -Wno-long-long"
  100. ;;
  101. icc | icpc)
  102. echo "Using INTEL icc"
  103. dnl -tpp6 is for pentiumII and more
  104. dnl -Xc is for ansi conformance
  105. CXXFLAGS="$CXXFLAGS -O3 -tpp6"
  106. ;;
  107. *)
  108. echo "Using a unknown compiler"
  109. CXXFLAGS="$CXXFLAGS -O3"
  110. ;;
  111. esac
  112. AC_SUBST(SUPLDFLAGS)
  113. dnl ------------------------------------------------------------------------
  114. dnl init libtools for shared libraries
  115. dnl ------------------------------------------------------------------------
  116. dnl AC_DISABLE_FAST_INSTALL
  117. AM_ENABLE_STATIC
  118. dnl AM_PROG_LIBTOOL
  119. AM_PROG_LIBTOOL
  120. AC_SUBST([LIBTOOL_DEPS])
  121. AC_CHECK_HEADERS(sys/times.h)
  122. BUILDER=`whoami`
  123. AC_SUBST(BUILDER)
  124. BUILDDATE=`date +%D,%H:%M:%S`
  125. AC_SUBST(BUILDDATE)
  126. CONFIGURE_ARGS=$ac_configure_args
  127. AC_SUBST(CONFIGURE_ARGS)
  128. LIBTOOL_VERSION_INFO="-version-info ${MAJOR_VERSION}:${MINOR_VERSION}:0"
  129. AC_SUBST(LIBTOOL_VERSION_INFO)
  130. dnl AC_CHECK_PROGS(RANLIB, ranlib)
  131. dnl -----------------------------------------------
  132. dnl sorties
  133. dnl -----------------------------------------------
  134. AC_CONFIG_FILES(\
  135. Makefile \
  136. tests/Makefile \
  137. include/Makefile gmm-config)
  138. AC_OUTPUT
  139. chmod a+x gmm-config
  140. chmod a+x gmm-config