view configure.ac @ 15874:11d5a7276b6d

configure.ac: Remove some no longer accurate comments. * configure.ac: Remove some no longer accurate comments.
author Rik <rik@octave.org>
date Wed, 02 Jan 2013 16:59:10 -0800
parents 7d300b85ee25
children c18692212b90
line wrap: on
line source

dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (C) 1993-2012 John W. Eaton
### 
### This file is part of Octave.
### 
### Octave is free software; you can redistribute it and/or modify it
### under the terms of the GNU General Public License as published by the
### Free Software Foundation; either version 3 of the License, or (at
### your option) any later version.
### 
### Octave is distributed in the hope that it will be useful, but WITHOUT
### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
### for more details.
### 
### You should have received a copy of the GNU General Public License
### along with Octave; see the file COPYING.  If not, see
### <http://www.gnu.org/licenses/>.

AC_PREREQ([2.62])
AC_INIT([GNU Octave], [3.7.0+], [http://octave.org/bugs.html], [octave])

dnl PACKAGE_VERSION is set by the AC_INIT VERSION arg
OCTAVE_VERSION="$PACKAGE_VERSION"
OCTAVE_API_VERSION_NUMBER="48"
OCTAVE_API_VERSION="api-v$OCTAVE_API_VERSION_NUMBER+"
OCTAVE_RELEASE_DATE="2012-02-22"
OCTAVE_COPYRIGHT="Copyright (C) 2012 John W. Eaton and others."
AC_SUBST(OCTAVE_VERSION)
AC_SUBST(OCTAVE_API_VERSION_NUMBER)
AC_SUBST(OCTAVE_API_VERSION)
AC_SUBST(OCTAVE_RELEASE_DATE)
AC_SUBST(OCTAVE_COPYRIGHT)

dnl FIXME: We should auto-insert the Mercurial changeset ID into the
dnl        AC_REVISION field whenever configure.ac is modified.
dnl AC_REVISION($Revision: 1.603 $)
AC_CONFIG_SRCDIR([libinterp/octave.cc])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([1.11 tar-ustar])

OCTAVE_CANONICAL_HOST

AC_DEFINE(OCTAVE_SOURCE, 1, [Define to 1 if this is Octave.])
  
AC_USE_SYSTEM_EXTENSIONS

### Make configure args available for other uses.

config_opts=$ac_configure_args
AC_SUBST(config_opts)

### Set default file locations

OCTAVE_SET_DEFAULT([octlibdir], '$(libdir)/octave/$(version)')
OCTAVE_SET_DEFAULT([archlibdir],
  '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localarchlibdir],
  '$(libexecdir)/octave/site/exec/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localapiarchlibdir],
  '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localverarchlibdir],
  '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([octfiledir],
  '$(libdir)/octave/$(version)/oct/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localoctfiledir],
  '$(libdir)/octave/site/oct/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localapioctfiledir],
  '$(libdir)/octave/site/oct/$(api_version)/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([localveroctfiledir],
  '$(libdir)/octave/$(version)/site/oct/$(canonical_host_type)')
OCTAVE_SET_DEFAULT([octincludedir], '$(includedir)/octave-$(version)/octave')
OCTAVE_SET_DEFAULT([fcnfiledir], '$(datadir)/octave/$(version)/m')
OCTAVE_SET_DEFAULT([localfcnfiledir], '$(datadir)/octave/site/m')
OCTAVE_SET_DEFAULT([localapifcnfiledir],
  '$(datadir)/octave/site/$(api_version)/m')
OCTAVE_SET_DEFAULT([localverfcnfiledir], '$(datadir)/octave/$(version)/site/m')
OCTAVE_SET_DEFAULT([octetcdir], '$(datadir)/octave/$(version)/etc')
OCTAVE_SET_DEFAULT([doc_cache_file], '$(octetcdir)/doc-cache')
OCTAVE_SET_DEFAULT([texi_macros_file], '$(octetcdir)/macros.texi')
OCTAVE_SET_DEFAULT([imagedir], '$(datadir)/octave/$(version)/imagelib')
OCTAVE_SET_DEFAULT([man1dir], '$(mandir)/man1')
OCTAVE_SET_DEFAULT([man1ext], '.1')
OCTAVE_SET_DEFAULT([infofile], '$(infodir)/octave.info')

### Check for programs used in building, installing, and running Octave.

## Programs used in configuring Octave.
## Find pkg-config executable (sets $PKG_CONFIG)
PKG_PROG_PKG_CONFIG

## Programs used in Makefiles.
AC_PROG_AWK
OCTAVE_PROG_FIND
OCTAVE_PROG_SED
OCTAVE_PROG_PERL

## Programs used to build parts of Octave.
OCTAVE_PROG_GPERF

OCTAVE_PROG_FLEX
AC_SUBST([LEX_OUTPUT_ROOT], [lex.octave_])

OCTAVE_PROG_BISON

OCTAVE_PROG_MAKEINFO
OCTAVE_PROG_TEXI2DVI
OCTAVE_PROG_TEXI2PDF

## Programs used when installing Octave.
AC_PROG_LN_S
AC_PROG_MKDIR_P

AC_PROG_INSTALL
INSTALL_SCRIPT='${INSTALL}'
AC_SUBST(INSTALL_SCRIPT)

OCTAVE_PROG_DESKTOP_FILE_INSTALL

## Programs used when running Octave
OCTAVE_PROG_GHOSTSCRIPT
OCTAVE_PROG_GNUPLOT
OCTAVE_PROG_PAGER
OCTAVE_PROG_PYTHON

### Path separator.

sepchar=':'
AC_ARG_WITH([sepchar],
  [AS_HELP_STRING([--with-sepchar=<char>],
    [use <char> as the path separation character])])
case $with_sepchar in
  yes | "")
    case $host_os in
      mingw* | msdosmsvc)
        sepchar=';' ;;
    esac
    ;;
  no)
    AC_MSG_ERROR([You are required to define a path separation character])
    ;;
  *)
    sepchar=$with_sepchar
    ;;
esac
AC_SUBST(sepchar)
AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'],
  [Define this to be the path separator for your system, as a character constant.])
AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"],
  [Define this to be the path separator for your system, as a string.])

### Define the path to the shell on the host system.  Most systems will
### ensure /bin/sh is the default shell so this can be safely ignored by
### almost everyone.  However, when building for Android, for example,
### this will need to be set.
SHELL_PATH=/bin/sh
AC_ARG_WITH([shell],
  [AS_HELP_STRING([--with-shell=SHELL],
    [use SHELL as the shell interpreter (default: /bin/sh)])])
case $with_shell in
  no)
    AC_MSG_ERROR([A shell interpreter is required])
  ;;
  yes | "")
  ;;
  *)
    SHELL_PATH=$with_shell
  ;;
esac
AC_DEFINE_UNQUOTED([SHELL_PATH], ["$SHELL_PATH"],
  [Define this to be the path to the shell command interpreter.])

### Enable bounds checking on element references within Octave's array and
### matrix classes.  This slows down some operations a bit, so it is turned off
### by default.

BOUNDS_CHECKING=false
AC_ARG_ENABLE([bounds-check],
  [AS_HELP_STRING([--enable-bounds-check],
    [enable bounds checking for indexing in internal array classes])],
  [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], [])
if $BOUNDS_CHECKING; then
  AC_DEFINE(BOUNDS_CHECKING, 1, [Define to 1 to use internal bounds checking.])
fi

### Use Octave's built-in memory allocator rather than straightforward malloc.
### Disabled by default.

USE_OCTAVE_ALLOCATOR=false
AC_ARG_ENABLE([octave-allocator],
  [AS_HELP_STRING([--enable-octave-allocator],
    [use the obsolete octave_allocator class for many of Octave's objects (mostly octave_value types).  You probably do NOT want to enable this feature.])],
  [if test "$enableval" = yes; then USE_OCTAVE_ALLOCATOR=true; fi], [])
if $USE_OCTAVE_ALLOCATOR; then
  AC_DEFINE(USE_OCTAVE_ALLOCATOR, 1,
    [Define to 1 to use octave_allocator class.])
fi

### Use atomic operations for internal reference counting.  This is required
### for thread-safe behavior but incurs a significant slowdown, and is thus
### disabled by default.

USE_ATOMIC_REFCOUNT=false
AC_ARG_ENABLE([atomic-refcount],
  [AS_HELP_STRING([--enable-atomic-refcount],
    [use atomic operations for internal reference counting.  This is required for thread-safe behavior but does not by itself make Octave internals thread safe.])],
  [if test "$enableval" = yes; then USE_ATOMIC_REFCOUNT=true; fi], [])
if $USE_ATOMIC_REFCOUNT; then
  AC_DEFINE(USE_ATOMIC_REFCOUNT, 1,
    [Define to 1 to use atomic operations for reference counting.])
fi

### Disable running Make in the doc directory.
### This is useful, for example, when building Octave on systems without TeX.

DOCDIR=doc
AC_ARG_ENABLE([docs],
  [AS_HELP_STRING([--disable-docs], [don't build documentation files])],
  [if test "$enableval" = no; then
     DOCDIR=
     warn_docs="building documentation disabled; make dist will fail"
     OCTAVE_CONFIGURE_WARNING([warn_docs])
   fi],
  [])
AC_SUBST(DOCDIR)

### If possible, use a 64-bit integer type for array dimensions and indexing.

USE_64_BIT_IDX_T=false
OCTAVE_IDX_TYPE=int
AC_ARG_ENABLE(64,
  [AS_HELP_STRING([--enable-64],
    [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])],
  [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], [])
if $USE_64_BIT_IDX_T; then
  AC_CHECK_SIZEOF([void *])
  AC_CHECK_SIZEOF([int])
  AC_CHECK_SIZEOF([long])
  if test $ac_cv_sizeof_void_p -eq 8; then
    if test $ac_cv_sizeof_int -eq 8; then
      OCTAVE_IDX_TYPE=int
    elif test $ac_cv_sizeof_long -eq 8; then
      OCTAVE_IDX_TYPE=long
      AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long.])
    else
      warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features"
      OCTAVE_CONFIGURE_WARNING([warn_64_bit])