3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(scrobby, 0.1)
13 dnl if host is freebsd, then add -lkvm to the list of libraries
15 *freebsd*) LDFLAGS="$LDFLAGS -lkvm" ;;
18 dnl ========================
19 dnl = checking for openssl =
20 dnl ========================
21 PKG_CHECK_MODULES([libssl], libssl, ,
22 AC_CHECK_LIB(ssl, EVP_DigestInit_ex, [
24 libssl_CFLAGS="" ], AC_MSG_ERROR([libssl library is required])))
25 AC_SUBST(libssl_CFLAGS)
27 CPPFLAGS="$CPPFLAGS $libssl_CFLAGS"
28 LDFLAGS="$LDFLAGS $libssl_LDFLAGS"
29 AC_CHECK_HEADERS([openssl/evp.h], , AC_MSG_ERROR([missing openssl/evp.h header]))
31 dnl =================================
32 dnl = checking for curl and pthread =
33 dnl =================================
34 AC_PATH_PROG(CURL_CONFIG, curl-config)
35 if test "$CURL_CONFIG" != "" ; then
36 CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
37 LDFLAGS="$LDFLAGS `$CURL_CONFIG --libs`"
38 AC_CHECK_LIB(curl, curl_easy_init, , AC_MSG_ERROR([curl library is required]))
39 AC_CHECK_HEADERS([curl/curl.h], , AC_MSG_ERROR([missing curl.h header]))
41 AC_MSG_ERROR([curl-config executable is missing])
44 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])