diff --git a/.github/workflows/build_ossfuzz.yml b/.github/workflows/build_ossfuzz.yml new file mode 100644 index 0000000..c96a287 --- /dev/null +++ b/.github/workflows/build_ossfuzz.yml @@ -0,0 +1,35 @@ +# Build OSSFuzz fuzz targets from source. +name: build_ossfuzz +on: + push: + branches: [main] +permissions: read-all +jobs: + build_ossfuzz: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - name: Install build dependencies + run: | + sudo apt-get -y install git + - uses: actions/checkout@v4 + with: + repository: google/oss-fuzz + path: oss-fuzz + - name: Build OSSFuzz fuzz targets + working-directory: oss-fuzz + run: | + mkdir -p projects/libfsclfs + cp projects/libyal/build.sh projects/libfsclfs/ + cp projects/libyal/project.yaml projects/libfsclfs/ + head -n 20 projects/libyal/Dockerfile > projects/libfsclfs/Dockerfile + echo "RUN git clone --depth 1 https://github.com/libyal/libfsclfs.git libfsclfs" >> projects/libfsclfs/Dockerfile + tail -n 3 projects/libyal/Dockerfile >> projects/libfsclfs/Dockerfile + python3 infra/helper.py build_image --pull libfsclfs + python3 infra/helper.py build_fuzzers --sanitizer address libfsclfs + python3 infra/helper.py check_build libfsclfs diff --git a/.github/workflows/build_shared.yml b/.github/workflows/build_shared.yml index 44031f0..66d9b25 100644 --- a/.github/workflows/build_shared.yml +++ b/.github/workflows/build_shared.yml @@ -10,9 +10,6 @@ jobs: strategy: matrix: include: - - architecture: 'x64' - compiler: 'gcc' - configure_options: '' - architecture: 'x64' compiler: 'gcc' configure_options: '--enable-wide-character-type' diff --git a/configure.ac b/configure.ac index a679b40..435482f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libfsclfs], - [20240430], + [20240622], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/libfsclfs.ini b/libfsclfs.ini index c8f8161..e50e2e7 100644 --- a/libfsclfs.ini +++ b/libfsclfs.ini @@ -4,10 +4,11 @@ status: "experimental" year_of_creation: "2010" data_format: "Common Log File System (CLFS)" documentation_url: "https://github.com/libyal/libfsclfs/tree/main/documenation" -features: ["debug_output"] +features: ["debug_output", "ossfuzz", "tools"] [library] description: "Library to access the Common Log File System (CLFS) format" +features: ["pthread", "wide_character_type"] public_types: ["container", "record", "store", "stream"] [tools] 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/libfdatetime.m4 b/m4/libfdatetime.m4 index d8f1066..f945e4f 100644 --- a/m4/libfdatetime.m4 +++ b/m4/libfdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libfdatetime required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240518 dnl Function to detect if libfdatetime is available dnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfdatetime"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfdatetime], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfdatetime])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,428 +38,95 @@ AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfdatetime_h" = xno], [ac_cv_libfdatetime=no], - [dnl Check for the individual functions - ac_cv_libfdatetime=yes - - AC_CHECK_LIB( - fdatetime, - libfdatetime_get_version, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl FAT date time functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_from_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_fat_date_time_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl FILETIME functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_from_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_filetime_add, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl Floatingtime functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_from_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_floatingtime_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl HFS time functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_from_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_hfs_time_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) + [ac_cv_libfdatetime=yes - dnl NSF timedate functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_from_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_nsf_timedate_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl POSIX time functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_from_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_32bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_from_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_64bit, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_posix_time_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - - dnl Systemtime functions - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_initialize, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_free, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_from_byte_stream, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf8_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf8_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf16_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf16_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf32_string, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) - AC_CHECK_LIB( - fdatetime, - libfdatetime_systemetime_copy_to_utf32_string_with_index, - [ac_cv_libfdatetime_dummy=yes], - [ac_cv_libfdatetime=no]) + AX_CHECK_LIB_FUNCTIONS( + [libfdatetime], + [fdatetime], + [[libfdatetime_get_version], + [libfdatetime_fat_date_time_initialize], + [libfdatetime_fat_date_time_free], + [libfdatetime_fat_date_time_copy_from_byte_stream], + [libfdatetime_fat_date_time_copy_from_32bit], + [libfdatetime_fat_date_time_copy_to_32bit], + [libfdatetime_fat_date_time_copy_to_utf8_string], + [libfdatetime_fat_date_time_copy_to_utf8_string_with_index], + [libfdatetime_fat_date_time_copy_to_utf16_string], + [libfdatetime_fat_date_time_copy_to_utf16_string_with_index], + [libfdatetime_fat_date_time_copy_to_utf32_string], + [libfdatetime_fat_date_time_copy_to_utf32_string_with_index], + [libfdatetime_filetime_initialize], + [libfdatetime_filetime_free], + [libfdatetime_filetime_copy_from_byte_stream], + [libfdatetime_filetime_copy_from_64bit], + [libfdatetime_filetime_copy_to_64bit], + [libfdatetime_filetime_copy_to_utf8_string], + [libfdatetime_filetime_copy_to_utf8_string_with_index], + [libfdatetime_filetime_copy_to_utf16_string], + [libfdatetime_filetime_copy_to_utf16_string_with_index], + [libfdatetime_filetime_copy_to_utf32_string], + [libfdatetime_filetime_copy_to_utf32_string_with_index], + [libfdatetime_filetime_add], + [libfdatetime_floatingtime_initialize], + [libfdatetime_floatingtime_free], + [libfdatetime_floatingtime_copy_from_byte_stream], + [libfdatetime_floatingtime_copy_from_64bit], + [libfdatetime_floatingtime_copy_to_64bit], + [libfdatetime_floatingtime_copy_to_utf8_string], + [libfdatetime_floatingtime_copy_to_utf8_string_with_index], + [libfdatetime_floatingtime_copy_to_utf16_string], + [libfdatetime_floatingtime_copy_to_utf16_string_with_index], + [libfdatetime_floatingtime_copy_to_utf32_string], + [libfdatetime_floatingtime_copy_to_utf32_string_with_index], + [libfdatetime_hfs_time_initialize], + [libfdatetime_hfs_time_free], + [libfdatetime_hfs_time_copy_from_byte_stream], + [libfdatetime_hfs_time_copy_from_32bit], + [libfdatetime_hfs_time_copy_to_32bit], + [libfdatetime_hfs_time_copy_to_utf8_string], + [libfdatetime_hfs_time_copy_to_utf8_string_with_index], + [libfdatetime_hfs_time_copy_to_utf16_string], + [libfdatetime_hfs_time_copy_to_utf16_string_with_index], + [libfdatetime_hfs_time_copy_to_utf32_string], + [libfdatetime_hfs_time_copy_to_utf32_string_with_index], + [libfdatetime_nsf_timedate_initialize], + [libfdatetime_nsf_timedate_free], + [libfdatetime_nsf_timedate_copy_from_byte_stream], + [libfdatetime_nsf_timedate_copy_from_64bit], + [libfdatetime_nsf_timedate_copy_to_64bit], + [libfdatetime_nsf_timedate_copy_to_utf8_string], + [libfdatetime_nsf_timedate_copy_to_utf8_string_with_index], + [libfdatetime_nsf_timedate_copy_to_utf16_string], + [libfdatetime_nsf_timedate_copy_to_utf16_string_with_index], + [libfdatetime_nsf_timedate_copy_to_utf32_string], + [libfdatetime_nsf_timedate_copy_to_utf32_string_with_index], + [libfdatetime_posix_time_initialize], + [libfdatetime_posix_time_free], + [libfdatetime_posix_time_copy_from_byte_stream], + [libfdatetime_posix_time_copy_from_32bit], + [libfdatetime_posix_time_copy_to_32bit], + [libfdatetime_posix_time_copy_from_64bit], + [libfdatetime_posix_time_copy_to_64bit], + [libfdatetime_posix_time_copy_to_utf8_string], + [libfdatetime_posix_time_copy_to_utf8_string_with_index], + [libfdatetime_posix_time_copy_to_utf16_string], + [libfdatetime_posix_time_copy_to_utf16_string_with_index], + [libfdatetime_posix_time_copy_to_utf32_string], + [libfdatetime_posix_time_copy_to_utf32_string_with_index], + [libfdatetime_systemetime_initialize], + [libfdatetime_systemetime_free], + [libfdatetime_systemetime_copy_from_byte_stream], + [libfdatetime_systemetime_copy_to_utf8_string], + [libfdatetime_systemetime_copy_to_utf8_string_with_index], + [libfdatetime_systemetime_copy_to_utf16_string], + [libfdatetime_systemetime_copy_to_utf16_string_with_index], + [libfdatetime_systemetime_copy_to_utf32_string], + [libfdatetime_systemetime_copy_to_utf32_string_with_index]]) ac_cv_libfdatetime_LIBADD="-lfdatetime"]) ]) - AS_IF( - [test "x$ac_cv_libfdatetime" != xyes && test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfdatetime]) ]) AS_IF( diff --git a/m4/libfguid.m4 b/m4/libfguid.m4 index 5e44bb6..d0b1ece 100644 --- a/m4/libfguid.m4 +++ b/m4/libfguid.m4 @@ -1,6 +1,6 @@ dnl Checks for libfguid required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240519 dnl Function to detect if libfguid is available dnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfguid"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfguid], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfguid])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,76 +38,27 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfguid_h" = xno], [ac_cv_libfguid=no], - [dnl Check for the individual functions - ac_cv_libfguid=yes - - AC_CHECK_LIB( - fguid, - libfguid_get_version, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - - dnl Identifier functions - AC_CHECK_LIB( - fguid, - libfguid_identifier_initialize, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_free, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_from_byte_stream, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_get_string_size, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf8_string, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf8_string_with_index, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf16_string, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf16_string_with_index, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf32_string, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) - AC_CHECK_LIB( - fguid, - libfguid_identifier_copy_to_utf32_string_with_index, - [ac_cv_libfguid_dummy=yes], - [ac_cv_libfguid=no]) + [ac_cv_libfguid=yes + + AX_CHECK_LIB_FUNCTIONS( + [libfguid], + [fguid], + [[libfguid_get_version], + [libfguid_identifier_initialize], + [libfguid_identifier_free], + [libfguid_identifier_copy_from_byte_stream], + [libfguid_identifier_get_string_size], + [libfguid_identifier_copy_to_utf8_string], + [libfguid_identifier_copy_to_utf8_string_with_index], + [libfguid_identifier_copy_to_utf16_string], + [libfguid_identifier_copy_to_utf16_string_with_index], + [libfguid_identifier_copy_to_utf32_string], + [libfguid_identifier_copy_to_utf32_string_with_index]]) ac_cv_libfguid_LIBADD="-lfguid"]) ]) - AS_IF( - [test "x$ac_cv_libfguid" != xyes && test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfguid in directory: $ac_cv_with_libfguid], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfguid]) ]) AS_IF( diff --git a/m4/libfusn.m4 b/m4/libfusn.m4 index dcdbca9..5cfb439 100644 --- a/m4/libfusn.m4 +++ b/m4/libfusn.m4 @@ -1,6 +1,6 @@ dnl Checks for libfusn required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240521 dnl Function to detect if libfusn is available dnl ac_libfusn_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFUSN_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfusn" != x && test "x$ac_cv_with_libfusn" != xauto-detect && test "x$ac_cv_with_libfusn" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfusn"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfusn}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfusn}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfusn], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfusn])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,48 +38,32 @@ AC_DEFUN([AX_LIBFUSN_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfusn_h" = xno], [ac_cv_libfusn=no], - [dnl Check for the individual functions - ac_cv_libfusn=yes - - AC_CHECK_LIB( - fusn, - libfusn_get_version, - [ac_cv_libfusn_dummy=yes], - [ac_cv_libfusn=no]) - - dnl Record functions - AC_CHECK_LIB( - fusn, - libfusn_record_initialize, - [ac_cv_libfusn_dummy=yes], - [ac_cv_libfusn=no]) - AC_CHECK_LIB( - fusn, - libfusn_record_free, - [ac_cv_libfusn_dummy=yes], - [ac_cv_libfusn=no]) - - AC_CHECK_LIB( - fusn, - libfusn_record_copy_from_byte_stream, - [ac_cv_libfusn_dummy=yes], - [ac_cv_libfusn=no]) - - AC_CHECK_LIB( - fusn, - libfusn_record_get_size, - [ac_cv_libfusn_dummy=yes], - [ac_cv_libfusn=no]) + [ac_cv_libfusn=yes + + AX_CHECK_LIB_FUNCTIONS( + [libfusn], + [fusn], + [[libfusn_get_version], + [libfusn_record_initialize], + [libfusn_record_free], + [libfusn_record_copy_from_byte_stream], + [libfusn_record_get_size], + [libfusn_record_get_update_time], + [libfusn_record_get_file_reference], + [libfusn_record_get_parent_file_reference], + [libfusn_record_get_update_sequence_number], + [libfusn_record_get_update_reason_flags], + [libfusn_record_get_update_source_flags], + [libfusn_record_get_file_attribute_flags], + [libfusn_record_get_utf8_name_size], + [libfusn_record_get_utf8_name], + [libfusn_record_get_utf16_name_size], + [libfusn_record_get_utf16_name]]) ac_cv_libfusn_LIBADD="-lfusn"]) ]) - AS_IF( - [test "x$ac_cv_libfusn" != xyes && test "x$ac_cv_with_libfusn" != x && test "x$ac_cv_with_libfusn" != xauto-detect && test "x$ac_cv_with_libfusn" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfusn in directory: $ac_cv_with_libfusn], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfusn]) ]) AS_IF( diff --git a/m4/libfwnt.m4 b/m4/libfwnt.m4 index 5337c17..125ac25 100644 --- a/m4/libfwnt.m4 +++ b/m4/libfwnt.m4 @@ -1,6 +1,6 @@ dnl Checks for libfwnt required headers and functions dnl -dnl Version: 20240413 +dnl Version: 20240519 dnl Function to detect if libfwnt is available dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -14,15 +14,7 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB], dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], - [AS_IF( - [test -d "$ac_cv_with_libfwnt"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwnt}/lib"], - [AC_MSG_FAILURE( - [no such directory: $ac_cv_with_libfwnt], - [1]) - ]) - ], + [AX_CHECK_LIB_DIRECTORY_EXISTS([libfwnt])], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], @@ -46,187 +38,47 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB], AS_IF( [test "x$ac_cv_header_libfwnt_h" = xno], [ac_cv_libfwnt=no], - [dnl Check for the individual functions - ac_cv_libfwnt=yes - - AC_CHECK_LIB( - fwnt, - libfwnt_get_version, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl Security descriptor functions - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_initialize, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_free, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_copy_from_byte_stream, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_get_owner, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_get_group, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_get_discretionary_acl, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_descriptor_get_system_acl, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl Security identifier (SID) functions - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_initialize, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_free, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_from_byte_stream, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_get_string_size, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf8_string, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf8_string_with_index, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf16_string, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf16_string_with_index, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf32_string, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_security_identifier_copy_to_utf32_string_with_index, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl Access control list (ACL) functions - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_list_free, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_list_get_number_of_entries, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_list_get_entry_by_index, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) + [ac_cv_libfwnt=yes - dnl Access control entry (ACE) functions - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_entry_free, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_entry_get_type, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_entry_get_flags, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_entry_get_access_mask, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_access_control_entry_get_security_identifier, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl LZNT1 functions - AC_CHECK_LIB( - fwnt, - libfwnt_lznt1_decompress, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl LZXPRESS functions - AC_CHECK_LIB( - fwnt, - libfwnt_lzx_decompress, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - - dnl LZXPRESS functions - AC_CHECK_LIB( - fwnt, - libfwnt_lzxpress_decompress, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) - AC_CHECK_LIB( - fwnt, - libfwnt_lzxpress_huffman_decompress, - [ac_cv_libfwnt_dummy=yes], - [ac_cv_libfwnt=no]) + AX_CHECK_LIB_FUNCTIONS( + [libfwnt], + [fwnt], + [[libfwnt_get_version], + [libfwnt_array_initialize], + [libfwnt_security_descriptor_initialize], + [libfwnt_security_descriptor_free], + [libfwnt_security_descriptor_copy_from_byte_stream], + [libfwnt_security_descriptor_get_owner], + [libfwnt_security_descriptor_get_group], + [libfwnt_security_descriptor_get_discretionary_acl], + [libfwnt_security_descriptor_get_system_acl], + [libfwnt_security_identifier_initialize], + [libfwnt_security_identifier_free], + [libfwnt_security_identifier_copy_from_byte_stream], + [libfwnt_security_identifier_get_string_size], + [libfwnt_security_identifier_copy_to_utf8_string], + [libfwnt_security_identifier_copy_to_utf8_string_with_index], + [libfwnt_security_identifier_copy_to_utf16_string], + [libfwnt_security_identifier_copy_to_utf16_string_with_index], + [libfwnt_security_identifier_copy_to_utf32_string], + [libfwnt_security_identifier_copy_to_utf32_string_with_index], + [libfwnt_access_control_list_free], + [libfwnt_access_control_list_get_number_of_entries], + [libfwnt_access_control_list_get_entry_by_index], + [libfwnt_access_control_entry_free], + [libfwnt_access_control_entry_get_type], + [libfwnt_access_control_entry_get_flags], + [libfwnt_access_control_entry_get_access_mask], + [libfwnt_access_control_entry_get_security_identifier], + [libfwnt_lznt1_decompress], + [libfwnt_lzx_decompress], + [libfwnt_lzxpress_decompress], + [libfwnt_lzxpress_huffman_decompress]]) ac_cv_libfwnt_LIBADD="-lfwnt"]) ]) - AS_IF( - [test "x$ac_cv_libfwnt" != xyes && test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], - [AC_MSG_FAILURE( - [unable to find supported libfwnt in directory: $ac_cv_with_libfwnt], - [1]) - ]) + AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfwnt]) ]) 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(