X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=675008ffb56e916ddfcd2dfc6d53c607b8903277;hb=3af5c3a185fc23b8fb9d528a9c0a14f70093ac70;hp=1f99b218b4a652a22f836b01fe6a1dda4686ea63;hpb=d48c131bca7a6af52cf13bd0ceb99ad8dfed512f;p=ncmpc.git diff --git a/configure.ac b/configure.ac index 1f99b21..675008f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,17 +1,19 @@ AC_PREREQ(2.60) -AC_INIT(ncmpc, 0.21~git, max@duempel.org) +AC_INIT(ncmpc, 0.27, max@duempel.org) VERSION_MAJOR=0 -VERSION_MINOR=21 +VERSION_MINOR=27 VERSION_REVISION=0 VERSION_EXTRA=0 AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR(build) -AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects]) +AM_INIT_AUTOMAKE([foreign 1.11 dist-xz subdir-objects]) +AM_SILENT_RULES AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) + dnl Check for programs AC_PROG_CC_C99 AC_PROG_INSTALL @@ -26,7 +28,7 @@ dnl initialize variables dnl ======================================================= dnl i18n -ALL_LINGUAS=`grep -v '^\#' po/LINGUAS` +ALL_LINGUAS=`grep -v '^\#' $srcdir/po/LINGUAS` set -- $CFLAGS @@ -96,15 +98,14 @@ else fi fi -dnl Check for glib-2.12 -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12],, - [AC_MSG_ERROR([glib 2.12 is required])]) +dnl Check for GLib +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30],, + [AC_MSG_ERROR([glib 2.30 is required])]) -dnl Check for libmpdclient 2.2 -PKG_CHECK_MODULES([LIBMPDCLIENT], [libmpdclient >= 2.2],, +dnl Check for libmpdclient 2.9 +PKG_CHECK_MODULES([LIBMPDCLIENT], [libmpdclient >= 2.9],, [AC_MSG_ERROR([libmpdclient2 is required])]) - dnl i18n AC_ARG_ENABLE([locale], @@ -148,11 +149,31 @@ else AM_PO_SUBDIRS fi +dnl Networking + +AC_ARG_ENABLE(tcp, + AS_HELP_STRING([--disable-tcp], + [Disable TCP support @<:@default=enabled@:>@]),, + [enable_tcp=$disable_mini]) +if test "x$enable_tcp" = xyes; then + AC_DEFINE([ENABLE_TCP], 1, [Define to enable TCP support]) + AC_SEARCH_LIBS([gethostbyname], [nsl]) + AC_CHECK_FUNCS([getaddrinfo]) +fi + +AC_ARG_ENABLE([async-connect], + AS_HELP_STRING([--enable-async-connect], + [Disable asynchronous connect @<:@default=yes@:>@]),, + [enable_async_connect=$disable_mini]) +AM_CONDITIONAL(ENABLE_ASYNC_CONNECT, test x$enable_async_connect = xyes) +if test "x$enable_async_connect" = xyes; then + AC_DEFINE([ENABLE_ASYNC_CONNECT], [1], [Enable asynchronous connect?]) +fi + dnl enable colors AC_ARG_ENABLE([colors], AS_HELP_STRING([--enable-colors], - [Enable color support]), - [enable_colors=$enableval], + [Enable color support]),, [enable_colors=auto]) AC_MSG_CHECKING([whether to include color support]) AS_IF([ test "x$enable_colors" = xyes || test "x$enable_colors" = xauto ], @@ -179,8 +200,12 @@ AC_ARG_ENABLE([lirc], [Enable LIRC support]),, [enable_lirc=no]) if test x$enable_lirc = xyes; then - PKG_CHECK_MODULES([LIBLIRCCLIENT], [liblircclient0],, - [AC_MSG_ERROR([liblircclient0 not found])]) + PKG_CHECK_MODULES([LIBLIRCCLIENT], [lirc],, + [PKG_CHECK_MODULES([LIBLIRCCLIENT], [liblircclient0],, + [AC_MSG_ERROR([lirc not found])] + )] + ) + AC_DEFINE([ENABLE_LIRC], [1], [Enable LIRC support]) fi @@ -202,16 +227,14 @@ AM_CONDITIONAL(ENABLE_HELP_SCREEN, test x$enable_help_screen = xyes) dnl Optional - curses getmouse support -dnl AC_CHECK_LIB depends on being able to prepend a '-l', remove the '-l' from CURSES_LIB first -AC_CHECK_LIB([$(expr substr $CURSES_LIB 3 99)], - [getmouse], +MPD_WITH_LIBRARY([CURSES], + [AC_CHECK_FUNC([getmouse], [ax_cv_curses_mouse=yes], - [ax_cv_curses_mouse=no]) + [ax_cv_curses_mouse=no])]) AC_ARG_ENABLE([mouse], AS_HELP_STRING([--enable-mouse], - [Enable curses getmouse support @<:@default=yes@:>@]), - [enable_mouse=$enableval], + [Enable curses getmouse support @<:@default=yes@:>@]),, [enable_mouse=auto]) AC_MSG_CHECKING([whether to include mouse support]) @@ -288,8 +311,7 @@ dnl Optional screen - lyrics AC_MSG_CHECKING([whether to include the lyrics screen]) AC_ARG_ENABLE([lyrics-screen], AS_HELP_STRING([--enable-lyrics-screen], - [Enable lyrics screen @<:@default=no@:>@]), - [enable_lyrics_screen=$enableval], + [Enable lyrics screen @<:@default=no@:>@]),, [enable_lyrics_screen=no]) case "$host_os" in @@ -324,7 +346,6 @@ AC_DEFINE_UNQUOTED([LYRICS_PLUGIN_DIR], ["$lyrics_plugin_dir"], AC_SUBST(lyrics_plugin_dir) AM_CONDITIONAL(ENABLE_PLUGIN_LIBRARY, test x$enable_lyrics_screen = xyes) -AM_CONDITIONAL(ENABLE_SCREEN_TEXT, test x$enable_lyrics_screen = xyes) dnl Optional screen - outputs AC_MSG_CHECKING([whether to include the outputs screen]) @@ -341,6 +362,24 @@ AM_CONDITIONAL(ENABLE_OUTPUTS_SCREEN, test x$enable_outputs_screen = xyes) AC_MSG_RESULT([$enable_outputs_screen]) +dnl Optional screen - client-to-client chat +AC_MSG_CHECKING([whether to include the chat screen]) +AC_ARG_ENABLE([chat-screen], + AC_HELP_STRING([--enable-chat-screen], + [Enable chat screen @<:@default=no@:>@]),, + [enable_chat_screen=no]) +if test "x$enable_chat_screen" = "xauto"; then + enable_chat_screen=yes +fi +AC_MSG_RESULT([$enable_chat_screen]) +if test "x$enable_chat_screen" = "xyes" ; then + AC_DEFINE(ENABLE_CHAT_SCREEN, 1, [Enable chat screen]) +fi +AM_CONDITIONAL(ENABLE_CHAT_SCREEN, test x$enable_chat_screen = xyes) + +AM_CONDITIONAL(ENABLE_SCREEN_TEXT, + test x$enable_lyrics_screen = xyes -o x$enable_chat_screen = xyes) + dnl dnl Windows OS Resource File dnl @@ -369,6 +408,11 @@ AC_ARG_ENABLE(debug, if test "x$enable_debug" = xno; then AM_CFLAGS="$AM_CFLAGS -DNDEBUG" + + AX_APPEND_COMPILE_FLAGS([-ffunction-sections]) + AX_APPEND_COMPILE_FLAGS([-fdata-sections]) + + AX_APPEND_LINK_FLAGS([-Wl,--gc-sections]) fi AC_ARG_ENABLE(test, @@ -403,6 +447,10 @@ dnl AC_SUBST(AM_CFLAGS) +AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden]) +AX_APPEND_COMPILE_FLAGS([-ffast-math]) +AX_APPEND_COMPILE_FLAGS([-ftree-vectorize]) + AX_APPEND_COMPILE_FLAGS([-Wall]) AX_APPEND_COMPILE_FLAGS([-Wextra]) AX_APPEND_COMPILE_FLAGS([-Wno-deprecated-declarations])