[ab788d] | 1 | AC_INIT([libpolys], [3.1.2.sw]) |
---|
| 2 | |
---|
[8184703] | 3 | AC_CONFIG_MACRO_DIR([../m4]) |
---|
| 4 | AC_CONFIG_AUX_DIR([.]) |
---|
[d11524] | 5 | AC_CONFIG_SRCDIR([reporter/reporter.h]) |
---|
[41dde6] | 6 | AC_CONFIG_HEADER([config.h misc/auxiliary.h]) |
---|
[ab788d] | 7 | |
---|
[ea0001] | 8 | AM_MAINTAINER_MODE |
---|
[24a77fb] | 9 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
[014b65] | 10 | |
---|
[84c376] | 11 | dnl Check if build env is sane |
---|
| 12 | AM_SANITY_CHECK |
---|
| 13 | |
---|
[f86531] | 14 | # |
---|
| 15 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
| 16 | # |
---|
| 17 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
| 18 | AC_PROG_CC |
---|
| 19 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
| 20 | AC_PROG_CXX |
---|
| 21 | if test "x$GCC" != xyes && test "x$GXX" != xyes; then |
---|
| 22 | AC_MSG_WARN(you better use gcc to compile Factory) |
---|
| 23 | else |
---|
| 24 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 25 | AC_MSG_WARN([we use \`' as default for \`CXXFLAGS' |
---|
| 26 | (instead of the configure default \`-g -O')]) |
---|
| 27 | fi |
---|
| 28 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 29 | AC_MSG_WARN([we use \`' as default for \`CFLAGS' |
---|
| 30 | (instead of the configure default \`-g -O')]) |
---|
| 31 | fi |
---|
| 32 | fi |
---|
| 33 | |
---|
[e078e0] | 34 | AM_PROG_CC_C_O |
---|
| 35 | AC_PROG_LN_S |
---|
| 36 | AC_PROG_INSTALL |
---|
| 37 | |
---|
| 38 | # AM_PROG_AR |
---|
[4c5b46] | 39 | # Turn off shared libraries during beta-testing, since they |
---|
| 40 | # make the build process take too long. |
---|
[80c102] | 41 | LT_INIT |
---|
| 42 | # ([shared]) |
---|
| 43 | # LT_INIT(dlopen disable-static) # doesn't work on PowerPC! |
---|
[72b880] | 44 | |
---|
[4aa8610] | 45 | # Checks for libraries. |
---|
[9af8a63] | 46 | LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) |
---|
[643b1eb] | 47 | LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) |
---|
| 48 | |
---|
[720156] | 49 | # Checks for library functions. |
---|
| 50 | AC_FUNC_ERROR_AT_LINE |
---|
[eb2d25] | 51 | AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv]) |
---|
[ec0d9b] | 52 | AC_FUNC_VPRINTF |
---|
| 53 | AC_FUNC_MALLOC |
---|
[84c376] | 54 | AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])]) |
---|
[720156] | 55 | |
---|
[d11524] | 56 | # Checks for header files. |
---|
| 57 | AC_HEADER_STDC |
---|
[84c376] | 58 | AC_STDC_HEADERS |
---|
[56bce65] | 59 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h execinfo.h]) |
---|
| 60 | |
---|
| 61 | # If the compiler supports GCC C++ ABI name demangling (has header |
---|
| 62 | # cxxabi.h and abi::__cxa_demangle() function), define |
---|
| 63 | # HAVE_GCC_ABI_DEMANGLE |
---|
| 64 | AX_CXX_GCC_ABI_DEMANGLE |
---|
[d11524] | 65 | |
---|
| 66 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 67 | AC_C_CONST |
---|
| 68 | AC_C_INLINE |
---|
[720156] | 69 | AC_HEADER_STDBOOL |
---|
| 70 | AC_TYPE_SIZE_T |
---|
[d11524] | 71 | |
---|
| 72 | SING_CHECK_PIPE |
---|
| 73 | |
---|
| 74 | # check for cpu properties |
---|
| 75 | AC_CHECK_SIZEOF(long,4) |
---|
| 76 | SING_CHECK_CPU |
---|
| 77 | |
---|
[720156] | 78 | #check for host: |
---|
| 79 | AC_CANONICAL_HOST |
---|
| 80 | case $host_os in |
---|
| 81 | *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";; |
---|
| 82 | * ) LIBPREFIX="";; |
---|
| 83 | esac |
---|
| 84 | |
---|
[84c376] | 85 | dnl INCLUDES="" |
---|
| 86 | dnl dnl OS specific flags and options |
---|
| 87 | dnl case "$host" in |
---|
| 88 | dnl *-*-freebsd*) |
---|
| 89 | dnl LIBS="$LIBS -L/usr/local/lib -lc" |
---|
| 90 | dnl CFLAGS="$CFLAGS -I/usr/local/include" |
---|
| 91 | dnl INCLUDES="$INCLUDES -I/usr/local/include" |
---|
| 92 | dnl ;; |
---|
| 93 | dnl esac |
---|
| 94 | dnl AC_SUBST(INCLUDES) |
---|
| 95 | |
---|
[ec0d9b] | 96 | SING_CHECK_P_PROCS |
---|
[568cf0] | 97 | SING_CHECK_ARITH_RINGS |
---|
[45e35b] | 98 | SING_CHECK_FACTORY |
---|
| 99 | SING_CHECK_PLURAL |
---|
[bea370] | 100 | |
---|
[f86531] | 101 | # CFLAGS |
---|
| 102 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 103 | CFLAGS="" |
---|
| 104 | fi |
---|
| 105 | |
---|
| 106 | # CXXFLAGS |
---|
| 107 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 108 | CXXFLAGS="" |
---|
| 109 | fi |
---|
| 110 | |
---|
[f284db] | 111 | #if test "x$prefix" != xNONE; then |
---|
| 112 | # PREFIX="$prefix" |
---|
| 113 | #else |
---|
| 114 | # PREFIX="$ac_default_prefix" |
---|
| 115 | #fi |
---|
[964389] | 116 | |
---|
[f284db] | 117 | AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]), |
---|
[2b43ac] | 118 | [if test "x$enableval" = "xyes"; then |
---|
| 119 | ENABLE_DEBUG=yes |
---|
| 120 | fi], ENABLE_DEBUG=no) |
---|
| 121 | |
---|
| 122 | AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) |
---|
| 123 | |
---|
[964389] | 124 | # AC_SUBST(PREFIX) |
---|
[f284db] | 125 | # AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix) |
---|
[964389] | 126 | |
---|
[f3ea6ce] | 127 | AC_DEFINE([SINGULAR],[1],[SINGULAR]) |
---|
| 128 | AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP]) |
---|
| 129 | AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP]) |
---|
| 130 | |
---|
[047597] | 131 | ## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions]) |
---|
| 132 | |
---|
[014b65] | 133 | AC_CONFIG_FILES([Makefile]) |
---|
[d11524] | 134 | AC_CONFIG_FILES([misc/Makefile]) |
---|
| 135 | AC_CONFIG_FILES([reporter/Makefile]) |
---|
[720156] | 136 | AC_CONFIG_FILES([coeffs/Makefile]) |
---|
[ec0d9b] | 137 | AC_CONFIG_FILES([polys/Makefile]) |
---|
[4aa8610] | 138 | AC_CONFIG_FILES([tests/Makefile]) |
---|
[c5917f1] | 139 | AC_CONFIG_FILES([libpolys-config]) |
---|
[014b65] | 140 | AC_OUTPUT |
---|