34
34
CLDWHOLEARCHIVE="-Wl,-whole-archive"
35
35
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
36
36
LDDEPS="$LDDEPS .export.sym"
37
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
382
381
AC_MSG_CHECKING(whether to enable readline)
383
382
AC_ARG_ENABLE([readline],
384
383
AC_HELP_STRING([--disable-readline], [disable readline support]),
385
READLINE=$enableval, READLINE=maybe)
384
READLINE=$enableval, READLINE=yes)
386
385
AC_MSG_RESULT($READLINE)
388
387
################################################################################
972
971
################################################################################
973
972
dnl -- Check for selinux
974
973
if test x$SELINUX = xyes; then
975
AC_CHECK_LIB([sepol], [sepol_check_context], [
976
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
977
SELINUX_LIBS="-lsepol"])
979
AC_CHECK_LIB([selinux], [is_selinux_enabled], [
980
AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
981
AC_CHECK_HEADERS([selinux/label.h])
982
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
983
SELINUX_LIBS="-lselinux $SELINUX_LIBS"
984
SELINUX_PC="libselinux"
985
HAVE_SELINUX=yes ], [
986
AC_MSG_WARN(Disabling selinux)
974
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
975
SELINUX_LIBS="$(pkg-config --libs libselinux)"
976
SELINUX_LIBS_STATIC="$(pkg-config --libs --static libselinux)"
992
979
################################################################################
1007
994
AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
1009
996
################################################################################
1010
dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
1011
if test x$READLINE != xno; then
1012
lvm_saved_libs=$LIBS
1013
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
1014
READLINE_LIBS=$ac_cv_search_tgetent, [
1015
if test "$READLINE" = yes; then
1017
[termcap could not be found which is required for the
1018
--enable-readline option (which is enabled by default). Either disable readline
1019
support with --disable-readline or download and install termcap from:
1020
ftp.gnu.org/gnu/termcap
1021
Note: if you are using precompiled packages you will also need the development
1022
package as well (which may be called termcap-devel or something similar).
1023
Note: (n)curses also seems to work as a substitute for termcap. This was
1024
not found either - but you could try installing that as well.])
1026
dnl -- Old systems may need extra termcap dependency explicitly in LIBS
1027
AC_CHECK_LIB([readline], [readline], [
1028
AC_DEFINE([READLINE_SUPPORT], 1,
1029
[Define to 1 to include the LVM readline shell.])
1030
dnl -- Try only with -lreadline and check for different symbol
1031
LIBS=$lvm_saved_libs
1032
AC_CHECK_LIB([readline], [rl_line_buffer],
1033
[ READLINE_LIBS="-lreadline" ], [
1034
AC_MSG_RESULT([linking -lreadline with $READLINE_LIBS needed])
1035
READLINE_LIBS="-lreadline $READLINE_LIBS"
1038
if test "$READLINE" = yes; then
1040
[GNU Readline could not be found which is required for the
1041
--enable-readline option (which is enabled by default). Either disable readline
1042
support with --disable-readline or download and install readline from:
1043
ftp.gnu.org/gnu/readline
1044
Note: if you are using precompiled packages you will also need the development
1045
package as well (which may be called readline-devel or something similar).])
1047
LIBS="$READLINE_LIBS $lvm_saved_libs"
1048
AC_CHECK_FUNCS([rl_completion_matches])
1049
LIBS=$lvm_saved_libs
1052
################################################################################
1053
997
dnl -- Internationalisation stuff
1054
998
AC_MSG_CHECKING(whether to enable internationalisation)
1055
999
AC_ARG_ENABLE(nls,
1109
1053
################################################################################
1110
1054
dnl -- Ensure additional headers required
1111
1055
if test x$READLINE = xyes; then
1112
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
1056
AC_CHECK_LIB([readline], [readline], [READLINE_LIBS="-lreadline"], AC_MSG_ERROR(bailing out))
1057
AC_DEFINE([READLINE_SUPPORT], 1, [Define to 1 to include the LVM readline shell.])
1115
1060
if test x$CLVMD != xnone; then
1143
1088
################################################################################
1144
AC_PATH_PROG(MODPROBE_CMD, modprobe)
1146
if test x$MODPROBE_CMD != x; then
1147
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
1089
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["/sbin/modprobe"], [The path to 'modprobe', if available.])
1151
1092
lvm_exec_prefix=$exec_prefix