[6afd7c] | 1 | dnl Process this file with autoconf to produce a configure script |
---|
[f84882] | 2 | AC_INIT(kernel/matpol.h) |
---|
[6afd7c] | 3 | AC_PREFIX_DEFAULT(`pwd`) |
---|
[a15090f] | 4 | pwd=`pwd` |
---|
| 5 | |
---|
[5e5db8] | 6 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 7 | dnl Version business -- set these here |
---|
| 8 | dnl |
---|
| 9 | # make them to env variables |
---|
| 10 | # pass them indirectly to subsequent configures |
---|
[23b5a6] | 11 | SINGULAR_MAJOR_VERSION=3 |
---|
[b4e3253] | 12 | SINGULAR_MINOR_VERSION=1 |
---|
[2ad9f9] | 13 | SINGULAR_SUB_VERSION=1 |
---|
[72541b] | 14 | VERSION_SEP="-" |
---|
[5e5db8] | 15 | SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}" |
---|
| 16 | SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" |
---|
[553006] | 17 | SINGULAR_RPM_VERSION="${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}" |
---|
[2ad9f9] | 18 | VERSION_DATE="Feb 2010" |
---|
[5e5db8] | 19 | SINGULAR_ROOT_DIR=$pwd |
---|
[a15090f] | 20 | |
---|
[5e5db8] | 21 | export SINGULAR_MINOR_VERSION |
---|
| 22 | export SINGULAR_MAJOR_VERSION |
---|
| 23 | export SINGULAR_SUB_VERSION |
---|
| 24 | export SINGULAR_VERSION |
---|
[553006] | 25 | export SINGULAR_RPM_VERSION |
---|
[5e5db8] | 26 | export VERSION_DATE |
---|
| 27 | export SINGULAR_ROOT_DIR |
---|
| 28 | |
---|
| 29 | dnl substitue them into the Makefiles |
---|
| 30 | AC_SUBST(SINGULAR_VERSION) |
---|
| 31 | AC_SUBST(VERSION_DATE) |
---|
| 32 | AC_SUBST(SINGULAR_SHORT_VERSION) |
---|
[553006] | 33 | AC_SUBST(SINGULAR_RPM_VERSION) |
---|
[5e5db8] | 34 | AC_SUBST(SINGULAR_ROOT_DIR) |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 38 | dnl Makefiles to output |
---|
| 39 | dnl |
---|
[a15090f] | 40 | # determine Makefiles to output |
---|
[aac46c] | 41 | OUTPUT_MAKEFILES="Makefile" |
---|
| 42 | if test -d "doc"; then |
---|
| 43 | OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES doc/Makefile doc/version.texi doc/uname.texi" |
---|
| 44 | fi |
---|
[460c1e1] | 45 | if test -d "emacs"; then |
---|
| 46 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" emacs/Makefile" |
---|
| 47 | fi |
---|
[8c8a76] | 48 | if test -d "IntegerProgramming"; then |
---|
| 49 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" IntegerProgramming/Makefile" |
---|
| 50 | fi |
---|
[08b7a76] | 51 | if test -d "Plural"; then |
---|
| 52 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" Plural/Makefile" |
---|
| 53 | fi |
---|
[a15090f] | 54 | if test -d "InstallShield"; then |
---|
| 55 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" InstallShield/Makefile InstallShield/Etc/Makefile InstallShield/Cygwin/Makefile InstallShield/Singular/Makefile InstallShield/Xemacs/Makefile" |
---|
| 56 | fi |
---|
[73e491] | 57 | |
---|
[9ead31] | 58 | |
---|
[ebe3e8] | 59 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[fe40293] | 60 | dnl determine singuname |
---|
[1bed80] | 61 | dnl |
---|
[fe40293] | 62 | AC_MSG_CHECKING(uname for singular) |
---|
| 63 | AC_CACHE_VAL(ac_cv_singuname, |
---|
| 64 | ac_cv_singuname="unknown" |
---|
| 65 | if test -r "singuname.sh"; then |
---|
| 66 | if (/bin/sh singuname.sh >/dev/null 2>&1) then |
---|
| 67 | ac_cv_singuname=`/bin/sh singuname.sh` |
---|
| 68 | fi |
---|
| 69 | fi |
---|
| 70 | ) |
---|
| 71 | AC_MSG_RESULT($ac_cv_singuname) |
---|
| 72 | if test "$ac_cv_singuname" = unknown; then |
---|
| 73 | AC_MSG_ERROR(Unknown architecture: Check singuname.sh) |
---|
| 74 | else |
---|
| 75 | SINGUNAME=$ac_cv_singuname |
---|
| 76 | AC_SUBST(SINGUNAME) |
---|
| 77 | fi |
---|
[ebe3e8] | 78 | |
---|
[c30f2eb] | 79 | SING_UNAME=`echo $SINGUNAME | tr '-' '_' ` |
---|
| 80 | AC_SUBST(SING_UNAME) |
---|
| 81 | |
---|
[1bed80] | 82 | |
---|
[074171] | 83 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 84 | dnl compiler stuff |
---|
| 85 | dnl is needed to check for libs and headers, later on |
---|
| 86 | dnl |
---|
| 87 | dnl we do not want to have "-g -O" for CFLAGS |
---|
| 88 | if test "${CXXFLAGS+set}" != set; then |
---|
| 89 | ac_cxxflags_set=no |
---|
| 90 | CXXFLAGS="-O" |
---|
| 91 | fi |
---|
| 92 | if test "${CFLAGS+set}" != set; then |
---|
| 93 | CFLAGS="-O" |
---|
| 94 | ac_cflags_set=no |
---|
| 95 | fi |
---|
| 96 | |
---|
[6afd7c] | 97 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[8c8a76] | 98 | dnl compiler stuff |
---|
| 99 | dnl is needed to check for libs and headers, later on |
---|
[6afd7c] | 100 | dnl |
---|
| 101 | AC_PROG_CC |
---|
| 102 | AC_PROG_CPP |
---|
[4b72f6] | 103 | AC_PROG_INSTALL |
---|
[6afd7c] | 104 | AC_AIX |
---|
[8c8a76] | 105 | AC_PROG_CXX |
---|
| 106 | |
---|
[5ff7d2] | 107 | SING_CC=${CC}; export SING_CC |
---|
| 108 | SING_CXX=${CXX}; export SING_CXX |
---|
| 109 | |
---|
[8c8a76] | 110 | # check whether the compiler accepts -pipe |
---|
| 111 | AC_MSG_CHECKING(whether compiler accepts -pipe) |
---|
| 112 | temp_cflags=${CFLAGS} |
---|
| 113 | CFLAGS="${CFLAGS} -pipe" |
---|
| 114 | AC_CACHE_VAL(ac_cv_cxx_have_pipe, |
---|
| 115 | AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no) |
---|
| 116 | ) |
---|
| 117 | AC_MSG_RESULT(${ac_cv_cxx_have_pipe}) |
---|
| 118 | CFLAGS=${temp_cflags} |
---|
| 119 | if test "${ac_cv_cxx_have_pipe}" != yes; then |
---|
| 120 | PIPE= |
---|
| 121 | else |
---|
| 122 | PIPE="-pipe" |
---|
| 123 | fi |
---|
| 124 | AC_SUBST(PIPE) |
---|
[6afd7c] | 125 | |
---|
[3d8259] | 126 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
[575b64] | 127 | AC_CHECK_PROGS(UUDECODE, uudecode "uudeview -i",${pwd}/warn_not_found.sh uudecode) |
---|
[9ead31] | 128 | AC_CHECK_PROGS(GUNZIP, gunzip, ${pwd}/warn_not_found.sh gunzip) |
---|
| 129 | # don't use GZIP this breaks configure |
---|
| 130 | AC_CHECK_PROGS(MYGZIP, gzip, ${pwd}/warn_not_found.sh gzip) |
---|
[f36635] | 131 | AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html) |
---|
[fe40293] | 132 | AC_PROG_LN_S |
---|
[73e491] | 133 | |
---|
[51f201] | 134 | if test -r "${pwd}/mkinstalldirs"; then |
---|
[a15090f] | 135 | MKINSTALLDIRS=${pwd}/mkinstalldirs |
---|
| 136 | AC_SUBST(MKINSTALLDIRS) |
---|
| 137 | else |
---|
| 138 | AC_MSG_ERROR(mkinstalldirs not foind in ${pwd}) |
---|
| 139 | fi |
---|
| 140 | |
---|
[64c6d1] | 141 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[a23686] | 142 | dnl Set exec_prefix, bindir, libdir, includedir to some sensible values |
---|
[64c6d1] | 143 | dnl |
---|
| 144 | # expand prefix and pass it to subsequent configures |
---|
[73e491] | 145 | if test "x$prefix" = xNONE; then |
---|
| 146 | prefix=${ac_default_prefix} |
---|
| 147 | ac_configure_args="$ac_configure_args --prefix=${prefix}" |
---|
| 148 | fi |
---|
[64c6d1] | 149 | |
---|
| 150 | # expand exec_prefix |
---|
| 151 | if test "x$exec_prefix" = xNONE; then |
---|
[fe40293] | 152 | exec_prefix=${prefix}/${ac_cv_singuname} |
---|
| 153 | ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}" |
---|
[6afd7c] | 154 | fi |
---|
| 155 | |
---|
[64c6d1] | 156 | # expand bindir |
---|
[73e491] | 157 | if test "x$bindir" = 'x${exec_prefix}/bin'; then |
---|
[dcc635] | 158 | bindir="${exec_prefix}" |
---|
[73e491] | 159 | ac_configure_args="$ac_configure_args --bindir=${bindir}" |
---|
| 160 | fi |
---|
[64c6d1] | 161 | |
---|
| 162 | # expand libdir |
---|
[73e491] | 163 | if test "x$libdir" = 'x${exec_prefix}/lib'; then |
---|
[dcc635] | 164 | libdir="${exec_prefix}/lib" |
---|
[73e491] | 165 | ac_configure_args="$ac_configure_args --libdir=${libdir}" |
---|
| 166 | fi |
---|
[64c6d1] | 167 | |
---|
| 168 | # expand includedir |
---|
[73e491] | 169 | if test "x$includedir" = 'x${prefix}/include'; then |
---|
[dcc635] | 170 | includedir="${exec_prefix}/include" |
---|
[73e491] | 171 | ac_configure_args="$ac_configure_args --includedir=${includedir}" |
---|
| 172 | fi |
---|
| 173 | |
---|
[9bc556] | 174 | # construct name of installed Singular executable |
---|
[ef0124] | 175 | SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION} |
---|
[9bc556] | 176 | export SINGULAR |
---|
| 177 | AC_SUBST(SINGULAR) |
---|
[64c6d1] | 178 | |
---|
[73e491] | 179 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[a23686] | 180 | dnl Check for various libraries and headers |
---|
[73e491] | 181 | dnl |
---|
| 182 | dnl After this part, the variables 'ac_<package>_ok' is 'yes' |
---|
| 183 | dnl if '<package>' is already existent on the system, otherwise |
---|
| 184 | dnl undefined. |
---|
| 185 | dnl |
---|
| 186 | |
---|
| 187 | # add -I to CPPFLAGS and -L to LDFLAGS, just to be sure |
---|
[64c6d1] | 188 | LDFLAGS="-L${libdir} ${LDFLAGS}" |
---|
| 189 | CPPFLAGS="-I${includedir} ${CPPFLAGS}" |
---|
[6afd7c] | 190 | |
---|
[73e491] | 191 | # check for AIX |
---|
[dc32d42] | 192 | AC_MSG_CHECKING(whether _AIX is defined) |
---|
| 193 | AC_CACHE_VAL(ac_cv_is_aix, |
---|
| 194 | AC_EGREP_CPP(yes, |
---|
| 195 | [#ifdef _AIX |
---|
| 196 | yes |
---|
| 197 | #endif |
---|
| 198 | ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) |
---|
| 199 | if test "$ac_cv_is_aix" = yes; then |
---|
| 200 | AC_MSG_RESULT(yes) |
---|
| 201 | else |
---|
| 202 | AC_MSG_RESULT(no) |
---|
| 203 | fi |
---|
[6afd7c] | 204 | |
---|
| 205 | AC_CHECK_LIB(m, atof) |
---|
[4dea87] | 206 | AC_CHECK_LIB(bsd, socket) |
---|
| 207 | AC_CHECK_LIB(socket, listen) |
---|
| 208 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
[a70441f] | 209 | AC_CHECK_LIB(gmp, main) |
---|
[6afd7c] | 210 | AC_CHECK_LIB(MP, IMP_PutGmpInt) |
---|
| 211 | AC_CHECK_LIB(MPT, MPT_GetTree) |
---|
| 212 | AC_CHECK_LIB(singcf, atof) |
---|
| 213 | AC_CHECK_LIB(singfac, atof) |
---|
[c232af] | 214 | AC_CHECK_LIB(omalloc, omTestAddr) |
---|
| 215 | AC_CHECK_LIB(omalloc_ndebug, main) |
---|
[6afd7c] | 216 | |
---|
[25ed91] | 217 | AC_CHECK_HEADERS(gmp.h MP.h MPT.h factory.h factor.h omalloc.h) |
---|
[6afd7c] | 218 | |
---|
[a70441f] | 219 | if test "$ac_cv_lib_gmp_main" = yes && \ |
---|
[6afd7c] | 220 | test "$ac_cv_header_gmp_h" = yes; then |
---|
[73e491] | 221 | ac_gmp_ok=yes |
---|
[6afd7c] | 222 | fi |
---|
| 223 | |
---|
| 224 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
| 225 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
| 226 | test "$ac_cv_header_MP_h" = yes && \ |
---|
| 227 | test "$ac_cv_header_MPT_h" = yes; then |
---|
| 228 | ac_MP_ok=yes |
---|
| 229 | fi |
---|
| 230 | |
---|
[4c001a] | 231 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
[6afd7c] | 232 | test "$ac_cv_header_factory_h" = yes; then |
---|
| 233 | ac_factory_ok=yes |
---|
| 234 | fi |
---|
| 235 | |
---|
[4c001a] | 236 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
[6afd7c] | 237 | test "$ac_cv_header_factor_h" = yes; then |
---|
| 238 | ac_libfac_ok=yes |
---|
| 239 | fi |
---|
| 240 | |
---|
[c232af] | 241 | if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \ |
---|
| 242 | test "$ac_cv_lib_omalloc_ndebug_main" = yes && \ |
---|
| 243 | test "$ac_cv_header_omalloc_c" = yes && \ |
---|
| 244 | test "$ac_cv_header_omalloc_h" = yes; then |
---|
| 245 | ac_cv_omalloc_ok=yes |
---|
| 246 | fi |
---|
[6afd7c] | 247 | |
---|
| 248 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[a23686] | 249 | dnl Check command line arguments |
---|
[6afd7c] | 250 | dnl |
---|
[9177e3] | 251 | |
---|
| 252 | DOC2TEX_EXAMPLE_EXCLUSIONS="" |
---|
| 253 | AC_SUBST(DOC2TEX_EXAMPLE_EXCLUSIONS) |
---|
| 254 | |
---|
[f36635] | 255 | AC_ARG_WITH(tmpdir, \ |
---|
| 256 | [ --with-tmpdir=DIR use DIR as temporary directory]) |
---|
[25ed91] | 257 | AC_ARG_ENABLE(omalloc, \ |
---|
[aac46c] | 258 | [ --enable-PACKAGE configure and/or build PACKAGE |
---|
| 259 | --disable-PACKAGE do not configure and/or build PACKAGE |
---|
[64c6d1] | 260 | where PACKAGE can be: |
---|
[25ed91] | 261 | omalloc omalloc memory managment]) |
---|
[64c6d1] | 262 | AC_ARG_ENABLE(gmp, \ |
---|
| 263 | [ gmp Gnu Multiple Precision package]) |
---|
[6afd7c] | 264 | AC_ARG_ENABLE(MP, \ |
---|
| 265 | [ MP Multi Protocol library]) |
---|
| 266 | AC_ARG_ENABLE(factory, \ |
---|
| 267 | [ factory polynomial factorization library]) |
---|
| 268 | AC_ARG_ENABLE(libfac, \ |
---|
| 269 | [ libfac char set and modp poly factorization library]) |
---|
[a04715] | 270 | AC_ARG_ENABLE(sgroup, \ |
---|
| 271 | [ sgroup numerical semigroup computations]) |
---|
[6afd7c] | 272 | AC_ARG_ENABLE(Singular, \ |
---|
[64c6d1] | 273 | [ Singular CAS for Polynomial Computations]) |
---|
[181d6e] | 274 | AC_ARG_ENABLE(IntegerProgramming, \ |
---|
| 275 | [ IntegerProgramming IntegerProgramming]) |
---|
[08b7a76] | 276 | AC_ARG_ENABLE(Plural, \ |
---|
| 277 | [ Plural Plural]) |
---|
[f36635] | 278 | AC_ARG_ENABLE(Texinfo, \ |
---|
| 279 | [ Texinfo Texinfo for info, texi2dvi, makeinfo]) |
---|
[aac46c] | 280 | AC_ARG_ENABLE(Texi2html, \ |
---|
| 281 | [ Texi2html Texinfo to HTML converter]) |
---|
| 282 | AC_ARG_ENABLE(doc, \ |
---|
| 283 | [ doc Singular documentation]) |
---|
| 284 | AC_ARG_ENABLE(emacs, \ |
---|
| 285 | [ emacs emacs completion files]) |
---|
[78364c] | 286 | AC_ARG_WITH(MP,\ |
---|
| 287 | [ --with-PACKAGE use PACKAGE, provide dependent functionality |
---|
| 288 | --without-PACKAGE do not use PACKAGE, disable dependent functionality |
---|
[64c6d1] | 289 | where PACKAGE can be: |
---|
[9f226d] | 290 | MP Multi Protocol library]) |
---|
[78364c] | 291 | AC_ARG_WITH(factory, \ |
---|
| 292 | [ factory polynomial factorization library]) |
---|
| 293 | AC_ARG_WITH(libfac, \ |
---|
| 294 | [ libfac char set and modp poly factorization library]) |
---|
| 295 | AC_ARG_WITH(gmp, \ |
---|
| 296 | [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic |
---|
[25ed91] | 297 | where PACKAGE can be gmp |
---|
[9bc556] | 298 | All additional --enable and --with options are passed to subsequent calls |
---|
| 299 | to configure of the packages to be built. See also configure --help in |
---|
| 300 | these packages (resp. subdirs). ]) |
---|
[64c6d1] | 301 | |
---|
[f36635] | 302 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 303 | dnl Check what to use as tmp dir |
---|
| 304 | dnl |
---|
| 305 | AC_MSG_CHECKING(which tmp dir to use) |
---|
| 306 | if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then |
---|
| 307 | if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1) |
---|
| 308 | then |
---|
[8f659dc] | 309 | TMP_DIR="${pwd}/tmp" |
---|
[f36635] | 310 | else |
---|
| 311 | TMP_DIR=${with_tmpdir} |
---|
| 312 | fi |
---|
| 313 | else |
---|
[8f659dc] | 314 | TMP_DIR="${pwd}/tmp" |
---|
[f36635] | 315 | fi |
---|
| 316 | AC_MSG_RESULT($TMP_DIR) |
---|
| 317 | AC_SUBST(TMP_DIR) |
---|
| 318 | |
---|
[a23686] | 319 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 320 | dnl Check whether or not to configure and build various packages |
---|
| 321 | dnl |
---|
[c232af] | 322 | AC_MSG_CHECKING(whether to configure and build omalloc) |
---|
| 323 | if test "${enable_omalloc+set}" != set; then |
---|
| 324 | if test "$ac_cv_omalloc_ok" = yes; then |
---|
| 325 | enable_omalloc=no |
---|
| 326 | fi |
---|
| 327 | enable_omalloc_not_set=yes |
---|
| 328 | fi |
---|
| 329 | if test "$enable_omalloc" = no; then |
---|
| 330 | if test "$ac_cv_omalloc_ok" != yes; then |
---|
| 331 | AC_MSG_ERROR(can not build without omalloc) |
---|
| 332 | fi |
---|
| 333 | AC_MSG_RESULT(no) |
---|
| 334 | else |
---|
| 335 | if test -d omalloc; then |
---|
| 336 | AC_MSG_RESULT(yes) |
---|
| 337 | if test "$enable_omalloc_not_set" = yes; then |
---|
[efbf54] | 338 | ac_configure_args="$ac_configure_args --enable-omalloc --with-external-config_h='$pwd/Singular/omSingularConfig.h' --with-track-custom" |
---|
[c232af] | 339 | fi |
---|
| 340 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS omalloc" |
---|
[25ed91] | 341 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS omalloc" |
---|
[995ba8] | 342 | if test "${with_malloc+set}" != set; then |
---|
| 343 | case "$ac_cv_singuname" in |
---|
| 344 | # under windows, it is best to use the provided malloc |
---|
| 345 | ix86-Win*) |
---|
| 346 | with_malloc=system |
---|
| 347 | ac_configure_args="$ac_configure_args --with-malloc=system" |
---|
| 348 | ;; |
---|
[26ec6d] | 349 | PowerMacintosh-darwin*) |
---|
| 350 | with_malloc=system |
---|
| 351 | ac_configure_args="$ac_configure_args --with-malloc=system" |
---|
| 352 | ;; |
---|
[995ba8] | 353 | esac |
---|
| 354 | fi |
---|
[c232af] | 355 | else |
---|
| 356 | AC_MSG_ERROR(need omalloc subdir) |
---|
| 357 | fi |
---|
| 358 | fi |
---|
[f36635] | 359 | |
---|
[64c6d1] | 360 | AC_MSG_CHECKING(whether to configure and build gmp lib) |
---|
| 361 | if test "$enable_gmp" != yes && test "$enable_gmp" != no; then |
---|
| 362 | if test "$ac_gmp_ok" != yes && test -d gmp; then |
---|
| 363 | AC_MSG_RESULT(yes) |
---|
| 364 | enable_gmp=yes |
---|
| 365 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
[25ed91] | 366 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp" |
---|
[64c6d1] | 367 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
[0319b3] | 368 | enable_gmp=yes |
---|
[b920d1] | 369 | # This we used to need for our patched version of gmp 2.x |
---|
[5e5db8] | 370 | # OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
[64c6d1] | 371 | else |
---|
| 372 | AC_MSG_RESULT(no) |
---|
| 373 | enable_gmp=no |
---|
| 374 | fi |
---|
| 375 | elif test "$enable_gmp" = yes; then |
---|
| 376 | if test ! -d gmp; then |
---|
| 377 | AC_MSG_RESULT(no) |
---|
| 378 | AC_MSG_ERROR(Can not find gmp subdir) |
---|
| 379 | else |
---|
| 380 | AC_MSG_RESULT(yes) |
---|
| 381 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
[25ed91] | 382 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp" |
---|
[b920d1] | 383 | # This we used to need for our patched version of gmp 2.x |
---|
[5e5db8] | 384 | # OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
[64c6d1] | 385 | fi |
---|
| 386 | else |
---|
| 387 | AC_MSG_RESULT(no) |
---|
| 388 | fi |
---|
[78364c] | 389 | |
---|
[03f074] | 390 | if test "$enable_gmp" = yes; then |
---|
[b920d1] | 391 | # for gmp-3.0 to work for all ix86 processors, set generic target |
---|
| 392 | if test "$target" = NONE; then |
---|
| 393 | case "$ac_cv_singuname" in |
---|
| 394 | ix86*) |
---|
| 395 | gmp_target=`./config.guess | sed 's/^\w*-/i386-/'` |
---|
| 396 | ac_configure_args="$ac_configure_args --target=$gmp_target" |
---|
| 397 | ;; |
---|
| 398 | esac |
---|
| 399 | fi |
---|
[03f074] | 400 | # furthermore, disable building of dynamic libraries, for we want to |
---|
| 401 | # link against the static ones |
---|
| 402 | if test "$enable_shared" != no; then |
---|
| 403 | ac_configure_args="$ac_configure_args --disable-shared" |
---|
| 404 | fi |
---|
[b920d1] | 405 | fi |
---|
| 406 | |
---|
[25ed91] | 407 | # Check whether we have gmp |
---|
| 408 | if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then |
---|
| 409 | AC_MSG_ERROR(can neither find nor built gmp) |
---|
[64c6d1] | 410 | fi |
---|
| 411 | |
---|
| 412 | # Check whether we need to cheat subsequent configures with --enable-gmp |
---|
[25ed91] | 413 | if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then |
---|
[78364c] | 414 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
[6afd7c] | 415 | fi |
---|
| 416 | |
---|
[2f7cc5] | 417 | #AC_MSG_CHECKING(whether to configure and build MP lib) |
---|
| 418 | # requires: sizeof(long)==4 |
---|
| 419 | AC_CHECK_SIZEOF(long,4) |
---|
| 420 | if test "$ac_cv_sizeof_long" != 4; then |
---|
| 421 | with_MP=no |
---|
| 422 | fi |
---|
| 423 | |
---|
[6afd7c] | 424 | AC_MSG_CHECKING(whether to configure and build MP lib) |
---|
[2f7cc5] | 425 | |
---|
[6afd7c] | 426 | if test "$enable_MP" != yes && test "$enable_MP" != no; then |
---|
[64c6d1] | 427 | if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \ |
---|
| 428 | (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then |
---|
| 429 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 430 | enable_MP=yes |
---|
[64c6d1] | 431 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
[25ed91] | 432 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP" |
---|
[64c6d1] | 433 | ac_configure_args="$ac_configure_args --enable-MP" |
---|
[6afd7c] | 434 | else |
---|
[64c6d1] | 435 | AC_MSG_RESULT(no) |
---|
[6afd7c] | 436 | enable_MP=no |
---|
| 437 | fi |
---|
[64c6d1] | 438 | elif test "$enable_MP" = yes; then |
---|
| 439 | if test ! -d MP; then |
---|
| 440 | AC_MSG_RESULT(no) |
---|
| 441 | AC_MSG_ERROR(can not build MP without MP directory) |
---|
| 442 | fi |
---|
| 443 | if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then |
---|
[dc32d42] | 444 | AC_MSG_RESULT(yes) |
---|
| 445 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
[25ed91] | 446 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP" |
---|
[dc32d42] | 447 | else |
---|
| 448 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 449 | AC_MSG_ERROR(can not build MP without gmp) |
---|
[dc32d42] | 450 | fi |
---|
[6afd7c] | 451 | else |
---|
| 452 | AC_MSG_RESULT(no) |
---|
| 453 | fi |
---|
[c232af] | 454 | |
---|
[70afd2] | 455 | # need MP code to be compiled with -fPIC, should not hurt anybody else |
---|
| 456 | if test "$enable_MP" = yes && test "${with_extra_cflags+set}" != set; then |
---|
| 457 | ac_configure_args="$ac_configure_args --with-extra_cflags=-fPIC" |
---|
| 458 | fi |
---|
| 459 | |
---|
[4d7834] | 460 | AC_MSG_CHECKING(whether to configure and build NTL lib) |
---|
| 461 | if test "$enable_NTL" != yes && test "$enable_NTL" != no; then |
---|
| 462 | if test "$with_NTL" != no && test "$ac_NTL_ok" != yes && \ |
---|
| 463 | test -d ntl; then |
---|
| 464 | enable_NTL=yes |
---|
| 465 | AC_MSG_RESULT(yes) |
---|
| 466 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl" |
---|
[25ed91] | 467 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl" |
---|
[4d7834] | 468 | ac_configure_args="$ac_configure_args --enable-NTL" |
---|
[9f738e4] | 469 | AC_LANG_CPLUSPLUS |
---|
| 470 | AC_CHECK_HEADERS(iostream.h iostream) |
---|
| 471 | AC_LANG_RESTORE |
---|
[4d7834] | 472 | else |
---|
| 473 | enable_NTL=no |
---|
| 474 | AC_MSG_RESULT(no) |
---|
| 475 | fi |
---|
| 476 | elif test "$enable_NTL" = yes; then |
---|
| 477 | if test -d ntl; then |
---|
| 478 | AC_MSG_RESULT(yes) |
---|
| 479 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl" |
---|
[25ed91] | 480 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl" |
---|
[4d7834] | 481 | else |
---|
| 482 | AC_MSG_RESULT(no) |
---|
| 483 | AC_MSG_ERROR(can not build NTL without ntl directory) |
---|
| 484 | fi |
---|
| 485 | else |
---|
| 486 | AC_MSG_RESULT(no) |
---|
| 487 | fi |
---|
[70afd2] | 488 | |
---|
[6afd7c] | 489 | AC_MSG_CHECKING(whether to configure and build factory lib) |
---|
| 490 | if test "$enable_factory" != yes && test "$enable_factory" != no; then |
---|
[64c6d1] | 491 | if test "$with_factory" != no && test "$ac_factory_ok" != yes && \ |
---|
| 492 | test -d factory; then |
---|
[6afd7c] | 493 | enable_factory=yes |
---|
[64c6d1] | 494 | AC_MSG_RESULT(yes) |
---|
| 495 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
[25ed91] | 496 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory" |
---|
[64c6d1] | 497 | ac_configure_args="$ac_configure_args --enable-factory" |
---|
[6afd7c] | 498 | else |
---|
| 499 | enable_factory=no |
---|
[64c6d1] | 500 | AC_MSG_RESULT(no) |
---|
[6afd7c] | 501 | fi |
---|
[64c6d1] | 502 | elif test "$enable_factory" = yes; then |
---|
| 503 | if test -d factory; then |
---|
[78364c] | 504 | AC_MSG_RESULT(yes) |
---|
| 505 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
[25ed91] | 506 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory" |
---|
[dc32d42] | 507 | else |
---|
| 508 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 509 | AC_MSG_ERROR(can not build factory without factory directory) |
---|
[dc32d42] | 510 | fi |
---|
[6afd7c] | 511 | else |
---|
| 512 | AC_MSG_RESULT(no) |
---|
| 513 | fi |
---|
| 514 | |
---|
| 515 | AC_MSG_CHECKING(whether to configure and build libfac lib) |
---|
| 516 | if test "$enable_libfac" != yes && test "$enable_libfac" != no; then |
---|
[64c6d1] | 517 | if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \ |
---|
| 518 | test -d libfac && \ |
---|
| 519 | (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then |
---|
[6afd7c] | 520 | enable_libfac=yes |
---|
[64c6d1] | 521 | AC_MSG_RESULT(yes) |
---|
| 522 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
[25ed91] | 523 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac" |
---|
[64c6d1] | 524 | ac_configure_args="$ac_configure_args --enable-libfac" |
---|
[6afd7c] | 525 | else |
---|
| 526 | enable_libfac=no |
---|
[64c6d1] | 527 | AC_MSG_RESULT(no) |
---|
| 528 | fi |
---|
| 529 | elif test "$enable_libfac" = yes; then |
---|
| 530 | if test ! -d libfac; then |
---|
| 531 | AC_MSG_RESULT(no) |
---|
| 532 | AC_MSG_ERROR(can not build libfac without libfac directory) |
---|
[6afd7c] | 533 | fi |
---|
[dc32d42] | 534 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[64c6d1] | 535 | AC_MSG_RESULT(yes) |
---|
| 536 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
[25ed91] | 537 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac" |
---|
[dc32d42] | 538 | else |
---|
| 539 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 540 | AC_MSG_ERROR(Can not build libfac without factory) |
---|
[dc32d42] | 541 | fi |
---|
[6afd7c] | 542 | else |
---|
| 543 | AC_MSG_RESULT(no) |
---|
| 544 | fi |
---|
| 545 | |
---|
[64c6d1] | 546 | AC_MSG_CHECKING(whether to configure and build sgroup lib) |
---|
[91ee87] | 547 | dnl |
---|
| 548 | dnl only sgroup if explicietely requested |
---|
| 549 | dnl if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then |
---|
| 550 | dnl if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \ |
---|
| 551 | dnl test -d sgroup && \ |
---|
| 552 | dnl (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
| 553 | dnl enable_sgroup=yes |
---|
| 554 | dnl AC_MSG_RESULT(yes) |
---|
| 555 | dnl CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
| 556 | dnl ac_configure_args="$ac_configure_args --enable-sgroup" |
---|
| 557 | dnl else |
---|
| 558 | dnl enable_sgroup=no |
---|
| 559 | dnl AC_MSG_RESULT(no) |
---|
| 560 | dnl fi |
---|
| 561 | dnl elif test "$enable_sgroup" = yes; then |
---|
| 562 | if test "$enable_sgroup" = yes; then |
---|
[64c6d1] | 563 | if test ! -d sgroup; then |
---|
| 564 | AC_MSG_RESULT(no) |
---|
| 565 | AC_MSG_ERROR(can not build sgroup without sgroup directory) |
---|
| 566 | fi |
---|
| 567 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
| 568 | AC_MSG_RESULT(yes) |
---|
| 569 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
[25ed91] | 570 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS sgroup" |
---|
[64c6d1] | 571 | else |
---|
| 572 | AC_MSG_RESULT(no) |
---|
| 573 | AC_MSG_ERROR(Can not build sgroup without MP) |
---|
[a04715] | 574 | fi |
---|
| 575 | else |
---|
| 576 | AC_MSG_RESULT(no) |
---|
| 577 | fi |
---|
| 578 | |
---|
[aac46c] | 579 | BUILD_SUBDIRS="$CONFIG_SUBDIRS" |
---|
| 580 | |
---|
[6afd7c] | 581 | AC_MSG_CHECKING(whether to configure and build Singular) |
---|
| 582 | if test "$enable_Singular" != yes && test "$enable_Singular" != no; then |
---|
[64c6d1] | 583 | if test "$with_Singular" != no && test -d Singular; then |
---|
[6afd7c] | 584 | enable_Singular=yes |
---|
[64c6d1] | 585 | AC_MSG_RESULT(yes) |
---|
| 586 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
[b2b47c] | 587 | BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular" |
---|
[25ed91] | 588 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular" |
---|
[64c6d1] | 589 | ac_configure_args="$ac_configure_args --enable-Singular" |
---|
[6afd7c] | 590 | else |
---|
| 591 | enable_Singular=no |
---|
[64c6d1] | 592 | AC_MSG_RESULT(no) |
---|
| 593 | fi |
---|
| 594 | elif test "$enable_Singular" = yes; then |
---|
| 595 | if test -d Singular; then |
---|
| 596 | AC_MSG_RESULT(yes) |
---|
| 597 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
[690e864] | 598 | BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular" |
---|
[25ed91] | 599 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular" |
---|
[64c6d1] | 600 | else |
---|
| 601 | AC_MSG_RESULT(no) |
---|
| 602 | AC_MSG_ERROR(can not build Singular without Singular directory) |
---|
[6afd7c] | 603 | fi |
---|
| 604 | else |
---|
| 605 | AC_MSG_RESULT(no) |
---|
| 606 | fi |
---|
| 607 | |
---|
[181d6e] | 608 | |
---|
| 609 | # test if IntegerProgramming should be built: |
---|
| 610 | |
---|
| 611 | AC_MSG_CHECKING(whether to build IntegerProgramming) |
---|
| 612 | if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then |
---|
| 613 | BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming" |
---|
[aee329b] | 614 | BUILD1_SUBDIRS="$BUILD1_SUBDIRS IntegerProgramming" |
---|
[181d6e] | 615 | AC_MSG_RESULT(yes) |
---|
| 616 | if test "$enable_IntegerProgramming" != yes; then |
---|
| 617 | ac_configure_args="$ac_configure_args --enable-IntegerProgramming" |
---|
| 618 | fi |
---|
| 619 | else |
---|
| 620 | AC_MSG_RESULT(no) |
---|
| 621 | fi |
---|
| 622 | |
---|
[08b7a76] | 623 | AC_MSG_CHECKING(whether to build Plural) |
---|
[bd63e0] | 624 | if test "$enable_Plural" != no || test "$with_Plural" != no; then |
---|
[08b7a76] | 625 | AC_MSG_RESULT(yes) |
---|
| 626 | if test "$enable_Plural" != yes; then |
---|
| 627 | ac_configure_args="$ac_configure_args --enable-Plural" |
---|
| 628 | fi |
---|
| 629 | else |
---|
| 630 | AC_MSG_RESULT(no) |
---|
| 631 | fi |
---|
| 632 | |
---|
[181d6e] | 633 | |
---|
[aac46c] | 634 | AC_MSG_CHECKING(whether to configure and build Texinfo) |
---|
| 635 | if test "$enable_Texinfo" != no && test -d Texinfo; then |
---|
| 636 | AC_MSG_RESULT(yes) |
---|
| 637 | enable_texinfo=yes |
---|
| 638 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo" |
---|
| 639 | BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo" |
---|
[175c56] | 640 | TEXI2PDF=${bindir}/texi2pdf |
---|
[181d6e] | 641 | MAKEINFO="${bindir}/makeinfo" |
---|
[aac46c] | 642 | TEXINDEX=${bindir}/texindex |
---|
[175c56] | 643 | AC_SUBST(TEXI2PDF) |
---|
[aac46c] | 644 | AC_SUBST(MAKEINFO) |
---|
| 645 | AC_SUBST(TEXINDEX) |
---|
| 646 | if test "$enable_Texinfo" != yes; then |
---|
| 647 | ac_configure_args="$ac_configure_args --enable-Texinfo" |
---|
| 648 | fi |
---|
| 649 | else |
---|
| 650 | AC_MSG_RESULT(no) |
---|
| 651 | AC_MSG_WARN(Building of doc might fail. Need Texinfo) |
---|
| 652 | enable_texinfo=no |
---|
| 653 | AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ${pwd}/warn_not_found.sh makeinfo) |
---|
| 654 | AC_CHECK_PROG(TEXINDEX, texindex, texindex, ${pwd}/warn_not_found.sh texindex) |
---|
[175c56] | 655 | AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, ${pwd}/warn_not_found.sh texi2pdf) |
---|
[aac46c] | 656 | fi |
---|
| 657 | |
---|
[d16193] | 658 | AC_MSG_CHECKING(whether to configure and build Texi2html) |
---|
[aac46c] | 659 | if test "$enable_Texi2html" != no && test -d Texi2html; then |
---|
| 660 | AC_MSG_RESULT(yes) |
---|
[d16193] | 661 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html" |
---|
[aac46c] | 662 | BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html" |
---|
| 663 | if test "$enable_Texi2html" != yes; then |
---|
| 664 | ac_configure_args="$ac_configure_args --enable-Texi2html" |
---|
| 665 | fi |
---|
[d16193] | 666 | TEXI2HTML=${bindir}/texi2html |
---|
| 667 | AC_SUBST(TEXI2HTML) |
---|
[aac46c] | 668 | else |
---|
| 669 | AC_MSG_RESULT(no) |
---|
[d16193] | 670 | AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html) |
---|
[aac46c] | 671 | fi |
---|
| 672 | |
---|
[575b64] | 673 | if test "${UUDECODE+set}" != set; then |
---|
| 674 | AC_MSG_WARN(uudecode not found. HTML doc generation will fail) |
---|
| 675 | fi |
---|
[d16193] | 676 | if test "${TEXI2HTML+set}" != set; then |
---|
| 677 | AC_MSG_WARN(texi2html not found. HTML doc generation will fail) |
---|
| 678 | fi |
---|
| 679 | if test "$ac_cv_prog_LATEX2HTML" = latex2html; then |
---|
| 680 | TEXI2HTML_OPTS="-l2h" |
---|
| 681 | fi |
---|
| 682 | AC_SUBST(TEXI2HTML_OPTS) |
---|
| 683 | |
---|
| 684 | |
---|
[aac46c] | 685 | AC_MSG_CHECKING(whether to build doc) |
---|
| 686 | if test "$enable_doc" != no && test -d doc; then |
---|
| 687 | AC_MSG_RESULT(yes) |
---|
| 688 | BUILD_SUBDIRS="$BUILD_SUBDIRS doc" |
---|
| 689 | if test "$enable_doc" != yes; then |
---|
| 690 | enable_doc=yes |
---|
| 691 | ac_configure_args="$ac_configure_args --enable-doc" |
---|
| 692 | fi |
---|
| 693 | else |
---|
| 694 | enable_doc=no |
---|
| 695 | AC_MSG_RESULT(no) |
---|
| 696 | fi |
---|
| 697 | |
---|
| 698 | AC_MSG_CHECKING(whether to build emacs) |
---|
| 699 | if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then |
---|
| 700 | AC_MSG_RESULT(yes) |
---|
| 701 | BUILD_SUBDIRS="$BUILD_SUBDIRS emacs" |
---|
| 702 | if test "$enable_emacs" != yes; then |
---|
| 703 | ac_configure_args="$ac_configure_args --enable-emacs" |
---|
| 704 | fi |
---|
| 705 | else |
---|
| 706 | AC_MSG_RESULT(no) |
---|
| 707 | fi |
---|
[6afd7c] | 708 | |
---|
| 709 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 710 | dnl Check whether or not to use various packages |
---|
| 711 | dnl |
---|
[a23686] | 712 | AC_MSG_CHECKING(which apint package to use) |
---|
[64c6d1] | 713 | if test "$with_apint" = gmp; then |
---|
| 714 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
| 715 | AC_MSG_RESULT(gmp) |
---|
| 716 | else |
---|
| 717 | AC_MSG_RESULT(none) |
---|
| 718 | AC_MSG_ERROR(can not use with gmp without finding or building it) |
---|
| 719 | fi |
---|
| 720 | elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then |
---|
| 721 | AC_MSG_RESULT(gmp) |
---|
| 722 | ac_configure_args="$ac_configure_args --with-apint=gmp" |
---|
[25ed91] | 723 | else |
---|
| 724 | AC_MSG_ERROR(gmp required) |
---|
[78364c] | 725 | fi |
---|
[6afd7c] | 726 | |
---|
[dc32d42] | 727 | AC_MSG_CHECKING(whether to use with MP) |
---|
[64c6d1] | 728 | if test "$with_MP" = yes; then |
---|
[dc32d42] | 729 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
[64c6d1] | 730 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 731 | else |
---|
[64c6d1] | 732 | AC_MSG_RESULT(none) |
---|
| 733 | AC_MSG_ERROR(can not use with MP without finding or building it) |
---|
[6afd7c] | 734 | fi |
---|
[64c6d1] | 735 | elif test "$with_MP" = no; then |
---|
| 736 | AC_MSG_RESULT(no) |
---|
| 737 | elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
[6afd7c] | 738 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 739 | ac_configure_args="$ac_configure_args --with-MP" |
---|
[6afd7c] | 740 | else |
---|
| 741 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 742 | ac_configure_args="$ac_configure_args --without-MP" |
---|
[9177e3] | 743 | DOC2TEX_EXAMPLE_EXCLUSIONS="$DOC2TEX_EXAMPLE_EXCLUSIONS -exclude MP" |
---|
[78364c] | 744 | fi |
---|
| 745 | |
---|
[dc32d42] | 746 | AC_MSG_CHECKING(whether to use with factory) |
---|
[64c6d1] | 747 | if test "$with_factory" = yes; then |
---|
[dc32d42] | 748 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[64c6d1] | 749 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 750 | else |
---|
[64c6d1] | 751 | AC_MSG_RESULT(none) |
---|
| 752 | AC_MSG_ERROR(can not use with factory without finding or building it) |
---|
[6afd7c] | 753 | fi |
---|
[64c6d1] | 754 | elif test "$with_factory" = no; then |
---|
| 755 | AC_MSG_RESULT(no) |
---|
| 756 | elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
[6afd7c] | 757 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 758 | ac_configure_args="$ac_configure_args --with-factory" |
---|
[6afd7c] | 759 | else |
---|
| 760 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 761 | ac_configure_args="$ac_configure_args --without-factory" |
---|
[6afd7c] | 762 | fi |
---|
[64c6d1] | 763 | |
---|
[dc32d42] | 764 | AC_MSG_CHECKING(whether to use with libfac) |
---|
[64c6d1] | 765 | if test "$with_libfac" = yes; then |
---|
[dc32d42] | 766 | if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
[64c6d1] | 767 | AC_MSG_RESULT(yes) |
---|
[6afd7c] | 768 | else |
---|
[64c6d1] | 769 | AC_MSG_RESULT(none) |
---|
| 770 | AC_MSG_ERROR(can not use with libfac without finding or building it) |
---|
[6afd7c] | 771 | fi |
---|
[64c6d1] | 772 | elif test "$with_libfac" = no; then |
---|
| 773 | AC_MSG_RESULT(no) |
---|
| 774 | elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
[6afd7c] | 775 | AC_MSG_RESULT(yes) |
---|
[64c6d1] | 776 | ac_configure_args="$ac_configure_args --with-libfac" |
---|
[6afd7c] | 777 | else |
---|
| 778 | AC_MSG_RESULT(no) |
---|
[64c6d1] | 779 | ac_configure_args="$ac_configure_args --without-libfac" |
---|
[6afd7c] | 780 | fi |
---|
| 781 | |
---|
[aac46c] | 782 | |
---|
| 783 | |
---|
[dc32d42] | 784 | AC_MSG_CHECKING(whether to use with Singular) |
---|
| 785 | if test "$with_Singular" != no && test "$with_Singular" != yes; then |
---|
[6afd7c] | 786 | if test "$enable_Singular" = yes; then |
---|
[dc32d42] | 787 | with_Singular=yes |
---|
[6afd7c] | 788 | else |
---|
| 789 | with_Singular=no |
---|
| 790 | fi |
---|
[dc32d42] | 791 | ac_configure_args="$ac_configure_args --with-Singular=$with_Singular" |
---|
[6afd7c] | 792 | fi |
---|
[dc32d42] | 793 | |
---|
[6afd7c] | 794 | if test "$with_Singular" != no; then |
---|
| 795 | AC_MSG_RESULT(yes) |
---|
| 796 | else |
---|
| 797 | AC_MSG_RESULT(no) |
---|
| 798 | fi |
---|
| 799 | |
---|
[a23686] | 800 | |
---|
[6afd7c] | 801 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 802 | dnl Check for known subdirs |
---|
| 803 | dnl |
---|
[73e491] | 804 | SUBDIRS="" |
---|
[c232af] | 805 | if test -d omalloc; then |
---|
| 806 | SUBDIRS="$SUBDIRS omalloc" |
---|
| 807 | fi |
---|
[64c6d1] | 808 | if test -d gmp; then |
---|
[73e491] | 809 | SUBDIRS="$SUBDIRS gmp" |
---|
[64c6d1] | 810 | fi |
---|
[6afd7c] | 811 | if test -d MP; then |
---|
| 812 | SUBDIRS="$SUBDIRS MP" |
---|
| 813 | fi |
---|
[4d7834] | 814 | if test -d ntl; then |
---|
| 815 | SUBDIRS="$SUBDIRS ntl" |
---|
| 816 | fi |
---|
[6afd7c] | 817 | if test -d factory; then |
---|
| 818 | SUBDIRS="$SUBDIRS factory" |
---|
| 819 | fi |
---|
| 820 | if test -d libfac; then |
---|
| 821 | SUBDIRS="$SUBDIRS libfac" |
---|
| 822 | fi |
---|
[aac46c] | 823 | if test -d sgroup; then |
---|
| 824 | SUBDIRS="$SUBDIRS sgroup" |
---|
| 825 | fi |
---|
[22e84a] | 826 | if test -d kernel; then |
---|
| 827 | SUBDIRS="$SUBDIRS kernel" |
---|
| 828 | fi |
---|
| 829 | if test -d IntegerProgramming; then |
---|
| 830 | SUBDIRS="$SUBDIRS IntegerProgramming" |
---|
| 831 | fi |
---|
[518752] | 832 | if test -d Singular; then |
---|
| 833 | SUBDIRS="$SUBDIRS Singular" |
---|
| 834 | fi |
---|
[aac46c] | 835 | if test -d Texinfo; then |
---|
| 836 | SUBDIRS="$SUBDIRS Texinfo" |
---|
[6b27cb] | 837 | fi |
---|
| 838 | if test -d Texi2html; then |
---|
| 839 | SUBDIRS="$SUBDIRS Texi2html" |
---|
[460c1e1] | 840 | fi |
---|
[aac46c] | 841 | if test -d doc; then |
---|
| 842 | SUBDIRS="$SUBDIRS doc" |
---|
| 843 | fi |
---|
| 844 | if test -d emacs; then |
---|
| 845 | SUBDIRS="$SUBDIRS emacs" |
---|
| 846 | fi |
---|
[234bc8] | 847 | dnl if test -d rpm; then |
---|
| 848 | dnl SUBDIRS="$SUBDIRS rpm" |
---|
| 849 | dnl fi |
---|
[3c473c] | 850 | if test -d dyn_modules; then |
---|
| 851 | SUBDIRS="$SUBDIRS dyn_modules" |
---|
[99b3777] | 852 | fi |
---|
[3c473c] | 853 | if test -d "dyn_modules"; then |
---|
| 854 | dnl OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" dyn_modules/Makefile" |
---|
| 855 | CONFIG_SUBDIRS=$CONFIG_SUBDIRS" dyn_modules" |
---|
| 856 | BUILD_SUBDIRS=$BUILD_SUBDIRS" dyn_modules" |
---|
[b640fd] | 857 | fi |
---|
[6afd7c] | 858 | |
---|
[051dc7] | 859 | AC_MSG_CHECKING(whether to use libsvd) |
---|
| 860 | if test "$with_svd" = yes; then |
---|
| 861 | AC_MSG_RESULT(yes) |
---|
[3c473c] | 862 | dnl OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" dyn_modules/Makefile" |
---|
[051dc7] | 863 | CONFIG_SUBDIRS=$CONFIG_SUBDIRS" svd" |
---|
| 864 | BUILD_SUBDIRS=$BUILD_SUBDIRS" svd" |
---|
| 865 | else |
---|
| 866 | AC_MSG_RESULT(no) |
---|
| 867 | fi |
---|
| 868 | |
---|
[6afd7c] | 869 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
[73e491] | 870 | dnl Enough -- wrap it up |
---|
[6afd7c] | 871 | dnl |
---|
| 872 | AC_PROG_MAKE_SET |
---|
| 873 | AC_SUBST(SUBDIRS) |
---|
[6b27cb] | 874 | AC_SUBST(BUILD_SUBDIRS) |
---|
[25ed91] | 875 | AC_SUBST(BUILD1_SUBDIRS) |
---|
[6afd7c] | 876 | AC_SUBST(CONFIG_SUBDIRS) |
---|
| 877 | AC_CONFIG_SUBDIRS($CONFIG_SUBDIRS) |
---|
| 878 | |
---|
[8c4748] | 879 | AC_OUTPUT(${OUTPUT_MAKEFILES}) |
---|