2009-09-16 18:52:22 +02:00
|
|
|
dnl ax_mexext.m4 --- check for MEX-file suffix.
|
2009-07-06 15:57:43 +02:00
|
|
|
dnl
|
2019-04-16 14:30:37 +02:00
|
|
|
dnl Copyright © 2000-2003 Ralph Schleicher
|
2019-09-16 18:27:53 +02:00
|
|
|
dnl Copyright © 2009-2019 Dynare Team
|
2009-07-06 15:57:43 +02:00
|
|
|
dnl
|
|
|
|
dnl This program is free software; you can redistribute it and/or
|
|
|
|
dnl modify it under the terms of the GNU General Public License as
|
|
|
|
dnl published by the Free Software Foundation; either version 2,
|
|
|
|
dnl or (at your option) any later version.
|
|
|
|
dnl
|
|
|
|
dnl This program is distributed in the hope that it will be useful,
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
dnl GNU General Public License for more details.
|
|
|
|
dnl
|
2010-01-13 18:39:59 +01:00
|
|
|
dnl You should have received a copy of the GNU General Public License along
|
2021-06-09 17:33:48 +02:00
|
|
|
dnl with this program. If not, see <https://www.gnu.org/licenses/>.
|
2009-07-06 15:57:43 +02:00
|
|
|
dnl
|
|
|
|
dnl As a special exception to the GNU General Public License, if
|
|
|
|
dnl you distribute this file as part of a program that contains a
|
|
|
|
dnl configuration script generated by GNU Autoconf, you may include
|
|
|
|
dnl it under the same distribution terms that you use for the rest
|
|
|
|
dnl of that program.
|
|
|
|
dnl
|
|
|
|
dnl Code:
|
|
|
|
|
|
|
|
# AX_MEXEXT
|
|
|
|
# ---------
|
|
|
|
# Check for MEX-file suffix.
|
|
|
|
AC_DEFUN([AX_MEXEXT],
|
|
|
|
[dnl
|
|
|
|
AC_PREREQ([2.50])
|
2009-07-06 19:01:12 +02:00
|
|
|
AC_REQUIRE([AX_MATLAB])
|
2009-10-30 16:09:12 +01:00
|
|
|
AC_REQUIRE([AC_CANONICAL_BUILD])
|
2009-07-06 15:57:43 +02:00
|
|
|
AC_CACHE_CHECK([for MEX-file suffix], [ax_cv_mexext],
|
|
|
|
[if test "${MEXEXT+set}" = set ; then
|
|
|
|
ax_cv_mexext="$MEXEXT"
|
|
|
|
else
|
2009-10-30 16:09:12 +01:00
|
|
|
case $build_os in
|
2019-09-16 18:27:53 +02:00
|
|
|
*cygwin*|*mingw*)
|
2018-10-31 15:57:34 +01:00
|
|
|
ax_cv_mexext=$("$MATLAB"/bin/mexext.bat | sed 's/\r//')
|
2009-07-06 19:01:12 +02:00
|
|
|
;;
|
|
|
|
*)
|
2018-10-31 15:57:34 +01:00
|
|
|
ax_cv_mexext=$("$MATLAB"/bin/mexext)
|
2009-07-06 19:01:12 +02:00
|
|
|
;;
|
|
|
|
esac
|
2009-07-06 15:57:43 +02:00
|
|
|
fi])
|
|
|
|
MEXEXT="$ax_cv_mexext"
|
|
|
|
AC_SUBST([MEXEXT])
|
|
|
|
])
|
|
|
|
|
|
|
|
# AX_DOT_MEXEXT
|
|
|
|
# -------------
|
|
|
|
# Check for MEX-file suffix with leading dot.
|
|
|
|
AC_DEFUN([AX_DOT_MEXEXT],
|
|
|
|
[dnl
|
|
|
|
AC_REQUIRE([AX_MEXEXT])
|
|
|
|
case $MEXEXT in
|
|
|
|
.*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test -n "$MEXEXT" ; then
|
|
|
|
MEXEXT=.$MEXEXT
|
|
|
|
AC_MSG_RESULT([setting MEX-file suffix to $MEXEXT])
|
|
|
|
AC_SUBST([MEXEXT])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
])
|
|
|
|
|
2009-09-16 18:52:22 +02:00
|
|
|
dnl ax_mexext.m4 ends here
|
2009-07-06 19:01:12 +02:00
|
|
|
|
|
|
|
dnl Local variables:
|
|
|
|
dnl tab-width: 8
|
|
|
|
dnl End:
|