--- a/misc/sha1.c
+++ b/misc/sha1.c
@@ -23,7 +23,9 @@
       Robert Klep <robert@ilse.nl>  -- Expansion function fix
 */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "sha1.h"