=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/configure.in,v retrieving revision 1.2 retrieving revision 1.27 diff -u -p -r1.2 -r1.27 --- OpenXM_contrib2/asir2000/configure.in 2003/02/24 17:58:41 1.2 +++ OpenXM_contrib2/asir2000/configure.in 2008/03/19 07:05:55 1.27 @@ -1,11 +1,12 @@ -dnl $OpenXM: OpenXM_contrib2/asir2000/configure.in,v 1.1 2003/02/23 03:05:35 ohara Exp $ +dnl $OpenXM: OpenXM_contrib2/asir2000/configure.in,v 1.26 2007/11/11 15:54:02 ohara Exp $ -AC_INIT([LICENSE]) -AC_PREREQ(2.53) -AM_INIT_AUTOMAKE(asir, 20030128) +AC_INIT +AC_CONFIG_SRCDIR([LICENSE]) +AC_PREREQ(2.61) +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE(asir, 20030307) +AM_MAINTAINER_MODE -AC_CANONICAL_SYSTEM - dnl AM_PROG_AS AC_PROG_CC AC_PROG_INSTALL @@ -25,6 +26,47 @@ 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=gc6.8 +dnl GC_CONFIGURE_ARGS=--disable-threads --enable-shared=no +GC_CONFIGURE_ARGS=--disable-threads +if [ -n "${host_alias}" ]; then + GC_CONFIGURE_ARGS="--host=${host_alias} ${GC_CONFIGURE_ARGS}" +fi +AC_ARG_WITH([gc7], +[ --with-gc7 use Boehm's GC 7.x. [[no]]], +[with_gc7=${withval}],[with_gc7=no]) +if test ${with_gc7:=no} != no; then + case "${with_gc7}" in + [7*]) GC_VERSION=${with_gc7} ;; + *) GC_VERSION=7.0 ;; + esac + GC=gc-${GC_VERSION} + AC_DEFINE([GC7]) + USE_GC7="yes" +fi +AC_SUBST([GC]) +AC_SUBST([GC_CONFIGURE_ARGS]) +AM_CONDITIONAL([USE_GC7],[test "$with_gc7" != no]) + +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]]], @@ -32,10 +74,10 @@ AC_ARG_WITH([pari], if test ${with_pari:=no} != no ; then libasir_postfix=${libasir_postfix}_pari - if test ${with_pari} = old ; then - libpari=pari - else + 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 @@ -44,21 +86,26 @@ if test ${with_pari:=no} != no ; then PARILIB='-L${prefix}/lib'" -l${libpari}" fi AC_DEFINE([PARI]) - AC_CHECK_SIZEOF(long) - if test SIZEOF_LONG = 8; then - AC_DEFINE([LONG_IS_64BIT]) - else - AC_DEFINE([LONG_IS_32BIT]) - fi 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 @@ -113,7 +160,7 @@ dnl [ --with-lapack use the LAPACK library. dnl [with_lapack=${withval}],[with_lapack=no]) if test "${with_lapack:=no}" != no ; then - LAPACKLIB="-llapack -lblas -lI77 -lF77" + LAPACKLIB="-llapack -lblas -lg2c" AC_DEFINE([LAPACK]) fi AC_SUBST([LAPACKLIB]) @@ -130,28 +177,47 @@ dnl generic_obj: for 32bits/64bits generic micro pro 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="sparc-2.o asm5-2.o edr-2.o" +sparc_v9_obj=asmalpha.o generic_obj=asmalpha.o case "${host}" in -[i[3-6]86-*-freebsd[3-9].*]|[i[3-6]86-*-linux*]) +[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}" + AC_DEFINE([_ALL_SOURCE]) + ;; sparc-sun-solaris2.*) case "`uname -m`" in [sun4[dm]]) asm_obj="${sparc_v8_obj}" ;; - sun4u) asm_obj="${sparc_v9_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*) +*-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}" ;; @@ -163,4 +229,5 @@ 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]) +AC_CONFIG_FILES([Makefile engine/Makefile asm/Makefile builtin/Makefile fft/Makefile include/Makefile io/Makefile lib/Makefile parse/Makefile plot/Makefile]) +AC_OUTPUT