[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.21, Wed Feb 9 08:32:32 2005 UTC (19 years, 2 months ago) by noro
Branch: MAIN
Changes since 1.20: +2 -2 lines

Improving nd_det.

dnl $OpenXM: OpenXM_contrib2/asir2000/configure.in,v 1.21 2005/02/09 08:32:32 noro Exp $

AC_INIT([LICENSE])
AC_PREREQ(2.53)
AM_INIT_AUTOMAKE(asir, 20030307)
AM_MAINTAINER_MODE

AC_CANONICAL_SYSTEM

dnl AM_PROG_AS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_YACC

AC_PATH_XTRA

AC_DEFINE([HMEXT])

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

AC_ARG_ENABLE([gc-zeropage],
[  --enable-gc-zeropage    enable to avoid the kernel zeropage bug.  [[no]]],
[enable_gc_zeropage=yes],[enable_gc_zeropage=no])

if test "${enable_gc_zeropage:=no}" != no ; then
    USE_GC_ZEROPAGE="yes"
fi
AC_SUBST([USE_GC_ZEROPAGE])

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
    if test ${with_pari} = new ; then
        libpari=pari-2.2
    else
        libpari=pari
    fi
    PARIINC='-I${prefix}/include/pari'
    if test "${enable_shared}" != yes ; then
        PARILIB='${prefix}'"/lib/lib${libpari}.a"
    else
        PARILIB='-L${prefix}/lib'" -l${libpari}"
    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])

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

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

if test "${with_mpi:=no}" != no ; then
    MPIINC="-I/opt/FJSVmpi2/include"
    MPILIB="-L/opt/FJSVmpi2/lib -lmpi -L/opt/FSUNaprun/lib -lmpl -lemi -lthread"
    AC_DEFINE([MPI])
fi
AC_SUBST([MPIINC])
AC_SUBST([MPILIB])

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])
    ;;
*-*-cygwin*)
    asm_obj="${i386_aout_obj}"
    ;;
[i[3-6]86-*-interix*])
    asm_obj="${i386_aout_obj}"
    USE_GC_INTERIX="yes"
    AC_SUBST([USE_GC_INTERIX])
    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])
    ;;
powerpc-apple-darwin*)
    asm_obj="${generic_obj}"
    AC_DEFINE([__DARWIN__])
    ;;
arm*-*-linux*)
    asm_obj="${generic_obj}"
    if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
        CFLAGS="${CFLAGS} -fsigned-char"
    fi
    ;;
*)
    asm_obj="${generic_obj}"
    ;;
esac

AC_SUBST([asm_obj])

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

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