Index: configure
--- configure.orig	2015-05-12 15:09:19.000000000 +0200
+++ configure	2015-05-15 17:32:40.275212632 +0200
@@ -8646,13 +8646,13 @@
 # (For example to load libpcsclite)
 #
 gnupg_dlopen_save_libs="$LIBS"
-LIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
 $as_echo_n "checking for library containing dlopen... " >&6; }
 if ${ac_cv_search_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
+  LIBS=""
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
