1
1
# Process this file with autoconf to produce a configure script.
3
AC_CONFIG_SRCDIR([base/ctl.c])
4
AC_CONFIG_HEADER([base/ctl.h base/f77_func.h])
2
AC_INIT(libctl, 3.0.1, stevenj@alum.mit.edu)
3
AC_CONFIG_SRCDIR([src/ctl.c])
4
AC_CONFIG_HEADERS([config.h src/ctl.h])
6
# Shared-library version number; indicates api compatibility, and is
7
# not the same as the "public" version number. (Don't worry about this
8
# except for public releases.)
9
SHARED_VERSION_INFO="3:0:0"
12
AC_SUBST(SHARED_VERSION_INFO)
13
AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default
6
16
###########################################################################
18
LIBCTL_VERSION=$PACKAGE_VERSION
9
19
AC_DEFINE_UNQUOTED(LIBCTL_VERSION, "$LIBCTL_VERSION",
10
20
[Define to version string for libctl.])
11
21
AC_SUBST(LIBCTL_VERSION)
23
33
# Checks for programs.
29
36
AC_CHECK_PROGS(INDENT, indent gindent, echo)
32
39
# check how to transform the name of the installed program:
35
41
AC_ARG_ENABLE(debug, [ --enable-debug compile for debugging], ok=$enableval, ok=no)
36
42
if test "$ok" = "yes"; then
109
113
], [scm_flush_all_ports();], [AC_DEFINE(HAVE_SCM_FLUSH_ALL_PORTS, 1, [Define if we have scm_flush_all_ports])], ok=no)
110
114
AC_MSG_RESULT($ok)
112
AC_CHECK_FUNCS(scm_make_complex scm_variable_set_x scm_c_lookup)
116
AC_CHECK_FUNCS(scm_make_complex scm_variable_set_x scm_c_lookup scm_c_make_vector)
114
118
AC_MSG_CHECKING([for SCM_COMPLEXP])
146
150
###########################################################################
148
# Add libctl and libgeom -I/-L/-l flags to CPPFLAGS/LDFLAGS/LIBS,
149
# so that examples/Makefile.in can be used as-is for other programs.
150
# (The flags need to go first so that they'll take precedence over
151
# any previously-installed version of libctl.)
153
CPPFLAGS="-I`pwd`/$srcdir/base -I`pwd`/$srcdir/utils $CPPFLAGS"
154
LDFLAGS="-L`pwd`/$srcdir/base $LDFLAGS"
151
# Check for C99 complex-number support, for cintegrate.c
153
AC_CHECK_HEADERS(complex.h)
154
AC_CACHE_CHECK([for C complex keyword], acx_cv_c_complex,
155
[acx_cv_c_complex=unsupported
156
for acx_kw in complex _Complex __complex__; do
157
AC_TRY_COMPILE([#include <complex.h>], [float $acx_kw foo;],
158
[acx_cv_c_complex=$acx_kw; break])
162
if test "$acx_cv_c_complex" = "unsupported"; then
163
AC_MSG_WARN([C doesn't support complex numbers; disabling complex integration.])
165
AC_DEFINE([CTL_HAS_COMPLEX_INTEGRATION], [1], [If we have C99 complex nums])
156
168
###########################################################################
158
LIBCTL_DIR="`pwd`/$srcdir"
171
case $libctl_dir in .*) libctl_dir=`pwd`/$libctl_dir ;; esac
173
LIBCTL_DIR="$libctl_dir"
159
174
AC_SUBST(LIBCTL_DIR)
161
GEN_CTL_IO="`pwd`/$srcdir/utils/gen-ctl-io"
176
GEN_CTL_IO="`pwd`/utils/gen-ctl-io"
162
177
AC_SUBST(GEN_CTL_IO)
164
AC_CONFIG_FILES([Makefile base/Makefile utils/Makefile examples/Makefile utils/gen-ctl-io])
179
# On IRIX, basename/dirname functions require -lgen
180
AC_CHECK_LIB(gen, basename)
182
###########################################################################
184
AC_CONFIG_FILES([Makefile src/Makefile utils/Makefile examples/Makefile examples/example.scm])
185
AC_CONFIG_FILES([utils/gen-ctl-io], [chmod u+x utils/gen-ctl-io])