@@ -706,7 +706,8 @@ FUSE_LIB
706706fuse3_LIBS
707707fuse3_CFLAGS
708708CLOCK_GETTIME_LIB
709- ARCHIVE_LIB
709+ ARCHIVE_LIBS
710+ ARCHIVE_CFLAGS
710711MAGIC_LIB
711712SOCKET_LIB
712713SIZEOF_TIME_T
954955PKG_CONFIG
955956PKG_CONFIG_PATH
956957PKG_CONFIG_LIBDIR
958+ ARCHIVE_CFLAGS
959+ ARCHIVE_LIBS
957960fuse3_CFLAGS
958961fuse3_LIBS
959962CXX
@@ -1669,6 +1672,10 @@ Some influential environment variables:
16691672 directories to add to pkg-config's search path
16701673 PKG_CONFIG_LIBDIR
16711674 path overriding pkg-config's built-in search path
1675+ ARCHIVE_CFLAGS
1676+ C compiler flags for ARCHIVE, overriding pkg-config
1677+ ARCHIVE_LIBS
1678+ linker flags for ARCHIVE, overriding pkg-config
16721679 CXX C++ compiler command
16731680 CXXFLAGS C++ compiler flags
16741681 udev_CFLAGS C compiler flags for udev, overriding pkg-config
@@ -13804,16 +13811,86 @@ printf "%s\n" "Testing for libarchive support (with dlopen)" >&6; }
1380413811fi
1380513812
1380613813else $as_nop
13807- try_libarchive=" yes"
13808- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: Try testing for libarchive support (with dlopen) by default" >&5
13814+
13815+ case "$host_os" in
13816+ darwin*)
13817+ try_libarchive="direct"
13818+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Try testing for libarchive support (with static linking) by default" >&5
13819+ printf "%s\n" "Try testing for libarchive support (with static linking) by default" >&6; }
13820+ ;;
13821+ *)
13822+ try_libarchive="yes"
13823+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Try testing for libarchive support (with dlopen) by default" >&5
1380913824printf "%s\n" "Try testing for libarchive support (with dlopen) by default" >&6; }
13825+ ;;
13826+ esac
1381013827
1381113828fi
1381213829
13813- ARCHIVE_LIB =
13830+ ARCHIVE_LIBS =
1381413831if test -n "$try_libarchive"
1381513832then
13816- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for archive_read_new in -larchive" >&5
13833+
13834+ pkg_failed=no
13835+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libarchive" >&5
13836+ printf %s "checking for libarchive... " >&6; }
13837+
13838+ if test -n "$ARCHIVE_CFLAGS"; then
13839+ pkg_cv_ARCHIVE_CFLAGS="$ARCHIVE_CFLAGS"
13840+ elif test -n "$PKG_CONFIG"; then
13841+ if test -n "$PKG_CONFIG" && \
13842+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libarchive\""; } >&5
13843+ ($PKG_CONFIG --exists --print-errors "libarchive") 2>&5
13844+ ac_status=$?
13845+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13846+ test $ac_status = 0; }; then
13847+ pkg_cv_ARCHIVE_CFLAGS=`$PKG_CONFIG --cflags "libarchive" 2>/dev/null`
13848+ test "x$?" != "x0" && pkg_failed=yes
13849+ else
13850+ pkg_failed=yes
13851+ fi
13852+ else
13853+ pkg_failed=untried
13854+ fi
13855+ if test -n "$ARCHIVE_LIBS"; then
13856+ pkg_cv_ARCHIVE_LIBS="$ARCHIVE_LIBS"
13857+ elif test -n "$PKG_CONFIG"; then
13858+ if test -n "$PKG_CONFIG" && \
13859+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libarchive\""; } >&5
13860+ ($PKG_CONFIG --exists --print-errors "libarchive") 2>&5
13861+ ac_status=$?
13862+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13863+ test $ac_status = 0; }; then
13864+ pkg_cv_ARCHIVE_LIBS=`$PKG_CONFIG --libs "libarchive" 2>/dev/null`
13865+ test "x$?" != "x0" && pkg_failed=yes
13866+ else
13867+ pkg_failed=yes
13868+ fi
13869+ else
13870+ pkg_failed=untried
13871+ fi
13872+
13873+
13874+
13875+ if test $pkg_failed = yes; then
13876+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13877+ printf "%s\n" "no" >&6; }
13878+
13879+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13880+ _pkg_short_errors_supported=yes
13881+ else
13882+ _pkg_short_errors_supported=no
13883+ fi
13884+ if test $_pkg_short_errors_supported = yes; then
13885+ ARCHIVE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libarchive" 2>&1`
13886+ else
13887+ ARCHIVE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libarchive" 2>&1`
13888+ fi
13889+ # Put the nasty error message in config.log where it belongs
13890+ echo "$ARCHIVE_PKG_ERRORS" >&5
13891+
13892+
13893+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archive_read_new in -larchive" >&5
1381713894printf %s "checking for archive_read_new in -larchive... " >&6; }
1381813895if test ${ac_cv_lib_archive_archive_read_new+y}
1381913896then :
@@ -13850,26 +13927,84 @@ fi
1385013927printf "%s\n" "$ac_cv_lib_archive_archive_read_new" >&6; }
1385113928if test "x$ac_cv_lib_archive_archive_read_new" = xyes
1385213929then :
13853- ARCHIVE_LIB=-larchive
13854- ac_fn_c_check_header_compile " $LINENO " " archive.h" " ac_cv_header_archive_h" " $ac_includes_default "
13855- if test " x$ac_cv_header_archive_h " = xyes
13930+ ARCHIVE_LIBS=-larchive
13931+ fi
13932+
13933+
13934+ elif test $pkg_failed = untried; then
13935+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13936+ printf "%s\n" "no" >&6; }
13937+
13938+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archive_read_new in -larchive" >&5
13939+ printf %s "checking for archive_read_new in -larchive... " >&6; }
13940+ if test ${ac_cv_lib_archive_archive_read_new+y}
1385613941then :
13857- printf " %s\n" " #define HAVE_ARCHIVE_H 1" >> confdefs.h
13942+ printf %s "(cached) " >&6
13943+ else $as_nop
13944+ ac_check_lib_save_LIBS=$LIBS
13945+ LIBS="-larchive $LIBS"
13946+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947+ /* end confdefs.h. */
1385813948
13949+ /* Override any GCC internal prototype to avoid an error.
13950+ Use char because int might match the return type of a GCC
13951+ builtin and then its argument prototype would still apply. */
13952+ char archive_read_new ();
13953+ int
13954+ main (void)
13955+ {
13956+ return archive_read_new ();
13957+ ;
13958+ return 0;
13959+ }
13960+ _ACEOF
13961+ if ac_fn_c_try_link "$LINENO"
13962+ then :
13963+ ac_cv_lib_archive_archive_read_new=yes
13964+ else $as_nop
13965+ ac_cv_lib_archive_archive_read_new=no
13966+ fi
13967+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
13968+ conftest$ac_exeext conftest.$ac_ext
13969+ LIBS=$ac_check_lib_save_LIBS
13970+ fi
13971+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_archive_archive_read_new" >&5
13972+ printf "%s\n" "$ac_cv_lib_archive_archive_read_new" >&6; }
13973+ if test "x$ac_cv_lib_archive_archive_read_new" = xyes
13974+ then :
13975+ ARCHIVE_LIBS=-larchive
1385913976fi
1386013977
13978+
13979+ else
13980+ ARCHIVE_CFLAGS=$pkg_cv_ARCHIVE_CFLAGS
13981+ ARCHIVE_LIBS=$pkg_cv_ARCHIVE_LIBS
13982+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13983+ printf "%s\n" "yes" >&6; }
13984+
13985+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config found libarchive" >&5
13986+ printf "%s\n" "pkg-config found libarchive" >&6; }
13987+ CFLAGS="$ARCHIVE_CFLAGS $CFLAGS"
13988+
13989+ fi
13990+ if test -n "$ARCHIVE_LIBS" ; then
13991+ ac_fn_c_check_header_compile "$LINENO" "archive.h" "ac_cv_header_archive_h" "$ac_includes_default"
13992+ if test "x$ac_cv_header_archive_h" = xyes
13993+ then :
13994+ printf "%s\n" "#define HAVE_ARCHIVE_H 1" >>confdefs.h
13995+
1386113996fi
1386213997
13863- if test " $ac_cv_func_dlopen " = yes -a " $try_libarchive " ! = " direct" ; then
13864- ARCHIVE_LIB =$DLOPEN_LIB
13998+ if test "$ac_cv_func_dlopen" = yes -a "$try_libarchive" != "direct"; then
13999+ ARCHIVE_LIBS =$DLOPEN_LIB
1386514000
1386614001printf "%s\n" "#define CONFIG_DLOPEN_LIBARCHIVE 1" >>confdefs.h
1386714002
13868-
14003+ fi
1386914004 fi
1387014005 if test "$ac_cv_header_archive_h" != "yes"
1387114006 then
13872- ARCHIVE_LIB =
14007+ ARCHIVE_LIBS =
1387314008 fi
1387414009fi
1387514010
@@ -14553,8 +14688,8 @@ fi
1455314688if test "$FUSE_LIB" = "-lfuse3"
1455414689then
1455514690 FUSE_USE_VERSION=35
14556- CFLAGS=" $CFLAGS $fuse3_CFLAGS "
14557- LDFLAGS =" $LDFLAGS $fuse3_LDFLAGS "
14691+ CFLAGS="$fuse3_CFLAGS $CFLAGS "
14692+ FUSE_LIB ="$fuse3_LIBS "
1455814693 for ac_header in pthread.h fuse.h
1455914694do :
1456014695 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
0 commit comments