]> git.sur5r.net Git - kconfig-frontends/blobdiff - configure.ac
configure: allow passing extra libs per-frontend
[kconfig-frontends] / configure.ac
index 0759574df87ca9c531407b5c1f31841ab9443bd5..f856c21e397619b6de5ce9c5256854dfbe6c1e2a 100644 (file)
@@ -33,7 +33,7 @@ LT_INIT([disable-static])
 AC_ARG_ENABLE(
     [root-menu-prompt],
     [AS_HELP_STRING(
-        [--enable-root-menu-prompt],
+        [--enable-root-menu-prompt=PROMPT],
         [set the root-menu prompt (default=Configuration)])],
     [AS_CASE(
         ["$enableval"],
@@ -42,10 +42,7 @@ AC_ARG_ENABLE(
                [# Escape the $ signs, otherwise they would get munged by make
                 # Also, append a space at the end, to separate the package
                 # name from the literal 'Configuration'
-                root_menu="$( echo "$enableval"          \
-                              |sed -r -e 's/\$/\\$$/g;'  \
-                                      -e 's/$/ /;'       \
-                            )"])])
+                root_menu="$( echo "$enableval" |sed -r -e 's/\$/\\$$/g;' )"])])
 AC_SUBST([root_menu], [${root_menu=Configuration}])
 
 AC_ARG_ENABLE(
@@ -193,6 +190,7 @@ AS_IF(
     [AC_SUBST([CURSES_LOC])
      AC_SUBST([ncurses_LIBS])
      LIBS_old="$LIBS"
+     LIBS=
      AC_CHECK_HEADERS(
         [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
         [CURSES_LOC=$ac_header; break])
@@ -225,10 +223,12 @@ AS_IF(
     [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
     [AC_SUBST([ncurses_extra_LIBS])
      LIBS_old="$LIBS"
+     LIBS=
      AC_SEARCH_LIBS(
         [new_panel],
         [panelw panel],
-        [ac_ct_panel_lib_found=yes; break])
+        [ac_ct_panel_lib_found=yes; break],,
+        [$ncurses_LIBS])
      AS_IF(
         [test -z "$ac_ct_panel_lib_found"],
         [AS_IF(
@@ -238,7 +238,8 @@ AS_IF(
      AC_SEARCH_LIBS(
         [menu_init],
         [menuw menu],
-        [ac_ct_menu_lib_found=yes; break])
+        [ac_ct_menu_lib_found=yes; break],,
+        [$ncurses_LIBS])
      AS_IF(
         [test -z "$ac_ct_panel_lib_found"],
         [AS_IF(
@@ -286,6 +287,14 @@ AS_IF(
     [test "$has_qt" = "no" ],
     [enable_qconf=no])
 
+#----------------------------------------
+# Per-frontends extra libraries
+AC_ARG_VAR([conf_EXTRA_LIBS],  [Extra libraries to build the conf frontend] )
+AC_ARG_VAR([gconf_EXTRA_LIBS], [Extra libraries to build the gconf frontend])
+AC_ARG_VAR([mconf_EXTRA_LIBS], [Extra libraries to build the mconf frontend])
+AC_ARG_VAR([nconf_EXTRA_LIBS], [Extra libraries to build the nconf frontend])
+AC_ARG_VAR([qconf_EXTRA_LIBS], [Extra libraries to build the qconf frontend])
+
 #---------------------------------------------------------------------------
 # Now, we know what frontends to enable
 AS_IF([test "$enable_conf"  = "auto"], [enable_conf=yes ])