Node:MEX-File Support, Previous:Matlab Architecture, Up:Autoconf Macros



MEX-File Support

MEX-files are shared libraries that can be loaded from Matlab at run time.

AX_MEX_OPTIONS Macro
Check for MEX options file handling. The default behavior of this macro does not change the standard MEX options file handling.

The user can specify an alternative MEX options file by providing an argument to the --with-mex-options option for configure. Say --without-mex-options or --with-mex-options=no to disable MEX options file handling, --with-mex-options=yes enables the standard MEX options file handling.

For example, if you have installed both, a native C compiler as well as the GNU C compiler on your system, and you want to use the later for building a package, run configure as

./configure CC=gcc --with-mex-options=$MATLAB/bin/gccopts.sh

The AX_MEX_OPTIONS macro requires the file noopts.sh in the auxiliary build tools directory.

The AX_MEX_OPTIONS macro sets the output variables mexopts_sh to the absolute path name of the alternative MEX options file (default empty), and MEXOPTS to -f $(mexopts_sh) (default empty).

AX_PATH_MEX Macro
Check for a Unix compatible mex script.

Set output variable MEX to a command that creates MEX files. Default value is mex. The user can override the test by setting MEX in the environment.

The AX_PATH_MEX macro also sets the output variables MEXFLAGS (default -O) and MEXLDADD (default empty).

AX_MEXEXT Macro
Check for MEX-file extension.

Set output variable MEXEXT to the MEX-file extension, for example, mexsol for Sun Solaris. Please note that MEXEXT has no leading period. The user can override the test by setting MEXEXT in the environment.

AX_DOT_MEXEXT Macro
Like AX_MEXEXT described above but add a leading dot to the MEXEXT variable.

This macro is obsolete and only provided for backward compatibility with old make files. Consider changing your make files using the dotless form of the MEXEXT variable.