Code

configure.ac: added option --enable-mini
authorMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:24:13 +0000 (08:24 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:24:13 +0000 (08:24 +0100)
The option --enable-mini disables lots of features, and tries to
create a ncmpc binary which fits on very small machines.

configure.ac

index 1d2e0057c3463882118377f8dc32241e007f4d4e..4dec85891ade1c5b59e5abbd4c41a505894a3300 100644 (file)
@@ -36,6 +36,29 @@ dnl
 AC_CHECK_FUNCS([strcasestr])
 
 
+dnl
+dnl ncmpc-mini
+dnl
+
+AC_ARG_ENABLE(mini,
+    AS_HELP_STRING([--enable-mini],
+                   [Build ncmpc-mini (default: disabled)]),
+    [enable_mini=$enableval],
+    [enable_mini=no])
+
+AM_CONDITIONAL(NCMPC_MINI, test x$enable_mini = xyes)
+if test "x$enable_mini" = xyes; then
+    AC_DEFINE([NCMPC_MINI], [1], [Build ncmpc-mini, which disables lots of features]),
+    auto=no
+    disable_mini=no
+    ncurses=ncurses
+else
+    auto=auto
+    disable_mini=yes
+    ncurses=auto
+fi
+
+
 dnl
 dnl Check for libraries
 dnl
@@ -64,7 +87,6 @@ AC_ARG_ENABLE([wide],
 
 
 dnl ncurses
-ncurses=auto
 AC_ARG_WITH([ncurses],
            AC_HELP_STRING([--with-ncurses], [compile/link with ncurses library] ),
            [ncurses=ncurses])
@@ -242,7 +264,7 @@ AC_ARG_ENABLE([mouse],
               AC_HELP_STRING([--enable-mouse],
                             [Enable curses getmouse support @<:@default=yes@:>@]),
              [getmouse="$enableval"],
-             [getmouse=yes])
+             [getmouse=$disable_mini])
 AC_MSG_RESULT([$getmouse])
 if test "x$getmouse" = "xyes" ; then
    AC_CHECK_LIB([$ncurses], 
@@ -271,7 +293,7 @@ AC_ARG_ENABLE([search-screen],
               AC_HELP_STRING([--enable-search-screen],
                             [Enable search screen (EXPERIMENTAL) @<:@default=yes@:>@]),
              [search_screen="$enableval"],
-             [search_screen=yes])
+             [search_screen=$disable_mini])
 AC_MSG_RESULT([$search_screen])
 if test "x$search_screen" = "xyes" ; then
     AC_DEFINE(ENABLE_SEARCH_SCREEN, 1, [Enable search screen])
@@ -285,7 +307,7 @@ AC_ARG_ENABLE([key-screen],
               AC_HELP_STRING([--enable-key-screen],
                             [Enable key editor screen @<:@default=yes@:>@]),
              [keydef_screen="$enableval"],
-             [keydef_screen=yes])
+             [keydef_screen=$disable_mini])
 AC_MSG_RESULT([$keydef_screen])
 if test "x$keydef_screen" = "xyes" ; then
     AC_DEFINE(ENABLE_KEYDEF_SCREEN, 1, [Enable key editor screen])