AC_PREREQ(2.60)
AC_INIT([libloc],
- [0],
+ [0.9.0],
[michael.tremer@ipfire.org],
[libloc],
[https://www.ipfire.org/])
AC_CHECK_HEADERS_ONCE([
arpa/inet.h \
- arpa/nameser.h \
+ arpa/nameser.h \
+ arpa/nameser_compat.h \
endian.h \
netinet/in.h \
resolv.h \
AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes")
dnl Checking for libresolv
-AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv)
+case "${host}" in
+ *-gnu*)
+ AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv)
+ ;;
+ *)
+ AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv)
+ ;;
+esac
RESOLV_LIBS="${LIBS}"
+AC_SUBST(RESOLV_LIBS)
+
+dnl Checking for OpenSSL
+LIBS=
+AC_CHECK_LIB(crypto, EVP_EncryptInit,, AC_MSG_ERROR([libcrypto has not been found]))
+OPENSSL_LIBS="${LIBS}"
+AC_SUBST(OPENSSL_LIBS)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([