Skip to content

Commit 1df74eb

Browse files
committed
refactor: avoid hack when checking size of struct MD5Context
1 parent 1174e85 commit 1df74eb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libraries/ghc-internal/configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ AC_CONFIG_SRCDIR([include/HsBase.h])
66

77
AC_CONFIG_HEADERS([include/HsBaseConfig.h include/EventConfig.h])
88

9+
CPPFLAGS="-I$srcdir $CPPFLAGS"
10+
911
AC_PROG_CC
1012
dnl make extensions visible to allow feature-tests to detect them later on
1113
AC_USE_SYSTEM_EXTENSIONS
@@ -299,10 +301,10 @@ AS_IF([test "x$with_libcharset" != xno],
299301

300302
fi
301303

302-
dnl Calling AC_CHECK_TYPE(T) makes AC_CHECK_SIZEOF(T) abort on failure
303-
dnl instead of considering sizeof(T) as 0.
304-
AC_CHECK_TYPE([struct MD5Context], [], [AC_MSG_ERROR([internal error])], [#include "include/md5.h"])
305304
AC_CHECK_SIZEOF([struct MD5Context], [], [#include "include/md5.h"])
305+
AS_IF([test "$ac_cv_sizeof_struct_MD5Context" -eq 0],[
306+
AC_MSG_ERROR([cannot determine sizeof(struct MD5Context)])
307+
])
306308

307309
AC_SUBST(EXTRA_LIBS)
308310
AC_CONFIG_FILES([ghc-internal.buildinfo])

0 commit comments

Comments
 (0)