3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(scrobby, 0.0.99)
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_CHECK_LIB(pthread, pthread_create, LDFLAGS="$LDFLAGS -lpthread", AC_MSG_ERROR([pthread library is required]))
35 AC_CHECK_HEADERS([pthread.h], , AC_MSG_ERROR([missing pthread.h header]))
36 AC_PATH_PROG(CURL_CONFIG, curl-config)
37 if test "$CURL_CONFIG" != "" ; then
38 CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
39 LDFLAGS="$LDFLAGS `$CURL_CONFIG --libs`"
40 AC_CHECK_LIB(curl, curl_easy_init, , AC_MSG_ERROR([curl library is required]))
41 AC_CHECK_HEADERS([curl/curl.h], , AC_MSG_ERROR([missing curl.h header]))
43 AC_MSG_ERROR([curl-config executable is missing])
46 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])