octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54235] problems building Octave on Solaris


From: Rik
Subject: [Octave-bug-tracker] [bug #54235] problems building Octave on Solaris
Date: Wed, 25 Jul 2018 15:04:23 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #163, bug #54235 (project octave):

Below is the freetype section in configure.ac.


## Check for FreeType 2 library

check_freetype=yes
warn_freetype=
AC_ARG_WITH([freetype],
  [AS_HELP_STRING([--without-freetype],
    [don't use FreeType library, OpenGL graphics will not be fully
functional])],
  [if test x"$withval" = xno; then
     check_freetype=no
     warn_freetype="--without-freetype specified.  OpenGL graphics will not be
fully functional."
   fi])

if test $check_freetype = yes; then
  PKG_CHECK_MODULES([FT2], [freetype2], [
    min_ft2_version=9.03
    AC_MSG_CHECKING([for FreeType2 version >= $min_ft2_version])
    $PKG_CONFIG freetype2 --atleast-version=$min_ft2_version
    ac_status=$?
    if test "$ac_status" = 0; then
      AC_MSG_RESULT(yes)
      AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if Freetype is available.])
      save_LIBS="$LIBS"
      LIBS="$FT2_LIBS $LIBS"
      AC_CHECK_FUNCS([FT_Reference_Face])
      LIBS="$save_LIBS"
    else
      AC_MSG_RESULT(no)
      warn_freetype="FreeType library >= 9.03 not found.  OpenGL graphics will
not be fully functional."
    fi],
    [warn_freetype="FreeType library not found.  OpenGL graphics will not be
fully functional."])
fi

if test -n "$warn_freetype"; then
  OCTAVE_CONFIGURE_WARNING([warn_freetype])
else
  FT2_CPPFLAGS="$FT2_CFLAGS"
  dnl Alias CPPFLAGS to CFLAGS.  This is closer to the true meaning
  dnl of `pkg-config --cflags` output.
  FT2_CPPFLAGS="$FT2_CFLAGS"
  AC_SUBST(FT2_CPPFLAGS)
fi


Just a brief look doesn't give me confidence.  For starters, the last else
branch declares


  FT2_CPPFLAGS="$FT2_CFLAGS"


twice.  It is probably just an oversight, but who knows?

Second, is it possible that PKG_CHECK_MODULES defines variables like
FT2_CFLAGS that persist in the environment even if we find a version of
FreeType which will not work?  It looks to me like the test for Freetype
version occurs after PKG_CHECK_MODULES and therefore if the version check
fails it may need to unset some environment variables.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54235>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]