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.

143 lines
5.2 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. dnl run autoreconf -iv to produce the configure script.
  2. m4_define([cl_version_major], [1])
  3. m4_define([cl_version_minor], [2])
  4. m4_define([cl_version_patchlevel], [2])
  5. m4_define([cl_version], [cl_version_major.cl_version_minor.cl_version_patchlevel])
  6. dnl Libtool's library version information for CLN.
  7. dnl (Not to be confused with CLN's release version.)
  8. dnl Making new releases:
  9. dnl * increment CL_REVISION,
  10. dnl * if any functions/classes have been added, removed or changed, increment
  11. dnl CL_CURRENT and set CL_REVISION to 0,
  12. dnl * if any functions/classes have been added, increment CL_AGE,
  13. dnl * if backwards compatibility has been broken, set CL_AGE to 0.
  14. dnl $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) results in
  15. dnl libcln.so.$(CL_CURRENT)-$(CL_AGE)
  16. m4_define([cl_current], [6])
  17. m4_define([cl_revision], [0])
  18. m4_define([cl_age], [0])
  19. m4_define([cl_lt_version], [cl_current:cl_revision:cl_age])
  20. AC_INIT([cln], cln_version)
  21. AC_PREREQ(2.59)
  22. AC_CONFIG_SRCDIR(src/integer/gcd/cl_I_gcd.cc)
  23. AC_CONFIG_AUX_DIR([autoconf])
  24. AC_CONFIG_HEADERS(autoconf/cl_config.h include/cln/config.h include/cln/host_cpu.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h)
  25. AM_INIT_AUTOMAKE([foreign 1.8 dist-bzip2])
  26. AH_TOP([#ifndef _CL_CONFIG_H])
  27. AH_TOP([#define _CL_CONFIG_H])
  28. AH_TOP([#include "cln/host_cpu.h"])
  29. AH_TOP([/* prevents cln/config.h from being included, so no macro gets redefined */])
  30. AH_TOP([#define _CL_CONFIG_PUBLIC_H])
  31. AH_TOP([/* prevents cln/version.h from being included, so no macro gets redefined */])
  32. AH_TOP([#define _CL_VERSION_H])
  33. AH_BOTTOM([#endif /* _CL_CONFIG_H */])
  34. dnl checks for programs
  35. dnl
  36. AC_PROG_CC
  37. dnl sets variable CC
  38. AC_PROG_CPP
  39. dnl sets variable CPP
  40. AC_PROG_CXX
  41. dnl sets variable CXX
  42. AC_PROG_CXXCPP
  43. dnl sets variable CXXCPP
  44. CL_AS_UNDERSCORE
  45. dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE
  46. CL_AS_NOEXECSTACK
  47. dnl sets variable ASMFLAGS
  48. AC_PROG_INSTALL
  49. dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
  50. dnl
  51. dnl check for host type
  52. dnl
  53. CL_CANONICAL_HOST(autoconf)
  54. dnl sets variables host, host_cpu, host_vendor, host_os
  55. CL_CANONICAL_HOST_CPU
  56. dnl DEFS __${host_cpu}__
  57. case $host_os in
  58. *mingw*)
  59. AC_DISABLE_SHARED
  60. dnl Shared libraries are not supported on some platforms [yet]
  61. ;;
  62. *)
  63. AC_ENABLE_SHARED
  64. ;;
  65. esac
  66. AC_PROG_LIBTOOL
  67. dnl sets variable LIBTOOL
  68. LT_VERSION_INFO=cl_lt_version
  69. AC_SUBST(LT_VERSION_INFO)
  70. dnl release version
  71. CL_VERSION_MAJOR=cl_version_major
  72. CL_VERSION_MINOR=cl_version_minor
  73. CL_VERSION_PATCHLEVEL=cl_version_patchlevel
  74. dnl release version for cln/config.h, so it can be tested by the preprocessor
  75. AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR, [Major version number of CLN])
  76. AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR, [Minor version number of CLN])
  77. AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL, [Patchlevel version number of CLN])
  78. dnl concatenated release version
  79. CL_VERSION=cl_version
  80. AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION, [CLN release number])
  81. AC_SUBST(CL_VERSION)
  82. dnl checks for compiler characteristics
  83. dnl
  84. AC_LANG([C++])
  85. dnl
  86. CL_LONGLONG
  87. dnl DEFS HAVE_LONGLONG
  88. CL_LONGDOUBLE
  89. dnl DEFS HAVE_LONGDOUBLE
  90. dnl
  91. dnl checks for header files
  92. dnl
  93. AC_CHECK_HEADERS([unistd.h])
  94. dnl DEFS HAVE_UNISTD_H if exist unistd.h
  95. dnl
  96. dnl checks for typedefs
  97. dnl
  98. dnl
  99. dnl checks for functions and declarations
  100. dnl
  101. CL_ALLOCA
  102. dnl set variable ALLOCA, DEFS NO_ALLOCA
  103. CL_GETTIMEOFDAY
  104. dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T
  105. ac_cv_func_ftime=no
  106. dnl don't use ftime(3) even if it's available
  107. CL_TIMES_CLOCK
  108. dnl DEFS HAVE_TIMES_CLOCK
  109. CL_RUSAGE
  110. dnl DEFS HAVE_SYS_RESOURCE_H, HAVE_GETRUSAGE, HAVE_SYS_TIMES_H
  111. CL_PERROR
  112. dnl DEFS HAVE_PERROR_DECL
  113. CL_ATTRIBUTE_FLATTEN
  114. dnl DEFS CL_HAVE_ATTRIBUTE_FLATTEN
  115. dnl
  116. dnl checks for compiler characteristics
  117. dnl
  118. AC_C_CHAR_UNSIGNED
  119. dnl DEFS __CHAR_UNSIGNED__ if char is unsigned
  120. dnl Create a subdirectory in the ${top_builddir} to hold auto-generated
  121. dnl headers. This subdirectory does not exist when ${top_builddir} != ${top_srcdir}
  122. dnl (a.k.a. "VPATH build").
  123. if test ! -d include/cln; then
  124. AS_MKDIR_P([include/cln])
  125. fi
  126. CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,[CL_INTPARAM_CROSS],include/cln/intparam.h,cl_cv_file_intparam_h)
  127. dnl builds include/cln/intparam.h
  128. CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,[CL_FLOATPARAM_CROSS],include/cln/floatparam.h,cl_cv_file_floatparam_h)
  129. dnl builds include/cln/floatparam.h
  130. CL_LIBGMP
  131. dnl DEFS CL_USE_GMP, GMP_DEMANDS_UINTD_*
  132. dnl
  133. dnl That's it.
  134. dnl
  135. AC_OUTPUT([Makefile src/Makefile tests/Makefile examples/Makefile doc/Makefile benchmarks/Makefile cln.spec cln.pc])