1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Fix configure script a bit.

This commit is contained in:
Dave Davenport 2016-08-29 21:38:29 +02:00
parent 5cfe9a89b3
commit e79361e890
5 changed files with 26 additions and 4 deletions

View file

@ -54,9 +54,11 @@ AC_ARG_ENABLE(asan,
[AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fno-omit-frame-pointer -g3"]) [AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fno-omit-frame-pointer -g3"])
AC_ARG_ENABLE(broken-drun, dnl --------------------------------------------------------------------
[ --enable-broken-drun drun], dnl DRun dialog
[AM_CFLAGS="${AM_CFLAGS} -DBROKEN_DRUN"]) dnl --------------------------------------------------------------------
AC_ARG_ENABLE([drun], AC_HELP_STRING([--enable-drun],[Enable desktop file run dialog]))
AS_IF([test "x${enable_drun}" == "xyes"], [AC_DEFINE([ENABLE_DRUN], [1], [Enable desktop file run dialog])])
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
dnl Disable window mode dnl Disable window mode
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
@ -117,6 +119,16 @@ echo "Timing output: Enabled"
else else
echo "Timing output: Disabled" echo "Timing output: Disabled"
fi fi
if test x$enable_drun = xyes; then
echo "Desktop File run dialog Enabled"
else
echo "Desktop File run dialog Disabled"
fi
if test x$enable_windowmode != xno; then
echo "Window Switcher dialog Enabled"
else
echo "Window Switcher dialog Disabled"
fi
echo "-------------------------------------" echo "-------------------------------------"
echo "Now type 'make' to build" echo "Now type 'make' to build"
echo "" echo ""

View file

@ -6,6 +6,9 @@
* @ingroup MODES * @ingroup MODES
* @{ * @{
*/ */
#include <config.h>
#ifdef ENABLE_DRUN
extern Mode drun_mode; extern Mode drun_mode;
#endif // ENABLE_DRUN
/*@}*/ /*@}*/
#endif // ROFI_DIALOG_DRUN_H #endif // ROFI_DIALOG_DRUN_H

View file

@ -80,9 +80,11 @@ static void combi_mode_parse_switchers ( Mode *sw )
else if ( strcasecmp ( token, "run" ) == 0 ) { else if ( strcasecmp ( token, "run" ) == 0 ) {
pd->switchers[pd->num_switchers++] = &run_mode; pd->switchers[pd->num_switchers++] = &run_mode;
} }
#ifdef ENABLE_DRUN
else if ( strcasecmp ( token, "drun" ) == 0 ) { else if ( strcasecmp ( token, "drun" ) == 0 ) {
pd->switchers[pd->num_switchers++] = &drun_mode; pd->switchers[pd->num_switchers++] = &drun_mode;
} }
#endif // ENABLE_DRUN
else { else {
// If not build in, use custom switchers. // If not build in, use custom switchers.
Mode *sw = script_switcher_parse_setup ( token ); Mode *sw = script_switcher_parse_setup ( token );

View file

@ -25,6 +25,7 @@
* *
*/ */
#include <config.h> #include <config.h>
#ifdef ENABLE_DRUN
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -576,3 +577,5 @@ Mode drun_mode =
.private_data = NULL, .private_data = NULL,
.free = NULL .free = NULL
}; };
#endif // ENABLE_DRUN

View file

@ -368,7 +368,7 @@ static int add_mode ( const char * token )
modi[num_modi] = &run_mode; modi[num_modi] = &run_mode;
num_modi++; num_modi++;
} }
#ifdef BROKEN_DRUN #ifdef ENABLE_DRUN
else if ( strcasecmp ( token, "drun" ) == 0 ) { else if ( strcasecmp ( token, "drun" ) == 0 ) {
modi[num_modi] = &drun_mode; modi[num_modi] = &drun_mode;
num_modi++; num_modi++;
@ -410,7 +410,9 @@ static void setup_modi ( void )
// and re-alloc moves that pointer. // and re-alloc moves that pointer.
mode_set_config ( &ssh_mode ); mode_set_config ( &ssh_mode );
mode_set_config ( &run_mode ); mode_set_config ( &run_mode );
#ifdef ENABLE_DRUN
mode_set_config ( &drun_mode ); mode_set_config ( &drun_mode );
#endif
#ifdef WINDOW_MODE #ifdef WINDOW_MODE
mode_set_config ( &window_mode ); mode_set_config ( &window_mode );