configure.in
changeset 467 4b52401dda92
parent 464 9a6369a63488
child 468 391babf75293
     1.1 --- a/configure.in	Thu Nov 05 00:02:50 2009 +0000
     1.2 +++ b/configure.in	Fri Nov 06 03:37:57 2009 +0000
     1.3 @@ -180,10 +180,22 @@
     1.4  
     1.5  AC_ARG_ENABLE([music-cmd],
     1.6  AC_HELP_STRING([--enable-music-cmd], [support an external music player [[default=yes]]]),
     1.7 -              [], [enable_music_cmd=yes])
     1.8 -if test x$enable_music_cmd = xyes; then
     1.9 -    SOURCES="$SOURCES $srcdir/music_cmd.c"
    1.10 -    EXTRA_CFLAGS="$EXTRA_CFLAGS -DCMD_MUSIC"
    1.11 +              [], [enable_music_cmd=detect])
    1.12 +if test "x$enable_music_cmd" != xno; then
    1.13 +    AC_CHECK_FUNCS([fork vfork])
    1.14 +    if test "x$ac_cv_func_fork" = "xyes"; then
    1.15 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_FORK"
    1.16 +    elif test "x$ac_cv_func_vfork" = "xyes"; then
    1.17 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_VFORK"
    1.18 +    elif test "x$enable_music_cmd" = "xyes"; then
    1.19 +        AC_MSG_ERROR([external music player not available on your platform])
    1.20 +    else
    1.21 +        enable_music_cmd=no
    1.22 +    fi
    1.23 +    if test "x$enable_music_cmd" != xno; then
    1.24 +        SOURCES="$SOURCES $srcdir/music_cmd.c"
    1.25 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -DCMD_MUSIC"
    1.26 +    fi
    1.27  fi
    1.28  
    1.29  AC_ARG_ENABLE([music-wave],