diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 2ff315f1..943eb3e4 100644 --- a/configure.ac +++ b/configure.ac @@ -171,9 +171,15 @@ dnl [LIBS="$LIBS -lintl"]) AC_REPLACE_FUNCS([strstr strcasecmp memmove stpcpy strlcpy strlcat]) -AC_SEARCH_LIBS(MD5Init, [md5 md], [], - [AC_LIBSOURCE(md5c.c) - EXTRAOBJ="$EXTRAOBJ md5c.\$(OBJEXT)"]) +have_md5=no +if test "$ac_cv_header_md5_h" != no ; then + AC_SEARCH_LIBS(MD5Init, [md], [have_md5=yes]) +fi + +if test "$have_md5" != yes ; then + AC_LIBSOURCE(md5c.c) + EXTRAOBJ="$EXTRAOBJ md5c.\$(OBJEXT)" +fi AC_CHECK_FUNC(getopt_long, [], [AC_LIBSOURCES([getopt.c, getopt1.c]) |