diff --git a/ChangeLog b/ChangeLog
index 14a8ca909896f2d9d938f9ea44bc4cb26f6e3b2b..f47e0f51d2321a0ebfa8f4f4aaa3d8cf537f20ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-10-06  Niels Möller  <nisse@lysator.liu.se>
 
+	* configure.ac: Check for openssl/aes.h.
+
 	* Makefile.in (distdir): Use a loop to pick up the contents of
 	$(DISTFILES) from source and build directories. For some reason,
 	$? failed to find stamp-h.in in the source directory.
diff --git a/configure.ac b/configure.ac
index e5776f41bad521c4e9be21af95c2c7c6b24dd8bc..66307deea05bcb73f2157ccea98387c6e021c281 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,7 +244,7 @@ AC_TYPE_UID_T
 AC_TYPE_SIZE_T
 AC_HEADER_TIME
 
-AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h],,
+AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h],,
 [enable_openssl=no
  break])