--- gdal-3.1.3/configure.ac.orig	2020-09-01 11:36:31.000000000 +0300
+++ gdal-3.1.3/configure.ac	2020-10-29 20:38:35.090809700 +0300
@@ -4633,20 +4633,20 @@
   # 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,)
+    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"
+        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,)
+    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=1
-        LIBS="-lqhull $LIBS"
+        LIBS="-lqhull_r $LIBS"
     fi
   fi
 
