]> git.sur5r.net Git - kconfig-frontends/blobdiff - configure.ac
configure: better isolate libraries search results
[kconfig-frontends] / configure.ac
index ce3393ff98af3312769c25a7e5aa02da3afbb32b..ac7b4c0eec4f92b557a0f869c8d3cf881ef770eb 100644 (file)
@@ -31,22 +31,19 @@ LT_INIT([disable-static])
 # Although there is a default (="linux") in the code, we do provide
 # a default here, to get a consistent autostuff behavior
 AC_ARG_ENABLE(
-    [package-name],
+    [root-menu-prompt],
     [AS_HELP_STRING(
-        [--enable-package-name],
-        [set the package name (default=kconfig-frontends)])],
+        [--enable-root-menu-prompt=PROMPT],
+        [set the root-menu prompt (default=Configuration)])],
     [AS_CASE(
         ["$enableval"],
-        [yes], [package_name=$PACKAGE_NAME],
-        [no],  [package_name=],
+        [yes], [root_menu=Configuration],
+        [no],  [root_menu=],
                [# 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'
-                package_name="$( echo "$enableval"          \
-                                 |sed -r -e 's/\$/\\$$/g;'  \
-                                         -e 's/$/ /;'       \
-                               )"])])
-AC_SUBST([package_name], [${package_name=$PACKAGE_NAME}])
+                root_menu="$( echo "$enableval" |sed -r -e 's/\$/\\$$/g;' )"])])
+AC_SUBST([root_menu], [${root_menu=Configuration}])
 
 AC_ARG_ENABLE(
     [config-prefix],
@@ -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(
@@ -347,8 +348,8 @@ AC_OUTPUT
 
 AC_MSG_NOTICE()
 AC_MSG_NOTICE([Configured with:])
-AC_MSG_NOTICE([- package name: '$package_name'])
-AC_MSG_NOTICE([- config prefix: '$config_prefix'])
+AC_MSG_NOTICE([- root-menu prompt: '$root_menu'])
+AC_MSG_NOTICE([- config prefix:    '$config_prefix'])
 AC_MSG_NOTICE([- frontends:])
 AS_IF([test "$enable_conf" = "yes"],
       [AC_MSG_NOTICE([  - conf:  yes])],