Mercurial > hg > octave-terminal
changeset 9515:eee9b3150446
more configure tweaks
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 11 Aug 2009 19:30:37 -0400 |
parents | af86991d8d47 |
children | fb933db0c517 |
files | ChangeLog Makeconf.in aclocal.m4 configure.in liboctave/ChangeLog liboctave/Makefile.in mkoctfile.cc.in mkoctfile.in src/ChangeLog src/oct-conf.h.in src/toplev.cc |
diffstat | 11 files changed, 87 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2009-08-11 John W. Eaton <jwe@octave.org> + + * configure.in: Define and substitute TERM_LIBS instead of + TERMLIBS. Don't add TERM_LIBS to LIBS. Define DL_LIBS instead of + adding them to LIBS. Display TERM_LIBS and DL_LIBS in summary + reporrt. + * aclocal.m4 (OCTAVE_ENABLE_READLINE): Define and substitute + READLINE_LIBS instead of LIBREADLINE. Don't add readline library + to LIBS. Display READLINE_LIBS in summary report. Temporarily + add TERM_LIBS to LIBS when checking for readline library. + * Makeconf.in, mkoctfile.cc.in, mkoctfile.in: + Use READLINE_LIBS instead of LIBREADLINE and TERM_LIBS instead of + TERMLIBS. Substitute DL_LIBS. + (do-subst-config-vals): Substitute TERM_LIBS and DL_LIBS. + 2009-08-11 John W. Eaton <jwe@octave.org> * configure.in: Generate separate variables for HDF5_LIBS and
--- a/Makeconf.in +++ b/Makeconf.in @@ -226,8 +226,6 @@ LIBOCTINTERP = @LIBOCTINTERP@ LIBOCTAVE = @LIBOCTAVE@ LIBCRUFT = @LIBCRUFT@ -LIBREADLINE = @LIBREADLINE@ -TERMLIBS = @TERMLIBS@ FT2_LIBS = @FT2_LIBS@ HDF5_LIBS = @HDF5_LIBS@ @@ -248,7 +246,10 @@ CXSPARSE_LIBS = @CXSPARSE_LIBS@ OPENGL_LIBS = @OPENGL_LIBS@ QRUPDATE_LIBS = @QRUPDATE_LIBS@ +READLINE_LIBS = @READLINE_LIBS@ +TERM_LIBS = @TERM_LIBS@ ARPACK_LIBS = @ARPACK_LIBS@ +DL_LIBS = @DL_LIBS@ LIBS = @LIBS@ USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@ @@ -506,6 +507,7 @@ -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \ -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \ -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \ -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \ @@ -534,7 +536,6 @@ -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \ -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \ -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \ - -e "s|%OCTAVE_CONF_LIBREADLINE%|\"${LIBREADLINE}\"|" \ -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \ -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \ -e "s|%OCTAVE_CONF_MAGICK_INCFLAGS%|\"${MAGICK_INCFLAGS}\"|" \ @@ -550,6 +551,7 @@ -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \ -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \ -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \ + -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \ -e "s|%OCTAVE_CONF_REGEX_LIBS%|\"${REGEX_LIBS}\"|" \ -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \ -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \ @@ -561,6 +563,7 @@ -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \ -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \ + -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \ -e "s|%OCTAVE_CONF_UGLY_DEFS%|\"${UGLY_DEFS}\"|" \ -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \ -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -641,7 +641,7 @@ dnl OCTAVE_ENABLE_READLINE AC_DEFUN(OCTAVE_ENABLE_READLINE, [ USE_READLINE=true - LIBREADLINE= + READLINE_LIBS= AC_ARG_ENABLE(readline, [ --enable-readline use readline library (default is yes)], [if test "$enableval" = no; then @@ -649,16 +649,18 @@ warn_readline="command editing and history features require GNU Readline" fi]) if $USE_READLINE; then + save_LIBS="$LIBS" + LIBS="$TERM_LIBS" AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ - LIBREADLINE="-lreadline" - LIBS="$LIBREADLINE $LIBS" + READLINE_LIBS="-lreadline" AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) ], [ AC_MSG_WARN([I need GNU Readline 4.2 or later]) AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) ]) + LIBS="$save_LIBS" fi - AC_SUBST(LIBREADLINE) + AC_SUBST(READLINE_LIBS) ]) dnl dnl Check to see if C++ reintrepret cast works for function pointers.
--- a/configure.in +++ b/configure.in @@ -1707,22 +1707,24 @@ ## Check for dyld first since OS X can have a non-standard libdl - AC_CHECK_HEADER(mach-o/dyld.h) + save_LIBS="$LIBS" + AC_CHECK_HEADER(mach-o/dyld.h) if test "$ac_cv_header_mach_o_dyld_h" = yes; then dyld_api=true else - AC_CHECK_LIB(dld, shl_load) + AC_CHECK_LIB(dld, shl_load, [DL_LIBS=-ldld; LIBS="$LIBS $DL_LIBS"]) AC_CHECK_FUNCS(shl_load shl_findsym) if test "$ac_cv_func_shl_load" = yes \ && test "$ac_cv_func_shl_findsym" = yes; then shl_load_api=true else - AC_CHECK_LIB(wsock32, LoadLibrary) + AC_CHECK_LIB(wsock32, LoadLibrary, [ + DL_LIBS=-lwsock32; LIBS="$LIBS $DL_LIBS"]) AC_CHECK_FUNCS(LoadLibrary) if test "$ac_cv_func_loadlibrary" = yes; then loadlibrary_api=true else - AC_CHECK_LIB(dl, dlopen) + AC_CHECK_LIB(dl, dlopen, [DL_LIBS=-ldl; LIBS="$LIBS $DL_LIBS"]) AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) if test "$ac_cv_func_dlclose" = yes \ && test "$ac_cv_func_dlerror" = yes \ @@ -1740,6 +1742,8 @@ fi fi fi + LIBS="$save_LIBS" + AC_SUBST(DL_LIBS) ## autoconf test for LoadLibrary appears broken. Bypass for cygwin/mingw if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then @@ -1890,15 +1894,10 @@ octave_found_termlib=no for termlib in ncurses curses termcap terminfo termlib; do - AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) - case "${TERMLIBS}" in - *-l${termlib}*) - LIBS="$TERMLIBS $LIBS" - AC_SUBST(TERMLIBS) - octave_found_termlib=yes - break - ;; - esac + AC_CHECK_LIB(${termlib}, tputs, [ + TERM_LIBS="-l${termlib}" + octave_found_termlib=yes + break]) done if test "$octave_found_termlib" = no; then @@ -1906,6 +1905,7 @@ r -ltermlib!" AC_MSG_WARN($warn_termlibs) fi +AC_SUBST(TERM_LIBS) OCTAVE_ENABLE_READLINE @@ -2230,8 +2230,11 @@ X11 include flags: $X11_INCFLAGS X11 libraries: $X11_LIBS CARBON libraries: $CARBON_LIBS - PTHREAD flags $PTHREAD_CFLAGS - PTHREAD libraries $PTHREAD_LIBS + PTHREAD flags: $PTHREAD_CFLAGS + PTHREAD libraries: $PTHREAD_LIBS + READLINE libraries: $READLINE_LIBS + TERM libraries: $TERM_LIBS + DL libraries: $DL_LIBS LIBS: $LIBS Default pager: $DEFAULT_PAGER gnuplot: $GNUPLOT
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2009-08-11 John W. Eaton <jwe@octave.org> + + * Makefile.in (LINK_DEPS): Use READLINE_LIBS instead of + LIBREADLINE. Also link with TERM_LIBS and DL_LIBS. + 2009-08-11 Jaroslav Hajek <highegg@gmail.com> * mx-inlines.cc (mx_inline_diff<T>): New overloaded template
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -39,8 +39,8 @@ -L../libcruft $(LIBCRUFT) \ $(CHOLMOD_LIBS) $(UMFPACK_LIBS) $(AMD_LIBS) $(CAMD_LIBS) \ $(COLAMD_LIBS) $(CCOLAMD_LIBS) $(CXSPARSE_LIBS) $(ARPACK_LIBS) \ - $(QRUPDATE_LIBS) $(FFTW_LIBS) $(LIBREADLINE) $(LIBGLOB) \ - $(REGEX_LIBS) $(LIBS) $(FLIBS) $(PTHREAD_LIBS) + $(QRUPDATE_LIBS) $(FFTW_LIBS) $(READLINE_LIBS) $(TERM_LIBS) $(LIBGLOB) \ + $(REGEX_LIBS) $(DL_LIBS) $(LIBS) $(FLIBS) $(PTHREAD_LIBS) MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h \ Array-util.h MArray-decl.h MArray-defs.h \
--- a/mkoctfile.cc.in +++ b/mkoctfile.cc.in @@ -221,7 +221,7 @@ vars["RDYNAMIC_FLAG"] = get_variable ("RDYNAMIC_FLAG", %OCTAVE_CONF_RDYNAMIC_FLAG%); vars["LIBOCTAVE"] = "-loctave"; vars["LIBOCTINTERP"] = "-loctinterp"; - vars["LIBREADLINE"] = "-lreadline"; + vars["READLINE_LIBS"] = "-lreadline"; vars["LIBCRUFT"] = "-lcruft"; vars["BLAS_LIBS"] = get_variable ("BLAS_LIBS", %OCTAVE_CONF_BLAS_LIBS%); vars["FFTW_LIBS"] = get_variable ("FFTW_LIBS", %OCTAVE_CONF_FFTW_LIBS%); @@ -296,10 +296,10 @@ " CPICFLAG LIBCRUFT\n" " CPPFLAGS LIBOCTAVE\n" " CXX LIBOCTINTERP\n" -" CXXFLAGS LIBREADLINE\n" -" CXXPICFLAG LIBS\n" -" DEPEND_EXTRA_SED_PATTERN OCTAVE_LIBS\n" -" DEPEND_FLAGS RDYNAMIC_FLAG\n" +" CXXFLAGS LIBS\n" +" CXXPICFLAG OCTAVE_LIBS\n" +" DEPEND_EXTRA_SED_PATTERN RDYNAMIC_FLAG\n" +" DEPEND_FLAGS READLINE_LIBS\n" " DL_LD RLD_FLAG\n" " DL_LDFLAGS SED\n" " F77 XTRA_CFLAGS\n" @@ -727,7 +727,7 @@ + " " + ldflags + " " + vars["LFLAGS"] + " " + vars["RLD_FLAG"] + " " + vars["OCTAVE_LIBS"] + " " + vars["BLAS_LIBS"] + " " + vars["FFTW_LIBS"] + " " - + vars["LIBREADLINE"] + " " + vars["LIBS"] + " " + + vars["READLINE_LIBS"] + " " + vars["LIBS"] + " " + vars["FLIBS"]; result = run_command (cmd); }
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -90,7 +90,7 @@ : ${RDYNAMIC_FLAG=%OCTAVE_CONF_RDYNAMIC_FLAG%} : ${LIBOCTAVE=-loctave} : ${LIBOCTINTERP=-loctinterp} -: ${LIBREADLINE=-lreadline} +: ${READLINE_LIBS=-lreadline} : ${LIBCRUFT=-lcruft} : ${BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%} : ${FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%} @@ -226,10 +226,10 @@ CPICFLAG LIBCRUFT CPPFLAGS LIBOCTAVE CXX LIBOCTINTERP - CXXFLAGS LIBREADLINE - CXXPICFLAG LIBS - DEPEND_EXTRA_SED_PATTERN OCTAVE_LIBS - DEPEND_FLAGS RDYNAMIC_FLAG + CXXFLAGS LIBS + CXXPICFLAG OCTAVE_LIBS + DEPEND_EXTRA_SED_PATTERN RDYNAMIC_FLAG + DEPEND_FLAGS READLINE_LIBS DL_LD RLD_FLAG DL_LDFLAGS SED F77 XTRA_CFLAGS @@ -508,7 +508,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 $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $libfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $READLINE_LIBS $LIBS $FLIBS" $dbg $cmd eval $cmd else
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-08-11 John W. Eaton <jwe@octave.org> + + * oct-conf.h.in: Use READLINE_LIBS instead of LIBREADLINE. + New #defines for TERM_LIBS and DL_LIBS. + * toplev.cc (octave_config_info): Add TERM_LIBS and DL_LIBS to the + struct. Use READLINE_LIBS instead of LIBREADLINE. + 2009-08-11 John W. Eaton <jwe@octave.org> * oct-conf.h.in: New #defines for AMD_LIBS, ARPACK_LIBS, @@ -5,6 +12,7 @@ FT2_LIBS, GRAPHICS_LIBS, HDF5_LIBS, OPENGL_LIBS, PTHREAD_CFLAGS, PTHREAD_LIBS, QHULL_LIBS, QRUPDATE_LIBS, REGEX_LIBS, UMFPACK_LIBS, ZLIB_LIBS. + * toplev.cc (octave_config_info): Include them in the struct. 2009-08-11 Jaroslav Hajek <highegg@gmail.com>
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -145,6 +145,10 @@ #define OCTAVE_CONF_DL_LDFLAGS %OCTAVE_CONF_DL_LDFLAGS% #endif +#ifndef OCTAVE_CONF_DL_LIBS +#define OCTAVE_CONF_DL_LIBS %OCTAVE_CONF_DL_LIBS% +#endif + #ifndef OCTAVE_CONF_EXEEXT #define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT% #endif @@ -253,10 +257,6 @@ #define OCTAVE_CONF_LIBPLPLOT %OCTAVE_CONF_LIBPLPLOT% #endif -#ifndef OCTAVE_CONF_LIBREADLINE -#define OCTAVE_CONF_LIBREADLINE %OCTAVE_CONF_LIBREADLINE% -#endif - #ifndef OCTAVE_CONF_LIBS #define OCTAVE_CONF_LIBS %OCTAVE_CONF_LIBS% #endif @@ -317,6 +317,10 @@ #define OCTAVE_CONF_RDYNAMIC_FLAG %OCTAVE_CONF_RDYNAMIC_FLAG% #endif +#ifndef OCTAVE_CONF_READLINE_LIBS +#define OCTAVE_CONF_READLINE_LIBS %OCTAVE_CONF_READLINE_LIBS% +#endif + #ifndef OCTAVE_CONF_REGEX_LIBS #define OCTAVE_CONF_REGEX_LIBS %OCTAVE_CONF_REGEX_LIBS% #endif @@ -357,6 +361,10 @@ #define OCTAVE_CONF_STATIC_LIBS %OCTAVE_CONF_STATIC_LIBS% #endif +#ifndef OCTAVE_CONF_TERM_LIBS +#define OCTAVE_CONF_TERM_LIBS %OCTAVE_CONF_TERM_LIBS% +#endif + #ifndef OCTAVE_CONF_UGLY_DEFS #define OCTAVE_CONF_UGLY_DEFS %OCTAVE_CONF_UGLY_DEFS% #endif
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -1221,6 +1221,7 @@ { false, "DEFS", OCTAVE_CONF_DEFS }, { false, "DL_LD", OCTAVE_CONF_DL_LD }, { false, "DL_LDFLAGS", OCTAVE_CONF_DL_LDFLAGS }, + { false, "DL_LIBS", OCTAVE_CONF_DL_LIBS }, { false, "ENABLE_DYNAMIC_LINKING", OCTAVE_CONF_ENABLE_DYNAMIC_LINKING }, { false, "EXEEXT", OCTAVE_CONF_EXEEXT }, { false, "F77", OCTAVE_CONF_F77 }, @@ -1247,7 +1248,6 @@ { false, "LIBFLAGS", OCTAVE_CONF_LIBFLAGS }, { false, "LIBOCTAVE", OCTAVE_CONF_LIBOCTAVE }, { false, "LIBOCTINTERP", OCTAVE_CONF_LIBOCTINTERP }, - { false, "LIBREADLINE", OCTAVE_CONF_LIBREADLINE }, { false, "LIBS", OCTAVE_CONF_LIBS }, { false, "LN_S", OCTAVE_CONF_LN_S }, { false, "MAGICK_INCFLAGS", OCTAVE_CONF_MAGICK_INCFLAGS }, @@ -1260,6 +1260,7 @@ { false, "QRUPDATE_LIBS", OCTAVE_CONF_QRUPDATE_LIBS }, { false, "RANLIB", OCTAVE_CONF_RANLIB }, { false, "RDYNAMIC_FLAG", OCTAVE_CONF_RDYNAMIC_FLAG }, + { false, "READLINE_LIBS", OCTAVE_CONF_READLINE_LIBS }, { false, "REGEX_LIBS", OCTAVE_CONF_REGEX_LIBS }, { false, "RLD_FLAG", OCTAVE_CONF_RLD_FLAG }, { false, "SED", OCTAVE_CONF_SED }, @@ -1270,6 +1271,7 @@ { false, "SH_LDFLAGS", OCTAVE_CONF_SH_LDFLAGS }, { false, "SONAME_FLAGS", OCTAVE_CONF_SONAME_FLAGS }, { false, "STATIC_LIBS", OCTAVE_CONF_STATIC_LIBS }, + { false, "TERM_LIBS", OCTAVE_CONF_TERM_LIBS }, { false, "UGLY_DEFS", OCTAVE_CONF_UGLY_DEFS }, { false, "UMFPACK_LIBS", OCTAVE_CONF_UMFPACK_LIBS }, { false, "USE_64_BIT_IDX_T", OCTAVE_CONF_USE_64_BIT_IDX_T },