1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

added suto-detection for xmms stuff

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@495 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-01-11 22:13:13 +00:00
parent e2487a6537
commit 228f39ffc4

View File

@ -83,78 +83,143 @@ dnl
dnl XMMS (Version 1)
dnl
want_xmms=no
want_xmms=auto
AC_ARG_ENABLE(xmms,
[ --enable-xmms enable xmms (ver. 1) media player support [[default=no]]],
[ --enable-xmms enable xmms (ver. 1) media player support [[default=auto]]],
[want_xmms="$enableval"])
if test x$want_xmms = "xyes"; then
AC_DEFINE(XMMS, 1, [Define for XMMS Version 1 support])
echo "Sorry, xmms isn't supported yet"
exit -1
fi
case x$want_xmms in
xauto)
want_xmms=no
;;
xyes)
echo "Sorry, xmms isn't supported yet"
exit -1
AC_DEFINE(XMMS, 1, [Define for XMMS Version 1 support])
;;
xno)
;;
*)
echo "Error: invalid bmp parameter specified: $want_bmp"
exit -1
;;
esac
AM_CONDITIONAL(BUILD_XMMS, test x$want_xmms = xyes)
dnl
dnl BMP (through 0.9.7.1)
dnl
want_bmp=no
want_bmp=auto
AC_ARG_ENABLE(bmp,
[ --enable-bmp enable beep media media player support [[default=no]]],
[ --enable-bmp enable beep media media player support [[default=auto]]],
[want_bmp="$enableval"])
if test x$want_bmp = "xyes"; then
AC_DEFINE(BMP, 1, [Define for Beep Media Player support])
PKG_CHECK_MODULES([BMP], [glib-2.0], [])
CFLAGS="$CFLAGS $BMP_CFLAGS"
LIBS="$LIBS $BMP_LIBS"
AC_CHECK_HEADERS([dlfcn.h], [], [DLFCN_MISSING=yes])
if test "x$DLFCN_MISSING" = xyes; then
AC_MSG_ERROR(["dlfcn.h missing: dynamic library loading not supported"])
fi
AC_CHECK_LIB(dl, dlopen,
LIBS="$LIBS -ldl",
AC_MSG_ERROR([Could not find dlopen in libdl]))
fi
case x$want_bmp in
xauto)
want_bmp=yes
PKG_CHECK_MODULES([BMP], [glib-2.0 >= 2.0], [], [want_bmp=no])
if test x$want_bmp = xyes; then
AC_CHECK_HEADERS([dlfcn.h], [], [want_bmp=no])
if test x$want_bmp = xyes; then
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"],
[AC_CHECK_LIB(c,dlopen,[LIBS="$LIBS -lc"],
[want_bmp=no])])
if test x$want_bmp = xyes; then
CFLAGS="$CFLAGS $BMP_CFLAGS"
LIBS="$LIBS $BMP_LIBS"
AC_DEFINE(BMP, 1, [Define for Beep Media Player support])
fi
fi
fi
;;
xyes)
PKG_CHECK_MODULES([BMP], [glib-2.0 >= 2.0])
CFLAGS="$CFLAGS $BMP_CFLAGS"
LIBS="$LIBS $BMP_LIBS"
AC_CHECK_HEADERS([dlfcn.h], [],
[AC_MSG_ERROR(["dlfcn.h not found: dynamic library loading not supported"])])
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"],
[AC_CHECK_LIB(c,dlopen,[LIBS="$LIBS -lc"],
[AC_MSG_ERROR([dlopen() not available])])])
AC_DEFINE(BMP, 1, [Define for Beep Media Player support])
;;
xno)
;;
*)
echo "Error: invalid bmp parameter specified: $want_bmp"
exit -1
;;
esac
AM_CONDITIONAL(BUILD_BMP, test x$want_bmp = xyes)
dnl
dnl Audacious Media Player
dnl
want_audacious=no
want_audacious=auto
AC_ARG_ENABLE(audacious,
[ --enable-audacious enable beep audacious player support [[default=no]]],
[ --enable-audacious enable audacious player support [[default=auto]]],
[want_audacious="$enableval"])
if test x$want_audacious = "xyes"; then
AC_DEFINE(AUDACIOUS, 1, [Define for Audacious support])
PKG_CHECK_MODULES([AUDACIOUS], [glib-2.0], [])
CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
LIBS="$LIBS $AUDACIOUS_LIBS"
AC_CHECK_HEADERS([dlfcn.h], [], [DLFCN_MISSING=yes])
if test "x$DLFCN_MISSING" = xyes; then
AC_MSG_ERROR(["dlfcn.h missing: dynamic library loading not supported"])
fi
AC_CHECK_LIB(dl, dlopen,
LIBS="$LIBS -ldl",
AC_MSG_ERROR([Could not find dlopen in libdl]))
fi
case x$want_audacious in
xauto)
want_audacious=yes
PKG_CHECK_MODULES([AUDACIOUS], [glib-2.0 >= 2.0], [], [want_audacious=no])
if test x$want_audacious = xyes; then
AC_CHECK_HEADERS([dlfcn.h], [], [want_audacious=no])
if test x$want_audacious = xyes; then
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"],
[AC_CHECK_LIB(c,dlopen,[LIBS="$LIBS -lc"],
[want_audacious=no])])
if test x$want_audacious = xyes; then
CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
LIBS="$LIBS $AUDACIOUS_LIBS"
AC_DEFINE(AUDACIOUS, 1, [Define for Audacious support])
fi
fi
fi
;;
xyes)
PKG_CHECK_MODULES([AUDACIOUS], [glib-2.0 >= 2.0])
CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
LIBS="$LIBS $AUDACIOUS_LIBS"
AC_CHECK_HEADERS([dlfcn.h], [],
[AC_MSG_ERROR(["dlfcn.h not found: dynamic library loading not supported"])])
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"],
[AC_CHECK_LIB(c,dlopen,[LIBS="$LIBS -lc"],
[AC_MSG_ERROR([dlopen() not available])])])
AC_DEFINE(AUDACIOUS, 1, [Define for Audacious support])
;;
xno)
;;
*)
echo "Error: invalid audacious parameter specified: $want_audacious"
exit -1
;;
esac
AM_CONDITIONAL(BUILD_AUDACIOUS, test x$want_audacious = xyes)
dnl
dnl InfoPipe (Version 1.3)
dnl
want_infopipe=no
want_infopipe=yes
AC_ARG_ENABLE(infopipe,
[ --enable-infopipe enable xmms/bmp infopipe support [[default=no]]],
[ --enable-infopipe enable xmms/bmp infopipe support [[default=yes]]],
[want_infopipe="$enableval"])
if test x$want_infopipe = "xyes"; then
AC_DEFINE(INFOPIPE, 1, [Define for InfoPipe support])
fi
case x$want_infopipe in
xyes)
AC_DEFINE(INFOPIPE, 1, [Define for InfoPipe support])
;;
xno)
;;
*)
echo "Error: invalid infopipe parameter specified: $want_infopipe"
exit -1
;;
esac
AM_CONDITIONAL(BUILD_INFOPIPE, test x$want_infopipe = xyes)
dnl