Skip to content

Commit

Permalink
configure: update for libarchive
Browse files Browse the repository at this point in the history
  • Loading branch information
josch committed Apr 2, 2023
1 parent 68267d8 commit 8980abb
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
52 changes: 52 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ SEM_INIT_LIB
FUSE_CMT
FUSE_LIB
CLOCK_GETTIME_LIB
ARCHIVE_LIB
MAGIC_LIB
SOCKET_LIB
SIZEOF_TIME_T
Expand Down Expand Up @@ -13512,6 +13513,57 @@ if test "$ac_cv_func_dlopen" = yes ; then
MAGIC_LIB=$DLOPEN_LIB
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archive_read_new in -larchive" >&5
printf %s "checking for archive_read_new in -larchive... " >&6; }
if test ${ac_cv_lib_archive_archive_read_new+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-larchive $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. */
char archive_read_new ();
int
main (void)
{
return archive_read_new ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_archive_archive_read_new=yes
else $as_nop
ac_cv_lib_archive_archive_read_new=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_archive_archive_read_new" >&5
printf "%s\n" "$ac_cv_lib_archive_archive_read_new" >&6; }
if test "x$ac_cv_lib_archive_archive_read_new" = xyes
then :
ARCHIVE_LIB=-larchive
ac_fn_c_check_header_compile "$LINENO" "archive.h" "ac_cv_header_archive_h" "$ac_includes_default"
if test "x$ac_cv_header_archive_h" = xyes
then :
printf "%s\n" "#define HAVE_ARCHIVE_H 1" >>confdefs.h

fi

fi

if test "$ac_cv_func_dlopen" = yes ; then
ARCHIVE_LIB=$DLOPEN_LIB
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
printf %s "checking for clock_gettime in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_gettime+y}
Expand Down
3 changes: 3 additions & 0 deletions lib/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
/* Define to 1 if you have the `add_key' function. */
#undef HAVE_ADD_KEY

/* Define to 1 if you have the <archive.h> header file. */
#undef HAVE_ARCHIVE_H

/* Define to 1 if you have the <attr/xattr.h> header file. */
#undef HAVE_ATTR_XATTR_H

Expand Down

0 comments on commit 8980abb

Please sign in to comment.