[35aab3] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
| 2 | AC_INIT(mmalloc.cc) |
---|
| 3 | AC_CONFIG_HEADER(mod2.h) |
---|
| 4 | |
---|
| 5 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 6 | dnl determine singuname |
---|
| 7 | dnl |
---|
| 8 | |
---|
| 9 | AC_MSG_CHECKING(uname for singular) |
---|
| 10 | AC_CACHE_VAL(ac_cv_singuname, |
---|
| 11 | ac_cv_singuname="unknown" |
---|
| 12 | if test -r "singuname.sh"; then |
---|
| 13 | if (/bin/sh singuname.sh >/dev/null 2>&1) then |
---|
| 14 | ac_cv_singuname=`/bin/sh singuname.sh` |
---|
| 15 | fi |
---|
| 16 | fi |
---|
| 17 | if test "$ac_cv_singuname" = unknown && test -r "../singuname.sh"; then |
---|
| 18 | if (/bin/sh ../singuname.sh >/dev/null 2>&1) then |
---|
| 19 | ac_cv_singuname=`/bin/sh ../singuname.sh` |
---|
| 20 | fi |
---|
| 21 | fi |
---|
| 22 | ) |
---|
| 23 | AC_MSG_RESULT($ac_cv_singuname) |
---|
| 24 | if test "$ac_cv_singuname" = unknown; then |
---|
| 25 | AC_MSG_WARN(Unknown architecture: Check singuname.sh) |
---|
| 26 | ac_cv_singuname="unknown" |
---|
| 27 | fi |
---|
| 28 | AC_DEFINE_UNQUOTED(S_UNAME, "$ac_cv_singuname") |
---|
| 29 | SINGUNAME=$ac_cv_singuname |
---|
| 30 | AC_SUBST(SINGUNAME) |
---|
| 31 | |
---|
| 32 | if test "$ac_cv_singuname" = ix86-Win; then |
---|
| 33 | EXEC_EXT=".exe" |
---|
| 34 | fi |
---|
| 35 | AC_SUBST(EXEC_EXT) |
---|
| 36 | |
---|
| 37 | SING_UNAME=`echo $SINGUNAME | tr '-' '_' ` |
---|
| 38 | AC_SUBST(SING_UNAME) |
---|
| 39 | |
---|
| 40 | # stupid Win programs do not like dots in their pathnames |
---|
| 41 | VERSION_SEP="-" |
---|
| 42 | |
---|
| 43 | dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 44 | dnl version stuff -- should be set in ../configure.in |
---|
| 45 | dnl |
---|
| 46 | dnl here are some defaults |
---|
| 47 | |
---|
| 48 | SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-2} |
---|
| 49 | SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-1} |
---|
| 50 | SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-2} |
---|
| 51 | SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}" |
---|
| 52 | VERSION_DATE=${VERSION_DATE:-"July 2003"} |
---|
| 53 | |
---|
| 54 | dnl pass them on into the Makefiles |
---|
| 55 | AC_SUBST(SINGULAR_VERSION) |
---|
| 56 | AC_SUBST(VERSION_DATE) |
---|
| 57 | AC_SUBST(SINGULAR_MAJOR_VERSION) |
---|
| 58 | AC_SUBST(SINGULAR_MINOR_VERSION) |
---|
| 59 | AC_SUBST(SINGULAR_SUB_VERSION) |
---|
| 60 | AC_DEFINE_UNQUOTED(SINGULAR_MAJOR_VERSION, ${SINGULAR_MAJOR_VERSION}) |
---|
| 61 | AC_DEFINE_UNQUOTED(SINGULAR_MINOR_VERSION, ${SINGULAR_MINOR_VERSION}) |
---|
| 62 | AC_DEFINE_UNQUOTED(SINGULAR_SUB_VERSION, ${SINGULAR_SUB_VERSION}) |
---|
| 63 | AC_DEFINE_UNQUOTED(S_VERSION1, "${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}") |
---|
| 64 | AC_DEFINE_UNQUOTED(S_VERSION2, "${VERSION_DATE}") |
---|
| 65 | AC_DEFINE_UNQUOTED(SINGULAR_SUB_VERSION, ${SINGULAR_SUB_VERSION}) |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 69 | dnl compiler stuff |
---|
| 70 | dnl is needed to check for libs and headers, later on |
---|
| 71 | dnl |
---|
| 72 | dnl we do not want to have "-g -O" for CFLAGS |
---|
| 73 | if test "${CXXFLAGS+set}" != set; then |
---|
| 74 | ac_cxxflags_set=no |
---|
| 75 | CXXFLAGS="-O" |
---|
| 76 | fi |
---|
| 77 | if test "${CFLAGS+set}" != set; then |
---|
| 78 | CFLAGS="-O" |
---|
| 79 | ac_cflags_set=no |
---|
| 80 | fi |
---|
| 81 | |
---|
| 82 | # check whether CXX was set by user as env variable |
---|
| 83 | if test "${CXX+set}" != set; then |
---|
| 84 | ac_cxx_set=no |
---|
| 85 | else |
---|
| 86 | ac_cxx_set=yes |
---|
| 87 | fi |
---|
| 88 | AC_PROG_CC |
---|
| 89 | AC_PROG_CPP |
---|
| 90 | AC_PROG_CXX |
---|
| 91 | AC_PROG_INSTALL |
---|
| 92 | AC_AIX |
---|
| 93 | |
---|
| 94 | # test for gcc-version: gcc2: prefer CC=gcc, CXX=gcc |
---|
| 95 | # gcc3: CC=gcc CXX=g++ |
---|
| 96 | # other: CC=cc CXX=c++ |
---|
| 97 | AC_MSG_CHECKING(gcc version) |
---|
| 98 | AC_CACHE_VAL(ac_cv_c_cpp, |
---|
| 99 | ac_cv_c_cp="unknown" |
---|
| 100 | if test -r "gccversion.sh"; then |
---|
| 101 | ac_cv_c_cpp=`/bin/sh gccversion.sh` |
---|
| 102 | fi |
---|
| 103 | ) |
---|
| 104 | AC_MSG_RESULT($ac_cv_c_cpp) |
---|
| 105 | |
---|
| 106 | # we prefer using gcc for compiling C++ files, provided the user did |
---|
| 107 | # not overwrite it explicitely |
---|
| 108 | if test "${GXX}" = yes && test "${ac_cxx_set}" = no; then |
---|
| 109 | if test "${ac_cv_c_cpp}" = gcc2; then |
---|
| 110 | CXX=gcc |
---|
| 111 | elif test "${ac_cv_c_cpp}" = gcc3; then |
---|
| 112 | CXX=g++ |
---|
| 113 | fi |
---|
| 114 | temp_cflags=${CXXFLAGS} |
---|
| 115 | AC_LANG_SAVE |
---|
| 116 | AC_LANG_CPLUSPLUS |
---|
| 117 | # check whether gcc accepts --no-rtti |
---|
| 118 | AC_MSG_CHECKING(whether gcc accepts --no-rtti) |
---|
| 119 | CXXFLAGS="${CXXFLAGS} --no-rtti" |
---|
| 120 | AC_CACHE_VAL(ac_cv_cxx_have_rtti, |
---|
| 121 | AC_TRY_COMPILE(,,ac_cv_cxx_have_rtti=yes,ac_cv_cxx_have_rtti=no) |
---|
| 122 | ) |
---|
| 123 | AC_MSG_RESULT(${ac_cv_cxx_have_rtti}) |
---|
| 124 | if test "${ac_cv_cxx_have_rtti}" != yes; then |
---|
| 125 | CXXFLAGS=$temp_flags |
---|
| 126 | else |
---|
| 127 | CXX="${CXX} --no-rtti" |
---|
| 128 | fi |
---|
| 129 | |
---|
| 130 | # check whether gcc accepts --no-exceptions |
---|
| 131 | AC_MSG_CHECKING(whether gcc accepts --no-exceptions) |
---|
| 132 | CXXFLAGS="${CXXFLAGS} --no-exceptions" |
---|
| 133 | AC_CACHE_VAL(ac_cv_cxx_have_exceptions, |
---|
| 134 | AC_TRY_LINK(,,ac_cv_cxx_have_exceptions=yes,ac_cv_cxx_have_exceptions=no) |
---|
| 135 | ) |
---|
| 136 | AC_MSG_RESULT(${ac_cv_cxx_have_exceptions}) |
---|
| 137 | if test "${ac_cv_cxx_have_exceptions}" != yes; then |
---|
| 138 | CXXFLAGS=$temp_flags |
---|
| 139 | else |
---|
| 140 | CXX="${CXX} --no-exceptions" |
---|
| 141 | fi |
---|
| 142 | |
---|
| 143 | AC_LANG_RESTORE |
---|
| 144 | CXXFLAGS=$temp_flags |
---|
| 145 | |
---|
| 146 | fi |
---|
| 147 | |
---|
| 148 | # check whether the compiler accepts -pipe |
---|
| 149 | AC_MSG_CHECKING(whether compiler accepts -pipe) |
---|
| 150 | temp_cflags=${CFLAGS} |
---|
| 151 | CFLAGS="${CFLAGS} -pipe" |
---|
| 152 | AC_CACHE_VAL(ac_cv_cxx_have_pipe, |
---|
| 153 | AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no) |
---|
| 154 | ) |
---|
| 155 | AC_MSG_RESULT(${ac_cv_cxx_have_pipe}) |
---|
| 156 | CFLAGS=${temp_cflags} |
---|
| 157 | if test "${ac_cv_cxx_have_pipe}" != yes; then |
---|
| 158 | PIPE= |
---|
| 159 | else |
---|
| 160 | PIPE="-pipe" |
---|
| 161 | fi |
---|
| 162 | AC_SUBST(PIPE) |
---|
| 163 | |
---|
| 164 | # Customize CFLAGS |
---|
| 165 | AC_MSG_CHECKING(whether _AIX is defined) |
---|
| 166 | AC_CACHE_VAL(ac_cv_is_aix, |
---|
| 167 | AC_EGREP_CPP(yes, |
---|
| 168 | [#ifdef _AIX |
---|
| 169 | yes |
---|
| 170 | #endif |
---|
| 171 | ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) |
---|
| 172 | if test "$ac_cv_is_aix" = yes; then |
---|
| 173 | AC_MSG_RESULT(yes) |
---|
| 174 | else |
---|
| 175 | AC_MSG_RESULT(no) |
---|
| 176 | fi |
---|
| 177 | |
---|
| 178 | # we know best when compiling with gcc |
---|
| 179 | if test "${GXX}" = yes; then |
---|
| 180 | if test "$ac_cxxflags_set" = no; then |
---|
| 181 | CXXFLAGS="-O3 -w -fomit-frame-pointer" |
---|
| 182 | fi |
---|
| 183 | CXXTEMPLFLAGS="-fno-implicit-templates" |
---|
| 184 | if test "$ac_cv_is_aix" = yes; then |
---|
| 185 | CXXNOOPTFLAGS="-w" |
---|
| 186 | else |
---|
| 187 | CXXNOOPTFLAGS=$CXXFLAGS |
---|
| 188 | fi |
---|
| 189 | STATIC_LDFLAGS="-static" |
---|
| 190 | else |
---|
| 191 | CXXTEMPFLAGS="" |
---|
| 192 | CXXNOOPTFLAGS=$CXXFLAGS |
---|
| 193 | STATIC_LDFLAGS="" |
---|
| 194 | fi |
---|
| 195 | AC_SUBST(CXXTEMPLFLAGS) |
---|
| 196 | AC_SUBST(CXXNOOPTFLAGS) |
---|
| 197 | AC_SUBST(STATIC_LDFLAGS) |
---|
| 198 | |
---|
| 199 | if test "${GCC}" = yes && test "$ac_cflags_set" = no ; then |
---|
| 200 | CFLAGS="-O3 -w -fomit-frame-pointer" |
---|
| 201 | fi |
---|
| 202 | |
---|
| 203 | AC_PROG_MAKE_SET |
---|
| 204 | |
---|
| 205 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 206 | dnl path stuff |
---|
| 207 | dnl |
---|
| 208 | AC_PREFIX_DEFAULT(`pwd`/..) |
---|
| 209 | |
---|
| 210 | dnl set exec_prefix, bindir, libdir, includedir to some sensible values |
---|
| 211 | dnl if they are not yet already set |
---|
| 212 | |
---|
| 213 | # expand prefix |
---|
| 214 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
| 215 | if test "${with_rootdir+set}" != set; then |
---|
| 216 | AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${prefix}") |
---|
| 217 | else |
---|
| 218 | AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${with_rootdir}") |
---|
| 219 | fi |
---|
| 220 | |
---|
| 221 | # expand exec_prefixad |
---|
| 222 | if test "x$exec_prefix" = xNONE; then |
---|
| 223 | exec_prefix=${prefix}/${ac_cv_singuname} |
---|
| 224 | fi |
---|
| 225 | |
---|
| 226 | # expand bindir |
---|
| 227 | test "x$bindir" = 'x${exec_prefix}/bin' && bindir="${exec_prefix}" |
---|
| 228 | SINGULAR=${SINGULAR:-$bindir/Singular-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION} |
---|
| 229 | AC_SUBST(SINGULAR) |
---|
| 230 | AC_DEFINE_UNQUOTED(S_BIN_DIR, "${bindir}") |
---|
| 231 | |
---|
| 232 | # expand libdir |
---|
| 233 | test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib" |
---|
| 234 | |
---|
| 235 | # expand includedir |
---|
| 236 | test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include" |
---|
| 237 | |
---|
| 238 | # add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure |
---|
| 239 | if test "$ac_cv_c_cpp" = gcc3 ; then |
---|
| 240 | LDFLAGS="-L${libdir} ${LDFLAGS}" |
---|
| 241 | CPPFLAGS="-I${includedir} ${CPPFLAGS}" |
---|
| 242 | else |
---|
| 243 | LDFLAGS="-L${libdir} ${LDFLAGS} -L/usr/local/lib" |
---|
| 244 | CPPFLAGS="-I${includedir} ${CPPFLAGS} -I/usr/local/include" |
---|
| 245 | fi |
---|
| 246 | |
---|
| 247 | # this is a work-around to include the right term.h |
---|
| 248 | if test "$ac_cv_singuname" = SunOS-5; then |
---|
| 249 | CPPFLAGS="-I/usr/xpg4/include ${CPPFLAGS}" |
---|
| 250 | fi |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 254 | dnl Checks for programs. |
---|
| 255 | dnl |
---|
| 256 | |
---|
| 257 | # lex |
---|
| 258 | if test "${with_lex+set}" != set; then |
---|
| 259 | AC_MSG_CHECKING(for flex) |
---|
| 260 | changequote(<<,>>)dnl |
---|
| 261 | cmd="egrep [2-9]\.[5-9]" |
---|
| 262 | changequote([,])dnl |
---|
| 263 | AC_CACHE_VAL(ac_cv_prog_flex, |
---|
| 264 | if (flex --version >/dev/null 2>&1) |
---|
| 265 | then |
---|
| 266 | if (flex --version | $cmd >/dev/null 2>&1 ) |
---|
| 267 | then |
---|
| 268 | ac_cv_prog_flex=flex |
---|
| 269 | fi |
---|
| 270 | fi |
---|
| 271 | ) |
---|
| 272 | dnl changequote([,])dnl |
---|
| 273 | if test "${ac_cv_prog_flex+set}" = set; then |
---|
| 274 | AC_MSG_RESULT(flex) |
---|
| 275 | LEX=flex |
---|
| 276 | AC_SUBST(LEX) |
---|
| 277 | else |
---|
| 278 | AC_MSG_ERROR(can not find flex with version greater 2.4) |
---|
| 279 | fi |
---|
| 280 | elif test "${with_lex}" = no; then |
---|
| 281 | AC_MSG_WARN(building without lex -- make might fail) |
---|
| 282 | else |
---|
| 283 | unset LEX |
---|
| 284 | unset ac_cv_prog_LEX |
---|
| 285 | AC_CHECK_PROGS(LEX, ${with_lex}) |
---|
| 286 | if test "x${LEX}" = x; then |
---|
| 287 | AC_MSG_WARN(building without lex -- make might fail) |
---|
| 288 | fi |
---|
| 289 | fi |
---|
| 290 | |
---|
| 291 | # bison |
---|
| 292 | AC_CHECK_PROGS(BISON, bison) |
---|
| 293 | if test "${BISON+set}" != set; then |
---|
| 294 | AC_MSG_WARN(did not find bison -- make might fail) |
---|
| 295 | fi |
---|
| 296 | |
---|
| 297 | # ln -s |
---|
| 298 | AC_PROG_LN_S |
---|
| 299 | |
---|
| 300 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
| 301 | |
---|
| 302 | dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 303 | dnl check for general libraries, header files, typedefs, etc |
---|
| 304 | dnl |
---|
| 305 | # lib checks |
---|
| 306 | # under cygwin, we should not explicitly link with -lm, except for |
---|
| 307 | # it really is the last thing to link with |
---|
| 308 | if test "$ac_cv_singuname" != ix86-Win; then |
---|
| 309 | AC_CHECK_LIB(m, atof) |
---|
| 310 | fi |
---|
| 311 | SAVE_LIBS=${LIBS} |
---|
| 312 | LIBS= |
---|
| 313 | |
---|
| 314 | dnl I'm not sure what they are for |
---|
| 315 | dnl AC_CHECK_LIB(bsd, socket) |
---|
| 316 | dnl AC_CHECK_LIB(socket, listen) |
---|
| 317 | dnl AC_CHECK_LIB(nsl, gethostbyname) |
---|
| 318 | dnl AC_CHECK_LIB(ucb, index) |
---|
| 319 | dnl MP_LIBS=${LIBS} |
---|
| 320 | # check for dl lib |
---|
| 321 | case "$ac_cv_singuname" in |
---|
| 322 | HPUX*) |
---|
| 323 | AC_CHECK_LIB(dld, shl_load) |
---|
| 324 | if test "$ac_cv_lib_dld_shl_load" = yes; then |
---|
| 325 | LD_DYN_FLAGS="-ldld -Xlinker -E" |
---|
| 326 | SFLAGS="-fpic -fPIC -DPIC" |
---|
| 327 | SLDFLAGS="-fPIC -DPIC -shared" |
---|
| 328 | LD=gcc |
---|
| 329 | ac_lib_dl=yes |
---|
| 330 | fi |
---|
| 331 | ;; |
---|
| 332 | *Linux*) |
---|
| 333 | AC_CHECK_LIB(dl, dlopen) |
---|
| 334 | if test "$ac_cv_lib_dl_dlopen" = yes; then |
---|
| 335 | LD_DYN_FLAGS="-ldl -rdynamic" |
---|
| 336 | SFLAGS="-fpic -DPIC" |
---|
| 337 | SLDFLAGS=-shared |
---|
| 338 | LD=ld |
---|
| 339 | ac_lib_dl=yes |
---|
| 340 | fi |
---|
| 341 | ;; |
---|
| 342 | IRIX-6) |
---|
| 343 | LD_DYN_FLAGS="-lc" |
---|
| 344 | SFLAGS="-fPIC -DPIC" |
---|
| 345 | SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared" |
---|
| 346 | LD=ld |
---|
| 347 | ac_lib_dl=yes |
---|
| 348 | ;; |
---|
| 349 | SunOS-5) |
---|
| 350 | AC_CHECK_LIB(dl, dlopen) |
---|
| 351 | if test "$ac_cv_lib_dl_dlopen" = yes; then |
---|
| 352 | LD_DYN_FLAGS="-ldl -Xlinker -E" |
---|
| 353 | SFLAGS="-fpic -DPIC" |
---|
| 354 | SLDFLAGS=-shared |
---|
| 355 | LD=ld |
---|
| 356 | ac_lib_dl=yes |
---|
| 357 | fi |
---|
| 358 | ;; |
---|
| 359 | esac |
---|
| 360 | AC_SUBST(LD_DYN_FLAGS) |
---|
| 361 | AC_SUBST(SFLAGS) |
---|
| 362 | AC_SUBST(SLDFLAGS) |
---|
| 363 | AC_SUBST(LD) |
---|
| 364 | LIBS=${SAVE_LIBS} |
---|
| 365 | |
---|
| 366 | |
---|
| 367 | # heder file checks |
---|
| 368 | AC_HEADER_STDC |
---|
| 369 | AC_CHECK_HEADERS(limits.h unistd.h,, |
---|
| 370 | AC_MSG_ERROR(Can not compile without limits.h unistd.h)) |
---|
| 371 | |
---|
| 372 | AC_CHECK_HEADERS(sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h \ |
---|
| 373 | sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h \ |
---|
| 374 | termios.h term.h readline/readline.h) |
---|
| 375 | |
---|
| 376 | # typedefs, structures |
---|
| 377 | AC_C_CONST |
---|
| 378 | AC_C_INLINE |
---|
| 379 | AC_TYPE_SIZE_T |
---|
| 380 | AC_STRUCT_TM |
---|
| 381 | AC_HEADER_TIME |
---|
| 382 | |
---|
| 383 | # library functions. |
---|
| 384 | AC_FUNC_ALLOCA |
---|
| 385 | AC_PROG_GCC_TRADITIONAL |
---|
| 386 | AC_FUNC_MMAP |
---|
| 387 | AC_TYPE_SIGNAL |
---|
| 388 | AC_FUNC_VPRINTF |
---|
| 389 | AC_SEARCH_LIBS(setenv, bsd) |
---|
| 390 | AC_CHECK_FUNCS(gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \ |
---|
| 391 | sleep usleep getpwnam popen setenv) |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 395 | dnl Find out more about particularity of the system |
---|
| 396 | dnl |
---|
| 397 | |
---|
| 398 | # arithmetic shifts |
---|
| 399 | AC_MSG_CHECKING(whether your machine has correct arithmetic shifts) |
---|
| 400 | AC_CACHE_VAL(ac_cv_shift, AC_TRY_RUN( |
---|
| 401 | [ int main() { if (-2 >> 1 == -1) exit(0); else exit(1); } ], |
---|
| 402 | ac_cv_shift=yes, |
---|
| 403 | ac_cv_shift=no, |
---|
| 404 | if test "$ac_c_cross_dos" = yes; then |
---|
| 405 | ac_cv_shift=yes; |
---|
| 406 | else |
---|
| 407 | AC_MSG_RESULT(no) |
---|
| 408 | AC_MSG_ERROR(cross compilation without default value) |
---|
| 409 | fi)) |
---|
| 410 | |
---|
| 411 | if test "$ac_cv_shift" = yes; then |
---|
| 412 | AC_MSG_RESULT(yes) |
---|
| 413 | else |
---|
| 414 | AC_MSG_RESULT(no) |
---|
| 415 | AC_MSG_ERROR(need -2 >> 1 == -1) |
---|
| 416 | fi |
---|
| 417 | |
---|
| 418 | |
---|
| 419 | # check for a peculiar constructor initialization |
---|
| 420 | AC_MSG_CHECKING(whether explicit C++ constructor calls are allowed) |
---|
| 421 | AC_LANG_SAVE |
---|
| 422 | AC_LANG_CPLUSPLUS |
---|
| 423 | AC_CACHE_VAL(ac_cv_explicit_const,AC_TRY_COMPILE(, |
---|
| 424 | class testclass |
---|
| 425 | { |
---|
| 426 | public: |
---|
| 427 | int value; |
---|
| 428 | testclass() : value(0) {} |
---|
| 429 | testclass( int i ) : value(i) {} |
---|
| 430 | ~testclass() { value = 0; } |
---|
| 431 | }; |
---|
| 432 | |
---|
| 433 | testclass ptr; |
---|
| 434 | ptr.testclass(1); |
---|
| 435 | , ac_cv_explicit_const=yes, ac_cv_explicit_const=no)) |
---|
| 436 | AC_LANG_RESTORE |
---|
| 437 | AC_MSG_RESULT($ac_cv_explicit_const) |
---|
| 438 | if test "$ac_cv_explicit_const" = yes; then |
---|
| 439 | AC_DEFINE(HAVE_EXPLICIT_CONSTR) |
---|
| 440 | fi |
---|
| 441 | |
---|
| 442 | # sprintf returns number of printed chars |
---|
| 443 | AC_MSG_CHECKING(whether vsprintf returns number of printed chars) |
---|
| 444 | AC_CACHE_VAL(ac_cv_returns_n_of_chars, AC_TRY_RUN( |
---|
| 445 | [#include <stdio.h> |
---|
| 446 | main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }], |
---|
| 447 | ac_cv_returns_n_of_chars=yes, |
---|
| 448 | ac_cv_returns_n_of_chars=no, |
---|
| 449 | ac_cv_returns_n_of_chars=no)) |
---|
| 450 | if test "$ac_cv_returns_n_of_chars" = yes; then |
---|
| 451 | AC_MSG_RESULT(yes) |
---|
| 452 | else |
---|
| 453 | AC_MSG_RESULT(no) |
---|
| 454 | AC_DEFINE(BSD_SPRINTF) |
---|
| 455 | fi |
---|
| 456 | |
---|
| 457 | # determine ALIGN_8 |
---|
| 458 | AC_CHECK_SIZEOF(char,1) |
---|
| 459 | AC_CHECK_SIZEOF(short,2) |
---|
| 460 | AC_CHECK_SIZEOF(int,4) |
---|
| 461 | AC_CHECK_SIZEOF(long,4) |
---|
| 462 | AC_CHECK_SIZEOF(void*,4) |
---|
| 463 | AC_CHECK_SIZEOF(double, 8) |
---|
| 464 | AC_C_BIGENDIAN |
---|
| 465 | if test "$ac_cv_sizeof_int" != 4; then |
---|
| 466 | AC_MSG_ERROR(need int to be four bytes long) |
---|
| 467 | fi |
---|
| 468 | if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then |
---|
| 469 | AC_MSG_ERROR(need equal sizes for long and void*) |
---|
| 470 | fi |
---|
| 471 | if test "$ac_cv_sizeof_double" != 8; then |
---|
| 472 | AC_MSG_ERROR(need double to b 8 bytes long) |
---|
| 473 | fi |
---|
| 474 | if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then |
---|
| 475 | AC_MSG_ERROR(need void* to be 4 or 8 bytes long) |
---|
| 476 | fi |
---|
| 477 | |
---|
| 478 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 479 | dnl help for configure |
---|
| 480 | dnl |
---|
| 481 | AC_ARG_WITH( |
---|
| 482 | rootdir, |
---|
| 483 | [ --with-rootdir=DIR use DIR ass compiled-in root directory |
---|
| 484 | (default is PREFIX)]) |
---|
| 485 | AC_ARG_WITH( |
---|
| 486 | lex, |
---|
| 487 | [ --with-lex=[LEX,no] uses LEX as lex program, default is flex]) |
---|
| 488 | AC_ARG_WITH( |
---|
| 489 | readline, |
---|
| 490 | [ --with-readline=[dynamic,static,no] |
---|
| 491 | do use dynamic/static/no readline for fancy display]) |
---|
| 492 | AC_ARG_WITH( |
---|
| 493 | MP, |
---|
| 494 | [ --without-MP do not use MP (no MP links)]) |
---|
| 495 | AC_ARG_WITH( |
---|
| 496 | dbm, |
---|
| 497 | [ --without-dbm do not use dbm (no DBM links)]) |
---|
| 498 | AC_ARG_WITH( |
---|
| 499 | factory, |
---|
| 500 | [ --without-factory do not use factory (no poly factorization)]) |
---|
| 501 | AC_ARG_WITH( |
---|
| 502 | libfac, |
---|
| 503 | [ --without-libfac do not use libfac (no primary decompositions)]) |
---|
| 504 | AC_ARG_WITH( |
---|
| 505 | namespaces, |
---|
| 506 | [ --with-namespaces do compile namespace support]) |
---|
| 507 | AC_ARG_WITH( |
---|
| 508 | dl, |
---|
| 509 | [ --without-dl do not use dynamic linking, modules, and kernel]) |
---|
| 510 | AC_ARG_WITH( |
---|
| 511 | dynamic-modules, |
---|
| 512 | [ --with-dynamic-modules do compile with dynamic modules support]) |
---|
| 513 | AC_ARG_WITH( |
---|
| 514 | dynamic-kernel, |
---|
| 515 | [ --without-dynamic-kernel |
---|
| 516 | do not compile with dynamic kernel parts]) |
---|
| 517 | AC_ARG_WITH(apint, |
---|
| 518 | [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic]) |
---|
| 519 | AC_ARG_WITH( |
---|
| 520 | Plural, |
---|
| 521 | [ --with-Plural do compile with Plural support]) |
---|
| 522 | AC_ARG_WITH( |
---|
| 523 | NTL, |
---|
| 524 | [ --with-NTL build for use with NTL.], |
---|
| 525 | , |
---|
| 526 | with_NTL=yes) |
---|
| 527 | |
---|
| 528 | dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 529 | dnl check for packages we need |
---|
| 530 | dnl for gmp, MP, factory and libfac, we built them in, even if the libs |
---|
| 531 | dnl and headers were not found under the condition that the respective |
---|
| 532 | dnl --enable argument was given |
---|
| 533 | dnl |
---|
| 534 | |
---|
| 535 | |
---|
| 536 | AC_MSG_CHECKING(whether to use dynamic linking) |
---|
| 537 | if test "$with_dl" != no && test "$ac_lib_dl" = yes; then |
---|
| 538 | AC_DEFINE(HAVE_DL) |
---|
| 539 | ac_have_dl=yes |
---|
| 540 | AC_MSG_RESULT(yes) |
---|
| 541 | else |
---|
| 542 | AC_MSG_RESULT(no) |
---|
| 543 | fi |
---|
| 544 | |
---|
| 545 | AC_CHECK_LIB(ncurses,tgetent,,\ |
---|
| 546 | AC_CHECK_LIB(curses,tgetent,,\ |
---|
| 547 | AC_CHECK_LIB(termcap,tgetent))) |
---|
| 548 | |
---|
| 549 | # readline |
---|
| 550 | if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then |
---|
| 551 | AC_MSG_WARN(can not build dynamic readline without dynamic linking) |
---|
| 552 | with_readline=static |
---|
| 553 | fi |
---|
| 554 | |
---|
| 555 | |
---|
| 556 | if test "$with_readline" != dynamic && test "$with_readline" != no; then |
---|
| 557 | AC_LANG_SAVE |
---|
| 558 | AC_LANG_CPLUSPLUS |
---|
| 559 | AC_CHECK_LIB(readline, rl_abort) |
---|
| 560 | AC_CHECK_HEADERS(readline/readline.h readline/history.h) |
---|
| 561 | if test "$ac_cv_lib_readline_rl_abort" = yes && \ |
---|
| 562 | test "$ac_cv_header_readline_readline_h" = yes; then |
---|
| 563 | AC_MSG_CHECKING(whether readline.h is ok) |
---|
| 564 | AC_CACHE_VAL(ac_cv_header_readline_readline_h_ok, |
---|
| 565 | AC_TRY_LINK( |
---|
| 566 | #include<unistd.h> |
---|
| 567 | #include<stdio.h> |
---|
| 568 | #include<readline/readline.h> |
---|
| 569 | #ifdef HAVE_READLINE_HISTORY_H |
---|
| 570 | #include<readline/history.h> |
---|
| 571 | #endif |
---|
| 572 | , |
---|
| 573 | , |
---|
| 574 | ac_cv_header_readline_readline_h_ok="yes", |
---|
| 575 | ac_cv_header_readline_readline_h_ok="no", |
---|
| 576 | )) |
---|
| 577 | AC_MSG_RESULT($ac_cv_header_readline_readline_h_ok) |
---|
| 578 | if test "$ac_cv_header_readline_readline_h_ok" != yes; then |
---|
| 579 | #not ok -- try once more with explicitly declaring everything |
---|
| 580 | AC_MSG_CHECKING(whether or not we nevertheless can use readline) |
---|
| 581 | AC_CACHE_VAL(ac_cv_have_readline, |
---|
| 582 | AC_TRY_LINK( |
---|
| 583 | #include <stdio.h> |
---|
| 584 | extern "C" |
---|
| 585 | { |
---|
| 586 | extern char * rl_readline_name; |
---|
| 587 | extern char *rl_line_buffer; |
---|
| 588 | char *filename_completion_function(); |
---|
| 589 | typedef char **CPPFunction (); |
---|
| 590 | extern char ** completion_matches (); |
---|
| 591 | extern CPPFunction * rl_attempted_completion_function; |
---|
| 592 | extern FILE * rl_outstream; |
---|
| 593 | char * readline (); |
---|
| 594 | void add_history (); |
---|
| 595 | int write_history (); |
---|
| 596 | int read_history(); |
---|
| 597 | } |
---|
| 598 | #ifndef NULL |
---|
| 599 | #define NULL 0 |
---|
| 600 | #endif |
---|
| 601 | , |
---|
| 602 | rl_readline_name=NULL; |
---|
| 603 | *rl_line_buffer=1; |
---|
| 604 | completion_matches(NULL, filename_completion_function); |
---|
| 605 | rl_attempted_completion_function = (CPPFunction *) NULL; |
---|
| 606 | rl_outstream=NULL; |
---|
| 607 | readline(NULL); |
---|
| 608 | add_history(NULL); |
---|
| 609 | read_history(NULL); |
---|
| 610 | write_history(NULL); |
---|
| 611 | , |
---|
| 612 | ac_cv_have_readline="yes" |
---|
| 613 | , |
---|
| 614 | ac_cv_have_readline="no" |
---|
| 615 | )) |
---|
| 616 | AC_MSG_RESULT($ac_cv_have_readline) |
---|
| 617 | else |
---|
| 618 | AC_DEFINE(READLINE_READLINE_H_OK) |
---|
| 619 | ac_cv_have_readline="yes" |
---|
| 620 | fi |
---|
| 621 | fi |
---|
| 622 | if test "$ac_cv_have_readline" = yes; then |
---|
| 623 | AC_DEFINE(HAVE_READLINE) |
---|
| 624 | fi |
---|
| 625 | AC_LANG_RESTORE |
---|
| 626 | fi |
---|
| 627 | |
---|
| 628 | AC_MSG_CHECKING(which readline to use) |
---|
| 629 | if test "$ac_cv_with_readline" = dynamic; then |
---|
| 630 | AC_MSG_RESULT(dynamic) |
---|
| 631 | AC_DEFINE(HAVE_DYN_RL) |
---|
| 632 | elif test "$ac_cv_have_readline" = yes; then |
---|
| 633 | AC_MSG_RESULT(static) |
---|
| 634 | elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then |
---|
| 635 | AC_MSG_ERROR(building without readline impossible on PowerMacintosh-darwin) |
---|
| 636 | else |
---|
| 637 | AC_MSG_RESULT(none) |
---|
| 638 | AC_MSG_WARN(building without readline: disabling fancy display) |
---|
| 639 | fi |
---|
| 640 | |
---|
| 641 | NEED_LIBS=$LIBS |
---|
| 642 | |
---|
| 643 | # gmp, smallgmp, MP, MPT, factory, libfac |
---|
| 644 | AC_CHECK_LIB(gmp, main) |
---|
| 645 | if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then |
---|
| 646 | LIBS=${NEED_LIBS} |
---|
| 647 | fi |
---|
| 648 | AC_CHECK_LIB(smallgmp, main) |
---|
| 649 | SAVE_LIBS=$LIBS |
---|
| 650 | AC_CHECK_LIB(MP, IMP_PutGmpInt,,,$MP_LIBS) |
---|
| 651 | AC_CHECK_LIB(MPT, MPT_GetTree,,,$MP_LIBS) |
---|
| 652 | LIBS=$SAVE_LIBS |
---|
| 653 | AC_CHECK_LIB(singcf, atof) |
---|
| 654 | AC_CHECK_LIB(singfac, atof) |
---|
| 655 | AC_CHECK_LIB(omalloc, omTestAddr) |
---|
| 656 | AC_CHECK_LIB(omalloc_ndebug, main) |
---|
| 657 | AC_CHECK_LIB(ntl,main) |
---|
| 658 | |
---|
| 659 | AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h MPT.h factory.h factor.h omalloc.h \ |
---|
| 660 | omalloc.c) |
---|
| 661 | |
---|
| 662 | if test "$ac_cv_lib_gmp_main" = yes && \ |
---|
| 663 | test "$ac_cv_header_gmp_h" = yes; then |
---|
| 664 | ac_gmp_ok=yes |
---|
| 665 | fi |
---|
| 666 | |
---|
| 667 | if test "$ac_cv_lib_smallgmp_main" = yes && \ |
---|
| 668 | test "$ac_cv_header_smallgmp_h" = yes && \ |
---|
| 669 | test "$ac_cv_header_gmp_h" = yes; then |
---|
| 670 | ac_smallgmp_ok=yes |
---|
| 671 | fi |
---|
| 672 | |
---|
| 673 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
| 674 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
| 675 | test "$ac_cv_header_MP_h" = yes && \ |
---|
| 676 | test "$ac_cv_header_MPT_h" = yes; then |
---|
| 677 | ac_MP_ok=yes |
---|
| 678 | fi |
---|
| 679 | |
---|
| 680 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
| 681 | test "$ac_cv_header_factory_h" = yes; then |
---|
| 682 | ac_factory_ok=yes |
---|
| 683 | fi |
---|
| 684 | |
---|
| 685 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
| 686 | test "$ac_cv_header_factor_h" = yes; then |
---|
| 687 | ac_libfac_ok=yes |
---|
| 688 | fi |
---|
| 689 | |
---|
| 690 | if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \ |
---|
| 691 | test "$ac_cv_lib_omalloc_ndebug_main" = yes && \ |
---|
| 692 | test "$ac_cv_header_omalloc_c" = yes && \ |
---|
| 693 | test "$ac_cv_header_omalloc_h" = yes; then |
---|
| 694 | ac_cv_omalloc_ok=yes |
---|
| 695 | fi |
---|
| 696 | |
---|
| 697 | if test "$ac_cv_lib_ntl_main" = yes; then |
---|
| 698 | ac_cv_ntl_ok=yes |
---|
| 699 | fi |
---|
| 700 | |
---|
| 701 | # evaluate results |
---|
| 702 | dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
| 703 | dnl make sure that omalloc is there |
---|
| 704 | dnl |
---|
| 705 | if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then |
---|
| 706 | AC_MSG_ERROR(can not build without omalloc) |
---|
| 707 | fi |
---|
| 708 | |
---|
| 709 | AC_MSG_CHECKING(which apint package to use) |
---|
| 710 | if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then |
---|
| 711 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
| 712 | AC_MSG_RESULT(gmp) |
---|
| 713 | will_have_gmp=yes |
---|
| 714 | NEED_LIBS="-lgmp ${NEED_LIBS}" |
---|
| 715 | elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then |
---|
| 716 | AC_MSG_RESULT(smallgmp) |
---|
| 717 | AC_DEFINE(HAVE_SMALLGMP) |
---|
| 718 | NEED_LIBS="-lsmallgmp ${NEED_LIBS}" |
---|
| 719 | else |
---|
| 720 | AC_MSG_RESULT(none) |
---|
| 721 | AC_MSG_ERROR(can not build without gmp or smallgmp) |
---|
| 722 | fi |
---|
| 723 | elif test "${with_apint}" = gmp; then |
---|
| 724 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
| 725 | AC_MSG_RESULT(gmp) |
---|
| 726 | will_have_gmp=yes |
---|
| 727 | NEED_LIBS="-lgmp ${NEED_LIBS}" |
---|
| 728 | else |
---|
| 729 | AC_MSG_RESULT(none) |
---|
| 730 | AC_MSG_ERROR(can not build with gmp) |
---|
| 731 | fi |
---|
| 732 | else |
---|
| 733 | if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then |
---|
| 734 | AC_MSG_RESULT(smallgmp) |
---|
| 735 | AC_DEFINE(HAVE_SMALLGMP) |
---|
| 736 | NEED_LIBS="-lsmallgmp ${NEED_LIBS}" |
---|
| 737 | else |
---|
| 738 | AC_MSG_RESULT(none) |
---|
| 739 | AC_MSG_ERROR(can not build with smallgmp) |
---|
| 740 | fi |
---|
| 741 | fi |
---|
| 742 | |
---|
| 743 | # |
---|
| 744 | AC_MSG_CHECKING(whether to have MP) |
---|
| 745 | if test "${with_MP}" != yes && test "${with_MP}" != no; then |
---|
| 746 | if (test "${will_have_gmp}" = yes) && \ |
---|
| 747 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
| 748 | AC_MSG_RESULT(yes) |
---|
| 749 | AC_DEFINE(HAVE_MPSR) |
---|
| 750 | HAVE_MPSR=1 |
---|
| 751 | MP_LIBS="-lMPT -lMP ${MP_LIBS}" |
---|
| 752 | else |
---|
| 753 | AC_MSG_RESULT(no) |
---|
| 754 | fi |
---|
| 755 | elif test "${with_MP}" = yes; then |
---|
| 756 | if (test "${will_have_gmp}" = yes) && \ |
---|
| 757 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
| 758 | AC_MSG_RESULT(yes) |
---|
| 759 | AC_DEFINE(HAVE_MPSR) |
---|
| 760 | HAVE_MPSR=1 |
---|
| 761 | MP_LIBS="-lMPT -lMP ${MP_LIBS}" |
---|
| 762 | else |
---|
| 763 | AC_MSG_RESULT(no) |
---|
| 764 | AC_MSG_ERROR(can not build with MP) |
---|
| 765 | fi |
---|
| 766 | else |
---|
| 767 | AC_MSG_RESULT(no) |
---|
| 768 | fi |
---|
| 769 | AC_SUBST(HAVE_MPSR) |
---|
| 770 | AC_SUBST(MP_LIBS) |
---|
| 771 | |
---|
| 772 | AC_MSG_CHECKING(whether to have NTL) |
---|
| 773 | if test "${with_NTL}" = yes ; then |
---|
| 774 | AC_MSG_RESULT(yes) |
---|
| 775 | NEED_LIBS="-lntl ${NEED_LIBS}" |
---|
| 776 | else |
---|
| 777 | AC_MSG_RESULT(no) |
---|
| 778 | fi |
---|
| 779 | |
---|
| 780 | AC_MSG_CHECKING(whether to have factory) |
---|
| 781 | if test "${with_factory}" != yes && test "${with_factory}" != no; then |
---|
| 782 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
| 783 | AC_MSG_RESULT(yes) |
---|
| 784 | AC_DEFINE(HAVE_FACTORY) |
---|
| 785 | will_have_factory=yes |
---|
| 786 | NEED_LIBS="-lsingcf ${NEED_LIBS}" |
---|
| 787 | else |
---|
| 788 | AC_MSG_RESULT(no) |
---|
| 789 | fi |
---|
| 790 | elif test "${with_factory}" = yes; then |
---|
| 791 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
| 792 | AC_MSG_RESULT(yes) |
---|
| 793 | AC_DEFINE(HAVE_FACTORY) |
---|
| 794 | will_have_factory=yes |
---|
| 795 | NEED_LIBS="-lsingcf ${NEED_LIBS}" |
---|
| 796 | else |
---|
| 797 | AC_MSG_RESULT(no) |
---|
| 798 | AC_MSG_ERROR(can not build with factory) |
---|
| 799 | fi |
---|
| 800 | else |
---|
| 801 | AC_MSG_RESULT(no) |
---|
| 802 | fi |
---|
| 803 | |
---|
| 804 | AC_MSG_CHECKING(whether to have libfac) |
---|
| 805 | if test "${with_libfac}" != yes && test "${with_libfac}" != no; then |
---|
| 806 | if (test "${will_have_factory}" = yes) && \ |
---|
| 807 | (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then |
---|
| 808 | AC_MSG_RESULT(yes) |
---|
| 809 | AC_DEFINE(HAVE_LIBFAC_P) |
---|
| 810 | NEED_LIBS="-lsingfac ${NEED_LIBS}" |
---|
| 811 | else |
---|
| 812 | AC_MSG_RESULT(no) |
---|
| 813 | fi |
---|
| 814 | elif test "${with_libfac}" = yes; then |
---|
| 815 | if (test "${will_have_factory}" = yes) && \ |
---|
| 816 | (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then |
---|
| 817 | AC_MSG_RESULT(yes) |
---|
| 818 | AC_DEFINE(HAVE_LIBFAC_P) |
---|
| 819 | NEED_LIBS="-lsingfac ${NEED_LIBS}" |
---|
| 820 | else |
---|
| 821 | AC_MSG_RESULT(no) |
---|
| 822 | AC_MSG_ERROR(can not build with libfac) |
---|
| 823 | fi |
---|
| 824 | else |
---|
| 825 | AC_MSG_RESULT(no) |
---|
| 826 | fi |
---|
| 827 | |
---|
| 828 | |
---|
| 829 | AC_SUBST(NEED_LIBS) |
---|
| 830 | |
---|
| 831 | AC_MSG_CHECKING(whether to have dbm links) |
---|
| 832 | if test "$with_dbm" != no; then |
---|
| 833 | AC_DEFINE(HAVE_DBM) |
---|
| 834 | AC_MSG_RESULT(yes) |
---|
| 835 | else |
---|
| 836 | AC_MSG_RESULT(no) |
---|
| 837 | fi |
---|
| 838 | |
---|
| 839 | AC_MSG_CHECKING(whether to have namespaces) |
---|
| 840 | if test "$with_namespaces" != no; then |
---|
| 841 | AC_MSG_RESULT(yes) |
---|
| 842 | AC_DEFINE(HAVE_NS) |
---|
| 843 | else |
---|
| 844 | AC_MSG_RESULT(no) |
---|
| 845 | fi |
---|
| 846 | |
---|
| 847 | AC_MSG_CHECKING(whether to have dynamic modules) |
---|
| 848 | if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then |
---|
| 849 | AC_MSG_RESULT(no) |
---|
| 850 | else |
---|
| 851 | AC_DEFINE(HAVE_DYNAMIC_LOADING) |
---|
| 852 | AC_MSG_RESULT(yes) |
---|
| 853 | fi |
---|
| 854 | |
---|
| 855 | AC_MSG_CHECKING(whether to have dynamic kernel) |
---|
| 856 | if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then |
---|
| 857 | DL_KERNEL=1 |
---|
| 858 | AC_SUBST(DL_KERNEL) |
---|
| 859 | AC_MSG_RESULT(yes) |
---|
| 860 | else |
---|
| 861 | AC_MSG_RESULT(no) |
---|
| 862 | fi |
---|
| 863 | |
---|
| 864 | AC_MSG_CHECKING(whether to have Plural) |
---|
| 865 | if test "$with_Plural" != yes && test "$enable_Plural" != yes; then |
---|
| 866 | AC_MSG_RESULT(no) |
---|
| 867 | else |
---|
| 868 | AC_DEFINE(HAVE_PLURAL) |
---|
| 869 | AC_MSG_RESULT(yes) |
---|
| 870 | fi |
---|
| 871 | |
---|
| 872 | |
---|
| 873 | OUTPUT_MAKEFILES=Makefile |
---|
| 874 | |
---|
| 875 | if test "$ac_cv_singuname" = "ix86-Win"; then |
---|
| 876 | OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc" |
---|
| 877 | fi |
---|
| 878 | |
---|
| 879 | AC_OUTPUT(${OUTPUT_MAKEFILES}, \ |
---|
| 880 | if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi) |
---|