[BACK]Return to configure.in CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000

File: [local] / OpenXM_contrib2 / asir2000 / configure.in (download)

Revision 1.53, Wed Mar 24 18:27:09 2021 UTC (3 years ago) by ohara
Branch: MAIN
CVS Tags: HEAD
Changes since 1.52: +2 -2 lines

Updated gc to ver.7.4.18 for asir2000.

dnl $OpenXM: OpenXM_contrib2/asir2000/configure.in,v 1.53 2021/03/24 18:27:09 ohara Exp $

AC_INIT(asir,1.15)
AC_CONFIG_SRCDIR([LICENSE])
AC_PREREQ(2.69)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE

dnl AM_PROG_AS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_YACC

AC_PATH_XTRA

AC_ARG_ENABLE([shared],
[  --enable-shared         enable linking shared libraries.  [[no]]],
[enable_shared=yes],[enable_shared=no])

if test "${enable_shared:=no}" != no ; then
   true
fi

if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
    if test "${ac_cv_prog_cc_g}" = yes; then
        CFLAGS="-g -O"
    else
        CFLAGS="-O"
    fi
elif test `basename ./"${CC}"` = "icc" ; then
    CFLAGS="-g -O"
fi

GC=gc-7.4.18
AC_ARG_WITH([asir-gc],
[  --with-asir-gc          modify Boehm's GC [[yes]]],
[with_asir_gc=${withval}],[with_asir_gc=yes])
if test ${with_asir_gc:=yes} != no; then
   ASIR_GCLIB=libasir-gc.a
   GCINC='-I${top_srcdir}/${GC}/include'
else
   GCLIB='-L${prefix}/lib -lgc'
   GCINC='-I${prefix}/include'
   AC_DEFINE([NO_ASIR_GC])
fi
dnl GC_CONFIGURE_ARGS=--disable-threads --enable-shared=no
GC_CONFIGURE_ARGS="--disable-threads --enable-large-config"
if test -n "${host_alias}" ; then
    GC_CONFIGURE_ARGS="--host=${host_alias} ${GC_CONFIGURE_ARGS}"
fi

AC_DEFINE([GC7])
AC_SUBST([ASIR_GCLIB])
AC_SUBST([GCLIB])
AC_SUBST([GCINC])
AC_SUBST([GC])
AC_SUBST([GC_CONFIGURE_ARGS])

AC_ARG_WITH([distdir],
[  --with-distdir          specify the spool for fetching. [[no]]],
[with_distdir=${withval}],[with_distdir=no])
GC_DISTDIR='${prefix}/../OpenXM_dist'
if test ${with_distdir:=no} != no -a ${with_distdir} != yes ; then
    GC_DISTDIR=${with_distdir}
fi   
AC_SUBST([GC_DISTDIR])

libasir_postfix=""
AC_ARG_WITH([pari],
[  --with-pari             use the PARI library. [[no]]],
[with_pari=${withval}],[with_pari=no])

if test ${with_pari:=no} != no ; then
    libasir_postfix=${libasir_postfix}_pari
    PARIINC='-I${prefix}/include/pari'
    if test "${enable_shared}" != yes ; then
        PARILIB='${libdir}/libpari.a'
    else
        PARILIB='-L${libdir} -lpari'
    fi
    AC_DEFINE([PARI])
fi
AC_SUBST([PARIINC])
AC_SUBST([PARILIB])

AC_CHECK_TYPES([unsigned long long])
AC_CHECK_SIZEOF(long)
if test "${ac_cv_sizeof_long}" = 8; then
    AC_DEFINE([LONG_IS_64BIT])
else
    AC_DEFINE([LONG_IS_32BIT])
fi
if test "${no_x}" != yes ; then
    if test -f "${x_libraries}/libXpm.a" -o -f "${x_libraries}/libXpm.dll.a" ; then
	    XPMLIB="-lXpm"
    fi
    AC_ARG_ENABLE([plot],
    [  --enable-plot           enable plot feature. [[no]]],
    [enable_plot=yes],[enable_plot=no])
fi
AC_SUBST([XPMLIB])

if test ${enable_plot:=no} != no ; then
    libasir_postfix=${libasir_postfix}_X
    AC_DEFINE([DO_PLOT])
fi
AM_CONDITIONAL([USE_PLOT],[test "$enable_plot" = yes])

GMPLIB="-L${libdir} -lmpfi -lmpc -lmpfr -lgmp"
AC_ARG_ENABLE([static_gmp],
[  --enable-static-gmp     force to link statically with gmp. [[no]]],
[enable_static_gmp=yes],[enable_static_gmp=no])
if test ${enable_static_gmp:=no} != no ; then
    GMPLIB='${libdir}/libmpc.a ${libdir}/libmpfr.a ${libdir}/libgmp.a'
fi
AC_SUBST([GMPLIB])

AC_ARG_ENABLE([interval],
[  --enable-interval       enable interval feature. [[no]]],
[enable_interval=${enableval}],[enable_interval=no])

if test ${enable_interval:=no} != no ; then
    libasir_postfix=${libasir_postfix}_itv
    AC_DEFINE([INTERVAL])
    if test "${enable_interval}" = debug ; then
       AC_DEFINE([ITVDEBUG])
    fi
fi

dnl AC_ARG_ENABLE([fep],
dnl [  --enable-fep            enable fep for human interfaces. [[no]]],
dnl [enable_fep=yes],[enable_fep=no])

if test "${enable_fep:=no}" != no ; then
    AC_DEFINE([FEP])
    FEPLIB="-lreadline -ltermcap"
fi
AC_SUBST([FEPLIB])

AC_ARG_ENABLE([fft-float],
[  --enable-fft-float      enable FFT-FLOAT feature. [[no]]],
[enable_fft_float=yes],[enable_fft_float=no])

if test "${enable_fft_float:=no}" != no ; then
    AC_DEFINE([USE_FLOAT])
fi

AC_ARG_WITH([mpi],
[  --with-mpi              use the MPI library. [[no]]],
[with_mpi=${withval}],[with_mpi=no])

if test "${with_mpi:=no}" != no ; then
    AC_DEFINE([MPI])
fi

dnl AC_ARG_WITH([lapack],
dnl [  --with-lapack           use the LAPACK library. [[no]]],
dnl [with_lapack=${withval}],[with_lapack=no])

if test "${with_lapack:=no}" != no ; then
    LAPACKLIB="-llapack -lblas -lg2c"
    AC_DEFINE([LAPACK])
fi
AC_SUBST([LAPACKLIB])

AC_SUBST([libasir_postfix])

dnl Object files in assembly languages for each micro processors.
dnl i386_elf_obj:  for FreeBSD 3.x or later and Linux 2.x
dnl i386_aout_obj: for FreeBSD 2.x, Linux 1.x, and Cygwin
dnl sparc_v8_obj:  for Sparc V8 processor on Solaris 2.x
dnl sparc_v9_obj:  for Sparc V9 processor on Solaris 2.x
dnl generic_obj:   for 32bits/64bits generic micro processors

i386_elf_obj=asmi_l.o
i386_aout_obj=asmi.o
sparc_v8_obj="sparc-2.o asm4-2.o edr-2.o"
sparc_v9_obj=asmalpha.o
generic_obj=asmalpha.o

case "${host}" in
[i[3-6]86-*-freebsd[3-9].*])
    asm_obj="${i386_elf_obj}"
    ;;
[i[3-6]86-*-linux*]|x86-*-linux*)
    asm_obj="${i386_elf_obj}"
    AC_DEFINE([_BSD_SOURCE])
    ;;
[i[3-6]86-*-cygwin*]|x86-*-cygwin*)
    asm_obj="${i386_aout_obj}"
    ;;
[i[3-6]86-*-interix*])
    asm_obj="${i386_aout_obj}"
    AC_DEFINE([_ALL_SOURCE])
    ;;
sparc-sun-solaris2.*)
    case "`uname -m`" in
    [sun4[dm]]) asm_obj="${sparc_v8_obj}" ;;
    sun4u*)     asm_obj="${sparc_v9_obj}"
                if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
                    CFLAGS="${CFLAGS} -m64"
                fi
                AC_SUBST([USE_GC_SPARC64])
                ;;
    *)          asm_obj="${generic_obj}"  ;;
    esac
    AC_DEFINE([SYSV])
    ;;
*-apple-darwin*)
    asm_obj="${generic_obj}"
    AC_DEFINE([__DARWIN__])
    if test -d /usr/X11/include -a x"${X_CFLAGS}" = x ; then
        X_CFLAGS=-I/usr/X11/include 
    fi
    ;;
arm*-*-linux*)
    asm_obj="${generic_obj}"
    if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
        CFLAGS="${CFLAGS} -fsigned-char"
    fi
    ;;
*-*-mingw*)
	WSLIB="-lws2_32"
    asm_obj="${generic_obj}"
    ;;
*)
    asm_obj="${generic_obj}"
    ;;
esac

AC_SUBST([asm_obj])
AC_SUBST([WSLIB])

AC_CHECK_FUNCS(sigaction)
dnl for Solaris 2.x
AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket,socket)])
AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl,gethostbyname)])

AC_CONFIG_FILES([Makefile engine/Makefile asm/Makefile builtin/Makefile fft/Makefile include/Makefile io/Makefile lib/Makefile parse/Makefile plot/Makefile asir2000])
AC_OUTPUT