~ubuntu-branches/ubuntu/saucy/libctl/saucy

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2006-05-01 20:25:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060501202501-lytbmb3oevyoqzxi
Tags: 3.0.1-1
* New upstream release (closes: #361676).
* Major rework of the debian/ directory. Switch to cdbs.
* Migrate Scheme files to a versioned location to allow several
  versions to be installed at once.
* Write a Makefile to put with the example.
* Update copyright, the library is now GPL.
* Use gfortran for the F77 wrappers.
* Standards-version is 3.7.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Process this file with autoconf to produce a configure script.
2
 
AC_INIT
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])
 
5
 
 
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"
 
10
 
 
11
AM_INIT_AUTOMAKE(1.6)
 
12
AC_SUBST(SHARED_VERSION_INFO)
 
13
AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default
 
14
AC_PROG_LIBTOOL
5
15
 
6
16
###########################################################################
7
17
 
8
 
LIBCTL_VERSION=2.2
 
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)
22
32
 
23
33
# Checks for programs.
24
34
AC_PROG_CC
25
 
AC_PROG_MAKE_SET
26
 
AC_PROG_INSTALL
27
 
AC_PROG_RANLIB
28
35
 
29
36
AC_CHECK_PROGS(INDENT, indent gindent, echo)
30
37
AC_SUBST(INDENT)
31
38
 
32
39
# check how to transform the name of the installed program:
33
 
AC_ARG_PROGRAM
34
40
 
35
41
AC_ARG_ENABLE(debug, [  --enable-debug          compile for debugging], ok=$enableval, ok=no)
36
42
if test "$ok" = "yes"; then
38
44
        AC_DEFINE(DEBUG, 1, [Define to enable debugging checks.])
39
45
fi
40
46
 
41
 
AC_CANONICAL_HOST
42
 
 
43
47
# Checks for header files.
44
48
AC_HEADER_STDC
45
49
 
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)
111
115
 
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)
113
117
 
114
118
AC_MSG_CHECKING([for SCM_COMPLEXP])
115
119
ok=yes
144
148
AC_F77_WRAPPERS
145
149
 
146
150
###########################################################################
147
 
 
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.)
152
 
 
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
 
152
 
 
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])
 
159
  done
 
160
 ])
 
161
 
 
162
if test "$acx_cv_c_complex" = "unsupported"; then
 
163
   AC_MSG_WARN([C doesn't support complex numbers; disabling complex integration.])
 
164
else
 
165
   AC_DEFINE([CTL_HAS_COMPLEX_INTEGRATION], [1], [If we have C99 complex nums])
 
166
fi
155
167
 
156
168
###########################################################################
157
169
 
158
 
LIBCTL_DIR="`pwd`/$srcdir"
 
170
libctl_dir=$srcdir
 
171
case $libctl_dir in .*) libctl_dir=`pwd`/$libctl_dir ;; esac
 
172
 
 
173
LIBCTL_DIR="$libctl_dir"
159
174
AC_SUBST(LIBCTL_DIR)
160
175
 
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)
163
178
 
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)
 
181
 
 
182
###########################################################################
 
183
 
 
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])
165
186
AC_OUTPUT