Ticket #8452: nettle_check.patch

File nettle_check.patch, 961 bytes (added by Tommy Wu, 6 years ago)

check nettle/md5.h, md5_init(), md5_update(), md5_digest() in configure

  • configure.ac

    old new  
    493493  # Some platforms have no d_type entry in their dirent structure
    494494  gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
    495495
     496  # Nettle
     497  # -------
     498
     499  PKG_CHECK_MODULES(LIBNETTLE, nettle >= 2.7,, [
     500  ])
     501
     502  AC_SUBST(LIBNETTLE_LIBS)
     503  AC_SUBST(LIBNETTLE_CFLAGS)
     504
     505  AC_CHECK_HEADER(nettle/md5.h,,
     506  [
     507    AC_MSG_ERROR([nettle/md5.h not found which is part of Nettle.])
     508  ])
     509
     510  AC_CHECK_LIB(nettle, nettle_md5_init, LIBNETTLE_LIBS="-lnettle",
     511  [
     512    AC_MSG_ERROR([need libnettle provide md5_init.])
     513  ])
     514
     515  AC_CHECK_LIB(nettle, nettle_md5_update, LIBNETTLE_LIBS="-lnettle",
     516  [
     517    AC_MSG_ERROR([need libnettle provide md5_update.])
     518  ])
     519
     520  AC_CHECK_LIB(nettle, nettle_md5_digest, LIBNETTLE_LIBS="-lnettle",
     521  [
     522    AC_MSG_ERROR([need libnettle provide md5_digest.])
     523  ])
     524
    496525  # SQLite3
    497526  # -------
    498527