old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} $gcc_werror"
AC_CHECK_TYPES([long long,uint32_t,uint16_t,uint8_t,intmax_t,uintmax_t])
-
-# Some GCC invocations warn for converting function pointers to void *.
-# This is fair enough, as it's technically forbidden, but we use dlsym()
-# which can pretty much only exist if object and function pointers are
-# interconvertable. So we disable -Werror if need be.
-if test ! -z "$gcc_werror"; then
- AC_CACHE_CHECK([whether function pointers can be converted to void * without a warning],
- [rjk_cv_function_pointer_cast],[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
- void somefunction(void);],
- [(void *)somefunction])],
- [rjk_cv_function_pointer_cast=yes],
- [rjk_cv_function_pointer_cast=no])])
- if test $rjk_cv_function_pointer_cast = no; then
- gcc_werror=""
- fi
-fi
-
CFLAGS="${old_CFLAGS}"
# gcrypt maintainers keep changing everything. Design your interface
if test ! -z "$missing_functions"; then
AC_MSG_ERROR([missing functions:$missing_functions])
fi
+# dlsym will do if dlfunc not available
+AC_CHECK_FUNCS([dlfunc],[:],[
+ AC_DEFINE([dlfunc],[dlsym],[define dlfunc to dlsym if not available])
+])
+if test ! -z "$missing_functions"; then
+ AC_MSG_ERROR([missing functions:$missing_functions])
+fi
# Functions we can take or leave
AC_CHECK_FUNCS([fls getfsstat closesocket])
fi
AM_CONDITIONAL([GTK], [test x$want_gtk = xyes])
+# Some GCC invocations warn for converting function pointers to void *.
+# This is fair enough, as it's technically forbidden, but we use dlsym()
+# which can pretty much only exist if object and function pointers are
+# interconvertable. So we disable -Werror if need be.
+if test ! -z "$gcc_werror" && test "$ac_cv_func_dlfunc" != yes; then
+ CFLAGS="${CFLAGS} $gcc_werror"
+ AC_CACHE_CHECK([whether function pointers can be converted to void * without a warning],
+ [rjk_cv_function_pointer_cast],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+ void somefunction(void);],
+ [(void *)somefunction])],
+ [rjk_cv_function_pointer_cast=yes],
+ [rjk_cv_function_pointer_cast=no])])
+ if test $rjk_cv_function_pointer_cast = no; then
+ gcc_werror=""
+ fi
+ CFLAGS="${old_CFLAGS}"
+fi
+
if test "x$GCC" = xyes; then
# We need LLONG_MAX and annoyingly GCC doesn't always give it to us
# by default.
/** @brief Table of all icons */
static struct icon icons[] = {
{
- toggle: TRUE,
- stock: TRUE,
- icon: GTK_STOCK_MEDIA_PAUSE,
- label: "Pause",
- tip_on: "Resume playing track",
- tip_off: "Pause playing track",
- menuitem: "<GdisorderMain>/Control/Playing",
- on: pause_resume_on,
- sensitive: pause_resume_sensitive,
- action_go_on: disorder_eclient_pause,
- action_go_off: disorder_eclient_resume,
- events: "pause-changed playing-changed rights-changed playing-track-changed",
- menu_invert: TRUE,
+ .toggle = TRUE,
+ .stock = TRUE,
+ .icon = GTK_STOCK_MEDIA_PAUSE,
+ .label = "Pause",
+ .tip_on = "Resume playing track",
+ .tip_off = "Pause playing track",
+ .menuitem = "<GdisorderMain>/Control/Playing",
+ .on = pause_resume_on,
+ .sensitive = pause_resume_sensitive,
+ .action_go_on = disorder_eclient_pause,
+ .action_go_off = disorder_eclient_resume,
+ .events = "pause-changed playing-changed rights-changed playing-track-changed",
+ .menu_invert = TRUE,
},
{
- stock: TRUE,
- icon: GTK_STOCK_STOP,
- label: "Scratch",
- tip_on: "Cancel playing track",
- menuitem: "<GdisorderMain>/Control/Scratch",
- sensitive: scratch_sensitive,
- action_go_off: disorder_eclient_scratch_playing,
- events: "playing-track-changed rights-changed",
+ .stock = TRUE,
+ .icon = GTK_STOCK_STOP,
+ .label = "Scratch",
+ .tip_on = "Cancel playing track",
+ .menuitem = "<GdisorderMain>/Control/Scratch",
+ .sensitive = scratch_sensitive,
+ .action_go_off = disorder_eclient_scratch_playing,
+ .events = "playing-track-changed rights-changed",
},
{
- toggle: TRUE,
- stock: FALSE,
- icon: "cards24.png",
- label: "Random",
- tip_on: "Disable random play",
- tip_off: "Enable random play",
- menuitem: "<GdisorderMain>/Control/Random play",
- on: random_enabled,
- sensitive: random_sensitive,
- action_go_on: disorder_eclient_random_enable,
- action_go_off: disorder_eclient_random_disable,
- events: "random-changed rights-changed",
+ .toggle = TRUE,
+ .stock = FALSE,
+ .icon = "cards24.png",
+ .label = "Random",
+ .tip_on = "Disable random play",
+ .tip_off = "Enable random play",
+ .menuitem = "<GdisorderMain>/Control/Random play",
+ .on = random_enabled,
+ .sensitive = random_sensitive,
+ .action_go_on = disorder_eclient_random_enable,
+ .action_go_off = disorder_eclient_random_disable,
+ .events = "random-changed rights-changed",
},
{
- toggle: TRUE,
- stock: TRUE,
- icon: GTK_STOCK_MEDIA_PLAY,
- label: "Play",
- tip_on: "Disable play",
- tip_off: "Enable play",
- on: playing_enabled,
- sensitive: playing_sensitive,
- action_go_on: disorder_eclient_enable,
- action_go_off: disorder_eclient_disable,
- events: "enabled-changed rights-changed",
+ .toggle = TRUE,
+ .stock = TRUE,
+ .icon = GTK_STOCK_MEDIA_PLAY,
+ .label = "Play",
+ .tip_on = "Disable play",
+ .tip_off = "Enable play",
+ .on = playing_enabled,
+ .sensitive = playing_sensitive,
+ .action_go_on = disorder_eclient_enable,
+ .action_go_off = disorder_eclient_disable,
+ .events = "enabled-changed rights-changed",
},
{
- toggle: TRUE,
- stock: TRUE,
- icon: GTK_STOCK_CONNECT,
- label: "RTP",
- tip_on: "Stop playing network stream",
- tip_off: "Play network stream",
- menuitem: "<GdisorderMain>/Control/Network player",
- on: rtp_enabled,
- sensitive: rtp_sensitive,
- action_go_on: enable_rtp,
- action_go_off: disable_rtp,
- events: "rtp-changed",
+ .toggle = TRUE,
+ .stock = TRUE,
+ .icon = GTK_STOCK_CONNECT,
+ .label = "RTP",
+ .tip_on = "Stop playing network stream",
+ .tip_off = "Play network stream",
+ .menuitem = "<GdisorderMain>/Control/Network player",
+ .on = rtp_enabled,
+ .sensitive = rtp_sensitive,
+ .action_go_on = enable_rtp,
+ .action_go_off = disable_rtp,
+ .events = "rtp-changed",
},
};