diff --git a/appveyor.yml b/appveyor.yml index f4f4d2f..a625586 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -121,14 +121,66 @@ environment: CFLAGS: "-I/usr/local/include" LDFLAGS: "-L/usr/local/lib" CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix" - - TARGET: python311 - BUILD_ENVIRONMENT: python + - TARGET: windows-tox-py38-32bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python38\\python.exe" + PYTHON_VERSION: 3.8 + TOXENV: py38 + - TARGET: windows-tox-py38-64bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python38-x64\\python.exe" + PYTHON_VERSION: 3.8 + TOXENV: py38 + - TARGET: windows-tox-py39-32bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python39\\python.exe" + PYTHON_VERSION: 3.9 + TOXENV: py39 + - TARGET: windows-tox-py39-64bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python39-x64\\python.exe" + PYTHON_VERSION: 3.9 + TOXENV: py39 + - TARGET: windows-tox-py310-32bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python310\\python.exe" + PYTHON_VERSION: 3.10 + TOXENV: py310 + - TARGET: windows-tox-py310-64bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python310-x64\\python.exe" + PYTHON_VERSION: 3.10 + TOXENV: py310 + - TARGET: windows-tox-py311-32bit + BUILD_ENVIRONMENT: python-tox APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311\\python.exe" - - TARGET: python311-x64 - BUILD_ENVIRONMENT: python + PYTHON_VERSION: 3.11 + TOXENV: py311 + - TARGET: windows-tox-py311-64bit + BUILD_ENVIRONMENT: python-tox APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311-x64\\python.exe" + PYTHON_VERSION: 3.11 + TOXENV: py311 + - TARGET: windows-tox-py312-32bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python312\\python.exe" + PYTHON_VERSION: 3.12 + TOXENV: py312 + - TARGET: windows-tox-py312-64bit + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python312-x64\\python.exe" + PYTHON_VERSION: 3.12 + TOXENV: py312 - TARGET: macos-tox-py38 BUILD_ENVIRONMENT: python-tox APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey @@ -159,6 +211,12 @@ environment: HOMEBREW_NO_INSTALL_CLEANUP: 1 PYTHON_VERSION: 3.12 TOXENV: py312 + - TARGET: linux-tox-py310 + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204 + PYTHON_VERSION: 3.10 + TOXENV: py310 + AUDITWHEEL_PLAT: manylinux_2_35_x86_64 - TARGET: cygwin64-gcc BUILD_ENVIRONMENT: cygwin64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -197,7 +255,7 @@ environment: install: - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] ( git clone https://github.com/libyal/vstools.git ..\vstools ) -- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) { +- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python-tox" -and $isWindows)) { .\syncwinflexbison.ps1 } - ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") { .\synczlib.ps1 } @@ -245,11 +303,12 @@ install: .\builddokan.ps1 -Configuration ${Configuration} -Platform "Win32"; .\builddokan.ps1 -Configuration ${Configuration} -Platform "x64"; } } -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool macfuse openssl pkg-config || true; fi -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi -- cmd: if [%BUILD_ENVIRONMENT%]==[python] ( - "%PYTHON%" -m pip install -U pip setuptools twine wheel ) +- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi +- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool macfuse openssl pkg-config || true; fi +- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] ( + "%PYTHON%" -m pip install -U tox twine ) +- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi +- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential flex git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi - ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") { (New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") } - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( @@ -260,7 +319,7 @@ install: $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe } build_script: -- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) { +- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python-tox" -and $isWindows)) { .\synclibs.ps1; .\autogen.ps1 } - ps: If ($env:TARGET -eq "vs2008") { @@ -279,9 +338,10 @@ build_script: move vs2022 msvscpp && nuget pack libewf.nuspec ) - sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; tests/build.sh ${CONFIGURE_OPTIONS}; fi -- cmd: if [%BUILD_ENVIRONMENT%]==[python] ( - "%PYTHON%" setup.py bdist_wheel ) -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi +- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] ( + "%PYTHON%" -m tox -e%TOXENV% ) +- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi +- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV} && tox -eauditwheel -- --plat ${AUDITWHEEL_PLAT} dist/*.whl && rm -f dist/*.whl && mv wheelhouse/*.whl dist/; fi - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( xcopy /i /q /s C:\projects\libewf-legacy C:\cygwin64\home\appveyor\libewf-legacy && C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" && diff --git a/autogen.ps1 b/autogen.ps1 index ff25970..6a99e4c 100644 --- a/autogen.ps1 +++ b/autogen.ps1 @@ -1,6 +1,6 @@ # Script to generate the necessary files for a msvscpp build # -# Version: 20230104 +# Version: 20240306 $WinFlex = "..\win_flex_bison\win_flex.exe" $WinBison = "..\win_flex_bison\win_bison.exe" @@ -9,48 +9,56 @@ $Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Re $Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" } $Prefix = ${Library}.Substring(3) -Get-Content -Path "include\${Library}.h.in" | % { $_ -Replace "@HAVE_V1_API@ \|\| ","" } > "include\${Library}.h" -Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | % { $_ -Replace "@HAVE_V1_API@","defined( HAVE_V1_API )" } > "include\${Library}\definitions.h" -Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\features.h" -Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\types.h" -Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } > "common\types.h" -Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}_definitions.h" -Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}.rc" +Get-Content -Path "include\${Library}.h.in" | % { $_ -Replace "@HAVE_V1_API@ \|\| ","" } | Out-File -Encoding ascii "include\${Library}.h" +Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | % { $_ -Replace "@HAVE_V1_API@","defined( HAVE_V1_API )" } | Out-File -Encoding ascii "include\${Library}\definitions.h" +Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\features.h" +Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\types.h" +Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } | Out-File -Encoding ascii "common\types.h" +Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}_definitions.h" +Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}.rc" + +If (Test-Path "setup.cfg.in") +{ + Get-Content -Path "setup.cfg.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "setup.cfg" +} If (Test-Path "${Prefix}.net") { - Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Prefix}.net\${Prefix}.net.rc" + Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Prefix}.net\${Prefix}.net.rc" } $NamePrefix = "" -ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l") +ForEach (${Library} in Get-ChildItem -Directory -Path "lib*") { - $OutputFile = ${DirectoryElement} -Replace ".l$",".c" + ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l") + { + $OutputFile = ${DirectoryElement} -Replace ".l$",".c" - $NamePrefix = Split-Path -path ${DirectoryElement} -leaf - $NamePrefix = ${NamePrefix} -Replace ".l$","_" + $NamePrefix = Split-Path -path ${DirectoryElement} -leaf + $NamePrefix = ${NamePrefix} -Replace ".l$","_" - Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}" + Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}" - # PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr - # therefore 2>&1 is added and the output is stored in a variable. - $Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1" - Write-Host ${Output} + # PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr + # therefore 2>&1 is added and the output is stored in a variable. + $Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1" + Write-Host ${Output} - # Moving manually since win_flex -o does not provide the expected behavior. - Move-Item "lex.yy.c" ${OutputFile} -force -} + # Moving manually since `win_flex -o filename' does not provide the expected behavior. + Move-Item "lex.yy.c" ${OutputFile} -force + } -ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y") -{ - $OutputFile = ${DirectoryElement} -Replace ".y$",".c" + ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y") + { + $OutputFile = ${DirectoryElement} -Replace ".y$",".c" - Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}" + Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}" - # PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr - # therefore 2>&1 is added and the output is stored in a variable. - $Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1" - Write-Host ${Output} + # PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr + # therefore 2>&1 is added and the output is stored in a variable. + $Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1" + Write-Host ${Output} + } } diff --git a/dpkg/copyright b/dpkg/copyright index 029e1b9..62bf103 100644 --- a/dpkg/copyright +++ b/dpkg/copyright @@ -3,7 +3,7 @@ Upstream-Name: libewf Source: https://github.com/libyal/libewf Files: * -Copyright: 2006-2023, Joachim Metz +Copyright: 2006-2024, Joachim Metz License: LGPL-3.0+ License: LGPL-3.0+ diff --git a/libewf.nuspec b/libewf.nuspec index 0964c05..2137f83 100644 --- a/libewf.nuspec +++ b/libewf.nuspec @@ -2,7 +2,7 @@ libewf - 20140816 + 20240317 Joachim Metz joachimmetz LGPL-3.0-or-later @@ -10,8 +10,8 @@ false libewf Library to access the Expert Witness Compression Format (EWF) format - Release of libewf 20140816 - Copyright (C) 2006-2023 + Release of libewf 20240317 + Copyright (C) 2006-2024 native diff --git a/m4/common.m4 b/m4/common.m4 index f578de1..71c18b8 100644 --- a/m4/common.m4 +++ b/m4/common.m4 @@ -1,6 +1,6 @@ dnl Checks for common headers and functions dnl -dnl Version: 20181117 +dnl Version: 20240308 dnl Function to test if a certain feature was disabled AC_DEFUN([AX_COMMON_ARG_DISABLE], @@ -26,7 +26,7 @@ AC_DEFUN([AX_COMMON_ARG_ENABLE], [$1], [AS_HELP_STRING( [--enable-$1], - [$3 [default=$4]])], + [$3 @<:@default=$4@:>@])], [ac_cv_enable_$2=$enableval], [ac_cv_enable_$2=$4])dnl @@ -43,7 +43,7 @@ AC_DEFUN([AX_COMMON_ARG_WITH], [$1], [AS_HELP_STRING( [--with-$1[[=$5]]], - [$3 [default=$4]])], + [$3 @<:@default=$4@:>@])], [ac_cv_with_$2=$withval], [ac_cv_with_$2=$4])dnl diff --git a/m4/libbfio.m4 b/m4/libbfio.m4 index db18a7f..5a6624a 100644 --- a/m4/libbfio.m4 +++ b/m4/libbfio.m4 @@ -1,6 +1,6 @@ dnl Checks for libbfio required headers and functions dnl -dnl Version: 20201125 +dnl Version: 20240314 dnl Function to detect if libbfio is available dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB], [ac_cv_libbfio=no], [ac_cv_libbfio=check dnl Check if the directory provided as parameter exists + dnl For both --with-libbfio which returns "yes" and --with-libbfio= which returns "" + 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" != 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" @@ -320,8 +322,9 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB], ac_cv_libbfio_LIBADD="-lbfio"]) ]) + AS_IF( - [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_libbfio" != xyes], + [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]) diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index 9b57679..0d7ebee 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20230108 +dnl Version: 20240314 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], [ac_cv_libcdata=no], [ac_cv_libcdata=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcdata which returns "yes" and --with-libcdata= which returns "" + 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" != 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" @@ -497,8 +499,9 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], ac_cv_libcdata_LIBADD="-lcdata"]) ]) + AS_IF( - [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_libcdata" != xyes], + [test "x$ac_cv_libcdata" != xyes && test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdata in directory: $ac_cv_with_libcdata], [1]) diff --git a/m4/libcdatetime.m4 b/m4/libcdatetime.m4 index d71bc07..5dcf601 100644 --- a/m4/libcdatetime.m4 +++ b/m4/libcdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdatetime required headers and functions dnl -dnl Version: 20230115 +dnl Version: 20240314 dnl Function to detect if libcdatetime is available dnl ac_libcdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,6 +10,8 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LIB], [ac_cv_libcdatetime=no], [ac_cv_libcdatetime=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcdatetime which returns "yes" and --with-libcdatetime= which returns "" + dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect], [AS_IF( @@ -217,8 +219,9 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LIB], ac_cv_libcdatetime_LIBADD="-lcdatetime"]) ]) + AS_IF( - [test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect && test "x$ac_cv_libcdatetime" != xyes], + [test "x$ac_cv_libcdatetime" != xyes && test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect && test "x$ac_cv_with_libcdatetime" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdatetime in directory: $ac_cv_with_libcdatetime], [1]) diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index 755722f..87af3e1 100644 --- a/m4/libcerror.m4 +++ b/m4/libcerror.m4 @@ -1,6 +1,6 @@ dnl Checks for libcerror required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB], [ac_cv_libcerror=no], [ac_cv_libcerror=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcerror which returns "yes" and --with-libcerror= which returns "" + 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" != 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" @@ -99,8 +101,9 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB], ac_cv_libcerror_LIBADD="-lcerror"]) ]) + AS_IF( - [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_libcerror" != xyes], + [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]) diff --git a/m4/libcfile.m4 b/m4/libcfile.m4 index 5cfd03d..6ff07cf 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], [ac_cv_libcfile=no], [ac_cv_libcfile=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcfile which returns "yes" and --with-libcfile= which returns "" + 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" != 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" @@ -203,8 +205,9 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], ac_cv_libcfile_LIBADD="-lcfile"]) ]) + AS_IF( - [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_libcfile" != xyes], + [test "x$ac_cv_libcfile" != xyes && test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], [AC_MSG_FAILURE( [unable to find supported libcfile in directory: $ac_cv_with_libcfile], [1]) diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index 21508a3..2410981 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], [ac_cv_libclocale=no], [ac_cv_libclocale=check dnl Check if the directory provided as parameter exists + dnl For both --with-libclocale which returns "yes" and --with-libclocale= which returns "" + 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" != 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" @@ -126,8 +128,9 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], ac_cv_libclocale_LIBADD="-lclocale"]) ]) + AS_IF( - [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_libclocale" != xyes], + [test "x$ac_cv_libclocale" != xyes && test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], [AC_MSG_FAILURE( [unable to find supported libclocale in directory: $ac_cv_with_libclocale], [1]) diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index 4c69aad..60472d8 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], [ac_cv_libcnotify=no], [ac_cv_libcnotify=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcnotify which returns "yes" and --with-libcnotify= which returns "" + 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" != 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" @@ -96,8 +98,9 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], ac_cv_libcnotify_LIBADD="-lcnotify"]) ]) + AS_IF( - [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_libcnotify" != xyes], + [test "x$ac_with_libcnotify" != xyes && test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], [AC_MSG_FAILURE( [unable to find supported libcnotify in directory: $ac_cv_with_libcnotify], [1]) diff --git a/m4/libcpath.m4 b/m4/libcpath.m4 index 7a6fcc0..95834f2 100644 --- a/m4/libcpath.m4 +++ b/m4/libcpath.m4 @@ -1,6 +1,6 @@ dnl Checks for libcpath required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcpath is available dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LIB], [ac_cv_libcpath=no], [ac_cv_libcpath=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcpath which returns "yes" and --with-libcpath= which returns "" + 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" != 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" @@ -152,8 +154,9 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LIB], ac_cv_libcpath_LIBADD="-lcpath"]) ]) + AS_IF( - [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_libcpath" != xyes], + [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]) diff --git a/m4/libcrypto.m4 b/m4/libcrypto.m4 index 507f2bb..41beb22 100644 --- a/m4/libcrypto.m4 +++ b/m4/libcrypto.m4 @@ -1,6 +1,6 @@ dnl Checks for libcrypto required headers and functions dnl -dnl Version: 20231007 +dnl Version: 20240308 dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE], @@ -623,8 +623,10 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB], [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_openssl" = xno], [ac_cv_libcrypto=no], [dnl Check if the directory provided as parameter exists + dnl For both --with-openssl which returns "yes" and --with-openssl= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_openssl" != x && test "x$ac_cv_with_openssl" != xauto-detect], + [test "x$ac_cv_with_openssl" != x && test "x$ac_cv_with_openssl" != xauto-detect && test "x$ac_cv_with_openssl" != xyes], [AS_IF( [test -d "$ac_cv_with_openssl"], [CFLAGS="$CFLAGS -I${ac_cv_with_openssl}/include" diff --git a/m4/libcsplit.m4 b/m4/libcsplit.m4 index 4b8e5e3..dc3ed8b 100644 --- a/m4/libcsplit.m4 +++ b/m4/libcsplit.m4 @@ -1,6 +1,6 @@ dnl Checks for libcsplit required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcsplit is available dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], [ac_cv_libcsplit=no], [ac_cv_libcsplit=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcsplit which returns "yes" and --with-libcsplit= which returns "" + 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" != 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" @@ -147,8 +149,9 @@ AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], ac_cv_libcsplit_LIBADD="-lcsplit"]) ]) + AS_IF( - [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_libcsplit" != xyes], + [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]) diff --git a/m4/libcthreads.m4 b/m4/libcthreads.m4 index 5971958..c0d61f5 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240314 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], [ac_cv_libcthreads=no], [ac_cv_libcthreads=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcthreads which returns "yes" and --with-libcthreads= which returns "" + 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" != 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" @@ -248,7 +250,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_libcthreads" != xyes], + [test "x$ac_cv_libcthreads" != xyes && test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], [AC_MSG_FAILURE( [unable to find supported libcthreads in directory: $ac_cv_with_libcthreads], [1]) diff --git a/m4/libfcache.m4 b/m4/libfcache.m4 index 86e56cc..86003b1 100644 --- a/m4/libfcache.m4 +++ b/m4/libfcache.m4 @@ -1,6 +1,6 @@ dnl Checks for libfcache required headers and functions dnl -dnl Version: 20230115 +dnl Version: 20240314 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], [ac_cv_libfcache=no], [ac_cv_libfcache=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfcache which returns "yes" and --with-libfcache= which returns "" + 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" != 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" @@ -151,8 +153,9 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], ac_cv_libfcache_LIBADD="-lfcache"]) ]) + AS_IF( - [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_libfcache" != xyes], + [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]) diff --git a/m4/libfdata.m4 b/m4/libfdata.m4 index 718b4fb..4670792 100644 --- a/m4/libfdata.m4 +++ b/m4/libfdata.m4 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20230318 +dnl Version: 20240314 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB], [ac_cv_libfdata=no], [ac_cv_libfdata=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfdata which returns "yes" and --with-libfdata= which returns "" + 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" != 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" @@ -454,8 +456,9 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB], ac_cv_libfdata_LIBADD="-lfdata"]) ]) + AS_IF( - [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_libfdata" != xyes], + [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]) diff --git a/m4/libuna.m4 b/m4/libuna.m4 index 4462a91..bb02abd 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20230702 +dnl Version: 20240314 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -27,8 +27,10 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [ac_cv_libuna=no], [ac_cv_libuna=check dnl Check if the directory provided as parameter exists + dnl For both --with-libuna which returns "yes" and --with-libuna= which returns "" + 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" != 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" @@ -942,8 +944,9 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], ac_cv_libuna_LIBADD="-luna"]) ]) + AS_IF( - [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_libuna" != xyes], + [test "x$ac_cv_libuna" != xyes && test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], [AC_MSG_FAILURE( [unable to find supported libuna in directory: $ac_cv_with_libuna], [1]) diff --git a/m4/pthread.m4 b/m4/pthread.m4 index 8a19f9c..e4fed14 100644 --- a/m4/pthread.m4 +++ b/m4/pthread.m4 @@ -1,183 +1,196 @@ dnl Functions for pthread dnl -dnl Version: 20130509 +dnl Version: 20240308 dnl Function to detect if pthread is available AC_DEFUN([AX_PTHREAD_CHECK_LIB], - [dnl Check if parameters were provided - AS_IF( - [test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xno && test "x$ac_cv_with_pthread" != xauto-detect], [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]) - ]) - ]) + [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_pthread" = xno], + [ac_cv_pthread=no], + [ac_cv_pthread=check + dnl Check if parameters were provided + dnl For both --with-pthread which returns "yes" and --with-pthread= which returns "" + 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]) + ]) + ]) + ]) - AS_IF( - [test "x$ac_cv_with_pthread" = xno], - [ac_cv_pthread=no], - [dnl Check for headers - AC_CHECK_HEADERS([pthread.h]) + AS_IF( + [test "x$ac_cv_pthread" = xcheck], + [dnl Check for headers + AC_CHECK_HEADERS([pthread.h]) - 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"; - ]) - ]) + AS_IF( + [test "x$ac_cv_header_pthread_h" = xno], + [ac_cv_pthread=no], + [dnl Check for the individual functions + ac_cv_pthread=pthread - AS_IF( - [test "x$ac_cv_pthread" = xpthread], - [AC_DEFINE( - [HAVE_PTHREAD], - [1], - [Define to 1 if you have the 'pthread' library (-lpthread).]) - ]) + 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]) - AS_IF( - [test "x$ac_cv_pthread" != xno], - [AC_SUBST( - [HAVE_PTHREAD], - [1]) ], - [AC_SUBST( - [HAVE_PTHREAD], - [0]) + 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"; + ]) + + 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]) + ]) + ]) + + AS_IF( + [test "x$ac_cv_pthread" = xpthread], + [AC_DEFINE( + [HAVE_PTHREAD], + [1], + [Define to 1 if you have the 'pthread' library (-lpthread).]) + ]) + + AS_IF( + [test "x$ac_cv_pthread" != xno], + [AC_SUBST( + [HAVE_PTHREAD], + [1]) ], + [AC_SUBST( + [HAVE_PTHREAD], + [0]) + ]) ]) - ]) dnl Function to detect how to enable pthread AC_DEFUN([AX_PTHREAD_CHECK_ENABLE], - [AX_COMMON_ARG_WITH( - [pthread], - [pthread], - [search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread], - [auto-detect], - [DIR]) - - dnl Check for a shared library version - AX_PTHREAD_CHECK_LIB - - AS_IF( - [test "x$ac_cv_pthread_CPPFLAGS" != "x"], - [AC_SUBST( - [PTHREAD_CPPFLAGS], - [$ac_cv_pthread_CPPFLAGS]) - ]) - AS_IF( - [test "x$ac_cv_pthread_LIBADD" != "x"], - [AC_SUBST( - [PTHREAD_LIBADD], - [$ac_cv_pthread_LIBADD]) - ]) + [AX_COMMON_ARG_WITH( + [pthread], + [pthread], + [search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread], + [auto-detect], + [DIR]) + + dnl Check for a shared library version + AX_PTHREAD_CHECK_LIB - AS_IF( - [test "x$ac_cv_pthread" = xpthread], - [AC_SUBST( - [ax_pthread_pc_libs_private], - [-lpthread]) + AS_IF( + [test "x$ac_cv_pthread_CPPFLAGS" != "x"], + [AC_SUBST( + [PTHREAD_CPPFLAGS], + [$ac_cv_pthread_CPPFLAGS]) + ]) + AS_IF( + [test "x$ac_cv_pthread_LIBADD" != "x"], + [AC_SUBST( + [PTHREAD_LIBADD], + [$ac_cv_pthread_LIBADD]) + ]) + + AS_IF( + [test "x$ac_cv_pthread" = xpthread], + [AC_SUBST( + [ax_pthread_pc_libs_private], + [-lpthread]) + ]) ]) - ]) diff --git a/m4/zlib.m4 b/m4/zlib.m4 index 28caa49..3490090 100644 --- a/m4/zlib.m4 +++ b/m4/zlib.m4 @@ -1,6 +1,6 @@ dnl Checks for zlib required headers and functions dnl -dnl Version: 20201230 +dnl Version: 20240314 dnl Function to detect if zlib is available AC_DEFUN([AX_ZLIB_CHECK_LIB], @@ -9,8 +9,10 @@ AC_DEFUN([AX_ZLIB_CHECK_LIB], [ac_cv_zlib=no], [ac_cv_zlib=check dnl Check if the directory provided as parameter exists + dnl For both --with-zlib which returns "yes" and --with-zlib= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect], + [test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], [AS_IF( [test -d "$ac_cv_with_zlib"], [CFLAGS="$CFLAGS -I${ac_cv_with_zlib}/include" @@ -62,6 +64,13 @@ AC_DEFUN([AX_ZLIB_CHECK_LIB], ac_cv_zlib_LIBADD="-lz"; ]) ]) + + AS_IF( + [test "x$ac_cv_zlib" != xyes && test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], + [AC_MSG_FAILURE( + [unable to find supported zlib in directory: $ac_cv_with_zlib], + [1]) + ]) ]) AS_IF( diff --git a/synczlib.ps1 b/synczlib.ps1 index a2a6f86..953d51c 100644 --- a/synczlib.ps1 +++ b/synczlib.ps1 @@ -1,6 +1,6 @@ # Script that synchronizes zlib. # -# Version: 20230926 +# Version: 20240305 Function ExtractZip($Filename) { @@ -27,9 +27,9 @@ Function ExtractZip($Filename) } } -$Filename = "${pwd}\zlib13.zip" -$Url = "http://zlib.net/zlib13.zip" -$ExtractedPath = "zlib-1.3" +$Filename = "${pwd}\zlib131.zip" +$Url = "https://zlib.net/zlib131.zip" +$ExtractedPath = "zlib-1.3.1" $DestinationPath = "..\zlib" If (Test-Path ${Filename}) diff --git a/tox.ini b/tox.ini index 009f168..3f0192d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3{7,8,9,10,11,12} +envlist = auditwheel,py3{7,8,9,10,11,12} [testenv] usedevelop = True @@ -12,9 +12,18 @@ passenv = LIB deps = build - setuptools + setuptools >= 65 wheel commands = python -m build --no-isolation --outdir=dist --wheel python -m pip install --no-index --find-links=dist libewf-python python tests/runtests.py + +[testenv:auditwheel] +usedevelop = True +pip_pre = True +deps = + auditwheel + setuptools >= 65 +commands = + python -m auditwheel repair {posargs}