1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Basic internationalisation support.

This commit is contained in:
Alasdair Kergon 2004-02-13 22:56:45 +00:00
parent 25dee56be9
commit f93434a8ce
13 changed files with 6020 additions and 111 deletions

View File

@ -20,16 +20,30 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
SUBDIRS = include man lib tools SUBDIRS = include man
ifeq ("@INTL@", "yes")
SUBDIRS += po
endif
SUBDIRS += lib tools
ifeq ($(MAKECMDGOALS),distclean) ifeq ($(MAKECMDGOALS),distclean)
SUBDIRS += lib/format1 \ SUBDIRS += lib/format1 \
po \
test/mm test/device test/format1 test/regex test/filters test/mm test/device test/format1 test/regex test/filters
endif endif
include make.tmpl include make.tmpl
lib: include lib: include
tools: include lib tools: lib
po: lib tools
ifeq ("@INTL@", "yes")
lib.pofile: include.pofile
tools.pofile: lib.pofile
po.pofile: lib.pofile tools.pofile
pofile: po.pofile
endif

273
configure vendored
View File

@ -32,6 +32,10 @@ ac_help="$ac_help
--disable-devmapper Disable device-mapper interaction" --disable-devmapper Disable device-mapper interaction"
ac_help="$ac_help ac_help="$ac_help
--disable-o_direct Disable O_DIRECT" --disable-o_direct Disable O_DIRECT"
ac_help="$ac_help
--enable-nls Enable Native Language Support"
ac_help="$ac_help
--with-localedir=DIR Translation files in DIR [PREFIX/share/locale]"
# Initialize some variables set by options. # Initialize some variables set by options.
# The variables have the same names as the options, with # The variables have the same names as the options, with
@ -568,7 +572,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:572: checking for $ac_word" >&5 echo "configure:576: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -600,7 +604,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:604: checking for $ac_word" >&5 echo "configure:608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -630,7 +634,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:634: checking for $ac_word" >&5 echo "configure:638: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -681,7 +685,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:685: checking for $ac_word" >&5 echo "configure:689: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -713,7 +717,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:721: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -724,12 +728,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 728 "configure" #line 732 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@ -755,12 +759,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:764: checking whether we are using GNU C" >&5 echo "configure:768: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -769,7 +773,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@ -788,7 +792,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:792: checking whether ${CC-cc} accepts -g" >&5 echo "configure:796: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -831,7 +835,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:835: checking for a BSD compatible install" >&5 echo "configure:839: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -884,7 +888,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:888: checking whether ln -s works" >&5 echo "configure:892: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -905,7 +909,7 @@ else
fi fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:909: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:913: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -934,7 +938,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:938: checking for $ac_word" >&5 echo "configure:942: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -967,12 +971,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:971: checking for $ac_hdr that defines DIR" >&5 echo "configure:975: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 976 "configure" #line 980 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <$ac_hdr> #include <$ac_hdr>
@ -980,7 +984,7 @@ int main() {
DIR *dirp = 0; DIR *dirp = 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes" eval "ac_cv_header_dirent_$ac_safe=yes"
else else
@ -1005,7 +1009,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:1009: checking for opendir in -ldir" >&5 echo "configure:1013: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1013,7 +1017,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS" LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1017 "configure" #line 1021 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1024,7 +1028,7 @@ int main() {
opendir() opendir()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1046,7 +1050,7 @@ fi
else else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:1050: checking for opendir in -lx" >&5 echo "configure:1054: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1054,7 +1058,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS" LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1058 "configure" #line 1062 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1065,7 +1069,7 @@ int main() {
opendir() opendir()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1088,7 +1092,7 @@ fi
fi fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1092: checking how to run the C preprocessor" >&5 echo "configure:1096: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1103,13 +1107,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1107 "configure" #line 1111 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1120,13 +1124,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1124 "configure" #line 1128 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1137,13 +1141,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1141 "configure" #line 1145 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1168,12 +1172,12 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1172: checking for ANSI C header files" >&5 echo "configure:1176: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1177 "configure" #line 1181 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
@ -1181,7 +1185,7 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1198,7 +1202,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1202 "configure" #line 1206 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
@ -1216,7 +1220,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1220 "configure" #line 1224 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
@ -1237,7 +1241,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1241 "configure" #line 1245 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1248,7 +1252,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -1275,17 +1279,17 @@ for ac_hdr in fcntl.h malloc.h sys/ioctl.h unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1279: checking for $ac_hdr" >&5 echo "configure:1283: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1284 "configure" #line 1288 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1313,12 +1317,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1317: checking for working const" >&5 echo "configure:1321: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1322 "configure" #line 1326 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@ -1367,7 +1371,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
@ -1388,21 +1392,21 @@ EOF
fi fi
echo $ac_n "checking for inline""... $ac_c" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:1392: checking for inline" >&5 echo "configure:1396: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_c_inline=no ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1399 "configure" #line 1403 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} $ac_kw foo() { } $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_inline=$ac_kw; break ac_cv_c_inline=$ac_kw; break
else else
@ -1428,12 +1432,12 @@ EOF
esac esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6 echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:1432: checking for off_t" >&5 echo "configure:1436: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1437 "configure" #line 1441 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
@ -1461,12 +1465,12 @@ EOF
fi fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:1465: checking for pid_t" >&5 echo "configure:1469: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1470 "configure" #line 1474 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
@ -1494,12 +1498,12 @@ EOF
fi fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:1498: checking for size_t" >&5 echo "configure:1502: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1503 "configure" #line 1507 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
@ -1527,12 +1531,12 @@ EOF
fi fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
echo "configure:1531: checking for st_rdev in struct stat" >&5 echo "configure:1535: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1536 "configure" #line 1540 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -1540,7 +1544,7 @@ int main() {
struct stat s; s.st_rdev; struct stat s; s.st_rdev;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_struct_st_rdev=yes ac_cv_struct_st_rdev=yes
else else
@ -1561,12 +1565,12 @@ EOF
fi fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1565: checking whether time.h and sys/time.h may both be included" >&5 echo "configure:1569: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1570 "configure" #line 1574 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
@ -1575,7 +1579,7 @@ int main() {
struct tm *tp; struct tm *tp;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_time=yes ac_cv_header_time=yes
else else
@ -1624,7 +1628,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
echo $ac_n "checking host system type""... $ac_c" 1>&6 echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:1628: checking host system type" >&5 echo "configure:1632: checking host system type" >&5
host_alias=$host host_alias=$host
case "$host_alias" in case "$host_alias" in
@ -1645,7 +1649,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6 echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:1649: checking target system type" >&5 echo "configure:1653: checking target system type" >&5
target_alias=$target target_alias=$target
case "$target_alias" in case "$target_alias" in
@ -1663,7 +1667,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6 echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1667: checking build system type" >&5 echo "configure:1671: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
@ -1762,6 +1766,7 @@ if test x$READLINE = xyes; then
CFLAGS="$CFLAGS -DREADLINE_SUPPORT" CFLAGS="$CFLAGS -DREADLINE_SUPPORT"
fi fi
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6
# Check whether --enable-debug or --disable-debug was given. # Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then if test "${enable_debug+set}" = set; then
enableval="$enable_debug" enableval="$enable_debug"
@ -1771,7 +1776,9 @@ else
DEBUG=no DEBUG=no
fi fi
echo "$ac_t""$DEBUG" 1>&6
echo $ac_n "checking whether to enable device-mapper""... $ac_c" 1>&6
# Check whether --enable-devmapper or --disable-devmapper was given. # Check whether --enable-devmapper or --disable-devmapper was given.
if test "${enable_devmapper+set}" = set; then if test "${enable_devmapper+set}" = set; then
enableval="$enable_devmapper" enableval="$enable_devmapper"
@ -1781,11 +1788,13 @@ else
DEVMAPPER=yes DEVMAPPER=yes
fi fi
echo "$ac_t""$DEVMAPPER" 1>&6
if test x$DEVMAPPER = xyes; then if test x$DEVMAPPER = xyes; then
CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT" CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT"
fi fi
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6
# Check whether --enable-o_direct or --disable-o_direct was given. # Check whether --enable-o_direct or --disable-o_direct was given.
if test "${enable_o_direct+set}" = set; then if test "${enable_o_direct+set}" = set; then
enableval="$enable_o_direct" enableval="$enable_o_direct"
@ -1795,6 +1804,7 @@ else
ODIRECT=yes ODIRECT=yes
fi fi
echo "$ac_t""$ODIRECT" 1>&6
if test x$ODIRECT = xyes; then if test x$ODIRECT = xyes; then
CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT" CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT"
@ -1806,13 +1816,13 @@ fi;
if test $ac_cv_prog_gcc = yes; then if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:1810: checking whether ${CC-cc} needs -traditional" >&5 echo "configure:1820: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_pattern="Autoconf.*'x'" ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1816 "configure" #line 1826 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sgtty.h> #include <sgtty.h>
Autoconf TIOCGETP Autoconf TIOCGETP
@ -1830,7 +1840,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1834 "configure" #line 1844 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <termio.h> #include <termio.h>
Autoconf TCGETA Autoconf TCGETA
@ -1852,12 +1862,12 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1856: checking return type of signal handlers" >&5 echo "configure:1866: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1861 "configure" #line 1871 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
@ -1874,7 +1884,7 @@ int main() {
int i; int i;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_type_signal=void ac_cv_type_signal=void
else else
@ -1893,12 +1903,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1897: checking for vprintf" >&5 echo "configure:1907: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1902 "configure" #line 1912 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
@ -1921,7 +1931,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
@ -1945,12 +1955,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:1949: checking for _doprnt" >&5 echo "configure:1959: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1954 "configure" #line 1964 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
@ -1973,7 +1983,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
@ -2000,12 +2010,12 @@ fi
for ac_func in mkdir rmdir uname for ac_func in mkdir rmdir uname
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2004: checking for $ac_func" >&5 echo "configure:2014: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2009 "configure" #line 2019 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -2028,7 +2038,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -2056,14 +2066,14 @@ done
if test x$READLINE = xyes; then if test x$READLINE = xyes; then
echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
echo "configure:2060: checking for library containing tgetent" >&5 echo "configure:2070: checking for library containing tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_func_search_save_LIBS="$LIBS" ac_func_search_save_LIBS="$LIBS"
ac_cv_search_tgetent="no" ac_cv_search_tgetent="no"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2067 "configure" #line 2077 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2074,7 +2084,7 @@ int main() {
tgetent() tgetent()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_search_tgetent="none required" ac_cv_search_tgetent="none required"
else else
@ -2085,7 +2095,7 @@ rm -f conftest*
test "$ac_cv_search_tgetent" = "no" && for i in ncurses curses termcap termlib; do test "$ac_cv_search_tgetent" = "no" && for i in ncurses curses termcap termlib; do
LIBS="-l$i $ac_func_search_save_LIBS" LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2089 "configure" #line 2099 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2096,7 +2106,7 @@ int main() {
tgetent() tgetent()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_search_tgetent="-l$i" ac_cv_search_tgetent="-l$i"
break break
@ -2129,7 +2139,7 @@ fi
fi fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2133: checking for dlopen in -ldl" >&5 echo "configure:2143: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2137,7 +2147,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS" LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2141 "configure" #line 2151 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2148,7 +2158,7 @@ int main() {
dlopen() dlopen()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2179,17 +2189,17 @@ for ac_hdr in getopt.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2183: checking for $ac_hdr" >&5 echo "configure:2193: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2188 "configure" #line 2198 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -2218,7 +2228,7 @@ done
if test x$READLINE = xyes; then if test x$READLINE = xyes; then
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
echo "configure:2222: checking for readline in -lreadline" >&5 echo "configure:2232: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2226,7 +2236,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS" LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2230 "configure" #line 2240 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2237,7 +2247,7 @@ int main() {
readline() readline()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2274,12 +2284,12 @@ package as well (which may be called readline-devel or something similar).
fi fi
echo $ac_n "checking for rl_completion_matches""... $ac_c" 1>&6 echo $ac_n "checking for rl_completion_matches""... $ac_c" 1>&6
echo "configure:2278: checking for rl_completion_matches" >&5 echo "configure:2288: checking for rl_completion_matches" >&5
if eval "test \"`echo '$''{'ac_cv_func_rl_completion_matches'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_rl_completion_matches'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2283 "configure" #line 2293 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char rl_completion_matches(); below. */ which can conflict with char rl_completion_matches(); below. */
@ -2302,7 +2312,7 @@ rl_completion_matches();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_rl_completion_matches=yes" eval "ac_cv_func_rl_completion_matches=yes"
else else
@ -2322,6 +2332,71 @@ else
fi fi
fi
echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
\
INTL=yes
else
INTL=no
fi
echo "$ac_t""$INTL" 1>&6
if test x$INTL = xyes; then
INTL_PACKAGE="lvm2"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2355: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$MSGFMT" in
/*)
ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_MSGFMT="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
echo "$ac_t""$MSGFMT" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if [ "x$MSGFMT" == x ];
then { echo "configure: error: msgfmt not found in path $PATH
" 1>&2; exit 1; }
exit
fi;
# Check whether --with-localedir or --without-localedir was given.
if test "${with_localedir+set}" = set; then
withval="$with_localedir"
LOCALEDIR="$withval"
else
LOCALEDIR='${prefix}/share/locale'
fi
fi fi
if test "-f VERSION"; then if test "-f VERSION"; then
@ -2341,6 +2416,10 @@ fi
trap '' 1 2 15 trap '' 1 2 15
cat > confcache <<\EOF cat > confcache <<\EOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@ -2461,6 +2540,7 @@ include/Makefile \
lib/Makefile \ lib/Makefile \
lib/format1/Makefile \ lib/format1/Makefile \
man/Makefile \ man/Makefile \
po/Makefile \
tools/Makefile \ tools/Makefile \
tools/version.h \ tools/version.h \
test/mm/Makefile \ test/mm/Makefile \
@ -2524,6 +2604,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g s%@build_os@%$build_os%g
s%@MSGFMT@%$MSGFMT%g
s%@JOBS@%$JOBS%g s%@JOBS@%$JOBS%g
s%@STATIC_LINK@%$STATIC_LINK%g s%@STATIC_LINK@%$STATIC_LINK%g
s%@LVM1@%$LVM1%g s%@LVM1@%$LVM1%g
@ -2533,6 +2614,9 @@ s%@LVM_VERSION@%$LVM_VERSION%g
s%@DEBUG@%$DEBUG%g s%@DEBUG@%$DEBUG%g
s%@DEVMAPPER@%$DEVMAPPER%g s%@DEVMAPPER@%$DEVMAPPER%g
s%@HAVE_LIBDL@%$HAVE_LIBDL%g s%@HAVE_LIBDL@%$HAVE_LIBDL%g
s%@LOCALEDIR@%$LOCALEDIR%g
s%@INTL_PACKAGE@%$INTL_PACKAGE%g
s%@INTL@%$INTL%g
CEOF CEOF
EOF EOF
@ -2581,6 +2665,7 @@ include/Makefile \
lib/Makefile \ lib/Makefile \
lib/format1/Makefile \ lib/format1/Makefile \
man/Makefile \ man/Makefile \
po/Makefile \
tools/Makefile \ tools/Makefile \
tools/version.h \ tools/version.h \
test/mm/Makefile \ test/mm/Makefile \

View File

@ -101,21 +101,27 @@ if test x$READLINE = xyes; then
CFLAGS="$CFLAGS -DREADLINE_SUPPORT" CFLAGS="$CFLAGS -DREADLINE_SUPPORT"
fi fi
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6
dnl Enable Debugging dnl Enable Debugging
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \ AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \
DEBUG=yes, DEBUG=no) DEBUG=yes, DEBUG=no)
echo "$ac_t""$DEBUG" 1>&6
echo $ac_n "checking whether to enable device-mapper""... $ac_c" 1>&6
dnl Disable devmapper dnl Disable devmapper
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \ AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \
DEVMAPPER=no, DEVMAPPER=yes) DEVMAPPER=no, DEVMAPPER=yes)
echo "$ac_t""$DEVMAPPER" 1>&6
if test x$DEVMAPPER = xyes; then if test x$DEVMAPPER = xyes; then
CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT" CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT"
fi fi
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6
dnl Disable O_DIRECT dnl Disable O_DIRECT
AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \ AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \
ODIRECT=no, ODIRECT=yes) ODIRECT=no, ODIRECT=yes)
echo "$ac_t""$ODIRECT" 1>&6
if test x$ODIRECT = xyes; then if test x$ODIRECT = xyes; then
CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT" CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT"
@ -177,6 +183,28 @@ package as well (which may be called readline-devel or something similar).
fi fi
echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
dnl Internationalisation stuff
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\
INTL=yes, INTL=no)
echo "$ac_t""$INTL" 1>&6
if test x$INTL = xyes; then
INTL_PACKAGE="lvm2"
AC_PATH_PROG(MSGFMT, msgfmt)
if [[ "x$MSGFMT" == x ]];
then AC_MSG_ERROR(
msgfmt not found in path $PATH
)
exit
fi;
AC_ARG_WITH(localedir,
[ --with-localedir=DIR Translation files in DIR [PREFIX/share/locale]],
[ LOCALEDIR="$withval" ],
[ LOCALEDIR='${prefix}/share/locale' ])
fi
if test "-f VERSION"; then if test "-f VERSION"; then
LVM_VERSION="\"`cat VERSION`\"" LVM_VERSION="\"`cat VERSION`\""
else else
@ -194,6 +222,10 @@ AC_SUBST(LVM_VERSION)
AC_SUBST(DEBUG) AC_SUBST(DEBUG)
AC_SUBST(DEVMAPPER) AC_SUBST(DEVMAPPER)
AC_SUBST(HAVE_LIBDL) AC_SUBST(HAVE_LIBDL)
AC_SUBST(MSGFMT)
AC_SUBST(LOCALEDIR)
AC_SUBST(INTL_PACKAGE)
AC_SUBST(INTL)
dnl First and last lines should not contain files to generate in order to dnl First and last lines should not contain files to generate in order to
dnl keep utility scripts running properly dnl keep utility scripts running properly
AC_OUTPUT( \ AC_OUTPUT( \
@ -203,6 +235,7 @@ include/Makefile \
lib/Makefile \ lib/Makefile \
lib/format1/Makefile \ lib/format1/Makefile \
man/Makefile \ man/Makefile \
po/Makefile \
tools/Makefile \ tools/Makefile \
tools/version.h \ tools/version.h \
test/mm/Makefile \ test/mm/Makefile \

View File

@ -30,6 +30,7 @@
../lib/mm/pool.h ../lib/mm/pool.h
../lib/mm/xlate.h ../lib/mm/xlate.h
../lib/misc/crc.h ../lib/misc/crc.h
../lib/misc/intl.h
../lib/misc/lib.h ../lib/misc/lib.h
../lib/misc/lvm-file.h ../lib/misc/lvm-file.h
../lib/misc/lvm-string.h ../lib/misc/lvm-string.h
@ -37,3 +38,4 @@
../lib/regex/matcher.h ../lib/regex/matcher.h
../lib/report/report.h ../lib/report/report.h
../lib/uuid/uuid.h ../lib/uuid/uuid.h
../po/pogen.h

View File

@ -35,9 +35,11 @@ distclean:
find . -maxdepth 1 -type l -exec $(RM) \{\} \; find . -maxdepth 1 -type l -exec $(RM) \{\} \;
$(RM) Makefile .include_symlinks .symlinks_created $(RM) Makefile .include_symlinks .symlinks_created
pofile: all
clean: clean:
install: install:
.PHONY: clean distclean all install .PHONY: clean distclean all install pofile

View File

@ -436,6 +436,10 @@ struct cmd_context *create_toolcontext(struct arg *the_args)
if (!setlocale(LC_ALL, "")) if (!setlocale(LC_ALL, ""))
log_error("setlocale failed"); log_error("setlocale failed");
#ifdef INTL_PACKAGE
bindtextdomain(INTL_PACKAGE, LOCALEDIR);
#endif
init_syslog(DEFAULT_LOG_FACILITY); init_syslog(DEFAULT_LOG_FACILITY);
if (!(cmd = dbg_malloc(sizeof(*cmd)))) { if (!(cmd = dbg_malloc(sizeof(*cmd)))) {

View File

@ -186,6 +186,9 @@ void print_log(int level, const char *file, int line, const char *format, ...)
va_list ap; va_list ap;
char buf[1024]; char buf[1024];
int bufused, n; int bufused, n;
char *trformat; /* Translated format string */
trformat = _(format);
if (!_log_suppress) { if (!_log_suppress) {
va_start(ap, format); va_start(ap, format);
@ -197,7 +200,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
printf("%s%s", _cmd_name, _msg_prefix); printf("%s%s", _cmd_name, _msg_prefix);
if (_indent) if (_indent)
printf(" "); printf(" ");
vprintf(format, ap); vprintf(trformat, ap);
putchar('\n'); putchar('\n');
} }
break; break;
@ -207,7 +210,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
printf("%s%s", _cmd_name, _msg_prefix); printf("%s%s", _cmd_name, _msg_prefix);
if (_indent) if (_indent)
printf(" "); printf(" ");
vprintf(format, ap); vprintf(trformat, ap);
putchar('\n'); putchar('\n');
} }
break; break;
@ -216,24 +219,24 @@ void print_log(int level, const char *file, int line, const char *format, ...)
printf("%s%s", _cmd_name, _msg_prefix); printf("%s%s", _cmd_name, _msg_prefix);
if (_indent) if (_indent)
printf(" "); printf(" ");
vprintf(format, ap); vprintf(trformat, ap);
putchar('\n'); putchar('\n');
} }
break; break;
case _LOG_WARN: case _LOG_WARN:
printf("%s%s", _cmd_name, _msg_prefix); printf("%s%s", _cmd_name, _msg_prefix);
vprintf(format, ap); vprintf(trformat, ap);
putchar('\n'); putchar('\n');
break; break;
case _LOG_ERR: case _LOG_ERR:
fprintf(stderr, "%s%s", _cmd_name, _msg_prefix); fprintf(stderr, "%s%s", _cmd_name, _msg_prefix);
vfprintf(stderr, format, ap); vfprintf(stderr, trformat, ap);
fputc('\n', stderr); fputc('\n', stderr);
break; break;
case _LOG_FATAL: case _LOG_FATAL:
default: default:
fprintf(stderr, "%s%s", _cmd_name, _msg_prefix); fprintf(stderr, "%s%s", _cmd_name, _msg_prefix);
vfprintf(stderr, format, ap); vfprintf(stderr, trformat, ap);
fputc('\n', stderr); fputc('\n', stderr);
break; break;
; ;
@ -249,7 +252,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
_msg_prefix); _msg_prefix);
va_start(ap, format); va_start(ap, format);
vfprintf(_log_file, format, ap); vfprintf(_log_file, trformat, ap);
va_end(ap); va_end(ap);
fprintf(_log_file, "\n"); fprintf(_log_file, "\n");
@ -258,7 +261,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
if (_syslog && (_log_while_suspended || !memlock())) { if (_syslog && (_log_while_suspended || !memlock())) {
va_start(ap, format); va_start(ap, format);
vsyslog(level, format, ap); vsyslog(level, trformat, ap);
va_end(ap); va_end(ap);
} }
@ -276,7 +279,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
va_start(ap, format); va_start(ap, format);
n = vsnprintf(buf + bufused - 1, sizeof(buf) - bufused - 1, n = vsnprintf(buf + bufused - 1, sizeof(buf) - bufused - 1,
format, ap); trformat, ap);
va_end(ap); va_end(ap);
bufused += n; bufused += n;

View File

@ -15,5 +15,6 @@
#include "log.h" #include "log.h"
#include "dbg_malloc.h" #include "dbg_malloc.h"
#include "intl.h"
#endif #endif

View File

@ -25,6 +25,7 @@ CC = @CC@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SHELL = /bin/sh SHELL = /bin/sh
INSTALL = @INSTALL@ INSTALL = @INSTALL@
MSGFMT = @MSGFMT@
LN_S = @LN_S@ LN_S = @LN_S@
LIBS = @LIBS@ LIBS = @LIBS@
CFLAGS += @CFLAGS@ CFLAGS += @CFLAGS@
@ -37,6 +38,7 @@ libdir = @libdir@
sbindir = @sbindir@ sbindir = @sbindir@
infodir = @infodir@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
localedir = @LOCALEDIR@
# setup misc variables # setup misc variables
# define the ownership variables for the binaries and man pages # define the ownership variables for the binaries and man pages
@ -49,7 +51,7 @@ MAKEFLAGS = @JOBS@
endif endif
SUFFIXES= SUFFIXES=
SUFFIXES=.c .d .o .so SUFFIXES=.c .d .o .so .po .pot .mo
CFLAGS+=-fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline CFLAGS+=-fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
@ -61,6 +63,10 @@ else
CFLAGS+=-O2 CFLAGS+=-O2
endif endif
ifeq ("@INTL@", "yes")
CFLAGS+=-DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
endif
#CFLAGS+=-DDEBUG_POOL #CFLAGS+=-DDEBUG_POOL
#CFLAGS+=-DBOUNDS_CHECK #CFLAGS+=-DBOUNDS_CHECK
@ -83,13 +89,16 @@ STRIP=
DEPS=$(top_srcdir)/make.tmpl Makefile $(INC_LNS) DEPS=$(top_srcdir)/make.tmpl Makefile $(INC_LNS)
OBJECTS=$(SOURCES:%.c=%.o) OBJECTS=$(SOURCES:%.c=%.o)
POTFILES=$(SOURCES:%.c=%.pot)
SUBDIRS.install := $(SUBDIRS:=.install) SUBDIRS.install := $(SUBDIRS:=.install)
SUBDIRS.pofile := $(SUBDIRS:=.pofile)
SUBDIRS.clean := $(SUBDIRS:=.clean) SUBDIRS.clean := $(SUBDIRS:=.clean)
SUBDIRS.distclean := $(SUBDIRS:=.distclean) SUBDIRS.distclean := $(SUBDIRS:=.distclean)
.PHONY: all install distclean clean .PHONY: all install pofile distclean clean
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean) .PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
.PHONY: $(SUBDIRS.pofile)
all: $(SUBDIRS) $(TARGETS) all: $(SUBDIRS) $(TARGETS)
@ -107,9 +116,22 @@ $(SUBDIRS.clean):
$(SUBDIRS.distclean): $(SUBDIRS.distclean):
-$(MAKE) -C $(@:.distclean=) distclean -$(MAKE) -C $(@:.distclean=) distclean
ifeq ("@INTL@", "yes")
pofile: $(SUBDIRS.pofile) $(POTFILES)
$(SUBDIRS.pofile):
$(MAKE) -C $(@:.pofile=) pofile
endif
%.o: %.c %.o: %.c
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
%.pot: %.c
$(CC) -E -P $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
$(CFLAGS) $< > $@
%.pot: Makefile
%.so: %.o %.so: %.o
$(CC) -c $(INCLUDES) $(CFLAGS) %< -o $@ $(CC) -c $(INCLUDES) $(CFLAGS) %< -o $@
@ -121,16 +143,22 @@ $(SUBDIRS.distclean):
set -e; FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \ set -e; FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \ DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
$(CC) -MM $(INCLUDES) $(CFLAGS) $< | \ $(CC) -MM $(INCLUDES) $(CFLAGS) $< | \
sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d : $$DEPS /g" > $@; \ sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" \
> $@; \
[ -s $@ ] || $(RM) $@ [ -s $@ ] || $(RM) $@
%.mo: %.po
$(MSGFMT) -o $@ $<
clean: $(SUBDIRS.clean) clean: $(SUBDIRS.clean)
$(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d) $(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot)
distclean: $(SUBDIRS.distclean) distclean: $(SUBDIRS.distclean)
$(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d) $(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d)
$(RM) $(SOURCES:%.c=%.pot)
$(RM) config.cache config.log config.status $(RM) config.cache config.log config.status
$(RM) Makefile make.tmpl version.h core $(RM) Makefile make.tmpl version.h core lvm2.po
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),distclean)

50
po/Makefile.in Normal file
View File

@ -0,0 +1,50 @@
#
# Copyright (C) 2004 Sistina Software
#
# This LVM library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This LVM library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this LVM library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
LANGS=de
TARGETS=$(LANGS:%=%.mo)
include ../make.tmpl
install: $(TARGETS)
@echo Installing translation files in $(localedir)
@( \
for lang in $(LANGS); do \
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/@INTL_PACKAGE@.mo;\
done; \
)
pofile: lvm2.po
lvm2.po: Makefile $(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot
@echo Compiling string table
@xgettext -C -F --keyword=print_log --keyword=log_debug \
--keyword=log_info --keyword=_ --keyword=N_ \
--keyword=log_notice --keyword=log_warn --keyword=log_err \
--keyword=log_fatal --keyword=log_debug --keyword=log_error \
--keyword=log_print --keyword=log_verbose \
--keyword=log_very_verbose -d - \
$(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot \
> $@

10
po/de.po Normal file
View File

@ -0,0 +1,10 @@
# Dummy test file
msgid ""
msgstr ""
"PO-Revision-Date: 2004-02-13 20:35+0000\n"
"Last-Translator: Nobody <nobody@nowhere>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"

5670
po/lvm2.po Normal file

File diff suppressed because it is too large Load Diff

7
po/pogen.h Normal file
View File

@ -0,0 +1,7 @@
/*
* Macro to change log messages into a format that xgettext can handle.
*
* Note that different PRI* definitions lead to different strings for
* different architectures.
*/
#define print_log(level, file, line, format, args...) print_log(format, args)