# HG changeset patch # User John W. Eaton # Date 1454701800 18000 # Node ID 945695cafd2bc8bf02bb2ca5eb35b40aa17ed115 # Parent 15517574276a71abe539f2161af4b7d4641b2390 allow build to succeed with missing dependencies * gl2ps-print.cc, graphics.cc: Allow building without freetype. * sparse-chol.cc: Allow building without cholmod. * sparse-lu.cc: Allow building without umfpack. * sparse-qr.cc: Allow building without cxsparse. diff -r 15517574276a -r 945695cafd2b libinterp/corefcn/gl2ps-print.cc --- a/libinterp/corefcn/gl2ps-print.cc Sat Feb 06 22:38:13 2016 +0100 +++ b/libinterp/corefcn/gl2ps-print.cc Fri Feb 05 14:50:00 2016 -0500 @@ -722,8 +722,6 @@ halign, valign, props.get_rotation ()); } -#endif - static void safe_pclose (FILE *f) { @@ -738,6 +736,8 @@ gnulib::fclose (f); } +#endif + // If the name of the stream begins with '|', open a pipe to the command // named by the rest of the string. Otherwise, write to the named file. diff -r 15517574276a -r 945695cafd2b libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Sat Feb 06 22:38:13 2016 +0100 +++ b/libinterp/corefcn/graphics.cc Fri Feb 05 14:50:00 2016 -0500 @@ -6963,10 +6963,6 @@ const string_vector& ticklabels, const Matrix& limits) { -#ifndef HAVE_FREETYPE - double fontsize = get ("fontsize").double_value (); -#endif - Matrix ext (1, 2, 0.0); double wmax, hmax; wmax = hmax = 0.0; @@ -6986,9 +6982,10 @@ hmax = std::max (hmax, ext(1)); #else // FIXME: find a better approximation + double fsize = get ("fontsize").double_value (); int len = label.length (); - wmax = std::max (wmax, 0.5*fontsize*len); - hmax = fontsize; + wmax = std::max (wmax, 0.5*fsize*len); + hmax = fsize; #endif } } diff -r 15517574276a -r 945695cafd2b liboctave/numeric/sparse-chol.cc --- a/liboctave/numeric/sparse-chol.cc Sat Feb 06 22:38:13 2016 +0100 +++ b/liboctave/numeric/sparse-chol.cc Fri Feb 05 14:50:00 2016 -0500 @@ -40,16 +40,16 @@ public: sparse_chol_rep (void) - : count (1), is_pd (false), minor_p (0), perms (), cond (0), + : count (1), is_pd (false), minor_p (0), perms (), cond (0) #ifdef HAVE_CHOLMOD - Lsparse (0), Common () + , Lsparse (0), Common () #endif { } sparse_chol_rep (const chol_type& a, bool natural, bool force) - : count (1), is_pd (false), minor_p (0), perms (), cond (0), + : count (1), is_pd (false), minor_p (0), perms (), cond (0) #ifdef HAVE_CHOLMOD - Lsparse (0), Common () + , Lsparse (0), Common () #endif { init (a, natural, force); @@ -57,9 +57,9 @@ sparse_chol_rep (const chol_type& a, octave_idx_type& info, bool natural, bool force) - : count (1), is_pd (false), minor_p (0), perms (), cond (0), + : count (1), is_pd (false), minor_p (0), perms (), cond (0) #ifdef HAVE_CHOLMOD - Lsparse (0), Common () + , Lsparse (0), Common () #endif { info = init (a, natural, force); @@ -73,14 +73,12 @@ #endif } +#ifdef HAVE_CHOLMOD cholmod_sparse *L (void) const { -#ifdef HAVE_CHOLMOD return Lsparse; -#else - return 0; + } #endif - } octave_idx_type P (void) const { diff -r 15517574276a -r 945695cafd2b liboctave/numeric/sparse-lu.cc --- a/liboctave/numeric/sparse-lu.cc Sat Feb 06 22:38:13 2016 +0100 +++ b/liboctave/numeric/sparse-lu.cc Fri Feb 05 14:50:00 2016 -0500 @@ -114,6 +114,8 @@ void umfpack_report_symbolic (void *Symbolic, const double *Control); +#if defined (HAVE_UMFPACK) + // SparseMatrix Specialization. template <> @@ -369,6 +371,8 @@ UMFPACK_ZNAME (report_symbolic) (Symbolic, Control); } +#endif + template sparse_lu::sparse_lu (const lu_type& a, const Matrix& piv_thres, bool scale) diff -r 15517574276a -r 945695cafd2b liboctave/numeric/sparse-qr.cc --- a/liboctave/numeric/sparse-qr.cc Sat Feb 06 22:38:13 2016 +0100 +++ b/liboctave/numeric/sparse-qr.cc Fri Feb 05 14:50:00 2016 -0500 @@ -34,9 +34,6 @@ class cxsparse_types { -public: - typedef void symbolic_type; - typedef void numeric_type; }; template <> @@ -47,6 +44,9 @@ #if defined (HAVE_CXSPARSE) typedef CXSPARSE_DNAME (s) symbolic_type; typedef CXSPARSE_DNAME (n) numeric_type; +#else + typedef void symbolic_type; + typedef void numeric_type; #endif }; @@ -58,6 +58,9 @@ #if defined (HAVE_CXSPARSE) typedef CXSPARSE_ZNAME (s) symbolic_type; typedef CXSPARSE_ZNAME (n) numeric_type; +#else + typedef void symbolic_type; + typedef void numeric_type; #endif };