Mercurial > pytave
diff configure.ac @ 96:66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
author | David Grundberg <individ@acc.umu.se> |
---|---|
date | Sat, 11 Sep 2010 18:37:08 +0200 |
parents | 758d1a140c61 |
children | 7ccdec6d2207 |
line wrap: on
line diff
--- a/configure.ac Mon Dec 21 15:30:13 2009 +0100 +++ b/configure.ac Sat Sep 11 18:37:08 2010 +0200 @@ -4,6 +4,27 @@ AC_PREREQ(2.61) AC_INIT(pytave, 0.1.1, [[https://bugs.launchpad.net/pytave]]) +AC_ARG_WITH(numpy, + [AS_HELP_STRING([--with-numpy], + [use NumPy module (experimental) + @<:@default=yes@:>@])], + [pytave_enable_numpy="$withval"], + [pytave_enable_numpy=yes]) + +AC_ARG_WITH(numeric, + [AS_HELP_STRING([--with-numeric], + [use legacy Numeric module. NumPy must be disabled. + @<:@default=no@:>@])], + [pytave_enable_numeric="$withval"], + [pytave_enable_numeric=no]) + +# Check for bad arguments. +AS_IF(test "x$pytave_enable_numpy" = "xyes" -a "x$pytave_enable_numeric" = "xyes" -o dnl +"x$pytave_enable_numpy" = "xno" -a "x$pytave_enable_numeric" = "xno", +[ + AC_ERROR([NumPy or Numeric: select one.]) +]) + # Some important programs. AC_LANG(C++) AC_PROG_CXX @@ -15,22 +36,6 @@ AC_CONFIG_SRCDIR([pytave.cc]) AC_CONFIG_HEADER([config.h]) -AC_PRESERVE_HELP_ORDER - -AC_ARG_WITH(numpy, - [AS_HELP_STRING([--with-numpy], - [use NumPy module (experimental) - @<:@default=yes@:>@])], - [pytave_enable_numpy="$enableval"], - [pytave_enable_numpy=yes]) - -AC_ARG_WITH(numeric, - [AS_HELP_STRING([--with-numeric], - [use legacy Numeric module. NumPy must be disabled. - @<:@default=no@:>@])], - [pytave_enable_numeric="$enableval"], - [pytave_enable_numeric=no]) - dnl Define a convenience m4 macro for appending to pytave_missing_libs define(addmissing,pytave_missing_libs="$1 $pytave_missing_libs") @@ -42,15 +47,8 @@ # Pick a Python library to use AX_PYTHON_DEVEL([], [], [addmissing([Python development files])]) -# Check for bad arguments. -AS_IF(test "x$pytave_enable_numpy" == "xyes" -a "x$pytave_enable_numeric" == "xyes" -o dnl -"x$pytave_enable_numpy" == "xno" -a "x$pytave_enable_numeric" == "xno", -[ - AC_ERROR([NumPy or Numeric: select one.]) -]) - # Select Python matrix interface, prefer numpy. -AS_IF(test "x$pytave_enable_numpy" == "xno", +AS_IF(test "x$pytave_enable_numpy" = "xno", [ pytave_matrix_interface="numeric" ], @@ -59,7 +57,7 @@ ]) # Look for selected matrix interface -AS_IF(test "$pytave_matrix_interface" == "numpy", +AS_IF(test "$pytave_matrix_interface" = "numpy", [ AX_PYTHON_NUMPY( [ @@ -174,6 +172,16 @@ ========================================================================]) +AS_IF(test "x$pytave_have_uselocale" = "xno", +[ + AC_MSG_WARN([This system doesn't have uselocale support. + The Octave interpreter will NOT work correctly in any + locale but the C (POSIX) locale. Pytave would use the + uselocale function to work around this limitation. Pytave + can be compiled without it but will only work correcly in C + (POSIX) locale.]) +]) + AS_IF(test -n "$pytave_missing_libs", [ AC_MSG_ERROR([[Configuration failure. Halt.]])