Skip to content
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

Merged
merged 2 commits into from Dec 23, 2021
Merged

Conversation

rouault
Copy link
Member

@rouault rouault commented Dec 23, 2021

No description provided.

@rouault rouault merged commit 0cda75f into OSGeo:master Dec 23, 2021
@rouault
Copy link
Member Author

rouault commented Dec 23, 2021

00c1542 backported to 3.4

@rouault rouault added this to the 3.4.1 milestone Dec 23, 2021
Comment on lines +4680 to +4708
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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants