--- configure
+++ configure
@@ -13954,6 +13954,7 @@
 
 fi
 
+[ -z "$UUID_PIC_LIB" ] && UUID_PIC_LIB=uuid
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locks in mod_webdav" >&5
 $as_echo_n "checking for locks in mod_webdav... " >&6; }
 
@@ -13968,13 +13969,13 @@
 $as_echo "$WITH_WEBDAV_LOCKS" >&6; }
 
  if test "$WITH_WEBDAV_LOCKS" != "no"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_unparse in -luuid" >&5
-$as_echo_n "checking for uuid_unparse in -luuid... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_unparse in -l$UUID_PIC_LIB" >&5
+$as_echo_n "checking for uuid_unparse in -l$UUID_PIC_LIB... " >&6; }
 if test "${ac_cv_lib_uuid_uuid_unparse+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
+LIBS="-l$UUID_PIC_LIB  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14014,7 +14015,7 @@
 #define HAVE_UUID_UUID_H 1
 _ACEOF
 
-                 UUID_LIBS=-luuid
+                 UUID_LIBS=-l$UUID_PIC_LIB
 
 $as_echo "#define HAVE_UUID 1" >>confdefs.h
 
