diff --git a/Makefile.am b/Makefile.am index 6e71698..5347f9a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,19 +30,14 @@ GETTEXT_FILES = \ EXTRA_DIST = \ $(GETTEXT_FILES) -MAINTAINERCLEANFILES = \ - Makefile.in +DISTCLEANFILES = \ + config.cache \ + config.log \ + config.status \ + Makefile \ + Makefile.in \ + po/Makevars libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck -distclean: clean - -rm -f Makefile - -rm -f config.status - -rm -f config.cache - -rm -f config.log - @for dir in ${subdirs}; do \ - (cd $$dir && $(MAKE) distclean) \ - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" - diff --git a/common/Makefile.am b/common/Makefile.am index 2433a75..f7aa524 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = \ + -I../include -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ @@ -15,11 +16,9 @@ EXTRA_DIST = \ types.h.in \ wide_string.h -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + config.h \ + types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f config.h - -rm -f types.h - -rm -f Makefile - diff --git a/m4/common.m4 b/m4/common.m4 index 71c18b8..b14eef5 100644 --- a/m4/common.m4 +++ b/m4/common.m4 @@ -1,11 +1,10 @@ dnl Checks for common headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240511 dnl Function to test if a certain feature was disabled AC_DEFUN([AX_COMMON_ARG_DISABLE], -[ - AC_ARG_ENABLE( + [AC_ARG_ENABLE( [$1], [AS_HELP_STRING( [--disable-$1], @@ -17,12 +16,11 @@ AC_DEFUN([AX_COMMON_ARG_DISABLE], [whether to disable $3], [ac_cv_enable_$2], [ac_cv_enable_$2="yes"])dnl -]) + ]) dnl Function to test if a certain feature was enabled AC_DEFUN([AX_COMMON_ARG_ENABLE], -[ - AC_ARG_ENABLE( + [AC_ARG_ENABLE( [$1], [AS_HELP_STRING( [--enable-$1], @@ -34,12 +32,11 @@ AC_DEFUN([AX_COMMON_ARG_ENABLE], [whether to enable $3], [ac_cv_enable_$2], [ac_cv_enable_$2=$4])dnl -]) + ]) dnl Function to test if the location of a certain feature was provided AC_DEFUN([AX_COMMON_ARG_WITH], -[ - AC_ARG_WITH( + [AC_ARG_WITH( [$1], [AS_HELP_STRING( [--with-$1[[=$5]]], @@ -51,21 +48,19 @@ AC_DEFUN([AX_COMMON_ARG_WITH], [whether to use $3], [ac_cv_with_$2], [ac_cv_with_$2=$4])dnl -]) + ]) -dnl Function to detect whether shared libary support should be disabled +dnl Function to detect whether shared library support should be disabled AC_DEFUN([AX_COMMON_CHECK_DISABLE_SHARED_LIBS], -[ - AX_COMMON_ARG_DISABLE( + [AX_COMMON_ARG_DISABLE( [shared-libs], [shared_libs], [disable shared library support]) -]) + ]) dnl Function to detect whether debug output should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT], -[ - AX_COMMON_ARG_ENABLE( + [AX_COMMON_ARG_ENABLE( [debug-output], [debug_output], [enable debug output], @@ -79,12 +74,11 @@ AC_DEFUN([AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT], [Define to 1 if debug output should be used.]) ac_cv_enable_debug_output=yes]) -]) + ]) dnl Function to detect whether static executables support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES], -[ - AX_COMMON_ARG_ENABLE( + [AX_COMMON_ARG_ENABLE( [static-executables], [static_executables], [build static executables (binaries)], @@ -99,12 +93,11 @@ AC_DEFUN([AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES], ac_cv_enable_static_executables=yes enable_shared=no]) -]) + ]) dnl Function to detect whether verbose output should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT], -[ - AX_COMMON_ARG_ENABLE( + [AX_COMMON_ARG_ENABLE( [verbose-output], [verbose_output], [enable verbose output], @@ -118,22 +111,20 @@ AC_DEFUN([AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT], [Define to 1 if verbose output should be used.]) ac_cv_enable_verbose_output=yes]) -]) + ]) dnl Function to detect whether static executables support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE], -[ - AX_COMMON_ARG_ENABLE( + [AX_COMMON_ARG_ENABLE( [wide-character-type], [wide_character_type], [enable wide character type support], [no]) -]) + ]) dnl Function to detect whether WINAPI support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_WINAPI], -[ - AX_COMMON_ARG_ENABLE( + [AX_COMMON_ARG_ENABLE( [winapi], [winapi], [enable WINAPI support for cross-compilation], @@ -156,13 +147,12 @@ AC_DEFUN([AX_COMMON_CHECK_ENABLE_WINAPI], [detected MSYS enabling WINAPI support for cross-compilation]) ac_cv_enable_winapi=yes], [*],[ac_cv_enable_winapi=no]) + ]) ]) -]) dnl Function to detect whether printf conversion specifier "%jd" is available AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_JD], -[ - AC_MSG_CHECKING( + [AC_MSG_CHECKING( [whether printf supports the conversion specifier "%jd"]) SAVE_CFLAGS="$CFLAGS" @@ -187,7 +177,7 @@ AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_JD], [[printf( "%jd", (off_t) 10 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no]) - ]) + ]) dnl Third try to see if the program runs correctly AS_IF( @@ -202,7 +192,7 @@ if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no], [ac_cv_cv_have_printf_jd=undetermined]) - ]) + ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" @@ -217,13 +207,12 @@ if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [Define to 1 whether printf supports the conversion specifier "%jd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_jd]) + ]) ]) -]) dnl Function to detect whether printf conversion specifier "%zd" is available AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD], -[ - AC_MSG_CHECKING( + [AC_MSG_CHECKING( [whether printf supports the conversion specifier "%zd"]) SAVE_CFLAGS="$CFLAGS" @@ -248,7 +237,7 @@ AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD], [[printf( "%zd", (size_t) 10 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no]) - ]) + ]) dnl Third try to see if the program runs correctly AS_IF( @@ -263,7 +252,7 @@ if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no], [ac_cv_cv_have_printf_zd=undetermined]) - ]) + ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" @@ -278,13 +267,12 @@ if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [Define to 1 whether printf supports the conversion specifier "%zd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_zd]) + ]) ]) -]) dnl Function to detect if common dependencies are available AC_DEFUN([AX_COMMON_CHECK_LOCAL], -[ - dnl Headers included in common/common.h + [dnl Headers included in common/common.h AS_IF( [test "x$ac_cv_enable_winapi" = xyes], [AC_CHECK_HEADERS([windows.h]) @@ -294,13 +282,13 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing header: windows.h header is required to compile with winapi support], [1]) + ]) ]) - ]) AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_HEADERS([libintl.h]) - ]) + ]) dnl Headers included in common/types.h AC_CHECK_HEADERS([limits.h]) @@ -319,56 +307,56 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing function: fclose], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_feof" != xyes], [AC_MSG_FAILURE( [Missing function: feof], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_fgets" != xyes], [AC_MSG_FAILURE( [Missing function: fgets], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_fopen" != xyes], [AC_MSG_FAILURE( [Missing function: fopen], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_fread" != xyes], [AC_MSG_FAILURE( [Missing function: fread], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes], [AC_MSG_FAILURE( [Missing function: fseeko and fseeko64], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_fwrite" != xyes], [AC_MSG_FAILURE( [Missing function: fwrite], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_vfprintf" != xyes], [AC_MSG_FAILURE( [Missing function: vfprintf], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], @@ -379,8 +367,8 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing function: fgetws], [1]) + ]) ]) - ]) dnl Memory functions used in common/memory.h AC_CHECK_FUNCS([free malloc memcmp memcpy memset realloc]) @@ -390,42 +378,42 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing function: free], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_malloc" != xyes], [AC_MSG_FAILURE( [Missing function: malloc], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memcmp" != xyes], [AC_MSG_FAILURE( [Missing function: memcmp], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memcpy" != xyes], [AC_MSG_FAILURE( [Missing function: memcpy], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memset" != xyes], [AC_MSG_FAILURE( [Missing function: memset], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_realloc" != xyes], [AC_MSG_FAILURE( [Missing function: realloc], [1]) - ]) + ]) dnl Narrow character string functions used in common/narrow_string.h AC_CHECK_FUNCS([memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf]) @@ -435,21 +423,21 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing functions: memchr and strchr], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes], [AC_MSG_FAILURE( [Missing functions: memcmp and strncmp], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes], [AC_MSG_FAILURE( [Missing functions: memcpy and strncpy], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memrchr" = xyes], @@ -458,56 +446,56 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], AS_IF( [test "x$ac_cv_decl_memrchr" != xyes], [ac_cv_func_memrchr=no]) - ]) + ]) AS_IF( [test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes], [AC_MSG_FAILURE( [Missing functions: strrchr and memrchr], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_snprintf" != xyes], [AC_MSG_FAILURE( [Missing function: snprintf], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_sscanf" != xyes], [AC_MSG_FAILURE( [Missing function: sscanf], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_strlen" != xyes], [AC_MSG_FAILURE( [Missing function: strlen], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes], [AC_MSG_FAILURE( [Missing functions: strncasecmp, strcasecmp and strnicmp], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_strstr" != xyes], [AC_MSG_FAILURE( [Missing function: strstr], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_vsnprintf" != xyes], [AC_MSG_FAILURE( [Missing function: vsnprintf], [1]) - ]) + ]) dnl Wide character string functions used in common/wide_string.h AS_IF( @@ -519,60 +507,97 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL], [AC_MSG_FAILURE( [Missing function: swprintf], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemchr and wcschr], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemcmp and wcsncmp], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemcpy and wcsncpy], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemrchr and wcsrchr], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wcslen" != xyes], [AC_MSG_FAILURE( [Missing function: wcslen], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes], [AC_MSG_FAILURE( [Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower], [1]) - ]) + ]) AS_IF( [test "x$ac_cv_func_wcsstr" != xyes], [AC_MSG_FAILURE( [Missing function: wcsstr], [1]) + ]) ]) - ]) dnl Check for printf conversion specifier support AX_COMMON_CHECK_FUNC_PRINTF_JD AX_COMMON_CHECK_FUNC_PRINTF_ZD -]) + ]) + +dnl Function to test if a library with specific functions is available +AC_DEFUN([AX_CHECK_LIB_FUNCTIONS], + [ac_cv_$1=yes + + m4_foreach( + [function], + [$3], + [AC_CHECK_LIB( + [$2], + [function], + [ac_cv_$1_dummy=yes], + [ac_cv_$1=no]) + ]) + ]) + +dnl Function to check if an user specified library directory exists +AC_DEFUN([AX_CHECK_LIB_DIRECTORY_EXISTS], + [AS_IF( + [test -d "$ac_cv_with_$1"], + [CFLAGS="$CFLAGS -I${ac_cv_with_$1}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_$1}/lib"], + [AC_MSG_FAILURE( + [no such directory: $ac_cv_with_$1], + [1]) + ]) + ]) + +dnl Function to warn if no supported library was found in an user specified directory +AC_DEFUN([AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE], + [AS_IF( + [test "x$ac_cv_$1" != xyes && test "x$ac_cv_with_$1" != x && test "x$ac_cv_with_$1" != xauto-detect && test "x$ac_cv_with_$1" != xyes], + [AC_MSG_FAILURE( + [unable to find supported $1 in directory: $ac_cv_with_$1], + [1]) + ]) + ]) diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index 309ec51..aa01d93 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -501,7 +501,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], + [test "x$ac_cv_libcdata" != xyes && test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdata in directory: $ac_cv_with_libcdata], [1]) @@ -531,7 +531,7 @@ dnl Function to detect if libcdata dependencies are available AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcdata_CPPFLAGS="-I../libcdata"; + ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index 7d7f40f..44ce6f3 100644 --- a/m4/libcerror.m4 +++ b/m4/libcerror.m4 @@ -1,6 +1,6 @@ dnl Checks for libcerror required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240511 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcerror"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcerror], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcerror])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,68 +38,23 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcerror_h" = xno], [ac_cv_libcerror=no], - [dnl Check for the individual functions - ac_cv_libcerror=yes - - AC_CHECK_LIB( - cerror, - libcerror_get_version, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - - dnl Error functions - AC_CHECK_LIB( - cerror, - libcerror_error_free, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_set, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_matches, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_fprint, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_sprint, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_backtrace_fprint, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - AC_CHECK_LIB( - cerror, - libcerror_error_backtrace_sprint, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) - - dnl System error functions - AC_CHECK_LIB( - cerror, - libcerror_system_set_error, - [ac_cv_libcerror_dummy=yes], - [ac_cv_libcerror=no]) + [AX_CHECK_LIB_FUNCTIONS( + [libcerror], + [cerror], + [[libcerror_get_version], + [libcerror_error_free], + [libcerror_error_set], + [libcerror_error_matches], + [libcerror_error_fprint], + [libcerror_error_sprint], + [libcerror_error_backtrace_fprint], + [libcerror_error_backtrace_sprint], + [libcerror_system_set_error]]) ac_cv_libcerror_LIBADD="-lcerror"]) ]) - AS_IF( - [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libcerror in directory: $ac_cv_with_libcerror], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcerror]) ]) AS_IF( @@ -169,7 +116,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL], ]) ]) - ac_cv_libcerror_CPPFLAGS="-I../libcerror"; + ac_cv_libcerror_CPPFLAGS="-I../libcerror -I\$(top_srcdir)/libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local diff --git a/m4/libcfile.m4 b/m4/libcfile.m4 index 5596e9c..81ac5f1 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -207,7 +207,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], + [test "x$ac_cv_libcfile" != xyes && test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], [AC_MSG_FAILURE( [unable to find supported libcfile in directory: $ac_cv_with_libcfile], [1]) @@ -361,7 +361,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [1]) ]) - ac_cv_libcfile_CPPFLAGS="-I../libcfile"; + ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index d82d1fd..bd5a10e 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -130,7 +130,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], + [test "x$ac_cv_libclocale" != xyes && test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], [AC_MSG_FAILURE( [unable to find supported libclocale in directory: $ac_cv_with_libclocale], [1]) @@ -223,7 +223,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET - ac_cv_libclocale_CPPFLAGS="-I../libclocale"; + ac_cv_libclocale_CPPFLAGS="-I../libclocale -I\$(top_srcdir)/libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index 41cf9e8..e382bdb 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -100,7 +100,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], + [test "x$ac_with_libcnotify" != xyes && test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], [AC_MSG_FAILURE( [unable to find supported libcnotify in directory: $ac_cv_with_libcnotify], [1]) @@ -141,7 +141,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) - ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; + ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local diff --git a/m4/libcthreads.m4 b/m4/libcthreads.m4 index 6503ce5..c9c4e46 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -250,7 +250,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], + [test "x$ac_cv_libcthreads" != xyes && test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], [AC_MSG_FAILURE( [unable to find supported libcthreads in directory: $ac_cv_with_libcthreads], [1]) @@ -292,7 +292,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL], AS_IF( [test "x$ac_cv_libcthreads_multi_threading" != xno], - [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; + [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local], diff --git a/m4/libfcrypto.m4 b/m4/libfcrypto.m4 index 7ba5233..0265d7e 100644 --- a/m4/libfcrypto.m4 +++ b/m4/libfcrypto.m4 @@ -1,6 +1,6 @@ dnl Checks for libfcrypto required headers and functions dnl -dnl Version: 20200104 +dnl Version: 20240413 dnl Function to detect if libfcrypto is available dnl ac_libfcrypto_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -9,8 +9,10 @@ AC_DEFUN([AX_LIBFCRYPTO_CHECK_LIB], [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfcrypto" = xno], [ac_cv_libfcrypto=no], [dnl Check if the directory provided as parameter exists + dnl For both --with-libfcrypto which returns "yes" and --with-libfcrypto= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfcrypto" != x && test "x$ac_cv_with_libfcrypto" != xauto-detect], + [test "x$ac_cv_with_libfcrypto" != x && test "x$ac_cv_with_libfcrypto" != xauto-detect && test "x$ac_cv_with_libfcrypto" != xyes], [AS_IF( [test -d "$ac_cv_with_libfcrypto"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfcrypto}/include" @@ -107,8 +109,9 @@ AC_DEFUN([AX_LIBFCRYPTO_CHECK_LIB], ac_cv_libfcrypto_LIBADD="-lfcrypto"]) ]) + AS_IF( - [test "x$ac_cv_with_libfcrypto" != x && test "x$ac_cv_with_libfcrypto" != xauto-detect && test "x$ac_cv_libfcrypto" != xyes], + [test "x$ac_cv_libfcrypto" != xyes && test "x$ac_cv_with_libfcrypto" != x && test "x$ac_cv_with_libfcrypto" != xauto-detect && test "x$ac_cv_with_libfcrypto" != xyes], [AC_MSG_FAILURE( [unable to find supported libfcrypto in directory: $ac_cv_with_libfcrypto], [1]) @@ -138,7 +141,7 @@ dnl Function to detect if libfcrypto dependencies are available AC_DEFUN([AX_LIBFCRYPTO_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfcrypto_CPPFLAGS="-I../libfcrypto"; + ac_cv_libfcrypto_CPPFLAGS="-I../libfcrypto -I\$(top_srcdir)/libfcrypto"; ac_cv_libfcrypto_LIBADD="../libfcrypto/libfcrypto.la"; ac_cv_libfcrypto=local diff --git a/m4/libfdatetime.m4 b/m4/libfdatetime.m4 index 13b8cf3..d8f1066 100644 --- a/m4/libfdatetime.m4 +++ b/m4/libfdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libfdatetime required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfdatetime is available dnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -463,7 +463,7 @@ AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], + [test "x$ac_cv_libfdatetime" != xyes && test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], [AC_MSG_FAILURE( [unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime], [1]) @@ -493,7 +493,7 @@ dnl Function to detect if libfdatetime dependencies are available AC_DEFUN([AX_LIBFDATETIME_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; + ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime -I\$(top_srcdir)/libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local diff --git a/m4/libfguid.m4 b/m4/libfguid.m4 index 6d1cd72..5e44bb6 100644 --- a/m4/libfguid.m4 +++ b/m4/libfguid.m4 @@ -1,6 +1,6 @@ dnl Checks for libfguid required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfguid is available dnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -111,7 +111,7 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], + [test "x$ac_cv_libfguid" != xyes && test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], [AC_MSG_FAILURE( [unable to find supported libfguid in directory: $ac_cv_with_libfguid], [1]) @@ -141,7 +141,7 @@ dnl Function to detect if libfguid dependencies are available AC_DEFUN([AX_LIBFGUID_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfguid_CPPFLAGS="-I../libfguid"; + ac_cv_libfguid_CPPFLAGS="-I../libfguid -I\$(top_srcdir)/libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local diff --git a/m4/libfmos.m4 b/m4/libfmos.m4 index 9d4015c..842aa13 100644 --- a/m4/libfmos.m4 +++ b/m4/libfmos.m4 @@ -1,6 +1,6 @@ dnl Checks for libfmos required headers and functions dnl -dnl Version: 20220804 +dnl Version: 20240413 dnl Function to detect if libfmos is available dnl ac_libfmos_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFMOS_CHECK_LIB], [ac_cv_libfmos=no], [ac_cv_libfmos=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfmos which returns "yes" and --with-libfmos= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect], + [test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect && test "x$ac_cv_with_libfmos" != xyes], [AS_IF( [test -d "$ac_cv_with_libfmos"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfmos}/include" @@ -76,8 +78,9 @@ AC_DEFUN([AX_LIBFMOS_CHECK_LIB], ac_cv_libfmos_LIBADD="-lfmos"]) ]) + AS_IF( - [test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect && test "x$ac_cv_libfmos" != xyes], + [test "x$ac_cv_libfmos" != xyes && test "x$ac_cv_with_libfmos" != x && test "x$ac_cv_with_libfmos" != xauto-detect && test "x$ac_cv_with_libfmos" != xyes], [AC_MSG_FAILURE( [unable to find supported libfmos in directory: $ac_cv_with_libfmos], [1]) @@ -107,7 +110,7 @@ dnl Function to detect if libfmos dependencies are available AC_DEFUN([AX_LIBFMOS_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfmos_CPPFLAGS="-I../libfmos"; + ac_cv_libfmos_CPPFLAGS="-I../libfmos -I\$(top_srcdir)/libfmos"; ac_cv_libfmos_LIBADD="../libfmos/libfmos.la"; ac_cv_libfmos=local diff --git a/m4/libfplist.m4 b/m4/libfplist.m4 index 61236cc..d0f3fb1 100644 --- a/m4/libfplist.m4 +++ b/m4/libfplist.m4 @@ -1,6 +1,6 @@ dnl Functions for libfplist dnl -dnl Version: 20230218 +dnl Version: 20240413 dnl Function to detect if libfplist is available dnl ac_libfplist_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFPLIST_CHECK_LIB], [ac_cv_libfplist=no], [ac_cv_libfplist=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfplist which returns "yes" and --with-libfplist= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfplist" != x && test "x$ac_cv_with_libfplist" != xauto-detect], + [test "x$ac_cv_with_libfplist" != x && test "x$ac_cv_with_libfplist" != xauto-detect && test "x$ac_cv_with_libfplist" != xyes], [AS_IF( [test -d "$ac_cv_with_libfplist"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfplist}/include" @@ -139,6 +141,13 @@ AC_DEFUN([AX_LIBFPLIST_CHECK_LIB], ac_cv_libfplist_LIBADD="-lfplist" ]) ]) + + AS_IF( + [test "x$ac_cv_libfplist" != xyes && test "x$ac_cv_with_libfplist" != x && test "x$ac_cv_with_libfplist" != xauto-detect && test "x$ac_cv_with_libfplist" != xyes], + [AC_MSG_FAILURE( + [unable to find supported libfplist in directory: $ac_cv_with_libfplist], + [1]) + ]) ]) AS_IF( @@ -165,7 +174,7 @@ AC_DEFUN([AX_LIBFPLIST_CHECK_LOCAL], [AC_PROG_LEX(noyywrap) AC_PROG_YACC - ac_cv_libfplist_CPPFLAGS="-I../libfplist"; + ac_cv_libfplist_CPPFLAGS="-I../libfplist -I\$(top_srcdir)/libfplist"; ac_cv_libfplist_LIBADD="../libfplist/libfplist.la"; ac_cv_libfplist=local diff --git a/m4/libfvalue.m4 b/m4/libfvalue.m4 index 18228f2..2a79f7d 100644 --- a/m4/libfvalue.m4 +++ b/m4/libfvalue.m4 @@ -1,6 +1,6 @@ dnl Checks for libfvalue required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfvalue is available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -593,7 +593,7 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], + [test "x$ac_cv_libfvalue" != xyes && test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AC_MSG_FAILURE( [unable to find supported libfvalue in directory: $ac_cv_with_libfvalue], [1]) @@ -623,7 +623,7 @@ dnl Function to detect if libfvalue dependencies are available AC_DEFUN([AX_LIBFVALUE_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; + ac_cv_libfvalue_CPPFLAGS="-I../libfvalue -I\$(top_srcdir)/libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local diff --git a/m4/libfwevt.m4 b/m4/libfwevt.m4 index 0a68fc4..683063a 100644 --- a/m4/libfwevt.m4 +++ b/m4/libfwevt.m4 @@ -1,6 +1,6 @@ dnl Checks for libfwevt required headers and functions dnl -dnl Version: 20220119 +dnl Version: 20240501 dnl Function to detect if libfwevt is available dnl ac_libfwevt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFWEVT_CHECK_LIB], [ac_cv_libfwevt=no], [ac_cv_libfwevt=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfwevt which returns "yes" and --with-libfwevt= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xauto-detect], + [test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xauto-detect && test "x$ac_cv_with_libfwevt" != xyes], [AS_IF( [test -d "$ac_cv_with_libfwevt"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfwevt}/include" @@ -26,7 +28,7 @@ AC_DEFUN([AX_LIBFWEVT_CHECK_LIB], [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfwevt], - [libfwevt >= 20211121], + [libfwevt >= 20240501], [ac_cv_libfwevt=yes], [ac_cv_libfwevt=check]) ]) @@ -471,6 +473,11 @@ AC_DEFUN([AX_LIBFWEVT_CHECK_LIB], [ac_cv_libfwevt=no]) dnl XML tag functions + AC_CHECK_LIB( + fwevt, + libfwevt_xml_tag_free, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, libfwevt_xml_tag_get_utf8_name_size, @@ -493,74 +500,117 @@ AC_DEFUN([AX_LIBFWEVT_CHECK_LIB], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_utf8_value_size, + libfwevt_xml_tag_get_value, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_utf8_value, + libfwevt_xml_tag_get_number_of_attributes, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_utf16_value_size, + libfwevt_xml_tag_get_attribute_by_index, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_utf16_value, + libfwevt_xml_tag_get_attribute_by_utf8_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_number_of_attributes, + libfwevt_xml_tag_get_attribute_by_utf16_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_attribute_by_index, + libfwevt_xml_tag_get_number_of_elements, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_attribute_by_utf8_name, + libfwevt_xml_tag_get_element_by_index, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_attribute_by_utf16_name, + libfwevt_xml_tag_get_element_by_utf8_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_number_of_elements, + libfwevt_xml_tag_get_element_by_utf16_name, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_element_by_index, + libfwevt_xml_tag_get_flags, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) + + dnl XML value functions AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_element_by_utf8_name, + libfwevt_xml_value_free, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_element_by_utf16_name, + libfwevt_xml_value_get_data_size, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) AC_CHECK_LIB( fwevt, - libfwevt_xml_tag_get_flags, + libfwevt_xml_value_copy_data, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_value_get_data_as_8bit_integer, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_value_get_data_as_32bit_integer, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_value_get_data_as_64bit_integer, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_value_get_data_as_filetime, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_xml_value_get_utf8_string_size, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_xml_value_copy_to_utf8_string, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_xml_value_get_utf16_string_size, + [ac_cv_libfwevt_dummy=yes], + [ac_cv_libfwevt=no]) + AC_CHECK_LIB( + fwevt, + libfwevt_xml_value_copy_to_utf16_string, [ac_cv_libfwevt_dummy=yes], [ac_cv_libfwevt=no]) ac_cv_libfwevt_LIBADD="-lfwevt"]) ]) + AS_IF( - [test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xauto-detect && test "x$ac_cv_libfwevt" != xyes], + [test "x$ac_cv_libfwevt" != xyes && test "x$ac_cv_with_libfwevt" != x && test "x$ac_cv_with_libfwevt" != xauto-detect && test "x$ac_cv_with_libfwevt" != xyes], [AC_MSG_FAILURE( [unable to find supported libfwevt in directory: $ac_cv_with_libfwevt], [1]) @@ -590,7 +640,7 @@ dnl Function to detect if libfwevt dependencies are available AC_DEFUN([AX_LIBFWEVT_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfwevt_CPPFLAGS="-I../libfwevt"; + ac_cv_libfwevt_CPPFLAGS="-I../libfwevt -I\$(top_srcdir)/libfwevt"; ac_cv_libfwevt_LIBADD="../libfwevt/libfwevt.la"; ac_cv_libfwevt=local diff --git a/m4/libfwnt.m4 b/m4/libfwnt.m4 index b8ca6f4..5337c17 100644 --- a/m4/libfwnt.m4 +++ b/m4/libfwnt.m4 @@ -1,6 +1,6 @@ dnl Checks for libfwnt required headers and functions dnl -dnl Version: 20191217 +dnl Version: 20240413 dnl Function to detect if libfwnt is available dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB], [ac_cv_libfwnt=no], [ac_cv_libfwnt=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfwnt which returns "yes" and --with-libfwnt= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect], + [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], [AS_IF( [test -d "$ac_cv_with_libfwnt"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" @@ -218,8 +220,9 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB], ac_cv_libfwnt_LIBADD="-lfwnt"]) ]) + AS_IF( - [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_libfwnt" != xyes], + [test "x$ac_cv_libfwnt" != xyes && test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], [AC_MSG_FAILURE( [unable to find supported libfwnt in directory: $ac_cv_with_libfwnt], [1]) @@ -249,7 +252,7 @@ dnl Function to detect if libfwnt dependencies are available AC_DEFUN([AX_LIBFWNT_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfwnt_CPPFLAGS="-I../libfwnt"; + ac_cv_libfwnt_CPPFLAGS="-I../libfwnt -I\$(top_srcdir)/libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local diff --git a/m4/libhmac.m4 b/m4/libhmac.m4 index 9f4b90b..b902eb6 100644 --- a/m4/libhmac.m4 +++ b/m4/libhmac.m4 @@ -1,6 +1,6 @@ dnl Checks for libhmac required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libhmac is available dnl ac_libhmac_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -169,7 +169,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], + [test "x$ac_cv_libhmac" != xyes && test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], [AC_MSG_FAILURE( [unable to find supported libhmac in directory: $ac_cv_with_libhmac], [1]) @@ -247,7 +247,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LOCAL], [ac_cv_libhmac_sha512=local], [ac_cv_libhmac_sha512=$ac_cv_libcrypto_sha512]) - ac_cv_libhmac_CPPFLAGS="-I../libhmac"; + ac_cv_libhmac_CPPFLAGS="-I../libhmac -I\$(top_srcdir)/libhmac"; ac_cv_libhmac_LIBADD="../libhmac/libhmac.la"; ac_cv_libhmac=local diff --git a/m4/libuna.m4 b/m4/libuna.m4 index b1301f4..996ac60 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -946,7 +946,7 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], + [test "x$ac_cv_libuna" != xyes && test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], [AC_MSG_FAILURE( [unable to find supported libuna in directory: $ac_cv_with_libuna], [1]) @@ -976,7 +976,7 @@ dnl Function to detect if libuna dependencies are available AC_DEFUN([AX_LIBUNA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libuna_CPPFLAGS="-I../libuna"; + ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local diff --git a/m4/pthread.m4 b/m4/pthread.m4 index e4fed14..041b6dd 100644 --- a/m4/pthread.m4 +++ b/m4/pthread.m4 @@ -1,6 +1,6 @@ dnl Functions for pthread dnl -dnl Version: 20240308 +dnl Version: 20240511 dnl Function to detect if pthread is available AC_DEFUN([AX_PTHREAD_CHECK_LIB], @@ -13,13 +13,7 @@ AC_DEFUN([AX_PTHREAD_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes], - [AS_IF( - [test -d "$ac_cv_with_pthread"], - [CFLAGS="$CFLAGS -I${ac_cv_with_pthread}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_pthread}/lib"], - [AC_MSG_WARN([no such directory: $ac_cv_with_pthread]) - ]) - ]) + [AX_CHECK_LIB_DIRECTORY_EXISTS([pthread])]) ]) AS_IF( @@ -30,116 +24,32 @@ AC_DEFUN([AX_PTHREAD_CHECK_LIB], AS_IF( [test "x$ac_cv_header_pthread_h" = xno], [ac_cv_pthread=no], - [dnl Check for the individual functions - ac_cv_pthread=pthread - - dnl Thread functions - AC_CHECK_LIB( - pthread, - pthread_create, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_exit, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_join, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - - dnl Condition functions - AC_CHECK_LIB( - pthread, - pthread_cond_init, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_cond_destroy, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_cond_broadcast, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_cond_signal, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_cond_wait, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - - dnl Mutex functions - AC_CHECK_LIB( - pthread, - pthread_mutex_init, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_mutex_destroy, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_mutex_lock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_mutex_trylock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_mutex_unlock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - - dnl Read/Write lock functions - AC_CHECK_LIB( - pthread, - pthread_rwlock_init, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_rwlock_destroy, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_rwlock_rdlock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_rwlock_wrlock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - AC_CHECK_LIB( - pthread, - pthread_rwlock_unlock, - [ac_pthread_dummy=yes], - [ac_cv_pthread=no]) - - ac_cv_pthread_LIBADD="-lpthread"; + [AX_CHECK_LIB_FUNCTIONS( + [pthread], + [pthread], + [[pthread_create], + [pthread_exit], + [pthread_join], + [pthread_cond_init], + [pthread_cond_destroy], + [pthread_cond_broadcast], + [pthread_cond_signal], + [pthread_cond_wait], + [pthread_mutex_init], + [pthread_mutex_destroy], + [pthread_mutex_lock], + [pthread_mutex_trylock], + [pthread_mutex_unlock], + [pthread_rwlock_init], + [pthread_rwlock_destroy], + [pthread_rwlock_rdlock], + [pthread_rwlock_wrlock], + [pthread_rwlock_unlock]]) + + ac_cv_pthread_LIBADD="-lpthread" ]) - AS_IF( - [test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes], - [AC_MSG_FAILURE( - [unable to find supported pthread in directory: $ac_cv_with_pthread], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([pthread]) ]) AS_IF( diff --git a/m4/zlib.m4 b/m4/zlib.m4 index a153320..3490090 100644 --- a/m4/zlib.m4 +++ b/m4/zlib.m4 @@ -1,6 +1,6 @@ dnl Checks for zlib required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240314 dnl Function to detect if zlib is available AC_DEFUN([AX_ZLIB_CHECK_LIB], @@ -66,7 +66,7 @@ AC_DEFUN([AX_ZLIB_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], + [test "x$ac_cv_zlib" != xyes && test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], [AC_MSG_FAILURE( [unable to find supported zlib in directory: $ac_cv_with_zlib], [1]) diff --git a/msvscpp/Makefile.am b/msvscpp/Makefile.am index 968f2f4..5d4bd44 100644 --- a/msvscpp/Makefile.am +++ b/msvscpp/Makefile.am @@ -65,9 +65,7 @@ MSVSCPP_FILES = \ EXTRA_DIST = \ $(MSVSCPP_FILES) -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/msvscpp/assorted.sln b/msvscpp/assorted.sln index b2bb7c7..0013f7b 100644 --- a/msvscpp/assorted.sln +++ b/msvscpp/assorted.sln @@ -322,7 +322,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfwevt", "libfwevt\libfwe {12DF7DB4-FC19-44F7-89B6-B7221EA77BE6} = {12DF7DB4-FC19-44F7-89B6-B7221EA77BE6} {F781EBD4-ECC6-49D4-8C14-EA0687BD2BD8} = {F781EBD4-ECC6-49D4-8C14-EA0687BD2BD8} {16510E82-C099-4A58-8ABE-E62D36E945E8} = {16510E82-C099-4A58-8ABE-E62D36E945E8} - {83818E3D-46FD-4903-81DC-34C25F9194EA} = {83818E3D-46FD-4903-81DC-34C25F9194EA} + {8E44F7E7-B792-4505-B5F5-9CC1335F5859} = {8E44F7E7-B792-4505-B5F5-9CC1335F5859} {2B851ED2-22C8-4BB6-AE22-E49A75536FF5} = {2B851ED2-22C8-4BB6-AE22-E49A75536FF5} EndProjectSection EndProject diff --git a/msvscpp/libfwevt/libfwevt.vcproj b/msvscpp/libfwevt/libfwevt.vcproj index 298f163..4ee0778 100644 --- a/msvscpp/libfwevt/libfwevt.vcproj +++ b/msvscpp/libfwevt/libfwevt.vcproj @@ -39,8 +39,8 @@ /> + + + + @@ -166,6 +174,14 @@ RelativePath="..\..\libfwevt\libfwevt_event.c" > + + + + @@ -214,6 +230,10 @@ RelativePath="..\..\libfwevt\libfwevt_xml_document.c" > + + @@ -226,6 +246,10 @@ RelativePath="..\..\libfwevt\libfwevt_xml_token.c" > + + + + + + @@ -260,6 +292,14 @@ RelativePath="..\..\libfwevt\libfwevt_extern.h" > + + + + @@ -280,12 +320,16 @@ RelativePath="..\..\libfwevt\libfwevt_libcnotify.h" > + + + + @@ -352,6 +400,10 @@ RelativePath="..\..\libfwevt\libfwevt_xml_token.h" > + + > ${LOCAL_LIB}-$$.sed; sed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM}; @@ -140,7 +141,7 @@ SED_SCRIPT="/^$/ { then if ! test -f "m4/libuna.m4"; then - sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; + sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I../libuna -I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; fi fi diff --git a/tests/Makefile.am b/tests/Makefile.am index 515b3d1..7c2cc30 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,8 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @@ -220,9 +220,7 @@ assorted_test_xor64_LDADD = \ @LIBCNOTIFY_LIBADD@ \ @LIBCERROR_LIBADD@ -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/tests/test_tools.sh b/tests/test_tools.sh index 8a2d3ee..982eaff 100755 --- a/tests/test_tools.sh +++ b/tests/test_tools.sh @@ -1,7 +1,7 @@ #!/bin/bash # Tests tools functions. # -# Version: 20190101 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -134,12 +134,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then