X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=efb6e22bc2944a7627f5cb237a5fdaa0adb142d2;hb=fe63646351309883cd2c61eb12be475ce8979764;hp=3dc9234e7a694529e5f628ec8a9881e88b0bc92b;hpb=031c52f873b908cb2bea5cb4c6d01949df6cace1;p=ncmpc.git diff --git a/configure.ac b/configure.ac index 3dc9234..efb6e22 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_INIT(ncmpc, 0.20~git, max@duempel.org) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR(build) AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects]) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl Check for programs @@ -43,24 +43,25 @@ else ncurses=auto fi +AC_CANONICAL_HOST -dnl -dnl Check for libraries -dnl - -dnl Try to find the socket functions -AC_CHECK_FUNC([socket], - [], - [AC_CHECK_LIB([socket],[socket],[LIBS="$LIBS -lsocket"], - [AC_MSG_ERROR(No UNIX socket API found)]) - ]) +case "$host_os" in +mingw32* | windows*) + LIBS="$LIBS -lws2_32" + ;; +*) + AC_CHECK_FUNC([socket], + [], + [AC_CHECK_LIB([socket],[socket],[LIBS="$LIBS -lsocket"], + [AC_MSG_ERROR(No UNIX socket API found)]) + ]) -dnl Try to find the gethostbyname functions -AC_CHECK_FUNC([gethostbyname], - [], - [AC_CHECK_LIB([nsl],[gethostbyname],[LIBS="$LIBS -lnsl"], - [AC_MSG_ERROR(No UNIX gethostbyname API found)]) - ]) + AC_CHECK_FUNC([gethostbyname], + [], + [AC_CHECK_LIB([nsl],[gethostbyname],[LIBS="$LIBS -lnsl"], + [AC_MSG_ERROR(No UNIX gethostbyname API found)]) + ]) +esac dnl wide character support @@ -230,17 +231,6 @@ fi AM_CONDITIONAL(ENABLE_HELP_SCREEN, test x$enable_help_screen = xyes) -dnl Optional screen - browse screen -#AC_MSG_CHECKING([whether to include the browse screen])r -#AC_ARG_ENABLE([browse-screen], -# AS_HELP_STRING([--enable-browse-screen], -# [Enable the browse screen @<:@default=yes@:>@]),, -# [enable_browse_screen=yes]) -#AC_MSG_RESULT([$enable_browse_screen]) -#if test "x$enable_browse_screen" = "xyes" ; then -# AC_DEFINE(ENABLE_BROWSE_SCREEN, 1, [Enable the browse screen]) -#fi - dnl Optional - curses getmouse support AC_MSG_CHECKING([whether to include mouse support]) AC_ARG_ENABLE([mouse], @@ -351,6 +341,8 @@ if test "x$enable_outputs_screen" = "xyes" ; then fi AM_CONDITIONAL(ENABLE_OUTPUTS_SCREEN, test x$enable_outputs_screen = xyes) +AC_MSG_RESULT([$enable_outputs_screen]) + dnl