X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?p=cln.git;a=blobdiff_plain;f=configure.ac;h=4ef40d1b4046d2d3e3c339d255badbe3f39c1e46;hp=f8a8fa945c7c3fb537ec03dae7845963cdf5f346;hb=cd0e13fd6ed1c917a645796fdb077ce9d909d3c2;hpb=88f748dfb4fd3a2285bb2b8e3482c4e64230c3c7 diff --git a/configure.ac b/configure.ac index f8a8fa9..4ef40d1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,51 +1,48 @@ -dnl AUTOCONF configuration for CLN -dnl -dnl configure.ac ------>> configure -dnl -dnl configure ------>> config.status -dnl --->> include/cln/config.h -dnl cln-config.in --->> cln-config -dnl Makefile.in --->> Makefile -dnl src/Makefile.in --->> src/Makefile -dnl -dnl Makefile ------>> libcln.a -dnl -dnl -AC_INIT(src/integer/gcd/cl_I_gcd.cc) -AC_CONFIG_AUX_DIR(autoconf) -AC_CONFIG_HEADER(include/cln/config.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h) -AC_PROG_MAKE_SET -dnl This piece of sed script replaces every line containing '@subdir@' -dnl by several consecutive lines, each referencing one subdir. -extrasub="$extrasub"' -/@subdir@/{ -h -g -s/@subdir@/src/ -p -g -s/@subdir@/tests/ -p -g -s/@subdir@/benchmarks/ -p -g -s/@subdir@/examples/ -p -g -s/@subdir@/doc/ -p -d -} -' -dnl +dnl run autoreconf -iv to produce the configure script. + +m4_define([cl_version_major], [1]) +m4_define([cl_version_minor], [3]) +m4_define([cl_version_patchlevel], [5]) +m4_define([cl_version], [cl_version_major.cl_version_minor.cl_version_patchlevel]) + +dnl Libtool's library version information for CLN. +dnl (Not to be confused with CLN's release version.) +dnl Making new releases: +dnl * increment cl_lt_revision, +dnl * if any interfaces have been added, removed, or changed, then increment +dnl cl_lt_current and set cl_lt_revision to 0, +dnl * if any interfaces have been added, then increment cl_lt_age, +dnl * if any interfaces have been removed, set cl_lt_age to 0. +dnl (On many systems, $(cl_lt_current):$(cl_lt_revision):$(cl_lt_age) results in +dnl libcln.so.$(cl_lt_current)-$(cl_lt_age).) +m4_define([cl_lt_current], [6]) +m4_define([cl_lt_revision], [5]) +m4_define([cl_lt_age], [0]) +m4_define([cl_lt_version], [cl_lt_current:cl_lt_revision:cl_lt_age]) + +AC_INIT([cln], cl_version) +AC_PREREQ(2.59) +AC_CONFIG_SRCDIR(src/integer/gcd/cl_I_gcd.cc) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +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) +AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects]) +AH_TOP([#ifndef _CL_CONFIG_H]) +AH_TOP([#define _CL_CONFIG_H]) +AH_TOP([#include "cln/host_cpu.h"]) +AH_TOP([/* prevents cln/config.h from being included, so no macro gets redefined */]) +AH_TOP([#define _CL_CONFIG_PUBLIC_H]) +AH_TOP([/* prevents cln/version.h from being included, so no macro gets redefined */]) +AH_TOP([#define _CL_VERSION_H]) +AH_BOTTOM([#endif /* _CL_CONFIG_H */]) + dnl checks for programs dnl -CL_PROG_CC +AC_PROG_CC dnl sets variable CC AC_PROG_CPP dnl sets variable CPP -CL_PROG_CXX +AC_PROG_CXX dnl sets variable CXX AC_PROG_CXXCPP dnl sets variable CXXCPP @@ -53,22 +50,15 @@ CL_AS_UNDERSCORE dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE CL_AS_NOEXECSTACK dnl sets variable ASMFLAGS -AC_PROG_RANLIB - dnl sets variable RANLIB AC_PROG_INSTALL dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM dnl dnl check for host type dnl -CL_CANONICAL_HOST(autoconf) +CL_CANONICAL_HOST dnl sets variables host, host_cpu, host_vendor, host_os CL_CANONICAL_HOST_CPU dnl DEFS __${host_cpu}__ -dnl -dnl check for build configuration -dnl -PACKAGE=cln - dnl libtool wants PACKAGE case $host_os in *mingw*) AC_DISABLE_SHARED @@ -81,47 +71,31 @@ esac AC_PROG_LIBTOOL dnl sets variable LIBTOOL -dnl Libtool's library version information for CLN. -dnl (Not to be confused with CLN's release version.) -dnl Making new releases: -dnl * increment CL_REVISION, -dnl * if any functions/classes have been added, removed or changed, increment -dnl CL_CURRENT and set CL_REVISION to 0, -dnl * if any functions/classes have been added, increment CL_AGE, -dnl * if backwards compatibility has been broken, set CL_AGE to 0. -dnl $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) results in -dnl libcln.so.$(CL_CURRENT)-$(CL_AGE) -CL_CURRENT=5 -CL_REVISION=2 -CL_AGE=0 -dnl make substitutions -AC_SUBST(CL_CURRENT) -AC_SUBST(CL_REVISION) -AC_SUBST(CL_AGE) +LT_VERSION_INFO=cl_lt_version +AC_SUBST(LT_VERSION_INFO) + dnl release version -CL_VERSION_MAJOR=1 -CL_VERSION_MINOR=2 -CL_VERSION_PATCHLEVEL=2 +CL_VERSION_MAJOR=cl_version_major +CL_VERSION_MINOR=cl_version_minor +CL_VERSION_PATCHLEVEL=cl_version_patchlevel dnl release version for cln/config.h, so it can be tested by the preprocessor -AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR) -AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR) -AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL) +AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR, [Major version number of CLN]) +AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR, [Minor version number of CLN]) +AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL, [Patchlevel version number of CLN]) dnl concatenated release version -CL_VERSION=$CL_VERSION_MAJOR.$CL_VERSION_MINOR.$CL_VERSION_PATCHLEVEL -AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION) +CL_VERSION=cl_version +AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION, [CLN release number]) AC_SUBST(CL_VERSION) -dnl dnl checks for compiler characteristics dnl -AC_LANG_CPLUSPLUS +AC_LANG([C++]) +AX_CXX_COMPILE_STDCXX([11], [ext], [optional]) dnl CL_LONGLONG dnl DEFS HAVE_LONGLONG CL_LONGDOUBLE dnl DEFS HAVE_LONGDOUBLE -CL_GLOBAL_CONSTRUCTORS - dnl DEFS CL_GLOBAL_CONSTRUCTOR_PREFIX, CL_GLOBAL_DESTRUCTOR_PREFIX dnl dnl checks for header files dnl @@ -139,8 +113,6 @@ CL_GETTIMEOFDAY dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T ac_cv_func_ftime=no dnl don't use ftime(3) even if it's available -CL_TIMES_CLOCK - dnl DEFS HAVE_TIMES_CLOCK CL_RUSAGE dnl DEFS HAVE_SYS_RESOURCE_H, HAVE_GETRUSAGE, HAVE_SYS_TIMES_H CL_PERROR @@ -165,17 +137,11 @@ CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c, dnl builds include/cln/floatparam.h CL_LIBGMP dnl DEFS CL_USE_GMP, GMP_DEMANDS_UINTD_* + +CLNLIB_LIBS='-L${libdir} -lcln' +AC_LIB_LINKFLAGS_FROM_LIBS([CLNLIB_RPATH], [$CLNLIB_LIBS]) + dnl dnl That's it. dnl -for f in 'tests/.gdbinit'; do - if test '!' -f "$f"; then - echo "creating $f" -changequote(,)dnl - g=`echo "$f" | sed -e 's,/[^/]*$,,'` -changequote([,])dnl - test "$g" = "$f" || test -d "$g" || mkdir "$g" - cp "$srcdir/$f" "$f" - fi -done -AC_OUTPUT([Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile cln.spec cln.pc]) +AC_OUTPUT([Makefile src/Makefile tests/Makefile examples/Makefile doc/Makefile benchmarks/Makefile cln.spec cln.pc])