https://bugzilla.redhat.com/show_bug.cgi?id=1658153



--- Comment #34 from Petr Menšík <[email protected]> ---
And side note hint: your server provides also http protocol for files. It seems
something is broken in ftp:// handling of fedora-review tool, it would simplify
your review if you would use http URL links instead. Reported as bug #1686383,
but HTTP would simplify reviews.

Anyway, header paths guessing in configure.in is quite unfortunate. I would
recommend use of PKG_CHECK_MODULES macro or something similar for eigen3 [1].
Similar approach should be used for vcglib if possible.

I think it might look like this:
# Modify configure.in, then run autoreconf

PKG_CHECK_MODULES(EIGEN, [eigen3 eigen], [], AC_MSG_ERROR([eigenlib was not
found]) )

CPPFLAGS="$CPPFLAGS $EIGEN_CFLAGS"
LIBS="$LIBS $EIGEN_LIBS"

# Alternatively, use --with-vcglib=/some/path. [2]
AC_MSG_CHECKING([for vcglib])
AC_ARG_WITH(vcglib, AS_HELP_STRING([--with-vcglib], [use vcglib]),
            use_vcglib="$withval", use_vcglib="yes")


# this allows --with-vcglib=/mypath/vcglib-1.0.1
# would use automagically installed vcglib and allows custom location at the
same time.
case "$use_vcglib" in
  yes)
       for d in /usr /usr/local $SELFDIR/vcglib; do
          if [ -f "$d/include/vcg/math/base.h" ]; then
            VCGLIB_CFLAGS="-I$d/include"
          elif [ -f "$d/vcg/math/base.h" ]; then
            VCGLIB_CFLAGS="-I$d"
          else
            AC_MSG_ERROR([vcglib headers not found])
          fi
       done
       AC_MSG_RESULT([yes])
       ;;
  no)
       AC_MSG_ERROR([vcglib is mandatory])
       ;;
  *)
       VCGLIB_CFLAGS="-I$use_vcglib"
       AC_MSG_RESULT([$use_vcglib])
       ;;
esac

CPPFLAGS="$CPPFLAGS $VCGLIB_CFLAGS"

Such configuration would prefer installed packages over custom, but would allow
easy override if required.

1. https://autotools.io/pkgconfig/pkg_check_modules.html
2.
https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to