dnl Process this file with autoconf to produce a configure script. AC_INIT(mmalloc.cc) AC_CONFIG_HEADER(mod2.h) dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl determine singuname dnl AC_MSG_CHECKING(uname for singular) AC_CACHE_VAL(ac_cv_singuname, ac_cv_singuname="unknown" if test -r "singuname.sh"; then if (/bin/sh singuname.sh >/dev/null 2>&1) then ac_cv_singuname=`/bin/sh singuname.sh` fi fi if test "$ac_cv_singuname" = unknown && test -r "../singuname.sh"; then if (/bin/sh ../singuname.sh >/dev/null 2>&1) then ac_cv_singuname=`/bin/sh ../singuname.sh` fi fi ) AC_MSG_RESULT($ac_cv_singuname) if test "$ac_cv_singuname" = unknown; then AC_MSG_WARN(Unknown architecture: Check singuname.sh) ac_cv_singuname="unknown" fi AC_DEFINE_UNQUOTED(S_UNAME, "$ac_cv_singuname") SINGUNAME=$ac_cv_singuname AC_SUBST(SINGUNAME) if test "$ac_cv_singuname" = ix86-Win; then EXEC_EXT=".exe" fi AC_SUBST(EXEC_EXT) SING_UNAME=`echo $SINGUNAME | tr '-' '_' ` AC_SUBST(SING_UNAME) # stupid Win programs do not like dots in their pathnames VERSION_SEP="-" dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl version stuff -- should be set in ../configure.in dnl dnl here are some defaults SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1} SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3} SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-9} SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}" VERSION_DATE=${VERSION_DATE:-"September 2000"} dnl pass them on into the Makefiles AC_SUBST(SINGULAR_VERSION) AC_SUBST(VERSION_DATE) AC_SUBST(SINGULAR_MAJOR_VERSION) AC_SUBST(SINGULAR_MINOR_VERSION) AC_SUBST(SINGULAR_SUB_VERSION) AC_DEFINE_UNQUOTED(SINGULAR_MAJOR_VERSION, ${SINGULAR_MAJOR_VERSION}) AC_DEFINE_UNQUOTED(SINGULAR_MINOR_VERSION, ${SINGULAR_MINOR_VERSION}) AC_DEFINE_UNQUOTED(SINGULAR_SUB_VERSION, ${SINGULAR_SUB_VERSION}) AC_DEFINE_UNQUOTED(S_VERSION1, "${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}") AC_DEFINE_UNQUOTED(S_VERSION2, "${VERSION_DATE}") AC_DEFINE_UNQUOTED(SINGULAR_SUB_VERSION, ${SINGULAR_SUB_VERSION}) dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl compiler stuff dnl is needed to check for libs and headers, later on dnl dnl we do not want to have "-g -O" for CFLAGS if test "${CXXFLAGS+set}" != set; then ac_cxxflags_set=no CXXFLAGS="-O" fi if test "${CFLAGS+set}" != set; then CFLAGS="-O" ac_cflags_set=no fi # check whether CXX was set by user as env variable if test "${CXX+set}" != set; then ac_cxx_set=no else ac_cxx_set=yes fi AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_INSTALL AC_AIX # we prefer using gcc for compiling C++ files, provided the user did # not overwrite it explicitely if test "${GXX}" = yes && test "${ac_cxx_set}" = no; then CXX=gcc fi # check whether the compiler accepts -pipe AC_MSG_CHECKING(whether compiler accepts -pipe) temp_cflags=${CFLAGS} CFLAGS="${CFLAGS} -pipe" AC_CACHE_VAL(ac_cv_cxx_have_pipe, AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no) ) AC_MSG_RESULT(${ac_cv_cxx_have_pipe}) CFLAGS=${temp_cflags} if test "${ac_cv_cxx_have_pipe}" != yes; then PIPE= else PIPE="-pipe" fi AC_SUBST(PIPE) # Customize CFLAGS AC_MSG_CHECKING(whether _AIX is defined) AC_CACHE_VAL(ac_cv_is_aix, AC_EGREP_CPP(yes, [#ifdef _AIX yes #endif ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) if test "$ac_cv_is_aix" = yes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi # we know best when compiling with gcc if test "${GXX}" = yes; then if test "$ac_cxxflags_set" = no; then CXXFLAGS="-O3 -w -fomit-frame-pointer" fi CXXTEMPLFLAGS="-fno-implicit-templates" if test "$ac_cv_is_aix" = yes; then CXXNOOPTFLAGS="-w" else CXXNOOPTFLAGS=$CXXFLAGS fi STATIC_LDFLAGS="-static" else CXXTEMPFLAGS="" CXXNOOPTFLAGS=$CXXFLAGS STATIC_LDFLAGS="" fi AC_SUBST(CXXTEMPLFLAGS) AC_SUBST(CXXNOOPTFLAGS) AC_SUBST(STATIC_LDFLAGS) if test "${GCC}" = yes && test "$ac_cflags_set" = no ; then CFLAGS="-O3 -w -fomit-frame-pointer" fi AC_PROG_MAKE_SET dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl path stuff dnl AC_PREFIX_DEFAULT(`pwd`/..) dnl set exec_prefix, bindir, libdir, includedir to some sensible values dnl if they are not yet already set # expand prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix if test "${with_rootdir+set}" != set; then AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${prefix}") else AC_DEFINE_UNQUOTED(S_ROOT_DIR, "${with_rootdir}") fi # expand exec_prefixad if test "x$exec_prefix" = xNONE; then exec_prefix=${prefix}/${ac_cv_singuname} fi # expand bindir test "x$bindir" = 'x${exec_prefix}/bin' && bindir="${exec_prefix}" SINGULAR=${SINGULAR:-$bindir/Singular-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION} AC_SUBST(SINGULAR) AC_DEFINE_UNQUOTED(S_BIN_DIR, "${bindir}") # expand libdir test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib" # expand includedir test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include" # add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure LDFLAGS="-L${libdir} ${LDFLAGS} -L/usr/local/lib" CPPFLAGS="-I${includedir} ${CPPFLAGS} -I/usr/local/include" # this is a work-around to include the right term.h if test "$ac_cv_singuname" = SunOS-5; then CPPFLAGS="-I/usr/xpg4/include ${CPPFLAGS}" fi dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl Checks for programs. dnl # lex if test "${with_lex+set}" != set; then AC_MSG_CHECKING(for flex) changequote(<<,>>)dnl AC_CACHE_VAL(ac_cv_prog_flex, if (flex --version >/dev/null 2>&1) then if (flex --version | egrep "[2-9]\.[5-9]" >/dev/null 2>&1) then ac_cv_prog_flex=flex fi fi ) changequote([,])dnl if test "${ac_cv_prog_flex+set}" = set; then AC_MSG_RESULT(flex) LEX=flex AC_SUBST(LEX) else AC_MSG_ERROR(can not find flex with version greater 2.4) fi elif test "${with_lex}" = no; then AC_MSG_WARN(building without lex -- make might fail) else unset LEX unset ac_cv_prog_LEX AC_CHECK_PROGS(LEX, ${with_lex}) if test "x${LEX}" = x; then AC_MSG_WARN(building without lex -- make might fail) fi fi # bison AC_CHECK_PROGS(BISON, bison) if test "${BISON+set}" != set; then AC_MSG_WARN(did not find bison -- make might fail) fi # ln -s AC_PROG_LN_S AC_CHECK_PROGS(PERL, perl5 perl) dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl check for general libraries, header files, typedefs, etc dnl # lib checks AC_CHECK_LIB(m, atof) AC_CHECK_LIB(bsd, socket) AC_CHECK_LIB(socket, listen) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(ucb, index) # heder file checks AC_HEADER_STDC AC_CHECK_HEADERS(limits.h unistd.h,, AC_MSG_ERROR(Can not compile without limits.h unistd.h)) AC_CHECK_HEADERS(sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h termios.h term.h readline/readline.h) # typedefs, structures AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM # library functions. AC_FUNC_ALLOCA AC_PROG_GCC_TRADITIONAL AC_FUNC_MMAP AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep setenv getpwnam popen) dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl Find out more about particularity of the system dnl # arithmetic shifts AC_MSG_CHECKING(whether your machine has correct arithmetic shifts) AC_CACHE_VAL(ac_cv_shift, AC_TRY_RUN( [ int main() { if (-2 >> 1 == -1) exit(0); else exit(1); } ], ac_cv_shift=yes, ac_cv_shift=no, if test "$ac_c_cross_dos" = yes; then ac_cv_shift=yes; else AC_MSG_RESULT(no) AC_MSG_ERROR(cross compilation without default value) fi)) if test "$ac_cv_shift" = yes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR(need -2 >> 1 == -1) fi # check for a peculiar constructor initialization AC_MSG_CHECKING(whether explicit C++ constructor calls are allowed) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CACHE_VAL(ac_cv_explicit_const,AC_TRY_COMPILE(, class testclass { public: int value; testclass() : value(0) {} testclass( int i ) : value(i) {} ~testclass() { value = 0; } }; testclass ptr; ptr.testclass(1); , ac_cv_explicit_const=yes, ac_cv_explicit_const=no)) AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_explicit_const) if test "$ac_cv_explicit_const" = yes; then AC_DEFINE(HAVE_EXPLICIT_CONSTR) fi # sprintf returns number of printed chars AC_MSG_CHECKING(whether vsprintf returns number of printed chars) AC_CACHE_VAL(ac_cv_returns_n_of_chars, AC_TRY_RUN( [#include main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }], ac_cv_returns_n_of_chars=yes, ac_cv_returns_n_of_chars=no, ac_cv_returns_n_of_chars=no)) if test "$ac_cv_returns_n_of_chars" = yes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_DEFINE(BSD_SPRINTF) fi # determine ALIGN_8 AC_CHECK_SIZEOF(char,1) AC_CHECK_SIZEOF(short,2) AC_CHECK_SIZEOF(int,4) AC_CHECK_SIZEOF(long,4) AC_CHECK_SIZEOF(void*,4) AC_CHECK_SIZEOF(double, 8) AC_C_BIGENDIAN if test "$ac_cv_sizeof_int" != 4; then AC_MSG_ERROR(need int to be four bytes long) fi if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then AC_MSG_ERROR(need equal sizes for long and void*) fi if test "$ac_cv_sizeof_double" != 8; then AC_MSG_ERROR(need double to b 8 bytes long) fi if test "$ac_cv_sizeof_voidp" != 4 && "$ac_cv_sizeof_voidp" != 8; then AC_MSG_ERROR(need void* to be 4 or 8 bytes long) fi dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl help for configure dnl AC_ARG_WITH( rootdir, [ --with-rootdir=DIR use DIR ass compiled-in root directory (default is PREFIX)]) AC_ARG_WITH( lex, [ --with-lex=[LEX,no] uses LEX as lex program, default is flex]) AC_ARG_WITH( readline, [ --with-readline do use static readline for fancy display]) AC_ARG_WITH( MP, [ --without-MP do not use MP (no MP links)]) AC_ARG_WITH( dbm, [ --without-dbm do not use dbm (no DBM links)]) AC_ARG_WITH( factory, [ --without-factory do not use factory (no poly factorization)]) AC_ARG_WITH( libfac, [ --without-libfac do not use libfac (no primary decompositions)]) AC_ARG_WITH( namespaces, [ --with-namespaces do compile namespace support]) AC_ARG_WITH( dl, [ --with-dl do use dl (dynamic linking)]) AC_ARG_WITH(apint, [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic]) AC_ARG_WITH( exp_type, [ --with-exp_type=TYPE uses TYPE as type of exponents in polynomials -- default type is short -- possible other types are char and int]) dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl check for packages we need dnl for gmp, MP, factory and libfac, we built them in, even if the libs dnl and headers were not found under the condition that the respective dnl --enable argument was given dnl AC_CHECK_LIB(ncurses,tgetent,,\ AC_CHECK_LIB(curses,tgetent,,\ AC_CHECK_LIB(termcap,tgetent))) # readline if test "$with_readline" = yes; then AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_LIB(readline, rl_abort) AC_CHECK_HEADERS(readline/readline.h readline/history.h) if test "$ac_cv_lib_readline_rl_abort" = yes && \ test "$ac_cv_header_readline_readline_h" = yes; then AC_MSG_CHECKING(whether readline.h is ok) AC_CACHE_VAL(ac_cv_header_readline_readline_h_ok, AC_TRY_LINK( #include #include #include #ifdef HAVE_READLINE_HISTORY_H #include #endif , #ifndef NULL #define NULL 0 #endif rl_readline_name=NULL; *rl_line_buffer=1; completion_matches(NULL, filename_completion_function); rl_attempted_completion_function = (CPPFunction *) NULL; rl_outstream=NULL; readline(NULL); add_history(NULL); read_history(NULL); write_history(NULL); , ac_cv_header_readline_readline_h_ok="yes", ac_cv_header_readline_readline_h_ok="no", )) AC_MSG_RESULT($ac_cv_header_readline_readline_h_ok) if test "$ac_cv_header_readline_readline_h_ok" != yes; then #not ok -- try once more with explicitly declaring everything AC_MSG_CHECKING(whether or not we nevertheless can use readline) AC_CACHE_VAL(ac_cv_have_readline, AC_TRY_LINK( #include extern "C" { extern char * rl_readline_name; extern char *rl_line_buffer; char *filename_completion_function(); typedef char **CPPFunction (); extern char ** completion_matches (); extern CPPFunction * rl_attempted_completion_function; extern FILE * rl_outstream; char * readline (); void add_history (); int write_history (); int read_history(); } #ifndef NULL #define NULL 0 #endif , rl_readline_name=NULL; *rl_line_buffer=1; completion_matches(NULL, filename_completion_function); rl_attempted_completion_function = (CPPFunction *) NULL; rl_outstream=NULL; readline(NULL); add_history(NULL); read_history(NULL); write_history(NULL); , ac_cv_have_readline="yes" , ac_cv_have_readline="no" )) AC_MSG_RESULT($ac_cv_have_readline) else AC_DEFINE(READLINE_READLINE_H_OK) ac_cv_have_readline="yes" fi fi if test "$ac_cv_have_readline" = yes; then AC_DEFINE(HAVE_READLINE) else AC_MSG_WARN(building without readline: disabling fancy display) fi AC_LANG_RESTORE fi NEED_LIBS=$LIBS # gmp, smallgmp, MP, MPT, factory, libfac AC_CHECK_LIB(gmp, main) if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then LIBS=NEED_LIBS fi AC_CHECK_LIB(smallgmp, main) AC_CHECK_LIB(MP, IMP_PutGmpInt) AC_CHECK_LIB(MPT, MPT_GetTree) AC_CHECK_LIB(singcf, atof) AC_CHECK_LIB(singfac, atof) AC_CHECK_LIB(omalloc, omTestAddr) AC_CHECK_LIB(omalloc_ndebug, main) AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h MPT.h factory.h factor.h omalloc.h omalloc.c) if test "$ac_cv_lib_gmp_main" = yes && \ test "$ac_cv_header_gmp_h" = yes; then ac_gmp_ok=yes fi if test "$ac_cv_lib_smallgmp_main" = yes && \ test "$ac_cv_header_smallgmp_h" = yes && \ test "$ac_cv_header_gmp_h" = yes; then ac_smallgmp_ok=yes fi if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ test "$ac_cv_lib_MPT_MPT_GetTree" && \ test "$ac_cv_header_MP_h" = yes && \ test "$ac_cv_header_MPT_h" = yes; then ac_MP_ok=yes fi if test "$ac_cv_lib_singcf_atof" = yes && \ test "$ac_cv_header_factory_h" = yes; then ac_factory_ok=yes fi if test "$ac_cv_lib_singfac_atof" = yes && \ test "$ac_cv_header_factor_h" = yes; then ac_libfac_ok=yes fi if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \ test "$ac_cv_lib_omalloc_ndebug_main" = yes && \ test "$ac_cv_header_omalloc_c" = yes && \ test "$ac_cv_header_omalloc_h" = yes; then ac_cv_omalloc_ok=yes fi # evaluate results dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl make sure that omalloc is there dnl if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then AC_MSG_ERROR(can not build without omalloc) fi AC_MSG_CHECKING(which apint package to use) if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then AC_MSG_RESULT(gmp) will_have_gmp=yes NEED_LIBS="-lgmp ${NEED_LIBS}" elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then AC_MSG_RESULT(smallgmp) AC_DEFINE(HAVE_SMALLGMP) NEED_LIBS="-lsmallgmp ${NEED_LIBS}" else AC_MSG_RESULT(none) AC_MSG_ERROR(can not build without gmp or smallgmp) fi elif test "${with_apint}" = gmp; then if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then AC_MSG_RESULT(gmp) will_have_gmp=yes NEED_LIBS="-lgmp ${NEED_LIBS}" else AC_MSG_RESULT(none) AC_MSG_ERROR(can not build with gmp) fi else if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then AC_MSG_RESULT(smallgmp) AC_DEFINE(HAVE_SMALLGMP) NEED_LIBS="-lsmallgmp ${NEED_LIBS}" else AC_MSG_RESULT(none) AC_MSG_ERROR(can not build with smallgmp) fi fi # AC_MSG_CHECKING(whether to have MP) if test "${with_MP}" != yes && test "${with_MP}" != no; then if (test "${will_have_gmp}" = yes) && \ (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MPSR) NEED_LIBS="-lMPT -lMP ${NEED_LIBS}" else AC_MSG_RESULT(no) fi elif test "${with_MP}" = yes; then if (test "${will_have_gmp}" = yes) && \ (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MPSR) NEED_LIBS="-lMPT -lMP ${NEED_LIBS}" else AC_MSG_RESULT(no) AC_MSG_ERROR(can not build with MP) fi else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(whether to have factory) if test "${with_factory}" != yes && test "${with_factory}" != no; then if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FACTORY) will_have_factory=yes NEED_LIBS="-lsingcf ${NEED_LIBS}" else AC_MSG_RESULT(no) fi elif test "${with_factory}" = yes; then if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FACTORY) will_have_factory=yes NEED_LIBS="-lsingcf ${NEED_LIBS}" else AC_MSG_RESULT(no) AC_MSG_ERROR(can not build with factory) fi else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(whether to have libfac) if test "${with_libfac}" != yes && test "${with_libfac}" != no; then if (test "${will_have_factory}" = yes) && \ (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBFAC_P) NEED_LIBS="-lsingfac ${NEED_LIBS}" else AC_MSG_RESULT(no) fi elif test "${with_libfac}" = yes; then if (test "${will_have_factory}" = yes) && \ (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBFAC_P) NEED_LIBS="-lsingfac ${NEED_LIBS}" else AC_MSG_RESULT(no) AC_MSG_ERROR(can not build with libfac) fi else AC_MSG_RESULT(no) fi AC_SUBST(NEED_LIBS) AC_MSG_CHECKING(whether to have dbm links) if test "$with_dbm" != no; then AC_DEFINE(HAVE_DBM) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(whether to have namespaces) if test "$with_namespaces" != yes; then AC_MSG_RESULT(no) else AC_DEFINE(HAVE_NAMESPACES) AC_MSG_RESULT(yes) fi AC_MSG_CHECKING(whether to have dl lib) case "$ac_cv_singuname" in HPUX-9) AC_MSG_RESULT(dld) AC_CHECK_LIB(dld, shl_load) LD_DYN_FLAGS="-ldld -Xlinker -E" AC_DEFINE(HAVE_DL) ;; HPUX-10) AC_MSG_RESULT(dld) AC_CHECK_LIB(dld, shl_load) LD_DYN_FLAGS="-ldld -Xlinker -E" AC_DEFINE(HAVE_DL) ;; *Linux*) AC_MSG_RESULT(dl) AC_CHECK_LIB(dl, dlopen) LD_DYN_FLAGS="-ldl -rdynamic" AC_DEFINE(HAVE_DL) ;; *) AC_MSG_RESULT(no) ;; esac AC_MSG_CHECKING(whether to have dynamic loading) if test "$with_dl" != yes; then AC_MSG_RESULT(no) else AC_DEFINE(HAVE_DYNAMIC_LOADING) AC_MSG_RESULT(yes) fi AC_SUBST(LD_DYN_FLAGS) dnl dnl figure out Exponent_t and Order_t dnl make sure that 2*sizeof(Exponent_t) + sizeof(Order_t) is aligned dnl AC_MSG_CHECKING(which exponent type to use) if test "$with_exp_type" = "char"; then AC_MSG_RESULT(char) AC_DEFINE(EXPONENT_TYPE, char) AC_DEFINE(SIZEOF_EXPONENT, SIZEOF_CHAR) elif test "with_exp_type" = "int"; then AC_MSG_RESULT(int) AC_DEFINE(EXPONENT_TYPE, int) AC_DEFINE(SIZEOF_EXPONENT, SIZEOF_INT) else AC_MSG_RESULT(short) AC_DEFINE(EXPONENT_TYPE, short) AC_DEFINE(SIZEOF_TYPE, SIZEOF_SHORT) fi OUTPUT_MAKEFILES=Makefile if test "$ac_cv_singuname" = "ix86-Win"; then OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc" fi AC_OUTPUT(${OUTPUT_MAKEFILES}, \ if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi)