Mercurial > hg > octave-nkf
diff src/mkoctfile.in @ 13010:edc5ec6e949b
maint: allow --enable-static --disable-dl to work again
* oct-conf.h.in (OCTAVE_CONF_OCTAVE_LINK_DEPS,
OCTAVE_CONF_OCTAVE_LINK_OPTS, OCTAVE_CONF_OCT_LINK_DEPS,
OCTAVE_CONF_OCT_LINK_OPTS): New macros.
* common.mk (do_subst_config_vals): Substitute them.
* toplev.cc (octave_config_info): Add them to the info map
* libcruft/link-deps.mk, liboctave/link-deps.mk, src/link-deps.mk:
New files.
* libcruft/Makefile.am, liboctave/Makefile.am, src/Makefile.am:
Include link-deps.mk files to get link options and dependencies.
Set link options in _LDFLAGS variable, not _LIBADD variable.
* configure.ac (--enable-dl): Update help message.
* configure.ac (AMCOND_LINK_ALL_DEPS): New conditional.
* liboctave/link-deps.mk, src/link-deps.mk: Use it.
* src/DLD-FUNCTIONS/module-files: Store file-specific CPPFLAGS,
* LDFLAGS, and LIBRARY info here.
src/Makefile.am: Not here.
* src/DLD-FUNCTIONS/config-module.awk: Use file-specific CPPFLAGS,
LDFLAGS, and LIBRARY info from module-files to generate variable
definitions and rules.
* src/Makefile.am (DLD_DYNAMIC_SRC, DLD_STATIC_SRC, OCTAVE_LIBS,
OCTINTERP_LINK_DEPS): Delete.
(octave_LDADD): Set to liboctinerp.la and $(OCTAVE_LINK_DEPS), not
$(OCTAVE_LIBS).
(octave_LDFLAGS): New variable.
(DLD_STATIC_DEF_FILES, DLD_DYNAMIC_DEF_FILES): Delete.
(DLD_FUNCTIONS_DEF_FILES): New variable.
(DEF_FILES): Set conditionally.
(DLD_FUNCTIONS_PKG_ADD_FILE): New conditionally defined variable.
Change all uses of hard-coded file name.
(DLD-FUNCTIONS/PKG_ADD:): Conditionally define rule.
* mkoctfile.in, mkoctfile.cc.in: Update for new linking rules.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 26 Aug 2011 15:36:14 -0400 |
parents | 00fbb05f099c |
children | f3c53fea9fb5 |
line wrap: on
line diff
--- a/src/mkoctfile.in +++ b/src/mkoctfile.in @@ -99,6 +99,10 @@ : ${FFTW3F_LIBS=%OCTAVE_CONF_FFTW3F_LIBS%} : ${LIBS=%OCTAVE_CONF_LIBS%} : ${FLIBS=%OCTAVE_CONF_FLIBS%} +: ${OCTAVE_LINK_DEPS=%OCTAVE_CONF_OCTAVE_LINK_DEPS%} +: ${OCTAVE_LINK_DEPS=%OCTAVE_CONF_OCTAVE_LINK_OPTS%} +: ${OCT_LINK_DEPS=%OCTAVE_CONF_OCT_LINK_DEPS%} +: ${OCT_LINK_DEPS=%OCTAVE_CONF_OCT_LINK_OPTS%} : ${LD_CXX=%OCTAVE_CONF_LD_CXX%} : ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} : ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} @@ -221,7 +225,7 @@ -s, --strip Strip output file. - --mex Create a MEX file. + --mex Create a MEX file. Set the default output extension to ".mex". -o FILE, --output FILE Output file name. Default extension is .oct @@ -231,28 +235,29 @@ -p VAR, --print VAR Print configuration variable VAR. Recognized variables are: - ALL_CFLAGS FFTW3F_LDFLAGS - ALL_CXXFLAGS FFTW3F_LIBS - ALL_FFLAGS FLIBS - ALL_LDFLAGS FPICFLAG - BLAS_LIBS INCFLAGS - CC LAPACK_LIBS - CFLAGS LDFLAGS - CPICFLAG LD_CXX - CPPFLAGS LD_STATIC_FLAG - CXX LFLAGS - CXXFLAGS LIBCRUFT - CXXPICFLAG LIBOCTAVE - DEPEND_EXTRA_SED_PATTERN LIBOCTINTERP - DEPEND_FLAGS LIBS - DL_LD OCTAVE_LIBS - DL_LDFLAGS RDYNAMIC_FLAG - EXEEXT READLINE_LIBS - F77 RLD_FLAG - F77_INTEGER_8_FLAG SED - FFLAGS XTRA_CFLAGS - FFTW3_LDFLAGS XTRA_CXXFLAGS - FFTW3_LIBS + ALL_CFLAGS FFTW3F_LIBS + ALL_CXXFLAGS FLIBS + ALL_FFLAGS FPICFLAG + ALL_LDFLAGS INCFLAGS + BLAS_LIBS LAPACK_LIBS + CC LDFLAGS + CFLAGS LD_CXX + CPICFLAG LD_STATIC_FLAG + CPPFLAGS LFLAGS + CXX LIBCRUFT + CXXFLAGS LIBOCTAVE + CXXPICFLAG LIBOCTINTERP + DEPEND_EXTRA_SED_PATTERN LIBS + DEPEND_FLAGS OCTAVE_LIBS + DL_LD OCTAVE_LINK_DEPS + DL_LDFLAGS OCT_LINK_DEPS + EXEEXT RDYNAMIC_FLAG + F77 READLINE_LIBS + F77_INTEGER_8_FLAG RLD_FLAG + FFLAGS SED + FFTW3_LDFLAGS XTRA_CFLAGS + FFTW3_LIBS XTRA_CXXFLAGS + FFTW3F_LDFLAGS -v, --verbose Echo commands as they are executed. @@ -529,7 +534,7 @@ if $link && [ -n "$objfiles" ]; then if $link_stand_alone; then if [ -n "$LD_CXX" ]; then - cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $libfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $LAPACK_LIBS $BLAS_LIBS $FFTW_LIBS $READLINE_LIBS $LIBS $FLIBS" + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $libfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LINK_OPTS $OCTAVE_LINK_DEPS" $dbg $cmd eval $cmd else @@ -537,8 +542,7 @@ exit 1 fi else - LINK_DEPS="$LFLAGS $OCTAVE_LIBS $LDFLAGS $LAPACK_LIBS $BLAS_LIBS $FFTW_LIBS $LIBS $FLIBS" - cmd="$DL_LD $DL_LDFLAGS $pass_on_options -o $octfile $objfiles $libfiles $ldflags $LINK_DEPS" + cmd="$DL_LD $DL_LDFLAGS $pass_on_options -o $octfile $objfiles $libfiles $ldflags $LFLAGS $OCT_LINK_OPTS $OCT_LINK_DEPS" $dbg $cmd eval $cmd fi