~ubuntu-branches/ubuntu/quantal/lvm2/quantal

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Steve Langasek
  • Date: 2012-04-14 02:57:53 UTC
  • mfrom: (3.1.22 sid)
  • Revision ID: steve.langasek@canonical.com-20120414025753-ejbdw9c8llik58y9
Merge version 2.02.88-2 from Debian testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
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"
38
37
                LIB_SUFFIX=so
39
38
                DEVMAPPER=yes
40
39
                ODIRECT=yes
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)
387
386
 
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"])
978
 
 
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)
987
 
                SELINUX_LIBS=
988
 
                SELINUX_PC=
989
 
                HAVE_SELINUX=no ])
 
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)"
990
977
fi
991
978
 
992
979
################################################################################
1007
994
AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
1008
995
 
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
1016
 
                        AC_MSG_ERROR(
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.])
1025
 
                fi])
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"
1036
 
                        ]) ], [
1037
 
                READLINE_LIBS=
1038
 
                if test "$READLINE" = yes; then
1039
 
                        AC_MSG_ERROR(
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).])
1046
 
                fi ])
1047
 
        LIBS="$READLINE_LIBS $lvm_saved_libs"
1048
 
        AC_CHECK_FUNCS([rl_completion_matches])
1049
 
        LIBS=$lvm_saved_libs
1050
 
fi
1051
 
 
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.])
1113
1058
fi
1114
1059
 
1115
1060
if test x$CLVMD != xnone; then
1141
1086
fi
1142
1087
 
1143
1088
################################################################################
1144
 
AC_PATH_PROG(MODPROBE_CMD, modprobe)
1145
 
 
1146
 
if test x$MODPROBE_CMD != x; then
1147
 
        AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
1148
 
fi
 
1089
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["/sbin/modprobe"], [The path to 'modprobe', if available.])
1149
1090
 
1150
1091
 
1151
1092
lvm_exec_prefix=$exec_prefix
1346
1287
AC_SUBST(SALCK_CFLAGS)
1347
1288
AC_SUBST(SALCK_LIBS)
1348
1289
AC_SUBST(SELINUX_LIBS)
 
1290
AC_SUBST(SELINUX_LIBS_STATIC)
1349
1291
AC_SUBST(SELINUX_PC)
1350
1292
AC_SUBST(SNAPSHOTS)
1351
1293
AC_SUBST(STATICDIR)