annotate src/libsndfile-1.0.25/M4/octave.m4 @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 545efbb81310
children
rev   line source
cannam@85 1 dnl Evaluate an expression in octave
cannam@85 2 dnl
cannam@85 3 dnl OCTAVE_EVAL(expr,var) -> var=expr
cannam@85 4 dnl
cannam@85 5 dnl Stolen from octave-forge
cannam@85 6
cannam@85 7 AC_DEFUN([OCTAVE_EVAL],
cannam@85 8 [
cannam@85 9 AC_MSG_CHECKING([for $1 in $OCTAVE])
cannam@85 10 $2=`TERM=;$OCTAVE -qfH --eval "disp($1)"`
cannam@85 11 AC_MSG_RESULT($$2)
cannam@85 12 AC_SUBST($2)
cannam@85 13 ]) # OCTAVE_EVAL
cannam@85 14
cannam@85 15 dnl @synopsis AC_OCTAVE_VERSION
cannam@85 16 dnl
cannam@85 17 dnl Find the version of Octave.
cannam@85 18 dnl @version 1.0 Aug 23 2007
cannam@85 19 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
cannam@85 20 dnl
cannam@85 21 dnl Permission to use, copy, modify, distribute, and sell this file for any
cannam@85 22 dnl purpose is hereby granted without fee, provided that the above copyright
cannam@85 23 dnl and this permission notice appear in all copies. No representations are
cannam@85 24 dnl made about the suitability of this software for any purpose. It is
cannam@85 25 dnl provided "as is" without express or implied warranty.
cannam@85 26 dnl
cannam@85 27
cannam@85 28 AC_DEFUN([AC_OCTAVE_VERSION],
cannam@85 29 [
cannam@85 30
cannam@85 31 AC_ARG_WITH(octave,
cannam@85 32 AC_HELP_STRING([--with-octave], [choose the octave version]),
cannam@85 33 [ with_octave=$withval ])
cannam@85 34
cannam@85 35 test -z "$with_octave" && with_octave=octave
cannam@85 36
cannam@85 37 AC_CHECK_PROG(HAVE_OCTAVE,$with_octave,yes,no)
cannam@85 38
cannam@85 39 if test "x$ac_cv_prog_HAVE_OCTAVE" = "xyes" ; then
cannam@85 40 OCTAVE=$with_octave
cannam@85 41 OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION)
cannam@85 42 fi
cannam@85 43
cannam@85 44 AC_SUBST(OCTAVE)
cannam@85 45 AC_SUBST(OCTAVE_VERSION)
cannam@85 46
cannam@85 47 ])# AC_OCTAVE_VERSION
cannam@85 48
cannam@85 49 dnl @synopsis AC_OCTAVE_CONFIG_VERSION
cannam@85 50 dnl
cannam@85 51 dnl Find the version of Octave.
cannam@85 52 dnl @version 1.0 Aug 23 2007
cannam@85 53 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
cannam@85 54 dnl
cannam@85 55 dnl Permission to use, copy, modify, distribute, and sell this file for any
cannam@85 56 dnl purpose is hereby granted without fee, provided that the above copyright
cannam@85 57 dnl and this permission notice appear in all copies. No representations are
cannam@85 58 dnl made about the suitability of this software for any purpose. It is
cannam@85 59 dnl provided "as is" without express or implied warranty.
cannam@85 60 dnl
cannam@85 61
cannam@85 62 AC_DEFUN([AC_OCTAVE_CONFIG_VERSION],
cannam@85 63 [
cannam@85 64
cannam@85 65 AC_ARG_WITH(octave-config,
cannam@85 66 AC_HELP_STRING([--with-octave-config], [choose the octave-config version]),
cannam@85 67 [ with_octave_config=$withval ])
cannam@85 68
cannam@85 69 test -z "$with_octave_config" && with_octave_config=octave-config
cannam@85 70
cannam@85 71 AC_CHECK_PROG(HAVE_OCTAVE_CONFIG,$with_octave_config,yes,no)
cannam@85 72
cannam@85 73 if test "x$ac_cv_prog_HAVE_OCTAVE_CONFIG" = "xyes" ; then
cannam@85 74 OCTAVE_CONFIG=$with_octave_config
cannam@85 75 AC_MSG_CHECKING([for version of $OCTAVE_CONFIG])
cannam@85 76 OCTAVE_CONFIG_VERSION=`$OCTAVE_CONFIG --version`
cannam@85 77 AC_MSG_RESULT($OCTAVE_CONFIG_VERSION)
cannam@85 78 fi
cannam@85 79
cannam@85 80 AC_SUBST(OCTAVE_CONFIG)
cannam@85 81 AC_SUBST(OCTAVE_CONFIG_VERSION)
cannam@85 82
cannam@85 83 ])# AC_OCTAVE_CONFIG_VERSION
cannam@85 84
cannam@85 85 dnl @synopsis AC_OCTAVE_BUILD
cannam@85 86 dnl
cannam@85 87 dnl Check programs and headers required for building octave plugins.
cannam@85 88 dnl @version 1.0 Aug 23 2007
cannam@85 89 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
cannam@85 90 dnl
cannam@85 91 dnl Permission to use, copy, modify, distribute, and sell this file for any
cannam@85 92 dnl purpose is hereby granted without fee, provided that the above copyright
cannam@85 93 dnl and this permission notice appear in all copies. No representations are
cannam@85 94 dnl made about the suitability of this software for any purpose. It is
cannam@85 95 dnl provided "as is" without express or implied warranty.
cannam@85 96
cannam@85 97
cannam@85 98 AC_DEFUN([AC_OCTAVE_BUILD],
cannam@85 99 [
cannam@85 100
cannam@85 101 dnl Default to no.
cannam@85 102 OCTAVE_BUILD=no
cannam@85 103
cannam@85 104 AC_OCTAVE_VERSION
cannam@85 105 OCTAVE_MKOCTFILE_VERSION
cannam@85 106 AC_OCTAVE_CONFIG_VERSION
cannam@85 107
cannam@85 108 prog_concat="$ac_cv_prog_HAVE_OCTAVE$ac_cv_prog_HAVE_OCTAVE_CONFIG$ac_cv_prog_HAVE_MKOCTFILE"
cannam@85 109
cannam@85 110 if test "x$prog_concat" = "xyesyesyes" ; then
cannam@85 111 if test "x$OCTAVE_VERSION" != "x$MKOCTFILE_VERSION" ; then
cannam@85 112 AC_MSG_WARN([** Mismatch between versions of octave and mkoctfile. **])
cannam@85 113 AC_MSG_WARN([** Octave libsndfile modules will not be built. **])
cannam@85 114 elif test "x$OCTAVE_VERSION" != "x$OCTAVE_CONFIG_VERSION" ; then
cannam@85 115 AC_MSG_WARN([** Mismatch between versions of octave and octave-config. **])
cannam@85 116 AC_MSG_WARN([** Octave libsndfile modules will not be built. **])
cannam@85 117 else
cannam@85 118 case "$MKOCTFILE_VERSION" in
cannam@85 119 2.*)
cannam@85 120 AC_MSG_WARN([Octave version 2.X is not supported.])
cannam@85 121 ;;
cannam@85 122 3.0.*)
cannam@85 123 OCTAVE_DEST_ODIR=`$OCTAVE_CONFIG --oct-site-dir | sed 's%^/usr%${prefix}%'`
cannam@85 124 OCTAVE_DEST_MDIR=`$OCTAVE_CONFIG --m-site-dir | sed 's%^/usr%${prefix}%'`
cannam@85 125
cannam@85 126 OCTAVE_BUILD=yes
cannam@85 127 ;;
cannam@85 128 *)
cannam@85 129 AC_MSG_WARN([Octave version $MKOCTFILE_VERSION is not supported.])
cannam@85 130 ;;
cannam@85 131 esac
cannam@85 132 fi
cannam@85 133 AC_MSG_RESULT([building octave libsndfile module... $OCTAVE_BUILD])
cannam@85 134 fi
cannam@85 135
cannam@85 136 AC_SUBST(OCTAVE_DEST_ODIR)
cannam@85 137 AC_SUBST(OCTAVE_DEST_MDIR)
cannam@85 138
cannam@85 139 AC_SUBST(MKOCTFILE)
cannam@85 140
cannam@85 141 AM_CONDITIONAL(BUILD_OCTAVE_MOD, test "x$OCTAVE_BUILD" = xyes)
cannam@85 142
cannam@85 143 ])# AC_OCTAVE_BUILD