STATICDIR
SNAPSHOTS
SELINUX_LIBS
+READLINE_LIBS
POOL
PKGCONFIG
OWNER
then exec_prefix="";
fi;
-################################################################################
-if test x$READLINE != xno; then
- { $as_echo "$as_me:$LINENO: checking for library containing tgetent" >&5
-$as_echo_n "checking for library containing tgetent... " >&6; }
-if test "${ac_cv_search_tgetent+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char tgetent ();
-int
-main ()
-{
-return tgetent ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' tinfo ncurses curses termcap termlib; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_search_tgetent=$ac_res
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext
- if test "${ac_cv_search_tgetent+set}" = set; then
- break
-fi
-done
-if test "${ac_cv_search_tgetent+set}" = set; then
- :
-else
- ac_cv_search_tgetent=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
-$as_echo "$ac_cv_search_tgetent" >&6; }
-ac_res=$ac_cv_search_tgetent
-if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- tg_found=yes
-else
- tg_found=no
-fi
-
- test x$READLINE:$tg_found = xyes:no &&
- { { $as_echo "$as_me:$LINENO: error: termcap could not be found which is required for the
---enable-readline option (which is enabled by default). Either disable readline
-support with --disable-readline or download and install termcap from:
- ftp.gnu.org/gnu/termcap
-Note: if you are using precompiled packages you will also need the development
- package as well (which may be called termcap-devel or something similar).
-Note: (n)curses also seems to work as a substitute for termcap. This was
- not found either - but you could try installing that as well.
-" >&5
-$as_echo "$as_me: error: termcap could not be found which is required for the
---enable-readline option (which is enabled by default). Either disable readline
-support with --disable-readline or download and install termcap from:
- ftp.gnu.org/gnu/termcap
-Note: if you are using precompiled packages you will also need the development
- package as well (which may be called termcap-devel or something similar).
-Note: (n)curses also seems to work as a substitute for termcap. This was
- not found either - but you could try installing that as well.
-" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
################################################################################
{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
################################################################################
if test x$READLINE != xno; then
- rl_found=yes
+ lvm_saved_libs=$LIBS
+ { $as_echo "$as_me:$LINENO: checking for library containing tgetent" >&5
+$as_echo_n "checking for library containing tgetent... " >&6; }
+if test "${ac_cv_search_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-{ $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' tinfo ncurses curses termcap termlib; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_tgetent=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_tgetent+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_tgetent+set}" = set; then
+ :
+else
+ ac_cv_search_tgetent=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
+$as_echo "$ac_cv_search_tgetent" >&6; }
+ac_res=$ac_cv_search_tgetent
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ READLINE_LIBS=$ac_cv_search_tgetent
+else
+
+ if test "$READLINE" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: termcap could not be found which is required for the
+--enable-readline option (which is enabled by default). Either disable readline
+support with --disable-readline or download and install termcap from:
+ ftp.gnu.org/gnu/termcap
+Note: if you are using precompiled packages you will also need the development
+ package as well (which may be called termcap-devel or something similar).
+Note: (n)curses also seems to work as a substitute for termcap. This was
+ not found either - but you could try installing that as well." >&5
+$as_echo "$as_me: error: termcap could not be found which is required for the
+--enable-readline option (which is enabled by default). Either disable readline
+support with --disable-readline or download and install termcap from:
+ ftp.gnu.org/gnu/termcap
+Note: if you are using precompiled packages you will also need the development
+ package as well (which may be called termcap-devel or something similar).
+Note: (n)curses also seems to work as a substitute for termcap. This was
+ not found either - but you could try installing that as well." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+ { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
$as_echo_n "checking for readline in -lreadline... " >&6; }
if test "${ac_cv_lib_readline_readline+set}" = set; then
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
$as_echo "$ac_cv_lib_readline_readline" >&6; }
if test "x$ac_cv_lib_readline_readline" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBREADLINE 1
+
+
+cat >>confdefs.h <<\_ACEOF
+#define READLINE_SUPPORT 1
_ACEOF
- LIBS="-lreadline $LIBS"
+ LIBS=$lvm_saved_libs
+ { $as_echo "$as_me:$LINENO: checking for rl_line_buffer in -lreadline" >&5
+$as_echo_n "checking for rl_line_buffer in -lreadline... " >&6; }
+if test "${ac_cv_lib_readline_rl_line_buffer+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char rl_line_buffer ();
+int
+main ()
+{
+return rl_line_buffer ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_readline_rl_line_buffer=yes
else
- rl_found=no
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_readline_rl_line_buffer=no
fi
- test x$READLINE:$rl_found = xyes:no &&
- { { $as_echo "$as_me:$LINENO: error: GNU Readline could not be found which is required for the
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_line_buffer" >&5
+$as_echo "$ac_cv_lib_readline_rl_line_buffer" >&6; }
+if test "x$ac_cv_lib_readline_rl_line_buffer" = x""yes; then
+ READLINE_LIBS="-lreadline"
+else
+
+ { $as_echo "$as_me:$LINENO: result: linking -lreadline with $READLINE_LIBS needed" >&5
+$as_echo "linking -lreadline with $READLINE_LIBS needed" >&6; }
+ READLINE_LIBS="-lreadline $READLINE_LIBS"
+
+fi
+
+else
+
+ READLINE_LIBS=
+ if test "$READLINE" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
-package as well (which may be called readline-devel or something similar).
-" >&5
+package as well (which may be called readline-devel or something similar)." >&5
$as_echo "$as_me: error: GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
-package as well (which may be called readline-devel or something similar).
-" >&2;}
+package as well (which may be called readline-devel or something similar)." >&2;}
{ (exit 1); exit 1; }; }
- if test $rl_found = yes; then
+ fi
+fi
+
+ LIBS="$READLINE_LIBS $lvm_saved_libs"
for ac_func in rl_completion_matches
do
fi
done
-
-cat >>confdefs.h <<\_ACEOF
-#define READLINE_SUPPORT 1
-_ACEOF
-
- fi
+ LIBS=$lvm_saved_libs
fi
################################################################################
+
################################################################################
then exec_prefix="";
fi;
-################################################################################
-dnl -- Check for termcap (Shamelessly copied from parted 1.4.17)
-if test x$READLINE != xno; then
- AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
- [tg_found=yes], [tg_found=no])
- test x$READLINE:$tg_found = xyes:no &&
- AC_MSG_ERROR(
-termcap could not be found which is required for the
---enable-readline option (which is enabled by default). Either disable readline
-support with --disable-readline or download and install termcap from:
- ftp.gnu.org/gnu/termcap
-Note: if you are using precompiled packages you will also need the development
- package as well (which may be called termcap-devel or something similar).
-Note: (n)curses also seems to work as a substitute for termcap. This was
- not found either - but you could try installing that as well.
-)
-fi
-
################################################################################
dnl -- Check for dlopen
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
################################################################################
dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
if test x$READLINE != xno; then
- rl_found=yes
- AC_CHECK_LIB([readline], [readline], , [rl_found=no])
- test x$READLINE:$rl_found = xyes:no &&
- AC_MSG_ERROR(
-GNU Readline could not be found which is required for the
+ lvm_saved_libs=$LIBS
+ AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
+ READLINE_LIBS=$ac_cv_search_tgetent, [
+ if test "$READLINE" = yes; then
+ AC_MSG_ERROR(
+[termcap could not be found which is required for the
+--enable-readline option (which is enabled by default). Either disable readline
+support with --disable-readline or download and install termcap from:
+ ftp.gnu.org/gnu/termcap
+Note: if you are using precompiled packages you will also need the development
+ package as well (which may be called termcap-devel or something similar).
+Note: (n)curses also seems to work as a substitute for termcap. This was
+ not found either - but you could try installing that as well.])
+ fi])
+ dnl -- Old systems may need extra termcap dependency explicitly in LIBS
+ AC_CHECK_LIB([readline], [readline], [
+ AC_DEFINE([READLINE_SUPPORT], 1,
+ [Define to 1 to include the LVM readline shell.])
+ dnl -- Try only with -lreadline and check for different symbol
+ LIBS=$lvm_saved_libs
+ AC_CHECK_LIB([readline], [rl_line_buffer],
+ [ READLINE_LIBS="-lreadline" ], [
+ AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
+ READLINE_LIBS="-lreadline $READLINE_LIBS"
+ ]) ], [
+ READLINE_LIBS=
+ if test "$READLINE" = yes; then
+ AC_MSG_ERROR(
+[GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
-package as well (which may be called readline-devel or something similar).
-)
- if test $rl_found = yes; then
- AC_CHECK_FUNCS([rl_completion_matches])
- AC_DEFINE([READLINE_SUPPORT], 1,
- [Define to 1 to include the LVM readline shell.])
- fi
+package as well (which may be called readline-devel or something similar).])
+ fi ])
+ LIBS="$READLINE_LIBS $lvm_saved_libs"
+ AC_CHECK_FUNCS([rl_completion_matches])
+ LIBS=$lvm_saved_libs
fi
################################################################################
AC_SUBST(POOL)
AC_SUBST(QUORUM_CFLAGS)
AC_SUBST(QUORUM_LIBS)
+AC_SUBST(READLINE_LIBS)
AC_SUBST(SACKPT_CFLAGS)
AC_SUBST(SACKPT_LIBS)
AC_SUBST(SALCK_CFLAGS)