[6afd7c] | 1 | dnl Process this file with autoconf to produce a configure script |
---|
| 2 | AC_INIT(Singular/matpol.h) |
---|
| 3 | AC_PREFIX_DEFAULT(`pwd`) |
---|
| 4 | |
---|
[ebe3e8] | 5 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[64c6d1] | 6 | dnl Version business -- set these here |
---|
[ebe3e8] | 7 | dnl |
---|
[64c6d1] | 8 | # make them to env variables |
---|
| 9 | # pass them indirectly to subsequent configures |
---|
| 10 | export SINGULAR_MAJOR_VERSION=1 |
---|
| 11 | export SINGULAR_MINOR_VERSION=2 |
---|
| 12 | export SINGULAR_SUB_VERSION=0 |
---|
| 13 | export SINGULAR_VERSION="${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}" |
---|
| 14 | export VERSION_DATE="June 1998" |
---|
| 15 | |
---|
| 16 | dnl substitue them into the Makefiles |
---|
[ebe3e8] | 17 | AC_SUBST(SINGULAR_MAJOR_VERSION) |
---|
| 18 | AC_SUBST(SINGULAR_MINOR_VERSION) |
---|
| 19 | AC_SUBST(SINGULAR_SUB_VERSION) |
---|
| 20 | |
---|
[6afd7c] | 21 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 22 | dnl those are needed to check for libs and headers, later on |
---|
| 23 | dnl |
---|
| 24 | AC_PROG_CC |
---|
| 25 | AC_PROG_CPP |
---|
| 26 | AC_AIX |
---|
| 27 | |
---|
[64c6d1] | 28 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 29 | dnl exec_prefix, bindir, libdir, includedir to some sensible values |
---|
| 30 | dnl |
---|
| 31 | |
---|
| 32 | # expand prefix and pass it to subsequent configures |
---|
| 33 | test "x$prefix" = xNONE && prefix=${ac_default_prefix}; \ |
---|
| 34 | ac_configure_args="$ac_configure_args --prefix=${prefix}" |
---|
| 35 | |
---|
| 36 | # expand exec_prefix |
---|
| 37 | if test "x$exec_prefix" = xNONE; then |
---|
| 38 | if test -x "singuname.sh"; then |
---|
| 39 | if (singuname.sh >/dev/null 2>&1) then |
---|
| 40 | exec_prefix=${prefix}/`singuname.sh` |
---|
| 41 | ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}" |
---|
[6afd7c] | 42 | else |
---|
[64c6d1] | 43 | AC_MSG_ERROR(Unknown architecture: Check singuname.sh) |
---|
[6afd7c] | 44 | fi |
---|
| 45 | else |
---|
[64c6d1] | 46 | AC_MSG_ERROR(Need singuname.sh) |
---|
[6afd7c] | 47 | fi |
---|
| 48 | fi |
---|
| 49 | |
---|
[64c6d1] | 50 | # expand bindir |
---|
| 51 | test "x$bindir" = 'x${exec_prefix}/bin' && \ |
---|
| 52 | bindir="${exec_prefix}/bin" ; \ |
---|
| 53 | ac_configure_args="$ac_configure_args --bindir=${bindir}" |
---|
| 54 | |
---|
| 55 | # construct name of installed Singular executable |
---|
| 56 | export SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION} |
---|
| 57 | AC_SUBST(SINGULAR) |
---|
| 58 | |
---|
| 59 | # expand libdir |
---|
| 60 | test "x$libdir" = 'x${exec_prefix}/lib' && \ |
---|
| 61 | libdir="${exec_prefix}/lib/${SINGULAR_VERSION}" ; \ |
---|
| 62 | ac_configure_args="$ac_configure_args --libdir=${libdir}" |
---|
| 63 | |
---|
| 64 | # expand includedir |
---|
| 65 | test "x$includedir" = 'x${prefix}/include' && \ |
---|
| 66 | includedir="${exec_prefix}/include/${SINGULAR_VERSION}" ; \ |
---|
| 67 | ac_configure_args="$ac_configure_args --includedir=${includedir}" |
---|
| 68 | |
---|
| 69 | # add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure |
---|
| 70 | LDFLAGS="-L${libdir} ${LDFLAGS}" |
---|
| 71 | CPPFLAGS="-I${includedir} ${CPPFLAGS}" |
---|
[6afd7c] | 72 | |
---|
| 73 | |
---|
[dc32d42] | 74 | AC_MSG_CHECKING(whether _AIX is defined) |
---|
| 75 | AC_CACHE_VAL(ac_cv_is_aix, |
---|
| 76 | AC_EGREP_CPP(yes, |
---|
| 77 | [#ifdef _AIX |
---|
| 78 | yes |
---|
| 79 | #endif |
---|
| 80 | ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) |
---|
| 81 | if test "$ac_cv_is_aix" = yes; then |
---|
| 82 | AC_MSG_RESULT(yes) |
---|
| 83 | else |
---|
| 84 | AC_MSG_RESULT(no) |
---|
| 85 | fi |
---|
[6afd7c] | 86 | |
---|
| 87 | |
---|
| 88 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 89 | dnl check for various libraries and headers |
---|
| 90 | dnl |
---|
| 91 | AC_CHECK_LIB(m, atof) |
---|
[4dea87] | 92 | AC_CHECK_LIB(bsd, socket) |
---|
| 93 | AC_CHECK_LIB(socket, listen) |
---|
| 94 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
[78364c] | 95 | AC_CHECK_LIB(gmp, mpq_init) |
---|
| 96 | AC_CHECK_LIB(smallgmp, mpz_init) |
---|
[6afd7c] | 97 | AC_CHECK_LIB(MP, IMP_PutGmpInt) |
---|
| 98 | AC_CHECK_LIB(MPT, MPT_GetTree) |
---|
| 99 | AC_CHECK_LIB(singcf, atof) |
---|
| 100 | AC_CHECK_LIB(singfac, atof) |
---|
| 101 | |
---|
[78364c] | 102 | AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h MPT.h factory.h factor.h) |
---|
[6afd7c] | 103 | |
---|
[78364c] | 104 | if test "$ac_cv_lib_gmp_mpq_init" = yes && \ |
---|
[6afd7c] | 105 | test "$ac_cv_header_gmp_h" = yes; then |
---|
| 106 | ac_gmp_ok=yes |
---|
| 107 | fi |
---|
| 108 | |
---|
[78364c] | 109 | if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \ |
---|
| 110 | test "$ac_cv_header_smallgmp_h" = yes && \ |
---|
| 111 | test "$ac_cv_header_gmp_h" = yes; then |
---|
| 112 | ac_smallgmp_ok=yes |
---|
| 113 | fi |
---|
| 114 | |
---|
[6afd7c] | 115 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
| 116 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
| 117 | test "$ac_cv_header_MP_h" = yes && \ |
---|
| 118 | test "$ac_cv_header_MPT_h" = yes; then |
---|
| 119 | ac_MP_ok=yes |
---|
| 120 | fi |
---|
| 121 | |
---|
[4c001a] | 122 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
[6afd7c] | 123 | test "$ac_cv_header_factory_h" = yes; then |
---|
| 124 | ac_factory_ok=yes |
---|
| 125 | fi |
---|
| 126 | |
---|
[4c001a] | 127 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
[6afd7c] | 128 | test "$ac_cv_header_factor_h" = yes; then |
---|
| 129 | ac_libfac_ok=yes |
---|
| 130 | fi |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 135 | dnl Check whether or not to built various packages |
---|
| 136 | dnl |
---|
[78364c] | 137 | AC_ARG_ENABLE(smallgmp, \ |
---|
[6afd7c] | 138 | [ --enable-PACKAGE configure and build PACKAGE |
---|
| 139 | --disable-PACKAGE do not configure and build PACKAGE |
---|
[64c6d1] | 140 | where PACKAGE can be: |
---|
[78364c] | 141 | smallgmp minimal version of gmp written in C only]) |
---|
[64c6d1] | 142 | AC_ARG_ENABLE(gmp, \ |
---|
| 143 | [ gmp Gnu Multiple Precision package]) |
---|
[6afd7c] | 144 | AC_ARG_ENABLE(MP, \ |
---|
| 145 | [ MP Multi Protocol library]) |
---|
| 146 | AC_ARG_ENABLE(factory, \ |
---|
| 147 | [ factory polynomial factorization library]) |
---|
| 148 | AC_ARG_ENABLE(libfac, \ |
---|
| 149 | [ libfac char set and modp poly factorization library]) |
---|
[a04715] | 150 | AC_ARG_ENABLE(sgroup, \ |
---|
| 151 | [ sgroup numerical semigroup computations]) |
---|
[6afd7c] | 152 | AC_ARG_ENABLE(Singular, \ |
---|
[64c6d1] | 153 | [ Singular CAS for Polynomial Computations]) |
---|
[6afd7c] | 154 | |
---|
[78364c] | 155 | AC_ARG_WITH(MP,\ |
---|
| 156 | [ --with-PACKAGE use PACKAGE, provide dependent functionality |
---|
| 157 | --without-PACKAGE do not use PACKAGE, disable dependent functionality |
---|
[64c6d1] | 158 | where PACKAGE can be: |
---|
[9f226d] | 159 | MP Multi Protocol library]) |
---|
[78364c] | 160 | AC_ARG_WITH(factory, \ |
---|
| 161 | [ factory polynomial factorization library]) |
---|
| 162 | AC_ARG_WITH(libfac, \ |
---|
| 163 | [ libfac char set and modp poly factorization library]) |
---|
| 164 | AC_ARG_WITH(gmp, \ |
---|
| 165 | [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic |
---|
[64c6d1] | 166 | where PACKAGE can be gmp or smallgmp]) |
---|
| 167 | |
---|
| 168 | AC_MSG_CHECKING(whether to configure and build gmp lib) |
---|
| 169 | if test "$enable_gmp" != yes && test "$enable_gmp" != no; then |
---|
| 170 | if test "$ac_gmp_ok" != yes && test -d gmp; then |
---|
| 171 | AC_MSG_RESULT(yes) |
---|
| 172 | enable_gmp=yes |
---|
| 173 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
| 174 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
| 175 | else |
---|
| 176 | AC_MSG_RESULT(no) |
---|
| 177 | enable_gmp=no |
---|
| 178 | fi |
---|
| 179 | elif test "$enable_gmp" = yes; then |
---|
| 180 | if test ! -d gmp; then |
---|
| 181 | AC_MSG_RESULT(no) |
---|
| 182 | AC_MSG_ERROR(Can not find gmp subdir) |
---|
| 183 | else |
---|
| 184 | AC_MSG_RESULT(yes) |
---|
| 185 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
| 186 | fi |
---|
| 187 | else |
---|
| 188 | AC_MSG_RESULT(no) |
---|
| 189 | fi |
---|
[78364c] | 190 | |
---|
| 191 | AC_MSG_CHECKING(whether to configure and build smallgmp lib) |
---|
| 192 | if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then |
---|
[64c6d1] | 193 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
| 194 | test "$enable_gmp" != yes && test -d smallgmp; then |
---|
| 195 | AC_MSG_RESULT(yes) |
---|
[78364c] | 196 | enable_smallgmp=yes |
---|
[64c6d1] | 197 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
| 198 | ac_configure_args="$ac_configure_args --enable-smallgmp --enable-gmp" |
---|
[6afd7c] | 199 | else |
---|
[64c6d1] | 200 | AC_MSG_RESULT(no) |
---|
[78364c] | 201 | enable_smallgmp=no |
---|
[6afd7c] | 202 | fi |
---|
[64c6d1] | 203 | elif test "$enable_smallgmp" = yes; then |
---|
| 204 | if test ! -d smallgmp; then |
---|
| 205 | AC_MSG_RESULT(no) |
---|
| 206 | AC_MSG_ERROR(Can not find smallgmp subdir) |
---|
| 207 | else |
---|
| 208 | AC_MSG_RESULT(yes) |
---|
| 209 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
| 210 | if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then |
---|
| 211 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
| 212 | fi |
---|
[6afd7c] | 213 | fi |
---|
[64c6d1] | 214 | else |
---|
| 215 | AC_MSG_RESULT(${enable_smallgmp}) |
---|
[78364c] | 216 | fi |
---|
[64c6d1] | 217 | |
---|
| 218 | # Check whether we have at least one of smallgmp or gmp |
---|
| 219 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
| 220 | test "$enable_smallgmp" != yes && test "$enable_gmp" != yes; then |
---|
| 221 | AC_MSG_ERROR(can neither find nor built gmp or smallgmp) |
---|
| 222 | fi |
---|
| 223 | |
---|
| 224 | # Check whether we need to cheat subsequent configures with --enable-gmp |
---|
| 225 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes; then |
---|
[78364c] | 226 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
[6afd7c] | 227 | fi |
---|
| 228 | |
---|
| 229 | AC_MSG_CHECKING(whether to configure and build MP lib) |
---|
| 230 | if test "$enable_MP" != yes && test "$enable_MP" != no; then |
---|
[64c6d1] | 231 | if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \ |
---|
| 232 | (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then |
---|
| 233 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 234 | enable_MP=yes |
---|
[64c6d1] | 235 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
| 236 | ac_configure_args="$ac_configure_args --enable-MP" |
---|
[6afd7c] | 237 | else |
---|
[64c6d1] | 238 | AC_MSG_RESULT(no) |
---|
[6afd7c] | 239 | enable_MP=no |
---|
| 240 | fi |
---|
[64c6d1] | 241 | elif test "$enable_MP" = yes; then |
---|
| 242 | if test ! -d MP; then |
---|
| 243 | AC_MSG_RESULT(no) |
---|
| 244 | AC_MSG_ERROR(can not build MP without MP directory) |
---|
| 245 | fi |
---|
| 246 | if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then |
---|
[dc32d42] | 247 | AC_MSG_RESULT(yes) |
---|
| 248 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
| 249 | else |
---|
| 250 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 251 | AC_MSG_ERROR(can not build MP without gmp) |
---|
[dc32d42] | 252 | fi |
---|
[6afd7c] | 253 | else |
---|
| 254 | AC_MSG_RESULT(no) |
---|
| 255 | fi |
---|
| 256 | |
---|
[64c6d1] | 257 | |
---|
[6afd7c] | 258 | AC_MSG_CHECKING(whether to configure and build factory lib) |
---|
| 259 | if test "$enable_factory" != yes && test "$enable_factory" != no; then |
---|
[64c6d1] | 260 | if test "$with_factory" != no && test "$ac_factory_ok" != yes && \ |
---|
| 261 | test -d factory; then |
---|
[6afd7c] | 262 | enable_factory=yes |
---|
[64c6d1] | 263 | AC_MSG_RESULT(yes) |
---|
| 264 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
| 265 | ac_configure_args="$ac_configure_args --enable-factory" |
---|
[6afd7c] | 266 | else |
---|
| 267 | enable_factory=no |
---|
[64c6d1] | 268 | AC_MSG_RESULT(no) |
---|
[6afd7c] | 269 | fi |
---|
[64c6d1] | 270 | elif test "$enable_factory" = yes; then |
---|
| 271 | if test -d factory; then |
---|
[78364c] | 272 | AC_MSG_RESULT(yes) |
---|
| 273 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
[dc32d42] | 274 | else |
---|
| 275 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 276 | AC_MSG_ERROR(can not build factory without factory directory) |
---|
[dc32d42] | 277 | fi |
---|
[6afd7c] | 278 | else |
---|
| 279 | AC_MSG_RESULT(no) |
---|
| 280 | fi |
---|
| 281 | |
---|
| 282 | AC_MSG_CHECKING(whether to configure and build libfac lib) |
---|
| 283 | if test "$enable_libfac" != yes && test "$enable_libfac" != no; then |
---|
[64c6d1] | 284 | if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \ |
---|
| 285 | test -d libfac && \ |
---|
| 286 | (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then |
---|
[6afd7c] | 287 | enable_libfac=yes |
---|
[64c6d1] | 288 | AC_MSG_RESULT(yes) |
---|
| 289 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
| 290 | ac_configure_args="$ac_configure_args --enable-libfac" |
---|
[6afd7c] | 291 | else |
---|
| 292 | enable_libfac=no |
---|
[64c6d1] | 293 | AC_MSG_RESULT(no) |
---|
| 294 | fi |
---|
| 295 | elif test "$enable_libfac" = yes; then |
---|
| 296 | if test ! -d libfac; then |
---|
| 297 | AC_MSG_RESULT(no) |
---|
| 298 | AC_MSG_ERROR(can not build libfac without libfac directory) |
---|
[6afd7c] | 299 | fi |
---|
[dc32d42] | 300 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[64c6d1] | 301 | AC_MSG_RESULT(yes) |
---|
| 302 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
[dc32d42] | 303 | else |
---|
| 304 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 305 | AC_MSG_ERROR(Can not build libfac without factory) |
---|
[dc32d42] | 306 | fi |
---|
[6afd7c] | 307 | else |
---|
| 308 | AC_MSG_RESULT(no) |
---|
| 309 | fi |
---|
| 310 | |
---|
[64c6d1] | 311 | AC_MSG_CHECKING(whether to configure and build sgroup lib) |
---|
| 312 | if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then |
---|
| 313 | if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \ |
---|
| 314 | test -d sgroup && \ |
---|
| 315 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
[a04715] | 316 | enable_sgroup=yes |
---|
[64c6d1] | 317 | AC_MSG_RESULT(yes) |
---|
| 318 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
| 319 | ac_configure_args="$ac_configure_args --enable-sgroup" |
---|
[a04715] | 320 | else |
---|
| 321 | enable_sgroup=no |
---|
[64c6d1] | 322 | AC_MSG_RESULT(no) |
---|
| 323 | fi |
---|
| 324 | elif test "$enable_sgroup" = yes; then |
---|
| 325 | if test ! -d sgroup; then |
---|
| 326 | AC_MSG_RESULT(no) |
---|
| 327 | AC_MSG_ERROR(can not build sgroup without sgroup directory) |
---|
| 328 | fi |
---|
| 329 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
| 330 | AC_MSG_RESULT(yes) |
---|
| 331 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
| 332 | else |
---|
| 333 | AC_MSG_RESULT(no) |
---|
| 334 | AC_MSG_ERROR(Can not build sgroup without MP) |
---|
[a04715] | 335 | fi |
---|
| 336 | else |
---|
| 337 | AC_MSG_RESULT(no) |
---|
| 338 | fi |
---|
| 339 | |
---|
[64c6d1] | 340 | |
---|
[6afd7c] | 341 | AC_MSG_CHECKING(whether to configure and build Singular) |
---|
| 342 | if test "$enable_Singular" != yes && test "$enable_Singular" != no; then |
---|
[64c6d1] | 343 | if test "$with_Singular" != no && test -d Singular; then |
---|
[6afd7c] | 344 | enable_Singular=yes |
---|
[64c6d1] | 345 | AC_MSG_RESULT(yes) |
---|
| 346 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
| 347 | ac_configure_args="$ac_configure_args --enable-Singular" |
---|
[6afd7c] | 348 | else |
---|
| 349 | enable_Singular=no |
---|
[64c6d1] | 350 | AC_MSG_RESULT(no) |
---|
| 351 | fi |
---|
| 352 | elif test "$enable_Singular" = yes; then |
---|
| 353 | if test -d Singular; then |
---|
| 354 | AC_MSG_RESULT(yes) |
---|
| 355 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
| 356 | else |
---|
| 357 | AC_MSG_RESULT(no) |
---|
| 358 | AC_MSG_ERROR(can not build Singular without Singular directory) |
---|
[6afd7c] | 359 | fi |
---|
| 360 | else |
---|
| 361 | AC_MSG_RESULT(no) |
---|
| 362 | fi |
---|
| 363 | |
---|
| 364 | |
---|
| 365 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 366 | dnl Check whether or not to use various packages |
---|
| 367 | dnl |
---|
[78364c] | 368 | AC_MSG_CHECKING(wich apint package to use) |
---|
[64c6d1] | 369 | if test "$with_apint" = gmp; then |
---|
| 370 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
| 371 | AC_MSG_RESULT(gmp) |
---|
| 372 | else |
---|
| 373 | AC_MSG_RESULT(none) |
---|
| 374 | AC_MSG_ERROR(can not use with gmp without finding or building it) |
---|
| 375 | fi |
---|
| 376 | elif test "$with_apint" = smallgmp; then |
---|
| 377 | if test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then |
---|
| 378 | AC_MSG_RESULT(smallgmp) |
---|
| 379 | else |
---|
| 380 | AC_MSG_RESULT(none) |
---|
| 381 | AC_MSG_ERROR(can not use with smallgmp without finding or building it) |
---|
| 382 | fi |
---|
| 383 | elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then |
---|
| 384 | AC_MSG_RESULT(gmp) |
---|
| 385 | ac_configure_args="$ac_configure_args --with-apint=gmp" |
---|
| 386 | else |
---|
| 387 | AC_MSG_RESULT(smallgmp) |
---|
| 388 | ac_configure_args="$ac_configure_args --with-apint=smallgmp" |
---|
[78364c] | 389 | fi |
---|
[6afd7c] | 390 | |
---|
[dc32d42] | 391 | AC_MSG_CHECKING(whether to use with MP) |
---|
[64c6d1] | 392 | if test "$with_MP" = yes; then |
---|
[dc32d42] | 393 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
[64c6d1] | 394 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 395 | else |
---|
[64c6d1] | 396 | AC_MSG_RESULT(none) |
---|
| 397 | AC_MSG_ERROR(can not use with MP without finding or building it) |
---|
[6afd7c] | 398 | fi |
---|
[64c6d1] | 399 | elif test "$with_MP" = no; then |
---|
| 400 | AC_MSG_RESULT(no) |
---|
| 401 | elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
[6afd7c] | 402 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 403 | ac_configure_args="$ac_configure_args --with-MP" |
---|
[6afd7c] | 404 | else |
---|
| 405 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 406 | ac_configure_args="$ac_configure_args --without-MP" |
---|
[78364c] | 407 | fi |
---|
| 408 | |
---|
[dc32d42] | 409 | AC_MSG_CHECKING(whether to use with factory) |
---|
[64c6d1] | 410 | if test "$with_factory" = yes; then |
---|
[dc32d42] | 411 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[64c6d1] | 412 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 413 | else |
---|
[64c6d1] | 414 | AC_MSG_RESULT(none) |
---|
| 415 | AC_MSG_ERROR(can not use with factory without finding or building it) |
---|
[6afd7c] | 416 | fi |
---|
[64c6d1] | 417 | elif test "$with_factory" = no; then |
---|
| 418 | AC_MSG_RESULT(no) |
---|
| 419 | elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[6afd7c] | 420 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 421 | ac_configure_args="$ac_configure_args --with-factory" |
---|
[6afd7c] | 422 | else |
---|
| 423 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 424 | ac_configure_args="$ac_configure_args --without-factory" |
---|
[6afd7c] | 425 | fi |
---|
[64c6d1] | 426 | |
---|
[dc32d42] | 427 | AC_MSG_CHECKING(whether to use with libfac) |
---|
[64c6d1] | 428 | if test "$with_libfac" = yes; then |
---|
[dc32d42] | 429 | if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
[64c6d1] | 430 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 431 | else |
---|
[64c6d1] | 432 | AC_MSG_RESULT(none) |
---|
| 433 | AC_MSG_ERROR(can not use with libfac without finding or building it) |
---|
[6afd7c] | 434 | fi |
---|
[64c6d1] | 435 | elif test "$with_libfac" = no; then |
---|
| 436 | AC_MSG_RESULT(no) |
---|
| 437 | elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
[6afd7c] | 438 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 439 | ac_configure_args="$ac_configure_args --with-libfac" |
---|
[6afd7c] | 440 | else |
---|
| 441 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 442 | ac_configure_args="$ac_configure_args --without-libfac" |
---|
[6afd7c] | 443 | fi |
---|
| 444 | |
---|
[64c6d1] | 445 | |
---|
[dc32d42] | 446 | AC_MSG_CHECKING(whether to use with Singular) |
---|
| 447 | if test "$with_Singular" != no && test "$with_Singular" != yes; then |
---|
[6afd7c] | 448 | if test "$enable_Singular" = yes; then |
---|
[dc32d42] | 449 | with_Singular=yes |
---|
[6afd7c] | 450 | else |
---|
| 451 | with_Singular=no |
---|
| 452 | fi |
---|
[dc32d42] | 453 | ac_configure_args="$ac_configure_args --with-Singular=$with_Singular" |
---|
[6afd7c] | 454 | fi |
---|
[dc32d42] | 455 | |
---|
[6afd7c] | 456 | if test "$with_Singular" != no; then |
---|
| 457 | AC_MSG_RESULT(yes) |
---|
| 458 | else |
---|
| 459 | AC_MSG_RESULT(no) |
---|
| 460 | fi |
---|
| 461 | |
---|
| 462 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 463 | dnl Check for known subdirs |
---|
| 464 | dnl |
---|
[78364c] | 465 | if test -d smallgmp; then |
---|
| 466 | SUBDIRS="smallgmp" |
---|
[6afd7c] | 467 | fi |
---|
[64c6d1] | 468 | if test -d gmp; then |
---|
| 469 | SUBDIRS="gmp" |
---|
| 470 | fi |
---|
[6afd7c] | 471 | if test -d MP; then |
---|
| 472 | SUBDIRS="$SUBDIRS MP" |
---|
| 473 | fi |
---|
| 474 | if test -d factory; then |
---|
| 475 | SUBDIRS="$SUBDIRS factory" |
---|
| 476 | fi |
---|
| 477 | if test -d libfac; then |
---|
| 478 | SUBDIRS="$SUBDIRS libfac" |
---|
| 479 | fi |
---|
[64c6d1] | 480 | if test -d sgroup; then |
---|
| 481 | SUBDIRS="sgroup" |
---|
| 482 | fi |
---|
[6afd7c] | 483 | if test -d Singular; then |
---|
| 484 | SUBDIRS="$SUBDIRS Singular" |
---|
| 485 | fi |
---|
| 486 | |
---|
| 487 | |
---|
| 488 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 489 | dnl Enough --wrap it up |
---|
| 490 | dnl |
---|
| 491 | AC_PROG_MAKE_SET |
---|
| 492 | AC_SUBST(SUBDIRS) |
---|
| 493 | AC_SUBST(CONFIG_SUBDIRS) |
---|
| 494 | AC_CONFIG_SUBDIRS($CONFIG_SUBDIRS) |
---|
| 495 | |
---|
[64c6d1] | 496 | AC_OUTPUT(Makefile doc/Makefile) |
---|