diff --git a/config/configure.xml b/config/configure.xml
index 5be36be..394a7aa 100644
--- a/config/configure.xml
+++ b/config/configure.xml
@@ -23,7 +23,7 @@
   <configure name="LIBS" value="-lMagickCore -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldjvulibre -lfftw3 -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lrsvg-2 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm -lgomp -lpthread -lltdl"/>
   <configure name="CXX" value="g++"/>
   <configure name="CXXFLAGS" value="-g -O2 -Wall -W -pthread"/>
-  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath="/>
+  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
   <configure name="HOST" value="x86_64-unknown-linux-gnu"/>
   <configure name="DELEGATES" value="bzlib djvu fftw fontconfig freetype jpeg jng jp2 lcms mpeg png rsvg tiff x11 xml wmf zlib"/>
   <configure name="COPYRIGHT" value="Copyright (C) 1999-2010 ImageMagick Studio LLC"/>
diff --git a/configure b/configure
index 7303eb0..d2afb12 100755
--- a/configure
+++ b/configure
@@ -19933,7 +19933,7 @@
 if test "${with_perl+set}" = set; then :
   withval=$with_perl; with_perl=$withval
 else
-  with_perl=$libtool_build_shared_libs
+  with_perl='no'
 fi
 
 
diff --git a/configure.ac b/configure.ac
index c8774d8..20f50c3 100755
--- a/configure.ac
+++ b/configure.ac
@@ -698,7 +698,7 @@
     [AC_HELP_STRING([--with-perl],
                     [enable build/install of PerlMagick])],
     [with_perl=$withval],
-    [with_perl=$libtool_build_shared_libs])
+    [with_perl='no'])
 
 # Options to pass when configuring PerlMagick
 AC_ARG_WITH([perl-options],
diff --git a/ltdl/lt__dirent.c b/ltdl/lt__dirent.c
index c9533b6..30dc072 100644
--- a/ltdl/lt__dirent.c
+++ b/ltdl/lt__dirent.c
@@ -35,7 +35,7 @@
 
 #include "lt__dirent.h"
 
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#if defined(__WINDOWS__)
 
 void
 closedir (DIR *entry)
@@ -104,4 +104,4 @@
   return &entry->file_info;
 }
 
-#endif /*defined(MAGICKCORE_WINDOWS_SUPPORT)*/
+#endif /*defined(__WINDOWS__)*/