diff --git a/ChangeLog b/ChangeLog index c3769e2c..5a6bcaf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-02-22 Theodore Ts'o + + * configure.in, configure: Add new configure option + --enable-blkid-debug + 2003-01-23 Theodore Ts'o * Makefile.in, configure, configure.in: Integrate new blkid library. diff --git a/configure b/configure index ff6fd9ec..e155ef60 100644 --- a/configure +++ b/configure @@ -43,6 +43,8 @@ ac_help="$ac_help --enable-checker build checker libraries" ac_help="$ac_help --enable-jbd-debug enable journal debugging" +ac_help="$ac_help + --enable-blkid-debug enable blkid debugging" ac_help="$ac_help --disable-swapfs disable support of legacy byte-swapped filesystems" ac_help="$ac_help @@ -640,7 +642,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:644: checking host system type" >&5 +echo "configure:646: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -674,7 +676,7 @@ export CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:678: checking for $ac_word" >&5 +echo "configure:680: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -704,7 +706,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:708: checking for $ac_word" >&5 +echo "configure:710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -755,7 +757,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:759: checking for $ac_word" >&5 +echo "configure:761: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -787,7 +789,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -798,12 +800,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 802 "configure" +#line 804 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -829,12 +831,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; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:833: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:838: checking whether we are using GNU C" >&5 +echo "configure:840: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -843,7 +845,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:847: \"$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:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -862,7 +864,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:866: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:868: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -911,7 +913,7 @@ if test "${with_ccopts+set}" = set; then CFLAGS=$withval fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:915: checking how to run the C preprocessor" >&5 +echo "configure:917: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -926,13 +928,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -943,13 +945,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -960,13 +962,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -992,17 +994,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "linux/fs.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6 -echo "configure:996: checking for linux/fs.h" >&5 +echo "configure:998: checking for linux/fs.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1293,6 +1295,25 @@ else fi +# Check whether --enable-blkid-debug or --disable-blkid-debug was given. +if test "${enable_blkid_debug+set}" = set; then + enableval="$enable_blkid_debug" + if test "$enableval" = "no" +then + echo "Disabling blkid debugging" +else + cat >> confdefs.h <<\EOF +#define CONFIG_BLKID_DEBUG 1 +EOF + + echo "Enabling blkid debugging" +fi + +else + echo "Disabling blkid debugging by default" + +fi + # Check whether --enable-swapfs or --disable-swapfs was given. if test "${enable_swapfs+set}" = set; then enableval="$enable_swapfs" @@ -1460,7 +1481,7 @@ EOF ALL_LINGUAS="it nyc tr de de-utf" echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1464: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1485: checking whether ${MAKE-make} sets \${MAKE}" >&5 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -1489,7 +1510,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1493: checking for $ac_word" >&5 +echo "configure:1514: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1517,7 +1538,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1521: checking for POSIXized ISC" >&5 +echo "configure:1542: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1538,12 +1559,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1542: checking for ANSI C header files" >&5 +echo "configure:1563: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1551,7 +1572,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1568,7 +1589,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1586,7 +1607,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1607,7 +1628,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1618,7 +1639,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1642,12 +1663,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1646: checking for working const" >&5 +echo "configure:1667: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1717,21 +1738,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1721: checking for inline" >&5 +echo "configure:1742: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1757,12 +1778,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1761: checking for off_t" >&5 +echo "configure:1782: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1790,12 +1811,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1794: checking for size_t" >&5 +echo "configure:1815: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1825,19 +1846,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1829: checking for working alloca.h" >&5 +echo "configure:1850: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1858,12 +1879,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1862: checking for alloca" >&5 +echo "configure:1883: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1923,12 +1944,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1927: checking whether alloca needs Cray hooks" >&5 +echo "configure:1948: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1957: checking for $ac_func" >&5 +echo "configure:1978: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2008,7 +2029,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2012: checking stack direction for C alloca" >&5 +echo "configure:2033: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2016,7 +2037,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2060,17 +2081,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2064: checking for $ac_hdr" >&5 +echo "configure:2085: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2099,12 +2120,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2103: checking for $ac_func" >&5 +echo "configure:2124: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2152,7 +2173,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2156: checking for working mmap" >&5 +echo "configure:2177: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2160,7 +2181,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2328,17 +2349,17 @@ unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2332: checking for $ac_hdr" >&5 +echo "configure:2353: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2368,12 +2389,12 @@ done strdup __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2372: checking for $ac_func" >&5 +echo "configure:2393: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2425,12 +2446,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2429: checking for $ac_func" >&5 +echo "configure:2450: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2487,19 +2508,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2491: checking for LC_MESSAGES" >&5 +echo "configure:2512: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2520,7 +2541,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2524: checking whether NLS is requested" >&5 +echo "configure:2545: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -2540,7 +2561,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2544: checking whether included gettext is requested" >&5 +echo "configure:2565: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -2559,17 +2580,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2563: checking for libintl.h" >&5 +echo "configure:2584: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2586,19 +2607,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:2590: checking for gettext in libc" >&5 +echo "configure:2611: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -2614,7 +2635,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:2618: checking for bindtextdomain in -lintl" >&5 +echo "configure:2639: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2622,7 +2643,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2649,12 +2670,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:2653: checking for gettext in libintl" >&5 +echo "configure:2674: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:2658: checking for gettext in -lintl" >&5 +echo "configure:2679: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2662,7 +2683,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2712,7 +2733,7 @@ EOF # 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:2716: checking for $ac_word" >&5 +echo "configure:2737: 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 @@ -2746,12 +2767,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2750: checking for $ac_func" >&5 +echo "configure:2771: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2801,7 +2822,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2805: checking for $ac_word" >&5 +echo "configure:2826: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2837,7 +2858,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2841: checking for $ac_word" >&5 +echo "configure:2862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2869,7 +2890,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2900,7 +2921,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2904: checking whether catgets can be used" >&5 +echo "configure:2925: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then withval="$with_catgets" @@ -2913,7 +2934,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2917: checking for main in -li" >&5 +echo "configure:2938: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2921,14 +2942,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2956,12 +2977,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2960: checking for catgets" >&5 +echo "configure:2981: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -3006,7 +3027,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3010: checking for $ac_word" >&5 +echo "configure:3031: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3042,7 +3063,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3046: checking for $ac_word" >&5 +echo "configure:3067: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3079,7 +3100,7 @@ fi # 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:3083: checking for $ac_word" >&5 +echo "configure:3104: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3114,7 +3135,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3118: checking for $ac_word" >&5 +echo "configure:3139: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3172,7 +3193,7 @@ fi # 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:3176: checking for $ac_word" >&5 +echo "configure:3197: 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 @@ -3206,7 +3227,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3210: checking for $ac_word" >&5 +echo "configure:3231: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3242,7 +3263,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3246: checking for $ac_word" >&5 +echo "configure:3267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3335,7 +3356,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3339: checking for catalogs to be installed" >&5 +echo "configure:3360: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3363,17 +3384,17 @@ echo "configure:3339: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:3367: checking for linux/version.h" >&5 +echo "configure:3388: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3439,7 +3460,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3443: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3464: checking whether ${MAKE-make} sets \${MAKE}" >&5 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3468,7 +3489,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3472: checking for $ac_word" >&5 +echo "configure:3493: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3502,7 +3523,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3506: checking whether ln -s works" >&5 +echo "configure:3527: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3525,7 +3546,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3529: checking for $ac_word" >&5 +echo "configure:3550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3561,7 +3582,7 @@ fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3565: checking for $ac_word" >&5 +echo "configure:3586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3597,7 +3618,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3601: checking for $ac_word" >&5 +echo "configure:3622: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3633,7 +3654,7 @@ fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3637: checking for $ac_word" >&5 +echo "configure:3658: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3669,7 +3690,7 @@ fi # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3673: checking for $ac_word" >&5 +echo "configure:3694: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3705,7 +3726,7 @@ fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3709: checking for $ac_word" >&5 +echo "configure:3730: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3741,7 +3762,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3745: checking for $ac_word" >&5 +echo "configure:3766: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3777,7 +3798,7 @@ fi # Extract the first word of "ldconfig", so it can be a program name with args. set dummy ldconfig; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3781: checking for $ac_word" >&5 +echo "configure:3802: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3811,7 +3832,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:3815: checking build system type" >&5 +echo "configure:3836: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -3837,7 +3858,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3841: checking for $ac_word" >&5 +echo "configure:3862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3869,7 +3890,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3873: checking for $ac_word" >&5 +echo "configure:3894: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3904,7 +3925,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3908: checking for $ac_word" >&5 +echo "configure:3929: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3936,7 +3957,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3940: checking for $ac_word" >&5 +echo "configure:3961: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3971,7 +3992,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3975: checking for $ac_word" >&5 +echo "configure:3996: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4003,7 +4024,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4007: checking for $ac_word" >&5 +echo "configure:4028: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4047,7 +4068,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./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 "configure:4051: checking for a BSD compatible install" >&5 +echo "configure:4072: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4109,7 +4130,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4113: checking for $ac_word" >&5 +echo "configure:4134: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4143,17 +4164,17 @@ for ac_hdr in stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h diren do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4147: checking for $ac_hdr" >&5 +echo "configure:4168: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4180,12 +4201,12 @@ fi done echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4184: checking for vprintf" >&5 +echo "configure:4205: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4232,12 +4253,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4236: checking for _doprnt" >&5 +echo "configure:4257: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4285,19 +4306,19 @@ fi fi echo $ac_n "checking whether llseek declared in unistd.h""... $ac_c" 1>&6 -echo "configure:4289: checking whether llseek declared in unistd.h" >&5 +echo "configure:4310: checking whether llseek declared in unistd.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_have_llseek_prototype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { extern int llseek(int); ; return 0; } EOF -if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_have_llseek_prototype=no else @@ -4317,12 +4338,12 @@ EOF fi echo $ac_n "checking whether lseek64 declared in unistd.h""... $ac_c" 1>&6 -echo "configure:4321: checking whether lseek64 declared in unistd.h" >&5 +echo "configure:4342: checking whether lseek64 declared in unistd.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_have_lseek64_prototype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_have_lseek64_prototype=no else @@ -4359,7 +4380,7 @@ if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2 fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4363: checking size of short" >&5 +echo "configure:4384: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4367,7 +4388,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -4379,7 +4400,7 @@ main() exit(0); } EOF -if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -4399,7 +4420,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4403: checking size of int" >&5 +echo "configure:4424: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4407,7 +4428,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -4419,7 +4440,7 @@ main() exit(0); } EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -4439,7 +4460,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4443: checking size of long" >&5 +echo "configure:4464: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4447,7 +4468,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -4459,7 +4480,7 @@ main() exit(0); } EOF -if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -4479,7 +4500,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4483: checking size of long long" >&5 +echo "configure:4504: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4487,7 +4508,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -4499,7 +4520,7 @@ main() exit(0); } EOF -if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4527,14 +4548,14 @@ SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4531: checking whether byte ordering is bigendian" >&5 +echo "configure:4552: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4545,11 +4566,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4560,7 +4581,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4580,7 +4601,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -4617,19 +4638,19 @@ EOF fi echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6 -echo "configure:4621: checking whether struct stat has a st_flags field" >&5 +echo "configure:4642: checking whether struct stat has a st_flags field" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags = 0; ; return 0; } EOF -if { (eval echo configure:4633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags=yes else @@ -4644,19 +4665,19 @@ fi echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6 if test "$e2fsprogs_cv_struct_st_flags" = yes; then echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6 -echo "configure:4648: checking whether st_flags field is useful" >&5 +echo "configure:4669: checking whether st_flags field is useful" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags |= UF_IMMUTABLE; ; return 0; } EOF -if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags_immut=yes else @@ -4679,12 +4700,12 @@ fi for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strtoull strcasecmp srandom fchown mallinfo fdatasync strnlen sysconf pathconf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_func" >&5 +echo "configure:4704: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4733,7 +4754,7 @@ done SOCKET_LIB='' echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:4737: checking for socket in -lsocket" >&5 +echo "configure:4758: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4741,7 +4762,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4774,12 +4795,12 @@ fi echo $ac_n "checking for optreset""... $ac_c" 1>&6 -echo "configure:4778: checking for optreset" >&5 +echo "configure:4799: checking for optreset" >&5 if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4858,20 +4879,20 @@ fi echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6 -echo "configure:4862: checking whether linker accepts -static" >&5 +echo "configure:4883: checking whether linker accepts -static" >&5 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext < int main() { fflush(stdout); ; return 0; } EOF -if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_e2fsprogs_use_static=yes else diff --git a/configure.in b/configure.in index 1ed81ccd..6428e031 100644 --- a/configure.in +++ b/configure.in @@ -334,6 +334,21 @@ fi echo "Disabling journal debugging by default" ) dnl +dnl handle --enable-blkid-debug +dnl +AC_ARG_ENABLE([blkid-debug], +[ --enable-blkid-debug enable blkid debugging], +if test "$enableval" = "no" +then + echo "Disabling blkid debugging" +else + AC_DEFINE(CONFIG_BLKID_DEBUG) + echo "Enabling blkid debugging" +fi +, +echo "Disabling blkid debugging by default" +) +dnl dnl handle --enable-swapfs dnl AC_ARG_ENABLE([swapfs], diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index f01476c2..4cb7b935 100644 --- a/lib/blkid/ChangeLog +++ b/lib/blkid/ChangeLog @@ -1,3 +1,10 @@ +2003-02-22 Theodore Ts'o + + * cache.c, dev.c, devname.c, devno.c, probe.c, read.c, resolve.c, + save.c, tag.c, blkidP.h: Add dynamic debugging + capabilities, controlled by the environment variable + BLKID_DEBUG. + 2003-02-16 Theodore Ts'o * blkid.h, dev.c, devname.c, probe.c, read.c, resolve.c: Rename diff --git a/lib/blkid/Makefile.in b/lib/blkid/Makefile.in index 17e772e3..5f48adcb 100644 --- a/lib/blkid/Makefile.in +++ b/lib/blkid/Makefile.in @@ -104,7 +104,7 @@ tst_save: $(srcdir)/save.c $(DEPLIBS_BLKID) blkid: ../../misc/blkid.o libblkid.a $(LIBUUID) $(CC) -Wall -o blkid ../../misc/blkid.o libblkid.a $(LIBUUID) -check:: tst_cache tst_devname tst_devno tst_getsize tst_probe \ +check:: all tst_cache tst_devname tst_devno tst_getsize tst_probe \ tst_read tst_resolve tst_save installdirs:: diff --git a/lib/blkid/blkidP.h b/lib/blkid/blkidP.h index 67a472be..db05675b 100644 --- a/lib/blkid/blkidP.h +++ b/lib/blkid/blkidP.h @@ -116,31 +116,37 @@ extern const char *blkid_devdirs[]; #define BLKID_PRI_LVM 20 #define BLKID_PRI_MD 10 -#if defined(TEST_PROGRAM) -#define DEBUG +#if defined(TEST_PROGRAM) && !defined(CONFIG_BLKID_DEBUG) +#define CONFIG_BLKID_DEBUG #endif -#ifdef DEBUG -#define DEBUG_CACHE -#define DEBUG_DUMP -#define DEBUG_DEV -#define DEBUG_DEVNAME -#define DEBUG_DEVNO -#define DEBUG_PROBE -#define DEBUG_READ -#define DEBUG_RESOLVE -#define DEBUG_SAVE -#define DEBUG_TAG -#define CHECK_TAG +#define DEBUG_CACHE 0x0001 +#define DEBUG_DUMP 0x0002 +#define DEBUG_DEV 0x0004 +#define DEBUG_DEVNAME 0x0008 +#define DEBUG_DEVNO 0x0010 +#define DEBUG_PROBE 0x0020 +#define DEBUG_READ 0x0040 +#define DEBUG_RESOLVE 0x0080 +#define DEBUG_SAVE 0x0100 +#define DEBUG_TAG 0x0200 +#define DEBUG_INIT 0x8000 +#define DEBUG_ALL 0xFFFF + +#ifdef CONFIG_BLKID_DEBUG +#include +extern int blkid_debug_mask; +#define DBG(m,x) if ((m) & blkid_debug_mask) x; +#else +#define DBG(m,x) #endif -#if defined(TEST_PROGRAM) && !defined(DEBUG_DUMP) -#define DEBUG_DUMP -#endif - -#ifdef DEBUG_DUMP -static inline void DEB_DUMP_TAG(blkid_tag tag) +#ifdef CONFIG_BLKID_DEBUG +static inline void DEB_DUMP_TAG(int mask, blkid_tag tag) { + if (!(mask & blkid_debug_mask)) + return; + if (!tag) { printf(" tag: NULL\n"); return; @@ -149,10 +155,13 @@ static inline void DEB_DUMP_TAG(blkid_tag tag) printf(" tag: %s=\"%s\"\n", tag->bit_name, tag->bit_val); } -static inline void DEB_DUMP_DEV(blkid_dev dev) +static inline void DEB_DUMP_DEV(int mask, blkid_dev dev) { struct list_head *p; + if (!(mask & blkid_debug_mask)) + return; + if (!dev) { printf(" dev: NULL\n"); return; @@ -166,16 +175,16 @@ static inline void DEB_DUMP_DEV(blkid_dev dev) list_for_each(p, &dev->bid_tags) { blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); - DEB_DUMP_TAG(tag); + DEB_DUMP_TAG(mask, tag); } printf("\n"); } -static inline void DEB_DUMP_CACHE(blkid_cache cache) +static inline void DEB_DUMP_CACHE(int mask, blkid_cache cache) { struct list_head *p; - if (!cache) { + if (!cache || !(mask & blkid_debug_mask)) { printf("cache: NULL\n"); return; } @@ -185,13 +194,13 @@ static inline void DEB_DUMP_CACHE(blkid_cache cache) list_for_each(p, &cache->bic_devs) { blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); - DEB_DUMP_DEV(dev); + DEB_DUMP_DEV(mask, dev); } } #else -#define DEB_DUMP_TAG(tag) do {} while (0) -#define DEB_DUMP_DEV(dev) do {} while (0) -#define DEB_DUMP_CACHE(cache) do {} while (0) +#define DEB_DUMP_TAG(mask, tag) do {} while (0) +#define DEB_DUMP_DEV(mask, dev) do {} while (0) +#define DEB_DUMP_CACHE(mask, cache) do {} while (0) #endif /* lseek.c */ diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c index 0e1fc8e5..93124160 100644 --- a/lib/blkid/cache.c +++ b/lib/blkid/cache.c @@ -13,17 +13,24 @@ #include #include "blkidP.h" -#ifdef DEBUG_CACHE -#include -#define DBG(x) x -#else -#define DBG(x) -#endif +int blkid_debug_mask; blkid_cache blkid_new_cache(void) { blkid_cache cache; +#ifdef CONFIG_BLKID_DEBUG + if (!(blkid_debug_mask & DEBUG_INIT)) { + char *dstr = getenv("BLKID_DEBUG"); + + if (dstr) + blkid_debug_mask = strtoul(dstr, 0, 0); + blkid_debug_mask |= DEBUG_INIT; + } +#endif + + DBG(DEBUG_CACHE, printf("initializing empty cache\n")); + if (!(cache = (blkid_cache) calloc(1, sizeof(struct blkid_struct_cache)))) return NULL; @@ -40,7 +47,7 @@ void blkid_put_cache(blkid_cache cache) (void) blkid_flush_cache(cache); - DBG(printf("freeing cache struct\n")); + DBG(DEBUG_CACHE, printf("freeing cache struct\n")); /* DEB_DUMP_CACHE(cache); */ @@ -61,8 +68,8 @@ void blkid_put_cache(blkid_cache cache) struct blkid_struct_tag, bit_names); - DBG(printf("warning: unfreed tag %s=%s\n", - bad->bit_name, bad->bit_val)); + DBG(DEBUG_CACHE, printf("warning: unfreed tag %s=%s\n", + bad->bit_name, bad->bit_val)); blkid_free_tag(bad); } blkid_free_tag(tag); @@ -79,6 +86,7 @@ int main(int argc, char** argv) blkid_cache cache = NULL; int ret; + blkid_debug_mask = DEBUG_ALL; if ((argc > 2)) { fprintf(stderr, "Usage: %s [filename] \n", argv[0]); exit(1); diff --git a/lib/blkid/dev.c b/lib/blkid/dev.c index 01ca2ea8..23af8878 100644 --- a/lib/blkid/dev.c +++ b/lib/blkid/dev.c @@ -15,13 +15,6 @@ #include "blkidP.h" -#ifdef DEBUG_DEV -#include -#define DBG(x) x -#else -#define DBG(x) -#endif - blkid_dev blkid_new_dev(void) { blkid_dev dev; @@ -40,8 +33,9 @@ void blkid_free_dev(blkid_dev dev) if (!dev) return; - DBG(printf(" freeing dev %s (%s)\n", dev->bid_name, dev->bid_type)); - DEB_DUMP_DEV(dev); + DBG(DEBUG_DEV, + printf(" freeing dev %s (%s)\n", dev->bid_name, dev->bid_type)); + DEB_DUMP_DEV(DEBUG_DEV, dev); list_del(&dev->bid_devs); while (!list_empty(&dev->bid_tags)) { diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c index 98feb7d2..7d885515 100644 --- a/lib/blkid/devname.c +++ b/lib/blkid/devname.c @@ -35,13 +35,6 @@ #include "blkidP.h" -/* #define DEBUG_DEVNAME */ -#ifdef DEBUG_DEVNAME -#define DBG(x) x -#else -#define DBG(x) -#endif - /* * Find a dev struct in the cache by device name, if available. * @@ -61,7 +54,8 @@ blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags) if (strcmp(tmp->bid_name, devname)) continue; - DBG(printf("found devname %s in cache\n", tmp->bid_name)); + DBG(DEBUG_DEVNAME, + printf("found devname %s in cache\n", tmp->bid_name)); dev = tmp; break; } @@ -157,10 +151,10 @@ static dev_t lvm_get_devno(const char *lvm_device) int ma, mi; dev_t ret = 0; - DBG(printf("opening %s\n", lvm_device)); + DBG(DEBUG_DEVNAME, printf("opening %s\n", lvm_device)); if ((lvf = fopen(lvm_device, "r")) == NULL) { - DBG(printf("%s: (%d) %s\n", lvm_device, errno, - strerror(errno))); + DBG(DEBUG_DEVNAME, printf("%s: (%d) %s\n", lvm_device, errno, + strerror(errno))); return 0; } @@ -185,7 +179,7 @@ static void lvm_probe_all(blkid_cache cache) if ((vg_list = opendir(VG_DIR)) == NULL) return; - DBG(printf("probing LVM devices under %s\n", VG_DIR)); + DBG(DEBUG_DEVNAME, printf("probing LVM devices under %s\n", VG_DIR)); while ((vg_iter = readdir(vg_list)) != NULL) { DIR *lv_list; @@ -223,8 +217,9 @@ static void lvm_probe_all(blkid_cache cache) lv_name); dev = lvm_get_devno(lvm_device); sprintf(lvm_device, "%s/%s", vg_name, lv_name); - DBG(printf("LVM dev %s: devno 0x%04X\n", - lvm_device, dev)); + DBG(DEBUG_DEVNAME, printf("LVM dev %s: devno 0x%04X\n", + lvm_device, + (unsigned int) dev)); probe_one(cache, lvm_device, dev, BLKID_PRI_LVM); free(lvm_device); } @@ -253,8 +248,8 @@ evms_probe_all(blkid_cache cache) &ma, &mi, &sz, device) != 4) continue; - DBG(printf("Checking partition %s (%d, %d)\n", - device, ma, mi)); + DBG(DEBUG_DEVNAME, printf("Checking partition %s (%d, %d)\n", + device, ma, mi)); probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS); num++; @@ -304,7 +299,7 @@ int blkid_probe_all(blkid_cache cache) continue; devs[which] = makedev(ma, mi); - DBG(printf("read partition name %s\n", ptname)); + DBG(DEBUG_DEVNAME, printf("read partition name %s\n", ptname)); /* Skip whole disk devs unless they have no partitions * If we don't have a partition on this dev, also @@ -319,8 +314,9 @@ int blkid_probe_all(blkid_cache cache) lens[which] = strlen(ptname); if (isdigit(ptname[lens[which] - 1])) { - DBG(printf("partition dev %s, devno 0x%04X\n", - ptname, devs[which])); + DBG(DEBUG_DEVNAME, + printf("partition dev %s, devno 0x%04X\n", + ptname, (unsigned int) devs[which])); if (sz > 1) probe_one(cache, ptname, devs[which], 0); @@ -328,8 +324,9 @@ int blkid_probe_all(blkid_cache cache) lens[last] = 0; } else if (lens[last] && strncmp(ptnames[last], ptname, lens[last])) { - DBG(printf("whole dev %s, devno 0x%04X\n", - ptnames[last], devs[last])); + DBG(DEBUG_DEVNAME, + printf("whole dev %s, devno 0x%04X\n", + ptnames[last], (unsigned int) devs[last])); probe_one(cache, ptnames[last], devs[last], 0); lens[last] = 0; } @@ -351,6 +348,7 @@ int main(int argc, char **argv) { blkid_cache cache = NULL; + blkid_debug_mask = DEBUG_ALL; if (argc != 1) { fprintf(stderr, "Usage: %s\n" "Probe all devices and exit\n", argv[0]); diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c index 41fdc3de..e665e38c 100644 --- a/lib/blkid/devno.c +++ b/lib/blkid/devno.c @@ -33,12 +33,6 @@ #include "blkidP.h" -#ifdef DEBUG_DEVNO -#define DBG(x) x -#else -#define DBG(x) -#endif - struct dir_list { char *name; struct dir_list *next; @@ -130,7 +124,8 @@ static void scan_dir(char *dirname, dev_t devno, struct dir_list **list, add_to_dirlist(path, list); else if (S_ISBLK(st.st_mode) && st.st_rdev == devno) { *devname = blkid_strdup(path); - DBG(printf("found 0x%Lx at %s (%p)\n", devno, + DBG(DEBUG_DEVNO, + printf("found 0x%Lx at %s (%p)\n", devno, path, *devname)); break; } @@ -164,7 +159,7 @@ char *blkid_devno_to_devname(dev_t devno) struct dir_list *current = list; list = list->next; - DBG(printf("directory %s\n", current->name)); + DBG(DEBUG_DEVNO, printf("directory %s\n", current->name)); scan_dir(current->name, devno, &new_list, &devname); free(current->name); free(current); @@ -182,11 +177,15 @@ char *blkid_devno_to_devname(dev_t devno) free_dirlist(&list); free_dirlist(&new_list); - if (!devname) - DBG(printf("blkid: couldn't find devno 0x%04lx\n", + if (!devname) { + DBG(DEBUG_DEVNO, + printf("blkid: couldn't find devno 0x%04lx\n", (unsigned long) devno)); - else - DBG(printf("found devno 0x%04Lx as %s\n", devno, devname)); + } else { + DBG(DEBUG_DEVNO, + printf("found devno 0x%04Lx as %s\n", devno, devname)); + } + return devname; } @@ -199,6 +198,7 @@ int main(int argc, char** argv) dev_t devno; const char *errmsg = "Couldn't parse %s: %s\n"; + blkid_debug_mask = DEBUG_ALL; if ((argc != 2) && (argc != 3)) { fprintf(stderr, "Usage:\t%s device_number\n\t%s major minor\n" "Resolve a device number to a device name\n", diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c index aea62f3b..4f76ba58 100644 --- a/lib/blkid/probe.c +++ b/lib/blkid/probe.c @@ -31,13 +31,6 @@ #include "uuid/uuid.h" #include "probe.h" -/* #define DEBUG_PROBE */ -#ifdef DEBUG_PROBE -#define DBG(x) x -#else -#define DBG(x) -#endif - /* * This is a special case code to check for an MDRAID device. We do * this special since it requires checking for a superblock at the end @@ -93,7 +86,7 @@ static int probe_ext2(int fd, blkid_cache cache, blkid_dev dev, es = (struct ext2_super_block *)buf; - DBG(printf("ext2_sb.compat = %08X:%08X:%08X\n", + DBG(DEBUG_PROBE, printf("ext2_sb.compat = %08X:%08X:%08X\n", blkid_le32(es->s_feature_compat), blkid_le32(es->s_feature_incompat), blkid_le32(es->s_feature_ro_compat))); @@ -344,7 +337,8 @@ blkid_dev blkid_verify_devname(blkid_cache cache, blkid_dev dev) diff < BLKID_PROBE_INTERVAL)) return dev; - DBG(printf("need to revalidate %s (time since last check %lu)\n", + DBG(DEBUG_PROBE, + printf("need to revalidate %s (time since last check %lu)\n", dev->bid_name, diff)); if (((fd = open(dev->bid_name, O_RDONLY)) < 0) || @@ -354,7 +348,9 @@ blkid_dev blkid_verify_devname(blkid_cache cache, blkid_dev dev) return NULL; } /* We don't have read permission, just return cache data. */ - DBG(printf("returning unverified data for %s\n", dev->bid_name)); + DBG(DEBUG_PROBE, + printf("returning unverified data for %s\n", + dev->bid_name)); return dev; } @@ -436,7 +432,7 @@ found_type: if (sec_type) blkid_set_tag(dev, "TYPE", sec_type, 0, 0); - DBG(printf("%s: devno 0x%04Lx, type %s\n", + DBG(DEBUG_PROBE, printf("%s: devno 0x%04Lx, type %s\n", dev->bid_name, st.st_rdev, type)); } @@ -451,6 +447,7 @@ int main(int argc, char **argv) blkid_dev dev; blkid_cache cache; + blkid_debug_mask = DEBUG_ALL; if (argc != 2) { fprintf(stderr, "Usage: %s device\n" "Probe a single device to determine type\n", argv[0]); diff --git a/lib/blkid/read.c b/lib/blkid/read.c index 9d09b686..fdee756a 100644 --- a/lib/blkid/read.c +++ b/lib/blkid/read.c @@ -23,12 +23,6 @@ #include "blkidP.h" #include "uuid/uuid.h" -#ifdef DEBUG_CACHE -#define DBG(x) x -#else -#define DBG(x) -#endif - #ifdef HAVE_STRTOULL #define __USE_ISOC9X #define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */ @@ -146,7 +140,7 @@ static int parse_start(char **cp) return 0; if (!strncmp(p, "", 9)) { - DBG(printf("found device trailer %9s\n", *cp)); + DBG(DEBUG_READ, printf("found device trailer %9s\n", *cp)); *cp += 9; return 0; } @@ -189,13 +183,14 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp) start = tmp = strchr(*cp, '>'); if (!start) { - DBG(printf("blkid: short line parsing dev: %s\n", *cp)); + DBG(DEBUG_READ, + printf("blkid: short line parsing dev: %s\n", *cp)); return -BLKID_ERR_CACHE; } start = skip_over_blank(start + 1); end = skip_over_word(start); - DBG(printf("device should be %*s\n", end - start, start)); + DBG(DEBUG_READ, printf("device should be %*s\n", end - start, start)); if (**cp == '>') *cp = end; @@ -204,13 +199,14 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp) *tmp = '\0'; - if (!(tmp = strrchr(end, '<')) || parse_end(&tmp) < 0) - DBG(printf("blkid: missing ending: %s\n", end)); - else if (tmp) + if (!(tmp = strrchr(end, '<')) || parse_end(&tmp) < 0) { + DBG(DEBUG_READ, + printf("blkid: missing ending: %s\n", end)); + } else if (tmp) *tmp = '\0'; if (end - start <= 1) { - DBG(printf("blkid: empty device name: %s\n", *cp)); + DBG(DEBUG_READ, printf("blkid: empty device name: %s\n", *cp)); return -BLKID_ERR_CACHE; } @@ -218,7 +214,7 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp) if (name == NULL) return -BLKID_ERR_MEM; - DBG(printf("found dev %s\n", name)); + DBG(DEBUG_READ, printf("found dev %s\n", name)); if (!(*dev = blkid_get_dev(cache, name, BLKID_DEV_CREATE))) return -BLKID_ERR_MEM; @@ -247,7 +243,8 @@ static int parse_token(char **name, char **value, char **cp) if (**value == '"') { end = strchr(*value + 1, '"'); if (!end) { - DBG(printf("unbalanced quotes at: %s\n", *value)); + DBG(DEBUG_READ, + printf("unbalanced quotes at: %s\n", *value)); *cp = *value; return -BLKID_ERR_CACHE; } @@ -317,7 +314,7 @@ static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp) else ret = blkid_set_tag(dev, name, value, strlen(value), 0); - DBG(printf(" tag: %s=\"%s\"\n", name, value)); + DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value)); return ret < 0 ? ret : 1; } @@ -343,7 +340,7 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp) *dev_p = NULL; - DBG(printf("line: %s\n", cp)); + DBG(DEBUG_READ, printf("line: %s\n", cp)); if ((ret = parse_dev(cache, dev_p, &cp)) <= 0) return ret; @@ -355,11 +352,12 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp) } if (dev->bid_type == NULL) { - DBG(printf("blkid: device %s has no TYPE\n",dev->bid_name)); + DBG(DEBUG_READ, + printf("blkid: device %s has no TYPE\n",dev->bid_name)); blkid_free_dev(dev); } - DEB_DUMP_DEV(dev); + DEB_DUMP_DEV(DEBUG_READ, dev); return ret; } @@ -386,7 +384,8 @@ int blkid_get_cache(blkid_cache *cache, const char *filename) else (*cache)->bic_filename = blkid_strdup(filename); - DBG(printf("cache file %s\n", filename)); + DBG(DEBUG_READ|DEBUG_CACHE, printf("reading cache file %s\n", + filename)); if (!strcmp(filename, "-")) file = stdin; @@ -417,7 +416,8 @@ int blkid_get_cache(blkid_cache *cache, const char *filename) } if (blkid_parse_line(*cache, &dev, buf) < 0) { - DBG(printf("blkid: bad format on line %d\n", lineno)); + DBG(DEBUG_READ, + printf("blkid: bad format on line %d\n", lineno)); continue; } } @@ -438,6 +438,7 @@ int main(int argc, char**argv) blkid_cache cache = NULL; int ret; + blkid_debug_mask = DEBUG_ALL; if (argc > 2) { fprintf(stderr, "Usage: %s [filename]\n" "Test parsing of the cache (filename)\n", argv[0]); diff --git a/lib/blkid/resolve.c b/lib/blkid/resolve.c index c5abfda7..7e729cbc 100644 --- a/lib/blkid/resolve.c +++ b/lib/blkid/resolve.c @@ -22,13 +22,6 @@ #include "blkidP.h" #include "probe.h" -#ifdef DEBUG_RESOLVE -#define DBG(x) x -#else -#define DBG(x) -#endif - - /* * Find a tagname (e.g. LABEL or UUID) on a specific device. */ @@ -39,7 +32,7 @@ char *blkid_get_tagname_devname(blkid_cache cache, const char *tagname, blkid_dev dev; char *ret = NULL; - DBG(printf("looking for %s on %s\n", tagname, devname)); + DBG(DEBUG_RESOLVE, printf("looking for %s on %s\n", tagname, devname)); if (!devname) return NULL; @@ -71,7 +64,8 @@ char *blkid_get_devname(blkid_cache cache, const char *token, if (!token) return NULL; - DBG(printf("looking for %s%c%s %s\n", token, value ? '=' : ' ', + DBG(DEBUG_RESOLVE, + printf("looking for %s%c%s %s\n", token, value ? '=' : ' ', value ? value : "", cache ? "in cache" : "from disk")); if (!cache) { @@ -112,6 +106,7 @@ int main(int argc, char **argv) char *value; blkid_cache cache; + blkid_debug_mask = DEBUG_ALL; if (argc != 2 && argc != 3) { fprintf(stderr, "Usage:\t%s tagname=value\n" "\t%s tagname devname\n" diff --git a/lib/blkid/save.c b/lib/blkid/save.c index 6f1d2447..82b9b775 100644 --- a/lib/blkid/save.c +++ b/lib/blkid/save.c @@ -26,12 +26,6 @@ #endif #include "blkidP.h" -#ifdef DEBUG_SAVE -#define DBG(x) x -#else -#define DBG(x) -#endif - static int save_dev(blkid_dev dev, FILE *file) { struct list_head *p; @@ -39,7 +33,8 @@ static int save_dev(blkid_dev dev, FILE *file) if (!dev) return 0; - DBG(printf("device %s, type %s\n", dev->bid_name, dev->bid_type)); + DBG(DEBUG_SAVE, + printf("device %s, type %s\n", dev->bid_name, dev->bid_type)); fprintf(file, "bic_devs) || !(cache->bic_flags & BLKID_BIC_FL_CHANGED)) { - DBG(printf("empty cache, not saving\n")); + DBG(DEBUG_SAVE, printf("empty cache, not saving\n")); return 0; } @@ -87,7 +82,8 @@ int blkid_flush_cache(blkid_cache cache) /* If we can't write to the cache file, then don't even try */ if (((ret = stat(filename, &st)) < 0 && errno != ENOENT) || (ret == 0 && access(filename, W_OK) < 0)) { - DBG(printf("can't write to cache file %s\n", filename)); + DBG(DEBUG_SAVE, + printf("can't write to cache file %s\n", filename)); return 0; } @@ -116,7 +112,8 @@ int blkid_flush_cache(blkid_cache cache) opened = filename; } - DBG(printf("cache file %s (really %s)\n", filename, opened)); + DBG(DEBUG_SAVE, + printf("cache file %s (really %s)\n", filename, opened)); if (!file) { ret = errno; @@ -142,7 +139,8 @@ int blkid_flush_cache(blkid_cache cache) if (opened != filename) { if (ret < 0) { unlink(opened); - DBG(printf("unlinked temp cache %s\n", opened)); + DBG(DEBUG_SAVE, + printf("unlinked temp cache %s\n", opened)); } else { char *backup; @@ -154,7 +152,8 @@ int blkid_flush_cache(blkid_cache cache) free(backup); } rename(opened, filename); - DBG(printf("moved temp cache %s\n", opened)); + DBG(DEBUG_SAVE, + printf("moved temp cache %s\n", opened)); } } } @@ -171,6 +170,7 @@ int main(int argc, char **argv) blkid_cache cache = NULL; int ret; + blkid_debug_mask = DEBUG_ALL; if (argc > 2) { fprintf(stderr, "Usage: %s [filename]\n" "Test loading/saving a cache (filename)\n", argv[0]); diff --git a/lib/blkid/tag.c b/lib/blkid/tag.c index 3948a1e6..e8b54f49 100644 --- a/lib/blkid/tag.c +++ b/lib/blkid/tag.c @@ -16,12 +16,6 @@ #include "blkidP.h" -#ifdef DEBUG_TAG -#define DBG(x) x -#else -#define DBG(x) -#endif - static blkid_tag blkid_new_tag(void) { blkid_tag tag; @@ -40,9 +34,9 @@ void blkid_free_tag(blkid_tag tag) if (!tag) return; - DBG(printf(" freeing tag %s=%s\n", tag->bit_name, + DBG(DEBUG_TAG, printf(" freeing tag %s=%s\n", tag->bit_name, tag->bit_val ? tag->bit_val : "(NULL)")); - DEB_DUMP_TAG(tag); + DEB_DUMP_TAG(DEBUG_TAG, tag); list_del(&tag->bit_tags); /* list of tags for this device */ list_del(&tag->bit_names); /* list of tags with this type */ @@ -91,7 +85,8 @@ static blkid_tag blkid_find_head_cache(blkid_cache cache, const char *type) list_for_each(p, &cache->bic_tags) { tmp = list_entry(p, struct blkid_struct_tag, bit_tags); if (!strcmp(tmp->bit_name, type)) { - DBG(printf(" found cache tag head %s\n", type)); + DBG(DEBUG_TAG, + printf(" found cache tag head %s\n", type)); head = tmp; break; } @@ -161,7 +156,8 @@ repeat: if (!head) goto errout; - DBG(printf(" creating new cache tag head %s\n", + DBG(DEBUG_TAG, + printf(" creating new cache tag head %s\n", name)); head->bit_name = blkid_strdup(name); if (!head->bit_name) @@ -210,7 +206,7 @@ int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val) { char *name, *value, *cp; - DBG(printf("trying to parse '%s' as a tag\n", token)); + DBG(DEBUG_TAG, printf("trying to parse '%s' as a tag\n", token)); if (!token || !(cp = strchr(token, '='))) return -1; @@ -325,11 +321,12 @@ extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache, if (!cache || !type || !value) return NULL; - DBG(printf("looking for %s=%s in cache\n", type, value)); + DBG(DEBUG_TAG, printf("looking for %s=%s in cache\n", type, value)); try_again: pri = -1; found = 0; + dev = 0; head = blkid_find_head_cache(cache, type); if (head) { @@ -349,7 +346,7 @@ try_again: if (dev && strcmp(found->bit_val, value)) dev = 0; - if ((!head || !dev) && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) { + if (!dev && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) { blkid_probe_all(cache); goto try_again; }