| 1 | AC_PREREQ(2.50) |
|---|
| 2 | #AC_INIT(linbox/linbox.doxy) |
|---|
| 3 | AC_INIT(linbox, 1.1.5,linbox-use@googlegroups.com) |
|---|
| 4 | AM_INIT_AUTOMAKE([1.8 gnu no-dependencies]) |
|---|
| 5 | AM_CONFIG_HEADER([config.h]) |
|---|
| 6 | AX_PREFIX_CONFIG_H(linbox/linbox-config.h, __LINBOX) |
|---|
| 7 | |
|---|
| 8 | AM_MAINTAINER_MODE |
|---|
| 9 | AM_DEP_TRACK |
|---|
| 10 | AM_OUTPUT_DEPENDENCY_COMMANDS |
|---|
| 11 | |
|---|
| 12 | # Give a sane default for CFLAGS and CXXFLAGS |
|---|
| 13 | # The sane thing is to define the flags differenly in tests, examples, interfaces, etc. -bds |
|---|
| 14 | #DEFAULT_CFLAGS="-O2 -Wall" |
|---|
| 15 | |
|---|
| 16 | CFLAGS=${CFLAGS:-$DEFAULT_CFLAGS} |
|---|
| 17 | CXXFLAGS=${CXXFLAGS:-$DEFAULT_CFLAGS} |
|---|
| 18 | |
|---|
| 19 | AM_ACLOCAL_INCLUDE(macros) |
|---|
| 20 | |
|---|
| 21 | # work around to fix the backward compatibility issue of automake 1.10 with 1.9 (pb with MKDIR_P) |
|---|
| 22 | AC_SUBST([MKDIR_P]) |
|---|
| 23 | AC_PROG_CC |
|---|
| 24 | AC_PROG_CXX |
|---|
| 25 | AC_STDC_HEADERS |
|---|
| 26 | #AC_DISABLE_SHARED |
|---|
| 27 | #AC_DISABLE_STATIC |
|---|
| 28 | #AM_PROG_LIBTOOL |
|---|
| 29 | # JGD 08.06.2004 : new name |
|---|
| 30 | AC_PROG_LIBTOOL |
|---|
| 31 | |
|---|
| 32 | # Machine characteristics |
|---|
| 33 | |
|---|
| 34 | AC_CHECK_SIZEOF(char, 8) |
|---|
| 35 | AC_CHECK_SIZEOF(short, 16) |
|---|
| 36 | AC_CHECK_SIZEOF(int, 32) |
|---|
| 37 | AC_CHECK_SIZEOF(long, 32) |
|---|
| 38 | AC_CHECK_SIZEOF(long long, 64) |
|---|
| 39 | AC_CHECK_SIZEOF(__int64, 64) |
|---|
| 40 | |
|---|
| 41 | # check endianness of the architecture |
|---|
| 42 | AC_C_BIGENDIAN( |
|---|
| 43 | [AC_DEFINE(HAVE_BIG_ENDIAN, 1, [Define that architecture uses big endian storage])], |
|---|
| 44 | [AC_DEFINE(HAVE_LITTLE_ENDIAN, 1, [Define that architecture uses little endian storage])], |
|---|
| 45 | []) |
|---|
| 46 | |
|---|
| 47 | # Create some useful data types of fixed, known lengths |
|---|
| 48 | |
|---|
| 49 | # We hereby assume that a character is always one byte |
|---|
| 50 | LINBOX_INT8="char"; |
|---|
| 51 | |
|---|
| 52 | case $ac_cv_sizeof_char in |
|---|
| 53 | 1) |
|---|
| 54 | TWO_BYTES=2; |
|---|
| 55 | FOUR_BYTES=4; |
|---|
| 56 | EIGHT_BYTES=8; |
|---|
| 57 | ;; |
|---|
| 58 | 8) |
|---|
| 59 | TWO_BYTES=16; |
|---|
| 60 | FOUR_BYTES=32; |
|---|
| 61 | EIGHT_BYTES=64; |
|---|
| 62 | esac |
|---|
| 63 | |
|---|
| 64 | case $TWO_BYTES in |
|---|
| 65 | $ac_cv_sizeof_short) |
|---|
| 66 | LINBOX_INT16="short"; |
|---|
| 67 | ;; |
|---|
| 68 | $ac_cv_sizeof_int) |
|---|
| 69 | LINBOX_INT16="int"; |
|---|
| 70 | ;; |
|---|
| 71 | esac |
|---|
| 72 | |
|---|
| 73 | case $FOUR_BYTES in |
|---|
| 74 | $ac_cv_sizeof_short) |
|---|
| 75 | LINBOX_INT32="short"; |
|---|
| 76 | ;; |
|---|
| 77 | $ac_cv_sizeof_int) |
|---|
| 78 | LINBOX_INT32="int"; |
|---|
| 79 | ;; |
|---|
| 80 | $ac_cv_sizeof_long) |
|---|
| 81 | LINBOX_INT32="long"; |
|---|
| 82 | ;; |
|---|
| 83 | esac |
|---|
| 84 | |
|---|
| 85 | case $EIGHT_BYTES in |
|---|
| 86 | $ac_cv_sizeof_short) |
|---|
| 87 | LINBOX_INT64="short"; |
|---|
| 88 | ;; |
|---|
| 89 | $ac_cv_sizeof_int) |
|---|
| 90 | LINBOX_INT64="int"; |
|---|
| 91 | ;; |
|---|
| 92 | $ac_cv_sizeof_long) |
|---|
| 93 | LINBOX_INT64="long"; |
|---|
| 94 | ;; |
|---|
| 95 | $ac_cv_sizeof_long_long) |
|---|
| 96 | LINBOX_INT64="long long"; |
|---|
| 97 | ;; |
|---|
| 98 | $ac_cv_sizeof___int64) |
|---|
| 99 | LINBOX_INT64="__int64"; |
|---|
| 100 | ;; |
|---|
| 101 | esac |
|---|
| 102 | |
|---|
| 103 | AC_DEFINE_UNQUOTED(INT8, $LINBOX_INT8, Canonical 8-bit data type) |
|---|
| 104 | AC_DEFINE_UNQUOTED(INT16, $LINBOX_INT16, Canonical 16-bit data type) |
|---|
| 105 | AC_DEFINE_UNQUOTED(INT32, $LINBOX_INT32, Canonical 32-bit data type) |
|---|
| 106 | AC_DEFINE_UNQUOTED(INT64, $LINBOX_INT64, Canonical 64-bit data type) |
|---|
| 107 | |
|---|
| 108 | # Feature checks |
|---|
| 109 | LB_MISC |
|---|
| 110 | LB_DRIVER |
|---|
| 111 | |
|---|
| 112 | AC_LANG_CPLUSPLUS |
|---|
| 113 | LB_CHECK_GMP(,,[ |
|---|
| 114 | echo '*******************************************************************************' |
|---|
| 115 | echo ' ERROR: GMP not found!' |
|---|
| 116 | echo |
|---|
| 117 | echo ' GMP version 3.1.1 or greater with --enable-cxx is required for this library to compile. Please' |
|---|
| 118 | echo ' make sure GMP is installed and specify its location with the option' |
|---|
| 119 | echo ' --with-gmp=<prefix> when running configure.' |
|---|
| 120 | echo '*******************************************************************************' |
|---|
| 121 | exit 1 |
|---|
| 122 | ]) |
|---|
| 123 | |
|---|
| 124 | LB_CHECK_NTL |
|---|
| 125 | LB_CHECK_GIVARO |
|---|
| 126 | LB_CHECK_SACLIB |
|---|
| 127 | LB_CHECK_LIDIA |
|---|
| 128 | LB_CHECK_MAPLE |
|---|
| 129 | #LB_CHECK_ATLAS |
|---|
| 130 | LB_CHECK_BLAS(,,[ |
|---|
| 131 | echo '' |
|---|
| 132 | echo '*******************************************************************************' |
|---|
| 133 | echo ' ERROR: BLAS not found!' |
|---|
| 134 | echo |
|---|
| 135 | echo ' BLAS routines are required for this library to compile. Please' |
|---|
| 136 | echo ' make sure BLAS are installed and specify its location with the option' |
|---|
| 137 | echo ' --with-blas=<lib> when running configure.' |
|---|
| 138 | echo '*******************************************************************************' |
|---|
| 139 | exit 1 |
|---|
| 140 | ]) |
|---|
| 141 | LB_CHECK_EXPAT |
|---|
| 142 | |
|---|
| 143 | LB_OPT |
|---|
| 144 | LB_DOC |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | # this is bogus so far as I can tell. -bds |
|---|
| 148 | #CXXFLAGS="${GMP_CFLAGS} ${NTL_CFLAGS} ${GIVARO_CFLAGS} ${SACLIB_CFLAGS} ${CXXFLAGS}" |
|---|
| 149 | #AC_SUBST(CXXFLAGS) |
|---|
| 150 | |
|---|
| 151 | AC_OUTPUT([ |
|---|
| 152 | Makefile |
|---|
| 153 | linbox-config |
|---|
| 154 | examples/Makefile |
|---|
| 155 | examples/fields/Makefile |
|---|
| 156 | examples/Readme-make |
|---|
| 157 | gmp++/Makefile |
|---|
| 158 | doc/Makefile |
|---|
| 159 | linbox/Makefile |
|---|
| 160 | linbox/algorithms/Makefile |
|---|
| 161 | linbox/fflas/Makefile |
|---|
| 162 | linbox/ffpack/Makefile |
|---|
| 163 | linbox/blackbox/Makefile |
|---|
| 164 | linbox/element/Makefile |
|---|
| 165 | linbox/field/Makefile |
|---|
| 166 | linbox/matrix/Makefile |
|---|
| 167 | linbox/randiter/Makefile |
|---|
| 168 | linbox/ring/Makefile |
|---|
| 169 | linbox/solutions/Makefile |
|---|
| 170 | linbox/switch/Makefile |
|---|
| 171 | linbox/util/Makefile |
|---|
| 172 | linbox/util/gmp++/Makefile |
|---|
| 173 | linbox/util/formats/Makefile |
|---|
| 174 | linbox/vector/Makefile |
|---|
| 175 | tests/Makefile |
|---|
| 176 | tests/data/Makefile |
|---|
| 177 | interfaces/Makefile |
|---|
| 178 | interfaces/driver/Makefile |
|---|
| 179 | interfaces/maple/Makefile |
|---|
| 180 | interfaces/kaapi/Makefile |
|---|
| 181 | macros/Makefile |
|---|
| 182 | ]) |
|---|