update window title if elapsed time changes
[ncmpcpp/cirrus.git] / configure.in
blob74fdbfd9cb9abd9f6c693b6f83c02a0b4425d155
1 AC_INIT(configure.in)
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(ncmpcpp, 0.2.95)
6 AC_PREREQ(2.59)
8 AC_LANG_CPLUSPLUS
9 AC_PROG_CXX
10 AM_PROG_LIBTOOL
12 AC_ARG_ENABLE(unicode, AS_HELP_STRING([--enable-unicode], [Enable utf8 support]), [unicode=$enableval], [unicode=yes])
13 AC_ARG_WITH(taglib, AS_HELP_STRING([--with-taglib], [Enable tag editor]), [taglib=$withval], [taglib=no])
14 AC_ARG_WITH(curl, AS_HELP_STRING([--with-curl], [Enable fetching lyrics from the Internet]), [curl=$withval], [curl=no])
16 dnl ========================
17 dnl = checking for ncurses =
18 dnl ========================
19 if test "$unicode" = "yes" ; then
20         ncurses_config_bin=ncursesw5-config
21         ncurses_lib=ncursesw
22         CPPFLAGS="$CPPFLAGS -D_UTF8"
23 else
24         ncurses_config_bin=ncurses5-config
25         ncurses_lib=ncurses
27 AC_PATH_PROG(NCURSES_CONFIG, $ncurses_config_bin)
28 if test "$NCURSES_CONFIG" != "" ; then
29         CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
30         LDFLAGS="$LDFLAGS `$NCURSES_CONFIG --libs`"
31         AC_CHECK_LIB($ncurses_lib, initscr, , AC_MSG_ERROR([$ncurses_lib library is required]))
32 else
33         AC_MSG_ERROR([$ncurses_config_bin executable is missing])
35 AC_CHECK_HEADERS([ncurses.h], , AC_MSG_ERROR([missing ncurses.h header]))
37 dnl =================================
38 dnl = checking for curl and pthread =
39 dnl =================================
40 if test "$curl" = "yes" ; then
41         AC_CHECK_LIB(pthread, pthread_create, LDFLAGS="$LDFLAGS -pthread", AC_MSG_ERROR([pthread library is required]))
42         AC_CHECK_HEADERS([pthread.h], , AC_MSG_ERROR([missing pthread.h header]))
43         AC_PATH_PROG(CURL_CONFIG, curl-config)
44         if test "$CURL_CONFIG" != "" ; then
45                 CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
46                 AC_CHECK_LIB(curl, curl_easy_init, LDFLAGS="$LDFLAGS `$CURL_CONFIG --libs`", AC_MSG_ERROR([curl library is required]))
47                 AC_CHECK_HEADERS([curl/curl.h], , AC_MSG_ERROR([missing curl.h header]))
48         else
49                 AC_MSG_ERROR([curl-config executable is missing])
50         fi
53 dnl =======================
54 dnl = checking for taglib =
55 dnl =======================
56 if test "$taglib" = "yes" ; then
57         AC_PATH_PROG(TAGLIB_CONFIG, taglib-config)
58         if test "$TAGLIB_CONFIG" != "" ; then
59                 CPPFLAGS="$CPPFLAGS `$TAGLIB_CONFIG --cflags`"
60                 LDFLAGS="$LDFLAGS `$TAGLIB_CONFIG --libs`"
61                 AC_CHECK_HEADERS([taglib.h], , AC_MSG_ERROR([missing taglib.h header]))
62         else
63                 AC_MSG_ERROR([taglib-config executable is missing])
64         fi
67 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
68 AC_OUTPUT