From 701994265f14edb841e996f07e09d821efe766fc Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 28 May 2024 10:16:41 +0200 Subject: [PATCH] Applied updates --- .github/workflows/build.yml | 2 +- configure.ac | 2 +- m4/common.m4 | 212 ++++--- m4/libbfio.m4 | 319 ++-------- m4/libcdata.m4 | 558 +++--------------- m4/libcerror.m4 | 85 +-- m4/libcfile.m4 | 180 ++---- m4/libclocale.m4 | 79 +-- m4/libcnotify.m4 | 81 +-- m4/libcpath.m4 | 120 +--- m4/libcsplit.m4 | 114 +--- m4/libcthreads.m4 | 257 ++------- m4/libfcache.m4 | 145 +---- m4/libfdata.m4 | 530 ++++------------- m4/libfvalue.m4 | 663 ++++----------------- m4/libhmac.m4 | 161 +----- m4/libuna.m4 | 1087 ++++++----------------------------- m4/pthread.m4 | 144 +---- 18 files changed, 932 insertions(+), 3807 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 257a7cb..e253595 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,7 +155,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install build dependencies diff --git a/configure.ac b/configure.ac index 14a4edb..351892f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libsmraw], - [20240506], + [20240528], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/m4/common.m4 b/m4/common.m4 index 71c18b8..c2ea816 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: 20240513 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,128 @@ 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 a specific definition is available +AC_DEFUN([AX_CHECK_LIB_DEFINITION], + [AC_CACHE_CHECK( + [if `$2' is defined], + [ac_cv_$1_definition_$2], + [AC_LANG_PUSH(C) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <$1.h>]], + [[int test = $2; + +return( 0 ); ]] + )], + [ac_cv_$1_definition_$2=yes], + [ac_cv_$1_definition_$2=no]) + AC_LANG_POP(C)]) + + AS_IF( + [test "x$ac_cv_$1_definition_$2" != xyes], + [ac_cv_$1=no]) + ]) + +dnl Function to test if a library with specific definitions is available +AC_DEFUN([AX_CHECK_LIB_DEFINITIONS], + [m4_foreach( + [definition], + [$2], + [AX_CHECK_LIB_DEFINITION( + [$1], + [definition]) + ]) + ]) + +dnl Function to test if a library with specific functions is available +AC_DEFUN([AX_CHECK_LIB_FUNCTIONS], + [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/libbfio.m4 b/m4/libbfio.m4 index 112bac6..caebad1 100644 --- a/m4/libbfio.m4 +++ b/m4/libbfio.m4 @@ -1,6 +1,6 @@ dnl Checks for libbfio required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240518 dnl Function to detect if libbfio is available dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libbfio"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libbfio], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libbfio])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -67,268 +59,69 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libbfio_h" = xno], [ac_cv_libbfio=no], - [dnl Check for the individual functions - ac_cv_libbfio=yes - - AC_CHECK_LIB( - bfio, - libbfio_get_version, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - dnl Handle functions - AC_CHECK_LIB( - bfio, - libbfio_handle_free, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_open, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_close, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_exists, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_read_buffer, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_read_buffer_at_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_write_buffer, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_write_buffer_at_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_seek_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - AC_CHECK_LIB( - bfio, - libbfio_handle_is_open, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_get_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_get_size, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_set_track_offsets_read, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_get_number_of_offsets_read, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_handle_get_offset_read, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - dnl File functions - AC_CHECK_LIB( - bfio, - libbfio_file_initialize, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_file_get_name_size, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_file_get_name, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_file_set_name, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - AS_IF( - [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - bfio, - libbfio_file_get_name_size_wide, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_file_get_name_wide, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_file_set_name_wide, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - ]) + [ac_cv_libbfio=yes - dnl Pool functions - AC_CHECK_LIB( - bfio, - libbfio_pool_initialize, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_free, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_clone, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - AC_CHECK_LIB( - bfio, - libbfio_pool_get_number_of_handles, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_get_handle, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_set_handle, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_append_handle, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_remove_handle, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_get_maximum_number_of_open_handles, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_set_maximum_number_of_open_handles, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - AC_CHECK_LIB( - bfio, - libbfio_pool_open, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_reopen, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_close, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_close_all, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_read_buffer, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_read_buffer_at_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_write_buffer, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_write_buffer_at_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_seek_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_get_offset, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - AC_CHECK_LIB( - bfio, - libbfio_pool_get_size, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) - - dnl File pool functions - AC_CHECK_LIB( - bfio, - libbfio_file_pool_open, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) + AX_CHECK_LIB_FUNCTIONS( + [libbfio], + [bfio], + [[libbfio_get_version], + [libbfio_handle_free], + [libbfio_handle_open], + [libbfio_handle_close], + [libbfio_handle_exists], + [libbfio_handle_read_buffer], + [libbfio_handle_read_buffer_at_offset], + [libbfio_handle_write_buffer], + [libbfio_handle_write_buffer_at_offset], + [libbfio_handle_seek_offset], + [libbfio_handle_is_open], + [libbfio_handle_get_offset], + [libbfio_handle_get_size], + [libbfio_handle_set_track_offsets_read], + [libbfio_handle_get_number_of_offsets_read], + [libbfio_handle_get_offset_read], + [libbfio_file_initialize], + [libbfio_file_get_name_size], + [libbfio_file_get_name], + [libbfio_file_set_name], + [libbfio_pool_initialize], + [libbfio_pool_free], + [libbfio_pool_clone], + [libbfio_pool_get_number_of_handles], + [libbfio_pool_get_handle], + [libbfio_pool_set_handle], + [libbfio_pool_append_handle], + [libbfio_pool_remove_handle], + [libbfio_pool_get_maximum_number_of_open_handles], + [libbfio_pool_set_maximum_number_of_open_handles], + [libbfio_pool_open], + [libbfio_pool_reopen], + [libbfio_pool_close], + [libbfio_pool_close_all], + [libbfio_pool_read_buffer], + [libbfio_pool_read_buffer_at_offset], + [libbfio_pool_write_buffer], + [libbfio_pool_write_buffer_at_offset], + [libbfio_pool_seek_offset], + [libbfio_pool_get_offset], + [libbfio_pool_get_size], + [libbfio_file_pool_open]]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - bfio, - libbfio_file_pool_open_wide, - [ac_cv_libbfio_dummy=yes], - [ac_cv_libbfio=no]) + [AX_CHECK_LIB_FUNCTIONS( + [libbfio], + [bfio], + [[libbfio_file_get_name_size_wide], + [libbfio_file_get_name_wide], + [libbfio_file_set_name_wide], + [libbfio_file_pool_open_wide]]) ]) ac_cv_libbfio_LIBADD="-lbfio"]) ]) - AS_IF( - [test "x$ac_cv_libbfio" != xyes && test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libbfio in directory: $ac_cv_with_libbfio], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libbfio]) ]) AS_IF( diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index aa01d93..74cea9d 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240514 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcdata"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcdata}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdata}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcdata], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcdata])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,466 +38,102 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcdata_h" = xno], [ac_cv_libcdata=no], - [dnl Check for the individual functions - ac_cv_libcdata=yes - - AC_CHECK_LIB( - cdata, - libcdata_get_version, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - - dnl Array functions - AC_CHECK_LIB( - cdata, - libcdata_array_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_empty, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_clone, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_resize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_reverse, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_get_number_of_entries, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_get_entry_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_get_entry_by_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_set_entry_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_prepend_entry, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_append_entry, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_insert_entry, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_array_remove_entry, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - - dnl Balanced tree functions - AC_CHECK_LIB( - cdata, - libcdata_btree_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_get_number_of_values, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_get_value_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_get_value_by_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_insert_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_replace_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_btree_remove_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - - dnl List functions - AC_CHECK_LIB( - cdata, - libcdata_list_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_empty, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_clone, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_get_number_of_elements, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_get_first_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_get_last_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_get_element_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_get_value_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_prepend_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_prepend_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_append_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_append_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_insert_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_insert_element_with_existing, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_insert_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_insert_value_with_existing, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_remove_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) + [ac_cv_libcdata=yes - dnl List element functions - AC_CHECK_LIB( - cdata, - libcdata_list_element_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_get_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_set_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_get_previous_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_set_previous_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_get_next_element, - [ac_cv_libcdata_dummy=yes], - AC_CHECK_LIB( - cdata, - libcdata_list_element_set_next_element, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_get_elements, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_list_element_set_elements, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - [ac_cv_libcdata=no]) - - dnl Range list functions - AC_CHECK_LIB( - cdata, - libcdata_range_list_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_empty, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_clone, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_get_number_of_elements, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_insert_range, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_insert_range_list, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_remove_range, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_get_range_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_get_range_at_offset, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_range_is_present, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_range_has_overlapping_range, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_range_list_get_spanning_range, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - - dnl Tree node functions - AC_CHECK_LIB( - cdata, - libcdata_tree_node_initialize, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_free, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_empty, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_clone, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_set_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_parent_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_set_parent_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_previous_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_set_previous_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_next_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_set_next_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_nodes, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_set_nodes, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_append_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_append_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_insert_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_insert_value, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_replace_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_remove_node, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_number_of_sub_nodes, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_sub_node_by_index, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) - AC_CHECK_LIB( - cdata, - libcdata_tree_node_get_leaf_node_list, - [ac_cv_libcdata_dummy=yes], - [ac_cv_libcdata=no]) + AX_CHECK_LIB_FUNCTIONS( + [libcdata], + [cdata], + [[libcdata_get_version], + [libcdata_array_initialize], + [libcdata_array_free], + [libcdata_array_empty], + [libcdata_array_clone], + [libcdata_array_resize], + [libcdata_array_reverse], + [libcdata_array_get_number_of_entries], + [libcdata_array_get_entry_by_index], + [libcdata_array_get_entry_by_value], + [libcdata_array_set_entry_by_index], + [libcdata_array_prepend_entry], + [libcdata_array_append_entry], + [libcdata_array_insert_entry], + [libcdata_array_remove_entry], + [libcdata_btree_initialize], + [libcdata_btree_free], + [libcdata_btree_get_number_of_values], + [libcdata_btree_get_value_by_index], + [libcdata_btree_get_value_by_value], + [libcdata_btree_insert_value], + [libcdata_btree_replace_value], + [libcdata_btree_remove_value], + [libcdata_list_initialize], + [libcdata_list_free], + [libcdata_list_empty], + [libcdata_list_clone], + [libcdata_list_get_number_of_elements], + [libcdata_list_get_first_element], + [libcdata_list_get_last_element], + [libcdata_list_get_element_by_index], + [libcdata_list_get_value_by_index], + [libcdata_list_prepend_element], + [libcdata_list_prepend_value], + [libcdata_list_append_element], + [libcdata_list_append_value], + [libcdata_list_insert_element], + [libcdata_list_insert_element_with_existing], + [libcdata_list_insert_value], + [libcdata_list_insert_value_with_existing], + [libcdata_list_remove_element], + [libcdata_list_element_initialize], + [libcdata_list_element_free], + [libcdata_list_element_get_value], + [libcdata_list_element_set_value], + [libcdata_list_element_get_previous_element], + [libcdata_list_element_set_previous_element], + [libcdata_list_element_get_next_element], + [libcdata_list_element_get_elements], + [libcdata_list_element_set_elements], + [libcdata_range_list_initialize], + [libcdata_range_list_free], + [libcdata_range_list_empty], + [libcdata_range_list_clone], + [libcdata_range_list_get_number_of_elements], + [libcdata_range_list_insert_range], + [libcdata_range_list_insert_range_list], + [libcdata_range_list_remove_range], + [libcdata_range_list_get_range_by_index], + [libcdata_range_list_get_range_at_offset], + [libcdata_range_list_range_is_present], + [libcdata_range_list_range_has_overlapping_range], + [libcdata_range_list_get_spanning_range], + [libcdata_tree_node_initialize], + [libcdata_tree_node_free], + [libcdata_tree_node_empty], + [libcdata_tree_node_clone], + [libcdata_tree_node_get_value], + [libcdata_tree_node_set_value], + [libcdata_tree_node_get_parent_node], + [libcdata_tree_node_set_parent_node], + [libcdata_tree_node_get_previous_node], + [libcdata_tree_node_set_previous_node], + [libcdata_tree_node_get_next_node], + [libcdata_tree_node_set_next_node], + [libcdata_tree_node_get_nodes], + [libcdata_tree_node_set_nodes], + [libcdata_tree_node_append_node], + [libcdata_tree_node_append_value], + [libcdata_tree_node_insert_node], + [libcdata_tree_node_insert_value], + [libcdata_tree_node_replace_node], + [libcdata_tree_node_remove_node], + [libcdata_tree_node_get_number_of_sub_nodes], + [libcdata_tree_node_get_sub_node_by_index], + [libcdata_tree_node_get_leaf_node_list]]) ac_cv_libcdata_LIBADD="-lcdata"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcdata]) ]) AS_IF( diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index e9abcdb..02263bb 100644 --- a/m4/libcerror.m4 +++ b/m4/libcerror.m4 @@ -1,6 +1,6 @@ dnl Checks for libcerror required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240513 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,25 @@ 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]) + [ac_cv_libcerror=yes + + 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_libcerror" != xyes && 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( diff --git a/m4/libcfile.m4 b/m4/libcfile.m4 index 81ac5f1..e9e7729 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240514 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcfile"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcfile], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcfile])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -67,151 +59,47 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcfile_h" = xno], [ac_cv_libcfile=no], - [dnl Check for the individual functions - ac_cv_libcfile=yes - - AC_CHECK_LIB( - cfile, - libcfile_get_version, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - - dnl File functions - AC_CHECK_LIB( - cfile, - libcfile_file_initialize, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_free, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_open, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_open_with_error_code, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_close, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_read_buffer, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_read_buffer_with_error_code, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_write_buffer, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_write_buffer_with_error_code, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_seek_offset, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_resize, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_is_open, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_get_offset, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_get_size, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_is_device, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_io_control_read, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_io_control_read_with_error_code, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - - AS_IF( - [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - cfile, - libcfile_file_open_wide, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_open_wide_with_error_code, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - ]) + [ac_cv_libcfile=yes - dnl Support functions - AC_CHECK_LIB( - cfile, - libcfile_file_exists, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_remove, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) + AX_CHECK_LIB_FUNCTIONS( + [libcfile], + [cfile], + [[libcfile_get_version], + [libcfile_file_initialize], + [libcfile_file_free], + [libcfile_file_open], + [libcfile_file_open_with_error_code], + [libcfile_file_close], + [libcfile_file_read_buffer], + [libcfile_file_read_buffer_with_error_code], + [libcfile_file_write_buffer], + [libcfile_file_write_buffer_with_error_code], + [libcfile_file_seek_offset], + [libcfile_file_resize], + [libcfile_file_is_open], + [libcfile_file_get_offset], + [libcfile_file_get_size], + [libcfile_file_is_device], + [libcfile_file_io_control_read], + [libcfile_file_io_control_read_with_error_code], + [libcfile_file_exists], + [libcfile_file_remove]]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - cfile, - libcfile_file_exists_wide, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) - AC_CHECK_LIB( - cfile, - libcfile_file_remove_wide, - [ac_cv_libcfile_dummy=yes], - [ac_cv_libcfile=no]) + [AX_CHECK_LIB_FUNCTIONS( + [libcfile], + [cfile], + [[libcfile_file_open_wide], + [libcfile_file_open_wide_with_error_code], + [libcfile_file_exists_wide], + [libcfile_file_remove_wide]]) ]) ac_cv_libcfile_LIBADD="-lcfile"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcfile]) ]) AS_IF( diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index bd5a10e..e9cb5bb 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240513 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libclocale"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libclocale], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libclocale])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -67,36 +59,19 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libclocale_h" = xno], [ac_cv_libclocale=no], - [dnl Check for the individual functions - ac_cv_libclocale=yes - - AC_CHECK_LIB( - clocale, - libclocale_get_version, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) + [ac_cv_libclocale=yes - dnl Codepage functions - AC_CHECK_LIB( - clocale, - libclocale_codepage, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - AC_CHECK_LIB( - clocale, - libclocale_codepage_get, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - AC_CHECK_LIB( - clocale, - libclocale_codepage_set, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - AC_CHECK_LIB( - clocale, - libclocale_codepage_copy_from_string, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) + AX_CHECK_LIB_FUNCTIONS( + [libclocale], + [clocale], + [[libclocale_get_version], + [libclocale_codepage], + [libclocale_codepage_get], + [libclocale_codepage_set], + [libclocale_codepage_copy_from_string], + [libclocale_locale_get_codepage], + [libclocale_locale_get_decimal_point], + [libclocale_initialize]]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], @@ -107,34 +82,10 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], [ac_cv_libclocale=no]) ]) - dnl Locale functions - AC_CHECK_LIB( - clocale, - libclocale_locale_get_codepage, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - AC_CHECK_LIB( - clocale, - libclocale_locale_get_decimal_point, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - - dnl Support functions - AC_CHECK_LIB( - clocale, - libclocale_initialize, - [ac_cv_libclocale_dummy=yes], - [ac_cv_libclocale=no]) - ac_cv_libclocale_LIBADD="-lclocale"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libclocale]) ]) AS_IF( diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index e382bdb..c0404cc 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240513 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcnotify"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcnotify], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcnotify])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,65 +38,24 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcnotify_h" = xno], [ac_cv_libcnotify=no], - [dnl Check for the individual functions - ac_cv_libcnotify=yes - - AC_CHECK_LIB( - cnotify, - libcnotify_get_version, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - - dnl Print functions - AC_CHECK_LIB( - cnotify, - libcnotify_printf, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - AC_CHECK_LIB( - cnotify, - libcnotify_print_data, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - AC_CHECK_LIB( - cnotify, - libcnotify_print_error_backtrace, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - - dnl Stream functions - AC_CHECK_LIB( - cnotify, - libcnotify_stream_set, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - AC_CHECK_LIB( - cnotify, - libcnotify_stream_open, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - AC_CHECK_LIB( - cnotify, - libcnotify_stream_close, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) - - dnl Verbose functions - AC_CHECK_LIB( - cnotify, - libcnotify_verbose_set, - [ac_cv_libcnotify_dummy=yes], - [ac_cv_libcnotify=no]) + [ac_cv_libcnotify=yes + + AX_CHECK_LIB_FUNCTIONS( + [libcnotify], + [cnotify], + [[libcnotify_get_version], + [libcnotify_printf], + [libcnotify_print_data], + [libcnotify_print_error_backtrace], + [libcnotify_stream_set], + [libcnotify_stream_open], + [libcnotify_stream_close], + [libcnotify_verbose_set]]) ac_cv_libcnotify_LIBADD="-lcnotify"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcnotify]) ]) AS_IF( diff --git a/m4/libcpath.m4 b/m4/libcpath.m4 index bf44d46..ad4cfe6 100644 --- a/m4/libcpath.m4 +++ b/m4/libcpath.m4 @@ -1,6 +1,6 @@ dnl Checks for libcpath required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240518 dnl Function to detect if libcpath is available dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcpath"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcpath], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcpath])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -67,100 +59,38 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcpath_h" = xno], [ac_cv_libcpath=no], - [dnl Check for the individual functions - ac_cv_libcpath=yes - - AC_CHECK_LIB( - cpath, - libcpath_get_version, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) + [ac_cv_libcpath=yes - dnl Path functions - AC_CHECK_LIB( - cpath, - libcpath_path_change_directory, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_current_working_directory, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_full_path, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_sanitized_filename, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_sanitized_path, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_join, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_make_directory, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) + AX_CHECK_LIB_FUNCTIONS( + [libcpath], + [cpath], + [[libcpath_get_version], + [libcpath_path_change_directory], + [libcpath_path_get_current_working_directory], + [libcpath_path_get_full_path], + [libcpath_path_get_sanitized_filename], + [libcpath_path_get_sanitized_path], + [libcpath_path_join], + [libcpath_path_make_directory]]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - cpath, - libcpath_path_change_directory_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_current_working_directory_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_full_path_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_sanitized_filename_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_get_sanitized_path_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_join_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) - AC_CHECK_LIB( - cpath, - libcpath_path_make_directory_wide, - [ac_cv_libcpath_dummy=yes], - [ac_cv_libcpath=no]) + [AX_CHECK_LIB_FUNCTIONS( + [libcpath], + [cpath], + [[libcpath_path_change_directory_wide], + [libcpath_path_get_current_working_directory_wide], + [libcpath_path_get_full_path_wide], + [libcpath_path_get_sanitized_filename_wide], + [libcpath_path_get_sanitized_path_wide], + [libcpath_path_join_wide], + [libcpath_path_make_directory_wide]]) ]) ac_cv_libcpath_LIBADD="-lcpath"]) ]) - AS_IF( - [test "x$ac_cv_libcpath" != xyes && test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libcpath in directory: $ac_cv_with_libcpath], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcpath]) ]) AS_IF( diff --git a/m4/libcsplit.m4 b/m4/libcsplit.m4 index 1ac7b9f..20bbec9 100644 --- a/m4/libcsplit.m4 +++ b/m4/libcsplit.m4 @@ -1,6 +1,6 @@ dnl Checks for libcsplit required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240513 dnl Function to detect if libcsplit is available dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcsplit"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcsplit], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcsplit])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -67,95 +59,37 @@ AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcsplit_h" = xno], [ac_cv_libcsplit=no], - [dnl Check for the individual functions - ac_cv_libcsplit=yes - - AC_CHECK_LIB( - csplit, - libcsplit_get_version, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - - dnl Narrow string functions - AC_CHECK_LIB( - csplit, - libcsplit_narrow_string_split, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - - dnl Narrow split string functions - AC_CHECK_LIB( - csplit, - libcsplit_narrow_split_string_free, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_narrow_split_string_get_string, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_narrow_split_string_get_number_of_segments, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_narrow_split_string_get_segment_by_index, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_narrow_split_string_set_segment_by_index, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) + [ac_cv_libcsplit=yes + + AX_CHECK_LIB_FUNCTIONS( + [libcsplit], + [csplit], + [[libcsplit_get_version], + [libcsplit_narrow_string_split], + [libcsplit_narrow_split_string_free], + [libcsplit_narrow_split_string_get_string], + [libcsplit_narrow_split_string_get_number_of_segments], + [libcsplit_narrow_split_string_get_segment_by_index], + [libcsplit_narrow_split_string_set_segment_by_index]]) dnl Wide string functions AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_LIB( - csplit, - libcsplit_wide_string_split, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - - dnl Wide split string functions - AC_CHECK_LIB( - csplit, - libcsplit_wide_split_string_free, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_wide_split_string_get_string, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_wide_split_string_get_number_of_segments, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_wide_split_string_get_segment_by_index, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) - AC_CHECK_LIB( - csplit, - libcsplit_wide_split_string_set_segment_by_index, - [ac_cv_libcsplit_dummy=yes], - [ac_cv_libcsplit=no]) + [AX_CHECK_LIB_FUNCTIONS( + [libcsplit], + [csplit], + [[libcsplit_wide_string_split], + [libcsplit_wide_split_string_free], + [libcsplit_wide_split_string_get_string], + [libcsplit_wide_split_string_get_number_of_segments], + [libcsplit_wide_split_string_get_segment_by_index], + [libcsplit_wide_split_string_set_segment_by_index]]) ]) ac_cv_libcsplit_LIBADD="-lcsplit"]) ]) - AS_IF( - [test "x$ac_cv_libcsplit" != xyes && test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libcsplit in directory: $ac_cv_with_libcsplit], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcsplit]) ]) AS_IF( diff --git a/m4/libcthreads.m4 b/m4/libcthreads.m4 index c9c4e46..a221764 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240513 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libcthreads"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libcthreads}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libcthreads}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libcthreads], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libcthreads])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,215 +38,52 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libcthreads_h" = xno], [ac_cv_libcthreads=no], - [dnl Check for the individual functions - ac_cv_libcthreads=yes - - AC_CHECK_LIB( - cthreads, - libcthreads_get_version, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Thread functions - AC_CHECK_LIB( - cthreads, - libcthreads_thread_create, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_thread_join, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Thread attributes functions - AC_CHECK_LIB( - cthreads, - libcthreads_thread_attributes_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_thread_attributes_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Condition functions - AC_CHECK_LIB( - cthreads, - libcthreads_condition_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_condition_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_condition_broadcast, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_condition_signal, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_condition_wait, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Lock functions - AC_CHECK_LIB( - cthreads, - libcthreads_lock_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_lock_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_lock_grab, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_lock_release, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Mutex functions - AC_CHECK_LIB( - cthreads, - libcthreads_mutex_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_mutex_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_mutex_grab, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_mutex_try_grab, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_mutex_release, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) + [ac_cv_libcthreads=yes - dnl Read/Write lock functions - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_grab_for_read, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_grab_for_write, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_release_for_read, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_read_write_lock_release_for_write, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Queue functions - AC_CHECK_LIB( - cthreads, - libcthreads_queue_initialize, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_free, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_type_pop, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_pop, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_try_push, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_push, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_queue_push_sorted, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - - dnl Thread pool functions - AC_CHECK_LIB( - cthreads, - libcthreads_thread_pool_create, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_thread_pool_push, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_thread_pool_push_sorted, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) - AC_CHECK_LIB( - cthreads, - libcthreads_thread_pool_join, - [ac_cv_libcthreads_dummy=yes], - [ac_cv_libcthreads=no]) + AX_CHECK_LIB_FUNCTIONS( + [libcthreads], + [cthreads], + [[libcthreads_get_version], + [libcthreads_thread_create], + [libcthreads_thread_join], + [libcthreads_thread_attributes_initialize], + [libcthreads_thread_attributes_free], + [libcthreads_condition_initialize], + [libcthreads_condition_free], + [libcthreads_condition_broadcast], + [libcthreads_condition_signal], + [libcthreads_condition_wait], + [libcthreads_lock_initialize], + [libcthreads_lock_free], + [libcthreads_lock_grab], + [libcthreads_lock_release], + [libcthreads_mutex_initialize], + [libcthreads_mutex_free], + [libcthreads_mutex_grab], + [libcthreads_mutex_try_grab], + [libcthreads_mutex_release], + [libcthreads_read_write_lock_initialize], + [libcthreads_read_write_lock_free], + [libcthreads_read_write_lock_grab_for_read], + [libcthreads_read_write_lock_grab_for_write], + [libcthreads_read_write_lock_release_for_read], + [libcthreads_read_write_lock_release_for_write], + [libcthreads_queue_initialize], + [libcthreads_queue_free], + [libcthreads_queue_type_pop], + [libcthreads_queue_pop], + [libcthreads_queue_try_push], + [libcthreads_queue_push], + [libcthreads_queue_push_sorted], + [libcthreads_thread_pool_create], + [libcthreads_thread_pool_push], + [libcthreads_thread_pool_push_sorted], + [libcthreads_thread_pool_join]]) ac_cv_libcthreads_LIBADD="-lcthreads"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcthreads]) ]) AS_IF( diff --git a/m4/libfcache.m4 b/m4/libfcache.m4 index f063bae..8d84e7f 100644 --- a/m4/libfcache.m4 +++ b/m4/libfcache.m4 @@ -1,6 +1,6 @@ dnl Checks for libfcache required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240514 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfcache"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfcache], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfcache])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,120 +38,35 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfcache_h" = xno], [ac_cv_libfcache=no], - [dnl Check for the individual functions - ac_cv_libfcache=yes - - AC_CHECK_LIB( - fcache, - libfcache_get_version, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - - dnl Cache functions - AC_CHECK_LIB( - fcache, - libfcache_cache_initialize, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_free, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_clone, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_clear, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_get_number_of_entries, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_get_number_of_cache_values, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_clear_value_by_index, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_get_value_by_identifier, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_get_value_by_index, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_set_value_by_identifier, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_set_value_by_index, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - - dnl Cache value functions - AC_CHECK_LIB( - fcache, - libfcache_cache_value_free, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_value_clear, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_value_get_identifier, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_value_set_identifier, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_value_get_value, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) - AC_CHECK_LIB( - fcache, - libfcache_cache_value_set_value, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) + [ac_cv_libfcache=yes - dnl Date time functions - AC_CHECK_LIB( - fcache, - libfcache_date_time_get_timestamp, - [ac_cv_libfcache_dummy=yes], - [ac_cv_libfcache=no]) + AX_CHECK_LIB_FUNCTIONS( + [libfcache], + [fcache], + [[libfcache_get_version], + [libfcache_cache_initialize], + [libfcache_cache_free], + [libfcache_cache_clone], + [libfcache_cache_clear], + [libfcache_cache_get_number_of_entries], + [libfcache_cache_get_number_of_cache_values], + [libfcache_cache_clear_value_by_index], + [libfcache_cache_get_value_by_identifier], + [libfcache_cache_get_value_by_index], + [libfcache_cache_set_value_by_identifier], + [libfcache_cache_set_value_by_index], + [libfcache_cache_value_free], + [libfcache_cache_value_clear], + [libfcache_cache_value_get_identifier], + [libfcache_cache_value_set_identifier], + [libfcache_cache_value_get_value], + [libfcache_cache_value_set_value], + [libfcache_date_time_get_timestamp]]) ac_cv_libfcache_LIBADD="-lfcache"]) ]) - AS_IF( - [test "x$ac_cv_libfcache" != xyes && test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfcache in directory: $ac_cv_with_libfcache], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfcache]) ]) AS_IF( diff --git a/m4/libfdata.m4 b/m4/libfdata.m4 index 50ffbb1..7d2d88e 100644 --- a/m4/libfdata.m4 +++ b/m4/libfdata.m4 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20240413 +dnl Version: 20240520 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfdata"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfdata], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfdata])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,423 +38,117 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfdata_h" = xno], [ac_cv_libfdata=no], - [dnl Check for the individual functions - ac_cv_libfdata=yes - - AC_CHECK_LIB( - fdata, - libfdata_get_version, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - dnl Area functions - AC_CHECK_LIB( - fdata, - libfdata_area_initialize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_free, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_clone, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_empty, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_resize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_get_number_of_segments, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_get_segment_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_set_segment_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_prepend_segment, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_append_segment, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_get_element_data_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_get_element_value_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_set_element_value_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_area_get_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - dnl List functions - AC_CHECK_LIB( - fdata, - libfdata_list_initialize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_free, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_clone, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_empty, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_resize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_reverse, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_get_number_of_elements, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_list_element_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_set_element_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_prepend_element, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_append_element, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_append_list, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_is_element_set, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_mapped_range, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_mapped_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_set_mapped_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_get_mapped_size_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_set_mapped_size_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_by_index_with_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_set_element_by_index_with_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_append_element_with_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_index_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_list_element_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_cache_element_value, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_value_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_element_value_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_set_element_value_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_set_element_value_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_get_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_list_element_get_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_set_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_get_element_value, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_set_element_value, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) + [ac_cv_libfdata=yes - dnl List element functions - AC_CHECK_LIB( - fdata, - libfdata_list_element_get_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_set_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_get_element_value, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_list_element_set_element_value, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - dnl Range list functions - dnl TODO: add functions - - dnl Stream functions - AC_CHECK_LIB( - fdata, - libfdata_stream_initialize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_free, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_clone, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_stream_empty, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_resize, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_reverse, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_stream_get_number_of_segments, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_get_segment_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_set_segment_by_index, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_prepend_segment, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_append_segment, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_set_mapped_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_stream_get_segment_mapped_range, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_get_segment_index_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_get_segment_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - AC_CHECK_LIB( - fdata, - libfdata_stream_read_buffer, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_read_buffer_at_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_write_buffer, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_seek_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_get_offset, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - AC_CHECK_LIB( - fdata, - libfdata_stream_get_size, - [ac_cv_libfdata_dummy=yes], - [ac_cv_libfdata=no]) - - dnl Tree list functions - dnl TODO: add functions - - dnl Vector list functions - dnl TODO: add functions + AX_CHECK_LIB_FUNCTIONS( + [libfdata], + [fdata], + [[libfdata_get_version], + [libfdata_area_initialize], + [libfdata_area_free], + [libfdata_area_clone], + [libfdata_area_empty], + [libfdata_area_resize], + [libfdata_area_get_number_of_segments], + [libfdata_area_get_segment_by_index], + [libfdata_area_set_segment_by_index], + [libfdata_area_prepend_segment], + [libfdata_area_append_segment], + [libfdata_area_get_element_data_size], + [libfdata_area_get_element_value_at_offset], + [libfdata_area_set_element_value_at_offset], + [libfdata_area_get_size], + [libfdata_list_initialize], + [libfdata_list_free], + [libfdata_list_clone], + [libfdata_list_empty], + [libfdata_list_resize], + [libfdata_list_reverse], + [libfdata_list_get_number_of_elements], + [libfdata_list_get_list_element_by_index], + [libfdata_list_get_element_by_index], + [libfdata_list_set_element_by_index], + [libfdata_list_prepend_element], + [libfdata_list_append_element], + [libfdata_list_append_list], + [libfdata_list_is_element_set], + [libfdata_list_get_element_mapped_range], + [libfdata_list_get_mapped_offset], + [libfdata_list_set_mapped_offset], + [libfdata_list_get_mapped_size_by_index], + [libfdata_list_set_mapped_size_by_index], + [libfdata_list_get_element_by_index_with_mapped_size], + [libfdata_list_set_element_by_index_with_mapped_size], + [libfdata_list_append_element_with_mapped_size], + [libfdata_list_get_element_index_at_offset], + [libfdata_list_get_list_element_at_offset], + [libfdata_list_get_element_at_offset], + [libfdata_list_cache_element_value], + [libfdata_list_get_element_value_by_index], + [libfdata_list_get_element_value_at_offset], + [libfdata_list_set_element_value_by_index], + [libfdata_list_set_element_value_at_offset], + [libfdata_list_get_size], + [libfdata_list_element_get_mapped_size], + [libfdata_list_element_set_mapped_size], + [libfdata_list_element_get_element_value], + [libfdata_list_element_set_element_value], + [libfdata_list_element_get_mapped_size], + [libfdata_list_element_set_mapped_size], + [libfdata_list_element_get_element_value], + [libfdata_list_element_set_element_value], + [libfdata_stream_initialize], + [libfdata_stream_free], + [libfdata_stream_clone], + [libfdata_stream_empty], + [libfdata_stream_resize], + [libfdata_stream_reverse], + [libfdata_stream_get_number_of_segments], + [libfdata_stream_get_segment_by_index], + [libfdata_stream_set_segment_by_index], + [libfdata_stream_prepend_segment], + [libfdata_stream_append_segment], + [libfdata_stream_set_mapped_size], + [libfdata_stream_get_segment_mapped_range], + [libfdata_stream_get_segment_index_at_offset], + [libfdata_stream_get_segment_at_offset], + [libfdata_stream_read_buffer], + [libfdata_stream_read_buffer_at_offset], + [libfdata_stream_write_buffer], + [libfdata_stream_seek_offset], + [libfdata_stream_get_offset], + [libfdata_stream_get_size], + [libfdata_range_list_initialize], + [libfdata_range_list_free], + [libfdata_range_list_clone], + [libfdata_range_list_empty], + [libfdata_range_list_get_list_element_at_offset], + [libfdata_range_list_get_element_at_offset], + [libfdata_range_list_insert_element], + [libfdata_range_list_get_element_value_at_offset], + [libfdata_range_list_set_element_value_at_offset], + [libfdata_vector_initialize], + [libfdata_vector_free], + [libfdata_vector_clone], + [libfdata_vector_empty], + [libfdata_vector_resize], + [libfdata_vector_get_number_of_segments], + [libfdata_vector_get_segment_by_index], + [libfdata_vector_set_segment_by_index], + [libfdata_vector_prepend_segment], + [libfdata_vector_append_segment], + [libfdata_vector_get_element_data_size], + [libfdata_vector_get_number_of_elements], + [libfdata_vector_get_element_index_at_offset], + [libfdata_vector_get_element_value_by_index], + [libfdata_vector_get_element_value_at_offset], + [libfdata_vector_set_element_value_by_index], + [libfdata_vector_get_size]]) ac_cv_libfdata_LIBADD="-lfdata"]) ]) - AS_IF( - [test "x$ac_cv_libfdata" != xyes && test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfdata in directory: $ac_cv_with_libfdata], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfdata]) ]) AS_IF( diff --git a/m4/libfvalue.m4 b/m4/libfvalue.m4 index 2a79f7d..a71d0f7 100644 --- a/m4/libfvalue.m4 +++ b/m4/libfvalue.m4 @@ -1,6 +1,6 @@ dnl Checks for libfvalue required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240519 dnl Function to detect if libfvalue is available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfvalue"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfvalue}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfvalue], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfvalue])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,558 +38,115 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfvalue_h" = xno], [ac_cv_libfvalue=no], - [dnl Check for the individual functions - ac_cv_libfvalue=yes - - AC_CHECK_LIB( - fvalue, - libfvalue_get_version, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Data handle functions - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_initialize, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_free, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_clone, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_clear, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_get_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_set_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_get_data_flags, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_set_data_flags, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_get_number_of_value_entries, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_get_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_set_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_data_handle_append_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Integer functions - AC_CHECK_LIB( - fvalue, - libfvalue_string_size_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_utf8_string_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf8_string_with_index_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf8_string_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf8_string_with_index_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_utf16_string_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf16_string_with_index_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf16_string_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf16_string_with_index_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_utf32_string_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf32_string_with_index_copy_from_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf32_string_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_utf32_string_with_index_copy_to_integer, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl String functions - AC_CHECK_LIB( - fvalue, - libfvalue_utf8_string_split, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_utf16_string_split, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Split string functions - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf8_string_free, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf8_string_get_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf8_string_get_number_of_segments, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf8_string_get_segment_by_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf16_string_free, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf16_string_get_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf16_string_get_number_of_segments, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_split_utf16_string_get_segment_by_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Table functions - AC_CHECK_LIB( - fvalue, - libfvalue_table_initialize, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_free, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_resize, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_clone, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_table_get_number_of_values, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_table_get_index_by_identifier, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_table_get_value_by_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_get_value_by_identifier, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_set_value_by_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_table_set_value, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_table_copy_from_utf8_xml_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Value functions - AC_CHECK_LIB( - fvalue, - libfvalue_value_initialize, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_free, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_clone, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_clear, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_type, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) + [ac_cv_libfvalue=yes - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_identifier, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_set_identifier, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_data_handle, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_has_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_data_size, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_set_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_data, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_format_flags, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_set_format_flags, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_number_of_value_entries, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_set_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_append_value_entry, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_boolean, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_boolean, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_8bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_8bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_16bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_16bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_32bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_32bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_64bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_64bit, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_float, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_float, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_double, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_double, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_utf8_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_utf8_string_size, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf8_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf8_string_with_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_utf16_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_utf16_string_size, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf16_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf16_string_with_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_from_utf32_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_get_utf32_string_size, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf32_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_copy_to_utf32_string_with_index, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_read_from_file_stream, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_write_to_file_stream, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - dnl Value type functions - AC_CHECK_LIB( - fvalue, - libfvalue_value_type_initialize, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_type_initialize_with_data_handle, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_type_set_data_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - AC_CHECK_LIB( - fvalue, - libfvalue_value_type_append_data_string, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) - - AC_CHECK_LIB( - fvalue, - libfvalue_value_type_set_data_strings_array, - [ac_cv_libfvalue_dummy=yes], - [ac_cv_libfvalue=no]) + AX_CHECK_LIB_FUNCTIONS( + [libfvalue], + [fvalue], + [[libfvalue_get_version], + [libfvalue_data_handle_initialize], + [libfvalue_data_handle_free], + [libfvalue_data_handle_clone], + [libfvalue_data_handle_clear], + [libfvalue_data_handle_get_data], + [libfvalue_data_handle_set_data], + [libfvalue_data_handle_get_data_flags], + [libfvalue_data_handle_set_data_flags], + [libfvalue_data_handle_get_number_of_value_entries], + [libfvalue_data_handle_get_value_entry], + [libfvalue_data_handle_set_value_entry], + [libfvalue_data_handle_append_value_entry], + [libfvalue_string_size_from_integer], + [libfvalue_utf8_string_copy_from_integer], + [libfvalue_utf8_string_with_index_copy_from_integer], + [libfvalue_utf8_string_copy_to_integer], + [libfvalue_utf8_string_with_index_copy_to_integer], + [libfvalue_utf16_string_copy_from_integer], + [libfvalue_utf16_string_with_index_copy_from_integer], + [libfvalue_utf16_string_copy_to_integer], + [libfvalue_utf16_string_with_index_copy_to_integer], + [libfvalue_utf32_string_copy_from_integer], + [libfvalue_utf32_string_with_index_copy_from_integer], + [libfvalue_utf32_string_copy_to_integer], + [libfvalue_utf32_string_with_index_copy_to_integer], + [libfvalue_utf8_string_split], + [libfvalue_utf16_string_split], + [libfvalue_split_utf8_string_free], + [libfvalue_split_utf8_string_get_string], + [libfvalue_split_utf8_string_get_number_of_segments], + [libfvalue_split_utf8_string_get_segment_by_index], + [libfvalue_split_utf16_string_free], + [libfvalue_split_utf16_string_get_string], + [libfvalue_split_utf16_string_get_number_of_segments], + [libfvalue_split_utf16_string_get_segment_by_index], + [libfvalue_table_initialize], + [libfvalue_table_free], + [libfvalue_table_resize], + [libfvalue_table_clone], + [libfvalue_table_get_number_of_values], + [libfvalue_table_get_index_by_identifier], + [libfvalue_table_get_value_by_index], + [libfvalue_table_get_value_by_identifier], + [libfvalue_table_set_value_by_index], + [libfvalue_table_set_value], + [libfvalue_table_copy_from_utf8_xml_string], + [libfvalue_value_initialize], + [libfvalue_value_free], + [libfvalue_value_clone], + [libfvalue_value_clear], + [libfvalue_value_get_type], + [libfvalue_value_get_identifier], + [libfvalue_value_set_identifier], + [libfvalue_value_get_data_handle], + [libfvalue_value_has_data], + [libfvalue_value_get_data_size], + [libfvalue_value_get_data], + [libfvalue_value_set_data], + [libfvalue_value_copy_data], + [libfvalue_value_get_format_flags], + [libfvalue_value_set_format_flags], + [libfvalue_value_get_number_of_value_entries], + [libfvalue_value_get_value_entry], + [libfvalue_value_set_value_entry], + [libfvalue_value_append_value_entry], + [libfvalue_value_copy_from_boolean], + [libfvalue_value_copy_to_boolean], + [libfvalue_value_copy_from_8bit], + [libfvalue_value_copy_to_8bit], + [libfvalue_value_copy_from_16bit], + [libfvalue_value_copy_to_16bit], + [libfvalue_value_copy_from_32bit], + [libfvalue_value_copy_to_32bit], + [libfvalue_value_copy_from_64bit], + [libfvalue_value_copy_to_64bit], + [libfvalue_value_copy_from_float], + [libfvalue_value_copy_to_float], + [libfvalue_value_copy_from_double], + [libfvalue_value_copy_to_double], + [libfvalue_value_copy_from_utf8_string], + [libfvalue_value_get_utf8_string_size], + [libfvalue_value_copy_to_utf8_string], + [libfvalue_value_copy_to_utf8_string_with_index], + [libfvalue_value_copy_from_utf16_string], + [libfvalue_value_get_utf16_string_size], + [libfvalue_value_copy_to_utf16_string], + [libfvalue_value_copy_to_utf16_string_with_index], + [libfvalue_value_copy_from_utf32_string], + [libfvalue_value_get_utf32_string_size], + [libfvalue_value_copy_to_utf32_string], + [libfvalue_value_copy_to_utf32_string_with_index], + [libfvalue_value_read_from_file_stream], + [libfvalue_value_write_to_file_stream], + [libfvalue_value_type_initialize], + [libfvalue_value_type_initialize_with_data_handle], + [libfvalue_value_type_set_data_string], + [libfvalue_value_type_append_data_string], + [libfvalue_value_type_set_data_strings_array]]) ac_cv_libfvalue_LIBADD="-lfvalue"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfvalue]) ]) AS_IF( diff --git a/m4/libhmac.m4 b/m4/libhmac.m4 index b902eb6..55f87fe 100644 --- a/m4/libhmac.m4 +++ b/m4/libhmac.m4 @@ -1,6 +1,6 @@ dnl Checks for libhmac required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240520 dnl Function to detect if libhmac is available dnl ac_libhmac_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libhmac"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libhmac}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libhmac}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libhmac], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libhmac])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,134 +38,37 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libhmac_h" = xno], [ac_cv_libhmac=no], - [dnl Check for the individual functions - ac_cv_libhmac=yes - - AC_CHECK_LIB( - hmac, - libhmac_get_version, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - - dnl MD5 functions - AC_CHECK_LIB( - hmac, - libhmac_md5_initialize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_md5_update, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_md5_finalize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_md5_free, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - - dnl SHA1 functions - AC_CHECK_LIB( - hmac, - libhmac_sha1_initialize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha1_update, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha1_finalize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha1_free, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - - dnl SHA224 functions - AC_CHECK_LIB( - hmac, - libhmac_sha224_initialize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha224_update, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha224_finalize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha224_free, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) + [ac_cv_libhmac=yes - dnl SHA256 functions - AC_CHECK_LIB( - hmac, - libhmac_sha256_initialize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha256_update, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha256_finalize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha256_free, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - - dnl SHA512 functions - AC_CHECK_LIB( - hmac, - libhmac_sha512_initialize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha512_update, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha512_finalize, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) - AC_CHECK_LIB( - hmac, - libhmac_sha512_free, - [ac_cv_libhmac_dummy=yes], - [ac_cv_libhmac=no]) + AX_CHECK_LIB_FUNCTIONS( + [libhmac], + [hmac], + [[libhmac_get_version], + [libhmac_md5_initialize], + [libhmac_md5_update], + [libhmac_md5_finalize], + [libhmac_md5_free], + [libhmac_sha1_initialize], + [libhmac_sha1_update], + [libhmac_sha1_finalize], + [libhmac_sha1_free], + [libhmac_sha224_initialize], + [libhmac_sha224_update], + [libhmac_sha224_finalize], + [libhmac_sha224_free], + [libhmac_sha256_initialize], + [libhmac_sha256_update], + [libhmac_sha256_finalize], + [libhmac_sha256_free], + [libhmac_sha512_initialize], + [libhmac_sha512_update], + [libhmac_sha512_finalize], + [libhmac_sha512_free]]) ac_cv_libhmac_LIBADD="-lhmac"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libhmac]) ]) AS_IF( diff --git a/m4/libuna.m4 b/m4/libuna.m4 index 996ac60..fe1fd40 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,23 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20240413 - -dnl Function to detect if a specific libuna definition is available. -AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], - [AC_CACHE_CHECK( - [if `$1' is defined], - [$2], - [AC_LANG_PUSH(C) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int test = $1; - -return( 0 ); ]] )], - [$2=yes], - [$2=no]) - AC_LANG_POP(C)]) - ]) +dnl Version: 20240513 dnl Function to detect if libuna is available dnl ac_libuna_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -31,15 +14,7 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libuna"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libuna], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libuna])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -63,894 +38,186 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libuna_h" = xno], [ac_cv_libuna=no], - [dnl Check for the individual functions - ac_cv_libuna=yes - - AC_CHECK_LIB( - una, - libuna_get_version, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Base16 stream functions - AC_CHECK_LIB( - una, - libuna_base16_stream_size_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base16_stream_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base16_stream_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base16_stream_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base16_stream_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Base32 stream functions - AC_CHECK_LIB( - una, - libuna_base32_quintuplet_copy_from_base32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_quintuplet_copy_to_base32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_quintuplet_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_quintuplet_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - AC_CHECK_LIB( - una, - libuna_base32_stream_size_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_stream_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_stream_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_stream_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base32_stream_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Base64 stream functions - AC_CHECK_LIB( - una, - libuna_base64_triplet_copy_from_base64_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_triplet_copy_to_base64_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_triplet_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_triplet_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - AC_CHECK_LIB( - una, - libuna_base64_stream_size_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_stream_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_stream_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_stream_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_base64_stream_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Byte stream functions - AC_CHECK_LIB( - una, - libuna_byte_stream_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_byte_stream_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_byte_stream_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_byte_stream_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_byte_stream_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_byte_stream_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Unicode character functions - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_ucs2, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_ucs2, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_ucs2, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_ucs4, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_ucs4, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_ucs4, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_utf8_rfc2279, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf8_rfc2279, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf8_rfc2279, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_size_to_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_unicode_character_copy_to_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl UTF-8 stream functions - AC_CHECK_LIB( - una, - libuna_utf8_stream_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_stream_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_stream_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_stream_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_stream_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_stream_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) + [ac_cv_libuna=yes - dnl UTF-16 stream functions - AC_CHECK_LIB( - una, - libuna_utf16_stream_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_stream_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_stream_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_stream_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_stream_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_stream_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl UTF-32 stream functions - AC_CHECK_LIB( - una, - libuna_utf32_stream_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_stream_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_stream_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_stream_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_stream_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_stream_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl UTF-8 string functions - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_compare_with_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_size_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf8_string_with_index_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl UTF-16 string functions - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - dnl libuna_utf16_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf16 - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_utf32, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_compare_with_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_size_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf16_string_with_index_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl UTF-32 string functions - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_compare_with_byte_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_compare_with_utf7_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - libuna_utf32_string_with_index_copy_from_utf8, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - dnl libuna_utf32_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf32 - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_compare_with_utf8_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_utf16, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - dnl libuna_utf32_string_compare_with_utf16 is implemented by libuna_utf16_string_compare_with_utf32 - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_compare_with_utf16_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_compare_with_utf32_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_size_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - AC_CHECK_LIB( - una, - libuna_utf32_string_with_index_copy_from_scsu_stream, - [ac_cv_libuna_dummy=yes], - [ac_cv_libuna=no]) - - dnl Check for definitions - AX_LIBUNA_CHECK_DEFINITION( - LIBUNA_COMPARE_LESS, - [ac_cv_libuna_defines_compare_less]) - AS_IF( - [test "x$ac_cv_libuna_defines_compare_less" != xyes], - [ac_cv_libuna=no]) - - AX_LIBUNA_CHECK_DEFINITION( - LIBUNA_COMPARE_EQUAL, - [ac_cv_libuna_defines_compare_equal]) - AS_IF( - [test "x$ac_cv_libuna_defines_compare_less" != xyes], - [ac_cv_libuna=no]) - - AX_LIBUNA_CHECK_DEFINITION( - LIBUNA_COMPARE_GREATER, - [ac_cv_libuna_defines_compare_greater]) - AS_IF( - [test "x$ac_cv_libuna_defines_compare_less" != xyes], - [ac_cv_libuna=no]) - - AX_LIBUNA_CHECK_DEFINITION( - LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE, - [ac_cv_libuna_defines_compare_greater]) - AS_IF( - [test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes], - [ac_cv_libuna=no]) + AX_CHECK_LIB_FUNCTIONS( + [libuna], + [una], + [[libuna_get_version], + [libuna_base16_stream_size_to_byte_stream], + [libuna_base16_stream_copy_to_byte_stream], + [libuna_base16_stream_size_from_byte_stream], + [libuna_base16_stream_copy_from_byte_stream], + [libuna_base16_stream_with_index_copy_from_byte_stream], + [libuna_base32_quintuplet_copy_from_base32_stream], + [libuna_base32_quintuplet_copy_to_base32_stream], + [libuna_base32_quintuplet_copy_from_byte_stream], + [libuna_base32_quintuplet_copy_to_byte_stream], + [libuna_base32_stream_size_to_byte_stream], + [libuna_base32_stream_copy_to_byte_stream], + [libuna_base32_stream_size_from_byte_stream], + [libuna_base32_stream_copy_from_byte_stream], + [libuna_base32_stream_with_index_copy_from_byte_stream], + [libuna_base64_triplet_copy_from_base64_stream], + [libuna_base64_triplet_copy_to_base64_stream], + [libuna_base64_triplet_copy_from_byte_stream], + [libuna_base64_triplet_copy_to_byte_stream], + [libuna_base64_stream_size_to_byte_stream], + [libuna_base64_stream_copy_to_byte_stream], + [libuna_base64_stream_size_from_byte_stream], + [libuna_base64_stream_copy_from_byte_stream], + [libuna_base64_stream_with_index_copy_from_byte_stream], + [libuna_byte_stream_size_from_utf8], + [libuna_byte_stream_copy_from_utf8], + [libuna_byte_stream_size_from_utf16], + [libuna_byte_stream_copy_from_utf16], + [libuna_byte_stream_size_from_utf32], + [libuna_byte_stream_copy_from_utf32], + [libuna_unicode_character_size_to_byte_stream], + [libuna_unicode_character_copy_from_byte_stream], + [libuna_unicode_character_copy_to_byte_stream], + [libuna_unicode_character_size_to_ucs2], + [libuna_unicode_character_copy_from_ucs2], + [libuna_unicode_character_copy_to_ucs2], + [libuna_unicode_character_size_to_ucs4], + [libuna_unicode_character_copy_from_ucs4], + [libuna_unicode_character_copy_to_ucs4], + [libuna_unicode_character_copy_from_utf7_stream], + [libuna_unicode_character_copy_to_utf7_stream], + [libuna_unicode_character_size_to_utf8], + [libuna_unicode_character_copy_from_utf8], + [libuna_unicode_character_copy_to_utf8], + [libuna_unicode_character_size_to_utf8_rfc2279], + [libuna_unicode_character_copy_from_utf8_rfc2279], + [libuna_unicode_character_copy_to_utf8_rfc2279], + [libuna_unicode_character_size_to_utf16], + [libuna_unicode_character_copy_from_utf16], + [libuna_unicode_character_copy_to_utf16], + [libuna_unicode_character_copy_from_utf16_stream], + [libuna_unicode_character_copy_to_utf16_stream], + [libuna_unicode_character_copy_from_utf32], + [libuna_unicode_character_copy_to_utf32], + [libuna_unicode_character_copy_from_utf32_stream], + [libuna_unicode_character_copy_to_utf32_stream], + [libuna_utf8_stream_size_from_utf8], + [libuna_utf8_stream_copy_from_utf8], + [libuna_utf8_stream_size_from_utf16], + [libuna_utf8_stream_copy_from_utf16], + [libuna_utf8_stream_size_from_utf32], + [libuna_utf8_stream_copy_from_utf32], + [libuna_utf16_stream_size_from_utf8], + [libuna_utf16_stream_copy_from_utf8], + [libuna_utf16_stream_size_from_utf16], + [libuna_utf16_stream_copy_from_utf16], + [libuna_utf16_stream_size_from_utf32], + [libuna_utf16_stream_copy_from_utf32], + [libuna_utf32_stream_size_from_utf8], + [libuna_utf32_stream_copy_from_utf8], + [libuna_utf32_stream_size_from_utf16], + [libuna_utf32_stream_copy_from_utf16], + [libuna_utf32_stream_size_from_utf32], + [libuna_utf32_stream_copy_from_utf32], + [libuna_utf8_string_size_from_byte_stream], + [libuna_utf8_string_copy_from_byte_stream], + [libuna_utf8_string_with_index_copy_from_byte_stream], + [libuna_utf8_string_compare_with_byte_stream], + [libuna_utf8_string_size_from_utf7_stream], + [libuna_utf8_string_copy_from_utf7_stream], + [libuna_utf8_string_with_index_copy_from_utf7_stream], + [libuna_utf8_string_compare_with_utf7_stream], + [libuna_utf8_string_size_from_utf8_stream], + [libuna_utf8_string_copy_from_utf8_stream], + [libuna_utf8_string_with_index_copy_from_utf8_stream], + [libuna_utf8_string_compare_with_utf8_stream], + [libuna_utf8_string_size_from_utf16], + [libuna_utf8_string_copy_from_utf16], + [libuna_utf8_string_with_index_copy_from_utf16], + [libuna_utf8_string_compare_with_utf16], + [libuna_utf8_string_size_from_utf16_stream], + [libuna_utf8_string_copy_from_utf16_stream], + [libuna_utf8_string_with_index_copy_from_utf16_stream], + [libuna_utf8_string_compare_with_utf16_stream], + [libuna_utf8_string_size_from_utf32], + [libuna_utf8_string_copy_from_utf32], + [libuna_utf8_string_with_index_copy_from_utf32], + [libuna_utf8_string_compare_with_utf32], + [libuna_utf8_string_size_from_utf32_stream], + [libuna_utf8_string_copy_from_utf32_stream], + [libuna_utf8_string_with_index_copy_from_utf32_stream], + [libuna_utf8_string_compare_with_utf32_stream], + [libuna_utf8_string_size_from_scsu_stream], + [libuna_utf8_string_copy_from_scsu_stream], + [libuna_utf8_string_with_index_copy_from_scsu_stream], + [libuna_utf16_string_size_from_byte_stream], + [libuna_utf16_string_copy_from_byte_stream], + [libuna_utf16_string_with_index_copy_from_byte_stream], + [libuna_utf16_string_compare_with_byte_stream], + [libuna_utf16_string_size_from_utf7_stream], + [libuna_utf16_string_copy_from_utf7_stream], + [libuna_utf16_string_with_index_copy_from_utf7_stream], + [libuna_utf16_string_compare_with_utf7_stream], + [libuna_utf16_string_size_from_utf8], + [libuna_utf16_string_copy_from_utf8], + [libuna_utf16_string_with_index_copy_from_utf8], + [libuna_utf16_string_size_from_utf8_stream], + [libuna_utf16_string_copy_from_utf8_stream], + [libuna_utf16_string_with_index_copy_from_utf8_stream], + [libuna_utf16_string_compare_with_utf8_stream], + [libuna_utf16_string_size_from_utf16_stream], + [libuna_utf16_string_copy_from_utf16_stream], + [libuna_utf16_string_with_index_copy_from_utf16_stream], + [libuna_utf16_string_compare_with_utf16_stream], + [libuna_utf16_string_size_from_utf32], + [libuna_utf16_string_copy_from_utf32], + [libuna_utf16_string_with_index_copy_from_utf32], + [libuna_utf16_string_compare_with_utf32], + [libuna_utf16_string_size_from_utf32_stream], + [libuna_utf16_string_copy_from_utf32_stream], + [libuna_utf16_string_with_index_copy_from_utf32_stream], + [libuna_utf16_string_compare_with_utf32_stream], + [libuna_utf16_string_size_from_scsu_stream], + [libuna_utf16_string_copy_from_scsu_stream], + [libuna_utf16_string_with_index_copy_from_scsu_stream], + [libuna_utf32_string_size_from_byte_stream], + [libuna_utf32_string_copy_from_byte_stream], + [libuna_utf32_string_with_index_copy_from_byte_stream], + [libuna_utf32_string_compare_with_byte_stream], + [libuna_utf32_string_size_from_utf7_stream], + [libuna_utf32_string_copy_from_utf7_stream], + [libuna_utf32_string_with_index_copy_from_utf7_stream], + [libuna_utf32_string_compare_with_utf7_stream], + [libuna_utf32_string_size_from_utf8_stream], + [libuna_utf32_string_size_from_utf8], + [libuna_utf32_string_copy_from_utf8], + [libuna_utf32_string_copy_from_utf8_stream], + [libuna_utf32_string_with_index_copy_from_utf8_stream], + [libuna_utf32_string_compare_with_utf8_stream], + [libuna_utf32_string_size_from_utf16], + [libuna_utf32_string_copy_from_utf16], + [libuna_utf32_string_with_index_copy_from_utf16], + [libuna_utf32_string_size_from_utf16_stream], + [libuna_utf32_string_copy_from_utf16_stream], + [libuna_utf32_string_with_index_copy_from_utf16_stream], + [libuna_utf32_string_compare_with_utf16_stream], + [libuna_utf32_string_size_from_utf32_stream], + [libuna_utf32_string_copy_from_utf32_stream], + [libuna_utf32_string_with_index_copy_from_utf32_stream], + [libuna_utf32_string_compare_with_utf32_stream], + [libuna_utf32_string_size_from_scsu_stream], + [libuna_utf32_string_copy_from_scsu_stream], + [libuna_utf32_string_with_index_copy_from_scsu_stream]]) + + AX_CHECK_LIB_DEFINITIONS( + [libuna], + [[LIBUNA_COMPARE_LESS], + [LIBUNA_COMPARE_EQUAL], + [LIBUNA_COMPARE_GREATER], + [LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE]]) ac_cv_libuna_LIBADD="-luna"]) ]) - AS_IF( - [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]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libuna]) ]) AS_IF( diff --git a/m4/pthread.m4 b/m4/pthread.m4 index e4fed14..830fb5f 100644 --- a/m4/pthread.m4 +++ b/m4/pthread.m4 @@ -1,6 +1,6 @@ dnl Functions for pthread dnl -dnl Version: 20240308 +dnl Version: 20240513 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,34 @@ 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"; + [ac_cv_pthread=yes + + 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(