Skip to content

Commit

Permalink
autoconf: fail with error if missing required library
Browse files Browse the repository at this point in the history
  • Loading branch information
dlundquist committed Jul 2, 2024
1 parent 85e9802 commit 2d99653
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ AM_PROG_CC_C_O


# Checks for libraries.
AC_CHECK_LIB([ev], [ev_run])
AC_CHECK_LIB([ev], [ev_run], [],
[AC_MSG_ERROR([libev is required])])
AC_CHECK_LIB([pcre2-8], [pcre2_compile_8], [],
[AC_CHECK_LIB([pcre], [pcre_exec])])
[AC_CHECK_LIB([pcre], [pcre_exec], [],
[AC_MSG_ERROR([libpcre is required])])])

AC_ARG_ENABLE([dns],
[AS_HELP_STRING([--enable-dns], [Enable DNS resolution])])
[AS_HELP_STRING([--enable-dns], [Enable DNS resolution])])

AM_CONDITIONAL([DNS_ENABLED], [test "$enable_dns"])

Expand Down

0 comments on commit 2d99653

Please sign in to comment.