Annotation of OpenXM_contrib2/asir2000/configure.in, Revision 1.35
1.35 ! ohara 1: dnl $OpenXM: OpenXM_contrib2/asir2000/configure.in,v 1.34 2009/02/23 16:51:06 ohara Exp $
1.1 ohara 2:
1.25 ohara 3: AC_INIT
4: AC_CONFIG_SRCDIR([LICENSE])
5: AC_PREREQ(2.61)
6: AC_CANONICAL_TARGET
1.5 noro 7: AM_INIT_AUTOMAKE(asir, 20030307)
1.11 ohara 8: AM_MAINTAINER_MODE
1.1 ohara 9:
10: dnl AM_PROG_AS
11: AC_PROG_CC
12: AC_PROG_INSTALL
13: AC_PROG_LN_S
14: AC_PROG_RANLIB
15: AC_PROG_YACC
16:
17: AC_PATH_XTRA
18:
19: AC_DEFINE([HMEXT])
20:
21: AC_ARG_ENABLE([shared],
22: [ --enable-shared enable linking shared libraries. [[no]]],
23: [enable_shared=yes],[enable_shared=no])
24:
25: if test "${enable_shared:=no}" != no ; then
26: true
27: fi
1.4 noro 28:
1.6 ohara 29: if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
30: if test "${ac_cv_prog_cc_g}" = yes; then
31: CFLAGS="-g -O"
32: else
33: CFLAGS="-O"
34: fi
1.18 ohara 35: elif test `basename ./"${CC}"` = "icc" ; then
36: CFLAGS="-g -O"
1.6 ohara 37: fi
1.23 ohara 38:
1.25 ohara 39: GC=gc6.8
1.30 ohara 40: AC_ARG_WITH([asir-gc],
41: [ --with-asir-gc modify Boehm's GC [[yes]]],
42: [with_asir_gc=${withval}],[with_asir_gc=yes])
43: if test ${with_asir_gc:=yes} != no; then
44: ASIR_GCLIB=libasir-gc.a
45: GCINC='-I${top_srcdir}/${GC}/include'
46: else
47: GCLIB='-L${prefix}/lib -lgc'
48: GCINC='-I${prefix}/include'
49: AC_DEFINE([NO_ASIR_GC])
50: fi
1.25 ohara 51: dnl GC_CONFIGURE_ARGS=--disable-threads --enable-shared=no
1.34 ohara 52: GC_CONFIGURE_ARGS="--disable-threads --enable-large-config"
1.31 ohara 53: if test -n "${host_alias}" ; then
1.25 ohara 54: GC_CONFIGURE_ARGS="--host=${host_alias} ${GC_CONFIGURE_ARGS}"
55: fi
1.26 ohara 56: AC_ARG_WITH([gc7],
1.30 ohara 57: [ --with-gc7 use GC 7.x (if --with-asir-gc=yes) [[no]]],
1.26 ohara 58: [with_gc7=${withval}],[with_gc7=no])
59: if test ${with_gc7:=no} != no; then
60: case "${with_gc7}" in
61: [7*]) GC_VERSION=${with_gc7} ;;
1.35 ! ohara 62: *) GC_VERSION=7.1 ;;
1.26 ohara 63: esac
64: GC=gc-${GC_VERSION}
65: AC_DEFINE([GC7])
66: fi
1.30 ohara 67:
68: AC_SUBST([ASIR_GCLIB])
69: AC_SUBST([GCLIB])
70: AC_SUBST([GCINC])
71:
1.25 ohara 72: AC_SUBST([GC])
73: AC_SUBST([GC_CONFIGURE_ARGS])
1.26 ohara 74: AM_CONDITIONAL([USE_GC7],[test "$with_gc7" != no])
1.25 ohara 75:
1.23 ohara 76: AC_ARG_WITH([distdir],
77: [ --with-distdir specify the spool for fetching. [[no]]],
78: [with_distdir=${withval}],[with_distdir=no])
79: GC_DISTDIR='${prefix}/../OpenXM_dist'
80: if test ${with_distdir:=no} != no -a ${with_distdir} != yes ; then
81: GC_DISTDIR=${with_distdir}
82: fi
83: AC_SUBST([GC_DISTDIR])
1.12 ohara 84:
1.1 ohara 85: libasir_postfix=""
86: AC_ARG_WITH([pari],
87: [ --with-pari use the PARI library. [[no]]],
88: [with_pari=${withval}],[with_pari=no])
89:
90: if test ${with_pari:=no} != no ; then
1.29 ohara 91: if test "${with_pari}" = new -o "${with_pari}" = 2.3 ; then
92: AC_DEFINE([PARI23])
93: fi
1.1 ohara 94: libasir_postfix=${libasir_postfix}_pari
95: PARIINC='-I${prefix}/include/pari'
96: if test "${enable_shared}" != yes ; then
1.30 ohara 97: PARILIB='${libdir}/libpari.a'
1.1 ohara 98: else
1.30 ohara 99: PARILIB='-L${libdir} -lpari'
1.1 ohara 100: fi
101: AC_DEFINE([PARI])
102: fi
103: AC_SUBST([PARIINC])
104: AC_SUBST([PARILIB])
105:
1.7 ohara 106: AC_CHECK_TYPES([unsigned long long])
1.5 noro 107: AC_CHECK_SIZEOF(long)
1.15 noro 108: if test "${ac_cv_sizeof_long}" = 8; then
1.5 noro 109: AC_DEFINE([LONG_IS_64BIT])
110: else
111: AC_DEFINE([LONG_IS_32BIT])
112: fi
1.1 ohara 113: if test "${no_x}" != yes ; then
1.14 ohara 114: if test -f "${x_libraries}/libXpm.a" -o -f "${x_libraries}/libXpm.dll.a" ; then
1.10 ohara 115: XPMLIB="-lXpm"
116: fi
1.1 ohara 117: AC_ARG_ENABLE([plot],
118: [ --enable-plot enable plot feature. [[no]]],
119: [enable_plot=yes],[enable_plot=no])
120: fi
1.10 ohara 121: AC_SUBST([XPMLIB])
1.1 ohara 122:
123: if test ${enable_plot:=no} != no ; then
124: libasir_postfix=${libasir_postfix}_X
125: AC_DEFINE([DO_PLOT])
126: fi
127: AM_CONDITIONAL([USE_PLOT],[test "$enable_plot" = yes])
128:
129: AC_ARG_ENABLE([interval],
130: [ --enable-interval enable interval feature. [[no]]],
131: [enable_interval=${enableval}],[enable_interval=no])
132:
133: if test ${enable_interval:=no} != no ; then
134: libasir_postfix=${libasir_postfix}_itv
135: AC_DEFINE([INTERVAL])
136: if test "${enable_interval}" = debug ; then
137: AC_DEFINE([ITVDEBUG])
138: fi
139: fi
140:
141: dnl AC_ARG_ENABLE([fep],
142: dnl [ --enable-fep enable fep for human interfaces. [[no]]],
143: dnl [enable_fep=yes],[enable_fep=no])
144:
145: if test "${enable_fep:=no}" != no ; then
146: AC_DEFINE([FEP])
147: FEPLIB="-lreadline -ltermcap"
148: fi
149: AC_SUBST([FEPLIB])
150:
151: AC_ARG_ENABLE([fft-float],
152: [ --enable-fft-float enable FFT-FLOAT feature. [[no]]],
153: [enable_fft_float=yes],[enable_fft_float=no])
154:
155: if test "${enable_fft_float:=no}" != no ; then
156: AC_DEFINE([USE_FLOAT])
157: fi
158:
1.32 ohara 159: AC_ARG_WITH([mpi],
160: [ --with-mpi use the MPI library. [[no]]],
161: [with_mpi=${withval}],[with_mpi=no])
1.1 ohara 162:
163: if test "${with_mpi:=no}" != no ; then
164: AC_DEFINE([MPI])
165: fi
166:
167: dnl AC_ARG_WITH([lapack],
168: dnl [ --with-lapack use the LAPACK library. [[no]]],
169: dnl [with_lapack=${withval}],[with_lapack=no])
170:
171: if test "${with_lapack:=no}" != no ; then
1.22 saito 172: LAPACKLIB="-llapack -lblas -lg2c"
1.1 ohara 173: AC_DEFINE([LAPACK])
174: fi
175: AC_SUBST([LAPACKLIB])
176:
177: AC_SUBST([libasir_postfix])
178:
179: dnl Object files in assembly languages for each micro processors.
180: dnl i386_elf_obj: for FreeBSD 3.x or later and Linux 2.x
181: dnl i386_aout_obj: for FreeBSD 2.x, Linux 1.x, and Cygwin
182: dnl sparc_v8_obj: for Sparc V8 processor on Solaris 2.x
183: dnl sparc_v9_obj: for Sparc V9 processor on Solaris 2.x
184: dnl generic_obj: for 32bits/64bits generic micro processors
185:
186: i386_elf_obj=asmi_l.o
187: i386_aout_obj=asmi.o
188: sparc_v8_obj="sparc-2.o asm4-2.o edr-2.o"
1.19 noro 189: sparc_v9_obj=asmalpha.o
1.1 ohara 190: generic_obj=asmalpha.o
191:
192: case "${host}" in
1.9 ohara 193: [i[3-6]86-*-freebsd[3-9].*])
1.1 ohara 194: asm_obj="${i386_elf_obj}"
1.9 ohara 195: ;;
196: [i[3-6]86-*-linux*]|x86-*-linux*)
197: asm_obj="${i386_elf_obj}"
1.13 ohara 198: AC_DEFINE([_BSD_SOURCE])
1.1 ohara 199: ;;
200: *-*-cygwin*)
201: asm_obj="${i386_aout_obj}"
1.16 ohara 202: ;;
203: [i[3-6]86-*-interix*])
1.17 ohara 204: asm_obj="${i386_aout_obj}"
1.16 ohara 205: AC_DEFINE([_ALL_SOURCE])
1.1 ohara 206: ;;
207: sparc-sun-solaris2.*)
208: case "`uname -m`" in
209: [sun4[dm]]) asm_obj="${sparc_v8_obj}" ;;
1.20 ohara 210: sun4u*) asm_obj="${sparc_v9_obj}"
211: if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
212: CFLAGS="${CFLAGS} -m64"
213: fi
214: AC_SUBST([USE_GC_SPARC64])
215: ;;
1.1 ohara 216: *) asm_obj="${generic_obj}" ;;
217: esac
218: AC_DEFINE([SYSV])
1.2 ohara 219: ;;
1.24 ohara 220: *-apple-darwin*)
1.2 ohara 221: asm_obj="${generic_obj}"
222: AC_DEFINE([__DARWIN__])
1.8 ohara 223: ;;
224: arm*-*-linux*)
225: asm_obj="${generic_obj}"
226: if test "${ac_test_CFLAGS}" != set -a "${GCC}" = yes ; then
227: CFLAGS="${CFLAGS} -fsigned-char"
228: fi
1.1 ohara 229: ;;
230: *)
231: asm_obj="${generic_obj}"
232: ;;
233: esac
234:
235: AC_SUBST([asm_obj])
236:
237: dnl for Solaris 2.x
238: AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket,socket)])
239: AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl,gethostbyname)])
240:
1.25 ohara 241: AC_CONFIG_FILES([Makefile engine/Makefile asm/Makefile builtin/Makefile fft/Makefile include/Makefile io/Makefile lib/Makefile parse/Makefile plot/Makefile])
242: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>