diff --git a/configure b/configure index d47cef7..9d6fcbe 100755 --- a/configure +++ b/configure @@ -1,9 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. +# Generated by GNU Autoconf 2.68. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -132,31 +134,6 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -190,8 +167,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" +test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -236,25 +212,21 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -356,14 +328,6 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -485,10 +449,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -523,16 +483,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -544,8 +504,28 @@ else as_mkdir_p=false fi -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1325,6 +1305,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1498,7 +1480,7 @@ Optional Features: --disable-testio-debug disable the use of the test I/O manager for debugging --disable-libuuid do not build private uuid library --disable-libblkid do not build private blkid library - --enable-libquota enable quota support + --disable-quota disable quota support --disable-debugfs disable support of debugfs program --disable-imager disable support of e2image program --disable-resizer disable support of e2resize program @@ -1607,9 +1589,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.68 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1685,7 +1667,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - test -x conftest$ac_exeext + $as_test_x conftest$ac_exeext }; then : ac_retval=0 else @@ -2039,8 +2021,7 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; +test_array [0] = 0 ; return 0; @@ -2056,8 +2037,7 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; +test_array [0] = 0 ; return 0; @@ -2083,8 +2063,7 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; +test_array [0] = 0 ; return 0; @@ -2100,8 +2079,7 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; +test_array [0] = 0 ; return 0; @@ -2135,8 +2113,7 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; +test_array [0] = 0 ; return 0; @@ -2312,7 +2289,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2849,7 +2826,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2889,7 +2866,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2942,7 +2919,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2983,7 +2960,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3041,7 +3018,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3085,7 +3062,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3531,7 +3508,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -struct stat; +#include +#include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3710,7 +3688,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3750,7 +3728,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3803,7 +3781,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3844,7 +3822,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3902,7 +3880,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3946,7 +3924,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4142,7 +4120,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -struct stat; +#include +#include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4228,7 +4207,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$GCC" = yes; then - RDYNAMIC="-rdynamic" + case "$host_os" in + haiku*) RDYNAMIC="-Wl,-export-dynamic" ;; + *) RDYNAMIC="-rdynamic" ;; + esac fi ac_ext=c @@ -4791,7 +4773,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4834,7 +4816,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4998,7 +4980,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5041,7 +5023,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5188,6 +5170,7 @@ fi +QUOTA_CMT= if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then @@ -5210,7 +5193,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5253,7 +5236,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5311,19 +5294,25 @@ if test "${enable_quota+set}" = set; then : then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling quota support" >&5 $as_echo "Disabling quota support" >&6; } + QUOTA_CMT=# else $as_echo "#define CONFIG_QUOTA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling quota support" >&5 $as_echo "Enabling quota support" >&6; } + LIBQUOTA='$(LIB)/libquota'$LIB_EXT + DEPLIBQUOTA=$LIBQUOTA + STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT + DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA + PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT + DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling quota support by default" >&5 -$as_echo "Disabling quota support by default" >&6; } - -fi + $as_echo "#define CONFIG_QUOTA 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling quota support by default" >&5 +$as_echo "Enabling quota support by default" >&6; } LIBQUOTA='$(LIB)/libquota'$LIB_EXT DEPLIBQUOTA=$LIBQUOTA STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT @@ -5331,6 +5320,9 @@ DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA +fi + + @@ -5739,7 +5731,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -5912,7 +5904,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6120,7 +6112,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6160,7 +6152,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6255,7 +6247,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -6321,7 +6313,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -6492,11 +6484,11 @@ else int main () { - +/* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ + /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset cs = { 0, 0 }; + const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -6513,9 +6505,8 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; + { /* SCO 3.2v4 cc rejects this. */ + char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -6531,10 +6522,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -7144,20 +7135,23 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction (int *addr, int depth) +find_stack_direction () { - int dir, dummy = 0; - if (! addr) - addr = &dummy; - *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; - return dir + dummy; + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; } int -main (int argc, char **argv) +main () { - return find_stack_direction (0, argc + !argv + 20) < 0; + return find_stack_direction () < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -8803,7 +8797,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_INTLBISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9608,7 +9602,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9660,7 +9654,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9701,7 +9695,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9742,7 +9736,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9783,7 +9777,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9824,7 +9818,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9867,7 +9861,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -9933,7 +9927,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9974,7 +9968,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10015,7 +10009,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LDCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10055,7 +10049,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10095,7 +10089,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10147,7 +10141,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10187,7 +10181,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10239,7 +10233,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10279,7 +10273,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10330,7 +10324,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MAKEINFO="makeinfo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -10390,7 +10384,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BUILD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11051,7 +11045,7 @@ if test "$ac_res" != no; then : fi fi -for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_memalign prctl setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc +for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags daemon fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_memalign prctl setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -11102,6 +11096,47 @@ fi $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : SOCKET_LIB=-lsocket +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 +$as_echo_n "checking for socket in -lnetwork... " >&6; } +if ${ac_cv_lib_network_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_network_socket=yes +else + ac_cv_lib_network_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 +$as_echo "$ac_cv_lib_network_socket" >&6; } +if test "x$ac_cv_lib_network_socket" = xyes; then : + SOCKET_LIB=-lnetwork +fi + fi @@ -11321,6 +11356,18 @@ $as_echo "...and mandir defaults to /usr/share/man" >&6; } fi fi ;; +haiku*) + if test "$prefix" = NONE ; then + prefix="`finddir B_COMMON_DIRECTORY`"; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: On $host_os systems, prefix defaults to \`finddir B_COMMON_DIRECTORY\`" >&5 +$as_echo "On $host_os systems, prefix defaults to \`finddir B_COMMON_DIRECTORY\`" >&6; } + if test "$sbindir" = '${exec_prefix}/sbin' ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ...and sbindir defaults to \`finddir B_COMMON_DIRECTORY\`/bin" >&5 +$as_echo "...and sbindir defaults to \`finddir B_COMMON_DIRECTORY\`/bin" >&6; } + mandir="`finddir B_COMMON_DIRECTORY`/bin" + fi + fi +;; esac if test "$root_prefix" = NONE ; then if test "$prefix" = NONE ; then @@ -11875,16 +11922,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -11944,16 +11991,28 @@ else as_mkdir_p=false fi - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -11975,7 +12034,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12041,10 +12100,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -12134,7 +12193,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff --git a/configure.in b/configure.in index 0b96b8d..cece319 100644 --- a/configure.in +++ b/configure.in @@ -96,7 +96,10 @@ AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead])) dnl AC_PROG_CC if test "$GCC" = yes; then - RDYNAMIC="-rdynamic" + case "$host_os" in + haiku*) RDYNAMIC="-Wl,-export-dynamic" ;; + *) RDYNAMIC="-rdynamic" ;; + esac AC_SUBST(RDYNAMIC) fi AC_PROG_CPP @@ -565,20 +568,28 @@ AC_SUBST(BLKID_CMT) dnl dnl handle --enable-quota dnl +QUOTA_CMT= PKG_PROG_PKG_CONFIG AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support]) AC_ARG_ENABLE([quota], -[ --enable-libquota enable quota support], +[ --disable-quota disable quota support], if test "$enableval" = "no" then AC_MSG_RESULT([Disabling quota support]) + QUOTA_CMT=# else AC_DEFINE(CONFIG_QUOTA, 1) AC_MSG_RESULT([Enabling quota support]) + LIBQUOTA='$(LIB)/libquota'$LIB_EXT + DEPLIBQUOTA=$LIBQUOTA + STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT + DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA + PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT + DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA fi , -AC_MSG_RESULT([Disabling quota support by default]) -) +AC_DEFINE(CONFIG_QUOTA, 1) +AC_MSG_RESULT([Enabling quota support by default]) dnl dnl Define stuff expected for quota library dnl @@ -588,6 +599,7 @@ STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA +) AC_SUBST(LIBQUOTA) AC_SUBST(DEPLIBQUOTA) AC_SUBST(STATIC_LIBQUOTA) @@ -1051,6 +1063,7 @@ AC_CHECK_FUNCS(m4_flatten([ backtrace blkid_probe_get_topology chflags + daemon fallocate fallocate64 fchown @@ -1094,9 +1107,10 @@ AC_CHECK_FUNCS(m4_flatten([ dnl dnl Check to see if -lsocket is required (solaris) to make something dnl that uses socket() to compile; this is needed for the UUID library +dnl Haiku needs -lnetwork to get socket(). dnl SOCKET_LIB='' -AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket]) +AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket],[AC_CHECK_LIB(network, socket, [SOCKET_LIB=-lnetwork])]) AC_SUBST(SOCKET_LIB) dnl dnl See if optreset exists @@ -1187,6 +1201,16 @@ linux* | gnu* | k*bsd*-gnu) fi fi ;; +haiku*) + if test "$prefix" = NONE ; then + prefix="`finddir B_COMMON_DIRECTORY`"; + AC_MSG_RESULT([On $host_os systems, prefix defaults to `finddir B_COMMON_DIRECTORY`]) + if test "$sbindir" = '${exec_prefix}/sbin' ; then + AC_MSG_RESULT([...and sbindir defaults to `finddir B_COMMON_DIRECTORY`/bin]) + mandir="`finddir B_COMMON_DIRECTORY`/bin" + fi + fi +;; esac if test "$root_prefix" = NONE ; then if test "$prefix" = NONE ; then diff --git a/contrib/spd_readdir.c b/contrib/spd_readdir.c index f89832c..8d571de 100644 --- a/contrib/spd_readdir.c +++ b/contrib/spd_readdir.c @@ -213,7 +213,7 @@ DIR *opendir(const char *name) dirstruct = alloc_dirstruct(dir); if (!dirstruct) { (*real_closedir)(dir); - errno = -ENOMEM; + errno = ENOMEM; return NULL; } @@ -246,7 +246,7 @@ DIR *fdopendir(int fd) dirstruct = alloc_dirstruct(dir); if (!dirstruct) { (*real_closedir)(dir); - errno = -ENOMEM; + errno = ENOMEM; return NULL; } diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h index 09a9d08..6cb3746 100644 --- a/e2fsck/e2fsck.h +++ b/e2fsck/e2fsck.h @@ -67,7 +67,9 @@ #define E2FSCK_ATTR(x) #endif +#ifdef CONFIG_QUOTA #include "quota/mkquota.h" +#endif /* * Exit codes used by fsck-type programs @@ -320,7 +322,9 @@ struct e2fsck_struct { /* * Ext4 quota support */ +#ifdef CONFIG_QUOTA quota_ctx_t qctx; +#endif #ifdef RESOURCE_TRACK /* * For timing purposes diff --git a/e2fsck/logfile.c b/e2fsck/logfile.c index 9229fbf..5a44dcb 100644 --- a/e2fsck/logfile.c +++ b/e2fsck/logfile.c @@ -227,10 +227,14 @@ static FILE *save_output(const char *s0, const char *s1, const char *s2) } if (pid == 0) { +#ifdef HAVE_DAEMON if (daemon(0, 0) < 0) { perror("daemon"); exit(1); } +#else +#warning daemon() not present +#endif /* * Grab the output from our parent */ diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index a4bd956..088e922 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2177,11 +2177,13 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx, } } +#ifdef CONFIG_QUOTA if (ino == EXT2_ROOT_INO || ino >= EXT2_FIRST_INODE(ctx->fs->super)) { quota_data_add(ctx->qctx, inode, ino, pb.num_blocks * fs->blocksize); quota_data_inodes(ctx->qctx, inode, ino, +1); } +#endif if (!(fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE) || diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c index 05cbd10..a4bae9e 100644 --- a/e2fsck/pass1b.c +++ b/e2fsck/pass1b.c @@ -644,8 +644,10 @@ static void delete_file(e2fsck_t ctx, ext2_ino_t ino, if (ctx->inode_bad_map) ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino); ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode)); +#ifdef CONFIG_QUOTA quota_data_sub(ctx->qctx, &inode, ino, pb.dup_blocks * fs->blocksize); quota_data_inodes(ctx->qctx, &inode, ino, -1); +#endif /* Inode may have changed by block_iterate, so reread it */ e2fsck_read_inode(ctx, ino, &inode, "delete_file"); @@ -677,7 +679,9 @@ static void delete_file(e2fsck_t ctx, ext2_ino_t ino, delete_file_block(fs, &blk, BLOCK_COUNT_EXTATTR, 0, 0, &pb); ext2fs_file_acl_block_set(fs, &inode, blk); +#ifdef CONFIG_QUOTA quota_data_sub(ctx->qctx, &inode, ino, fs->blocksize); +#endif } } } diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c index a379e9b..0d3af58 100644 --- a/e2fsck/pass3.c +++ b/e2fsck/pass3.c @@ -491,8 +491,10 @@ ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix) ext2fs_icount_store(ctx->inode_count, ino, 2); ext2fs_icount_store(ctx->inode_link_info, ino, 2); ctx->lost_and_found = ino; +#ifdef CONFIG_QUOTA quota_data_add(ctx->qctx, &inode, ino, fs->blocksize); quota_data_inodes(ctx->qctx, &inode, ino, +1); +#endif #if 0 printf("/lost+found created; inode #%lu\n", ino); #endif @@ -802,7 +804,9 @@ errcode_t e2fsck_expand_directory(e2fsck_t ctx, ext2_ino_t dir, inode.i_size = (es.last_block + 1) * fs->blocksize; ext2fs_iblk_add_blocks(fs, &inode, es.newblocks); +#ifdef CONFIG_QUOTA quota_data_add(ctx->qctx, &inode, dir, es.newblocks * fs->blocksize); +#endif e2fsck_write_inode(ctx, dir, &inode, "expand_directory"); diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c index 2d55180..c5ca971 100644 --- a/e2fsck/pass4.c +++ b/e2fsck/pass4.c @@ -64,7 +64,9 @@ static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i, e2fsck_read_bitmaps(ctx); ext2fs_inode_alloc_stats2(fs, i, -1, LINUX_S_ISDIR(inode->i_mode)); +#ifdef CONFIG_QUOTA quota_data_inodes(ctx->qctx, inode, i, -1); +#endif return 0; } } diff --git a/e2fsck/quota.c b/e2fsck/quota.c index 7a1476e..2dc01ff 100644 --- a/e2fsck/quota.c +++ b/e2fsck/quota.c @@ -21,6 +21,7 @@ static void move_quota_inode(ext2_filsys fs, ext2_ino_t from_ino, ext2_ino_t to_ino, int qtype) { +#ifdef CONFIG_QUOTA struct ext2_inode inode; char qf_name[QUOTA_NAME_LEN]; @@ -46,10 +47,12 @@ static void move_quota_inode(ext2_filsys fs, ext2_ino_t from_ino, /* Clear out the original inode in the inode-table block. */ memset(&inode, 0, sizeof(struct ext2_inode)); ext2fs_write_inode(fs, from_ino, &inode); +#endif } void e2fsck_hide_quota(e2fsck_t ctx) { +#ifdef CONFIG_QUOTA struct ext2_super_block *sb = ctx->fs->super; struct problem_context pctx; ext2_filsys fs = ctx->fs; @@ -79,4 +82,5 @@ void e2fsck_hide_quota(e2fsck_t ctx) } return; +#endif } diff --git a/e2fsck/unix.c b/e2fsck/unix.c index d2b1bbd..e63a846 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1618,6 +1618,7 @@ print_unsupp_features: journal_size = -1; if (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA) { +#ifdef CONFIG_QUOTA /* Quotas were enabled. Do quota accounting during fsck. */ if ((sb->s_usr_quota_inum && sb->s_grp_quota_inum) || (!sb->s_usr_quota_inum && !sb->s_grp_quota_inum)) @@ -1626,6 +1627,11 @@ print_unsupp_features: qtype = sb->s_usr_quota_inum ? USRQUOTA : GRPQUOTA; quota_init_context(&ctx->qctx, ctx->fs, qtype); +#else + log_err(ctx, _("%s: e2fsck not compiled with QUOTA support,\n\t" + "but filesystem %s has QUOTA enabled.\n"), + ctx->program_name, ctx->device_name); +#endif } run_result = e2fsck_run(ctx); @@ -1660,6 +1666,7 @@ print_unsupp_features: } no_journal: +#ifdef CONFIG_QUOTA if (ctx->qctx) { int i, needs_writeout; for (i = 0; i < MAXQUOTAS; i++) { @@ -1675,6 +1682,7 @@ no_journal: } quota_release_context(&ctx->qctx); } +#endif if (run_result == E2F_FLAG_RESTART) { log_out(ctx, _("Restarting e2fsck from the beginning...\n")); diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c index a6673c1..c2ea2f7 100644 --- a/lib/blkid/devname.c +++ b/lib/blkid/devname.c @@ -40,6 +40,10 @@ #include "blkidP.h" +#ifndef makedev +#define makedev(major,minor) (-1) +#endif + /* * Find a dev struct in the cache by device name, if available. * diff --git a/lib/ext2fs/bmap64.h b/lib/ext2fs/bmap64.h index c5384c9..4573fc6 100644 --- a/lib/ext2fs/bmap64.h +++ b/lib/ext2fs/bmap64.h @@ -9,6 +9,8 @@ * %End-Header% */ +#include + struct ext2_bmap_statistics { int type; struct timeval created; diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c index 6c2e562..c9b9f24 100644 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@ -724,6 +724,7 @@ __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group) __u16 crc = 0; struct ext2_group_desc *desc; size_t size; + size_t offset; size = fs->super->s_desc_size; if (size < EXT2_MIN_DESC_SIZE) @@ -766,7 +767,7 @@ __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group) } /* old crc16 code */ - size_t offset = offsetof(struct ext2_group_desc, bg_checksum); + offset = offsetof(struct ext2_group_desc, bg_checksum); crc = ext2fs_crc16(~0, fs->super->s_uuid, sizeof(fs->super->s_uuid)); crc = ext2fs_crc16(crc, &group, sizeof(group)); diff --git a/lib/ext2fs/dblist.c b/lib/ext2fs/dblist.c index ceaae8f..3d4b1a1 100644 --- a/lib/ext2fs/dblist.c +++ b/lib/ext2fs/dblist.c @@ -365,9 +365,9 @@ int ext2fs_dblist_count(ext2_dblist dblist) errcode_t ext2fs_dblist_get_last(ext2_dblist dblist, struct ext2_db_entry **entry) { - EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); static struct ext2_db_entry ret_entry; struct ext2_db_entry2 *last; + EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); if (dblist->count == 0) return EXT2_ET_DBLIST_EMPTY; diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 02570f0..c20ce36 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -24,6 +24,9 @@ #include "config.h" #include #include +#if HAVE_STDINT_H +#include +#endif #if HAVE_UNISTD_H #include #endif @@ -914,7 +917,7 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block, unsigned long long count) { struct unix_private_data *data; - __uint64_t range[2]; + uint64_t range[2]; int ret; EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL); diff --git a/lib/quota/quotaio_tree.h b/lib/quota/quotaio_tree.h index 6ee54c9..4c22c21 100644 --- a/lib/quota/quotaio_tree.h +++ b/lib/quota/quotaio_tree.h @@ -6,6 +6,7 @@ #define _LINUX_QUOTA_TREE_H #include +#include typedef u_int32_t qid_t; /* Type in which we store ids in memory */ diff --git a/misc/mke2fs.c b/misc/mke2fs.c index a288147..1af26ee 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -2282,6 +2282,7 @@ static void fix_cluster_bg_counts(ext2_filsys fs) ext2fs_free_blocks_count_set(fs->super, EXT2FS_C2B(fs, tot_free)); } +#ifdef CONFIG_QUOTA static int create_quota_inodes(ext2_filsys fs) { quota_ctx_t qctx; @@ -2293,6 +2294,7 @@ static int create_quota_inodes(ext2_filsys fs) return 0; } +#endif int main (int argc, char *argv[]) { @@ -2677,9 +2679,11 @@ no_journal: if (EXT2_HAS_RO_COMPAT_FEATURE(&fs_param, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) fix_cluster_bg_counts(fs); +#ifdef CONFIG_QUOTA if (EXT2_HAS_RO_COMPAT_FEATURE(&fs_param, EXT4_FEATURE_RO_COMPAT_QUOTA)) create_quota_inodes(fs); +#endif if (!quiet) printf(_("Writing superblocks and " diff --git a/misc/tune2fs.c b/misc/tune2fs.c index b290c46..b24b8c1 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -56,7 +56,9 @@ extern int optind; #include "jfs_user.h" #include "util.h" #include "blkid/blkid.h" +#ifdef CONFIG_QUOTA #include "quota/mkquota.h" +#endif #include "../version.h" #include "nls-enable.h" @@ -145,7 +147,9 @@ static __u32 ok_features[3] = { EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| EXT4_FEATURE_RO_COMPAT_GDT_CSUM | EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER | +#ifdef CONFIG_QUOTA EXT4_FEATURE_RO_COMPAT_QUOTA | +#endif EXT4_FEATURE_RO_COMPAT_METADATA_CSUM }; @@ -164,7 +168,9 @@ static __u32 clear_ok_features[3] = { EXT4_FEATURE_RO_COMPAT_DIR_NLINK| EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| EXT4_FEATURE_RO_COMPAT_GDT_CSUM | +#ifdef CONFIG_QUOTA EXT4_FEATURE_RO_COMPAT_QUOTA | +#endif EXT4_FEATURE_RO_COMPAT_METADATA_CSUM }; @@ -473,6 +479,7 @@ static int rewrite_dir_block(ext2_filsys fs, dcl->limit = ext2fs_cpu_to_le16(max_entries); } } else { + int max_entries; /* If htree block is full then rebuild the dir */ if (ext2fs_le16_to_cpu(dcl->count) == ext2fs_le16_to_cpu(dcl->limit)) { @@ -483,7 +490,7 @@ static int rewrite_dir_block(ext2_filsys fs, * Ensure dcl->limit is small enough to leave room for * the checksum tail. */ - int max_entries = (fs->blocksize - (dcl_offset + + max_entries = (fs->blocksize - (dcl_offset + sizeof(struct ext2_dx_tail))) / sizeof(struct ext2_dx_entry); if (ext2fs_le16_to_cpu(dcl->limit) != max_entries) @@ -1124,6 +1131,7 @@ err: return 1; } +#ifdef CONFIG_QUOTA void handle_quota_options(ext2_filsys fs) { quota_ctx_t qctx; @@ -1169,6 +1177,7 @@ void handle_quota_options(ext2_filsys fs) return; } +#endif void parse_quota_opts(const char *opts) { @@ -2540,7 +2549,13 @@ retry_open: rc = 1; goto closefs; } +#ifdef CONFIG_QUOTA handle_quota_options(fs); +#else + fputs(_("The quota feature is disabled.\n"), stderr); + rc = 1; + goto closefs; +#endif } if (U_flag) {