New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable using re-entrant qhull (refs #4040) #5033
Conversation
00c1542 backported to 3.4 |
AC_CHECK_HEADERS([libqhull_r/libqhull_r.h]) | ||
if test "$ac_cv_header_libqhull_r_libqhull_r_h" = "yes"; then | ||
AC_CHECK_LIB(qhull_r,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) | ||
if test "$QHULL_SETTING" = "yes"; then | ||
QHULL_SETTING=external | ||
QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0 | ||
LIBS="-lqhull $LIBS" | ||
QHULL_IS_LIBQHULL_R=1 | ||
LIBS="-lqhull_r $LIBS" | ||
fi | ||
fi | ||
AC_CHECK_HEADERS([libqhull/libqhull.h]) | ||
if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then | ||
AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) | ||
if test "$QHULL_SETTING" = "yes"; then | ||
QHULL_SETTING=external | ||
QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 | ||
LIBS="-lqhull $LIBS" | ||
else | ||
# Only qhull 2012 is reliable on certain datasets. Older Ubuntu have | ||
# qhull/qhull.h | ||
AC_CHECK_HEADERS([qhull/libqhull.h]) | ||
if test "$ac_cv_header_qhull_libqhull_h" = "yes"; then | ||
AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) | ||
if test "$QHULL_SETTING" = "yes"; then | ||
QHULL_SETTING=external | ||
QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0 | ||
LIBS="-lqhull $LIBS" | ||
fi | ||
fi | ||
|
||
AC_CHECK_HEADERS([libqhull/libqhull.h]) | ||
if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then | ||
AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) | ||
if test "$QHULL_SETTING" = "yes"; then | ||
QHULL_SETTING=external | ||
QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 | ||
LIBS="-lqhull $LIBS" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fragile. qhull lib names are different for shared/static and release/debug (+ non-reentrant/reentrant). qhull provides pkg-config files, it would be more robust to rely on them.
qhull.pc => shared qhull non-reentrant
qhullstatic.pc => static qhull non-reentrant
qhull_r.pc => static qhull reentrant
qhullstatic_r.pc => static qhull reentrant
No description provided.