misc: if dlopen() is available, use it to load the libmagic library

This prevents the libmagic library from being a hard dependency; if
it's not there, we can simply do without it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
diff --git a/configure b/configure
index 7ee6323..2bc1275 100755
--- a/configure
+++ b/configure
@@ -13187,6 +13187,9 @@
 
 fi
 
+if test "$ac_cv_lib_dl_dlopen" = yes ; then
+   MAGIC_LIB=$DLOPEN_LIB
+fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
 $as_echo_n "checking for optreset... " >&6; }