diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 366215b..06d4ca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,82 @@ jobs: compiler: 'gcc' configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + tests/runtests.sh + build_dist: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + make distcheck + build_fuse_ubuntu: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config libfuse-dev + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + tests/runtests.sh + build_fuse3_ubuntu: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config libfuse3-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -52,12 +124,12 @@ jobs: configure_options: '--enable-python' python_version: '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config python3-dev python-dev-is-python3 - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -81,7 +153,7 @@ jobs: configure_options: '' python-version: '3.10' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -90,7 +162,7 @@ jobs: run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config python3-dev python-dev-is-python3 - name: Building from source env: CC: ${{ matrix.compiler }} @@ -111,10 +183,10 @@ jobs: compiler: 'gcc' configure_options: '--enable-wide-character-type' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -132,6 +204,7 @@ jobs: (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \ done - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: name: linux-${{ matrix.architecture }}-gcc-no-optimization + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml index ee0f617..e05b2b2 100644 --- a/.github/workflows/build_freebsd.yml +++ b/.github/workflows/build_freebsd.yml @@ -6,7 +6,7 @@ jobs: build_freebsd: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Building from source id: build_freebsd uses: vmactions/freebsd-vm@v1 diff --git a/.github/workflows/build_shared.yml b/.github/workflows/build_shared.yml index e0ca458..44031f0 100644 --- a/.github/workflows/build_shared.yml +++ b/.github/workflows/build_shared.yml @@ -17,10 +17,10 @@ jobs: compiler: 'gcc' configure_options: '--enable-wide-character-type' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 15c13bf..d98d681 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -21,7 +21,7 @@ jobs: - python-version: '3.12' toxenv: 'py312' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | sudo add-apt-repository universe && diff --git a/.gitignore b/.gitignore index 5a97cca..6059f06 100644 --- a/.gitignore +++ b/.gitignore @@ -151,6 +151,7 @@ stamp-h[1-9] /tests/creg_test_value /tests/creg_test_value_entry /tests/input +/tests/notify_stream.log /tests/tmp* # Local library dependencies specific files diff --git a/Makefile.am b/Makefile.am index 0a11fab..c423c19 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,8 +61,15 @@ EXTRA_DIST = \ $(SETUP_PY_FILES) \ $(SPEC_FILES) -MAINTAINERCLEANFILES = \ - Makefile.in +DISTCLEANFILES = \ + config.status \ + config.cache \ + config.log \ + libcreg.pc \ + libcreg.spec \ + Makefile \ + Makefile.in \ + po/Makevars pkgconfigdir = $(libdir)/pkgconfig @@ -91,15 +98,3 @@ library: (cd $(srcdir)/libcreg && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) -distclean: clean - -rm -f Makefile - -rm -f config.status - -rm -f config.cache - -rm -f config.log - -rm -f libcreg.pc - -rm -f libcreg.spec - @for dir in ${subdirs}; do \ - (cd $$dir && $(MAKE) distclean) \ - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" - diff --git a/appveyor.yml b/appveyor.yml index fdf13a8..fe55c43 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: nuget_token: - secure: l8kGPdWSs3RTcW6B+mgcT8ByCdVvXx6HbWPNd8nnqoUDhku8g507tpxla7LUPDOM + secure: xFlOodfYttki8HxA1hdhVhQ2lkVbj1EA1FxP9T1il2MUsBfH1rPEbTZy+etaMTD8 PYPI_TOKEN: secure: VHuZiUWgTqTciKE2nsv/Lm6aKQU/ci3QClu+/jWvxtmkaYoz1JQfc7MbYFTIwQpe6DmCh0rl/iG6HlNKwo9yOS2+l/V45Ger3WeV0S0C1ZrftR5BVd1MLXfMs+MM6wn808uKhhWIhZWhcl2PtO6TLreuBzZmLHmjXwBRStGnUpmkGhyhzlZJss4sna11EzW7hZUbn2JA2GsSO1qNDYrvIjaqQZ5v4tu1DfNUi6OBTwm5nQ1YRvnQ2NU4eBV4r/aRRP23s4HqtKGLrJUQq+lAVQ== matrix: @@ -249,6 +249,10 @@ environment: CFLAGS: "--coverage -O0" CPPFLAGS: "-DOPTIMIZATION_DISABLED" LDFLAGS: "--coverage" + - TARGET: mingw-w64-gcc-python + BUILD_ENVIRONMENT: mingw-w64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + CONFIGURE_OPTIONS: "--enable-python" - TARGET: mingw-w64-gcc-static-executables BUILD_ENVIRONMENT: mingw-w64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -306,13 +310,13 @@ install: - 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 git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; 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] ( - C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P gettext-devel -P wget -P python3-devel ) + C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P cygfuse -P gettext-devel -P python3-devel -P wget ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc ) + C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-python3 ) - ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) { $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe } diff --git a/autogen.ps1 b/autogen.ps1 index 520fdb8..fd3f68b 100644 --- a/autogen.ps1 +++ b/autogen.ps1 @@ -1,6 +1,6 @@ # Script to generate the necessary files for a msvscpp build # -# Version: 20230118 +# Version: 20240306 $WinFlex = "..\win_flex_bison\win_flex.exe" $WinBison = "..\win_flex_bison\win_bison.exe" @@ -29,33 +29,36 @@ If (Test-Path "${Prefix}.net") $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 filename' 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/common/Makefile.am b/common/Makefile.am index 2433a75..f7aa524 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = \ + -I../include -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ @@ -15,11 +16,9 @@ EXTRA_DIST = \ types.h.in \ wide_string.h -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + config.h \ + types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f config.h - -rm -f types.h - -rm -f Makefile - diff --git a/configure.ac b/configure.ac index e5ebb9b..a8492fc 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libcreg], - [20240303], + [20240419], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/cregtools/Makefile.am b/cregtools/Makefile.am index a96ab78..e7f280e 100644 --- a/cregtools/Makefile.am +++ b/cregtools/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -104,12 +104,10 @@ cregmount_LDADD = \ @LIBCERROR_LIBADD@ \ @LIBINTL@ -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on cregexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(cregexport_SOURCES) diff --git a/include/Makefile.am b/include/Makefile.am index aa766e1..ba1f20f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,13 +15,11 @@ EXTRA_DIST = \ libcreg/features.h.in \ libcreg/types.h.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libcreg.h \ + libcreg/definitions.h \ + libcreg/features.h \ + libcreg/types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f libcreg.h - -rm -f libcreg/definitions.h - -rm -f libcreg/features.h - -rm -f libcreg/types.h - -rm -f Makefile - diff --git a/libcreg.nuspec b/libcreg.nuspec index 5d73d68..ba60ff1 100644 --- a/libcreg.nuspec +++ b/libcreg.nuspec @@ -2,7 +2,7 @@ libcreg - 20240303 + 20240419 Joachim Metz joachimmetz LGPL-3.0-or-later @@ -10,7 +10,7 @@ false libcreg Library to access the Windows 9x/Me Registry File (CREG) format - Release of libcreg 20240303 + Release of libcreg 20240419 Copyright (C) 2013-2024 native diff --git a/libcreg/Makefile.am b/libcreg/Makefile.am index 93aa12d..86ecb75 100644 --- a/libcreg/Makefile.am +++ b/libcreg/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @@ -78,14 +78,12 @@ EXTRA_DIST = \ libcreg.rc \ libcreg.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libcreg_definitions.h \ + libcreg.rc \ + Makefile \ Makefile.in -distclean: clean - -rm -f libcreg_definitions.h - -rm -f libcreg.rc - -rm -f Makefile - sources-local: $(BUILT_SOURCES) splint-local: 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..112bac6 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: 20240413 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]) @@ -351,7 +354,7 @@ dnl Function to detect if libbfio dependencies are available AC_DEFUN([AX_LIBBFIO_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libbfio_CPPFLAGS="-I../libbfio"; + ac_cv_libbfio_CPPFLAGS="-I../libbfio -I\$(top_srcdir)/libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index 9b57679..aa01d93 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20230108 +dnl Version: 20240413 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -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]) @@ -528,7 +531,7 @@ dnl Function to detect if libcdata dependencies are available AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcdata_CPPFLAGS="-I../libcdata"; + ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index 755722f..e9abcdb 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: 20240413 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]) @@ -166,7 +169,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL], ]) ]) - ac_cv_libcerror_CPPFLAGS="-I../libcerror"; + ac_cv_libcerror_CPPFLAGS="-I../libcerror -I\$(top_srcdir)/libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local diff --git a/m4/libcfile.m4 b/m4/libcfile.m4 index 5cfd03d..81ac5f1 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -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]) @@ -358,7 +361,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [1]) ]) - ac_cv_libcfile_CPPFLAGS="-I../libcfile"; + ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index 21508a3..bd5a10e 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -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]) @@ -220,7 +223,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET - ac_cv_libclocale_CPPFLAGS="-I../libclocale"; + ac_cv_libclocale_CPPFLAGS="-I../libclocale -I\$(top_srcdir)/libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index 4c69aad..e382bdb 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -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]) @@ -138,7 +141,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) - ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; + ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local diff --git a/m4/libcpath.m4 b/m4/libcpath.m4 index 7a6fcc0..bf44d46 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: 20240413 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]) @@ -273,7 +276,7 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LOCAL], AX_LIBCPATH_CHECK_FUNC_MKDIR - ac_cv_libcpath_CPPFLAGS="-I../libcpath"; + ac_cv_libcpath_CPPFLAGS="-I../libcpath -I\$(top_srcdir)/libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local diff --git a/m4/libcsplit.m4 b/m4/libcsplit.m4 index 4b8e5e3..1ac7b9f 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: 20240413 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]) @@ -178,7 +181,7 @@ dnl Function to detect if libcsplit dependencies are available AC_DEFUN([AX_LIBCSPLIT_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; + ac_cv_libcsplit_CPPFLAGS="-I../libcsplit -I\$(top_srcdir)/libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local diff --git a/m4/libcthreads.m4 b/m4/libcthreads.m4 index 5971958..c9c4e46 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -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]) @@ -290,7 +292,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL], AS_IF( [test "x$ac_cv_libcthreads_multi_threading" != xno], - [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; + [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local], diff --git a/m4/libfcache.m4 b/m4/libfcache.m4 index 86e56cc..f063bae 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: 20240413 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]) @@ -196,7 +199,7 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LOCAL], [1]) ]) - ac_cv_libfcache_CPPFLAGS="-I../libfcache"; + ac_cv_libfcache_CPPFLAGS="-I../libfcache -I\$(top_srcdir)/libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local diff --git a/m4/libfdata.m4 b/m4/libfdata.m4 index 718b4fb..50ffbb1 100644 --- a/m4/libfdata.m4 +++ b/m4/libfdata.m4 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20230318 +dnl Version: 20240413 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]) @@ -485,7 +488,7 @@ dnl Function to detect if libfdata dependencies are available AC_DEFUN([AX_LIBFDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfdata_CPPFLAGS="-I../libfdata"; + ac_cv_libfdata_CPPFLAGS="-I../libfdata -I\$(top_srcdir)/libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local diff --git a/m4/libfuse.m4 b/m4/libfuse.m4 index a6fc990..eec18d6 100644 --- a/m4/libfuse.m4 +++ b/m4/libfuse.m4 @@ -1,58 +1,86 @@ dnl Checks for libfuse required headers and functions dnl -dnl Version: 20220118 +dnl Version: 20240413 dnl Function to detect if libfuse is available dnl ac_libfuse_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFUSE_CHECK_LIB], - [dnl Check if parameters were provided - AS_IF( - [test "x$ac_cv_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_with_libfuse" != xauto-detect], - [AS_IF( - [test -d "$ac_cv_with_libfuse"], - [CFLAGS="$CFLAGS -I${ac_cv_with_libfuse}/include" - LDFLAGS="$LDFLAGS -L${ac_cv_with_libfuse}/lib"], - [AC_MSG_WARN([no such directory: $ac_cv_with_libfuse]) - ]) - ]) - - AS_IF( - [test "x$ac_cv_with_libfuse" = xno], + [AS_IF( + [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfuse" = xno], [ac_cv_libfuse=no], - [dnl Check for a pkg-config file + [dnl Check if the directory provided as parameter exists + dnl For both --with-libfuse which returns "yes" and --with-libfuse= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], - [PKG_CHECK_MODULES( - [fuse], - [fuse >= 2.6], - [ac_cv_libfuse=libfuse], - [ac_cv_libfuse=no]) + [test "x$ac_cv_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xauto-detect && test "x$ac_cv_with_libfuse" != xyes], + [AS_IF( + [test -d "$ac_cv_with_libfuse"], + [CFLAGS="$CFLAGS -I${ac_cv_with_libfuse}/include" + LDFLAGS="$LDFLAGS -L${ac_cv_with_libfuse}/lib"], + [AC_MSG_FAILURE( + [no such directory: $ac_cv_with_libfuse], + [1]) + ])], + [dnl Check for a pkg-config file + AS_IF( + [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], + [PKG_CHECK_MODULES( + [fuse3], + [fuse3 >= 3.0], + [ac_cv_libfuse=libfuse3], + [ac_cv_libfuse=no]) + + AS_IF( + [test "x$ac_cv_libfuse" = xno], + [PKG_CHECK_MODULES( + [fuse], + [fuse >= 2.6], + [ac_cv_libfuse=libfuse], + [ac_cv_libfuse=no]) + ]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse3], + [ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse3_CFLAGS -D_FILE_OFFSET_BITS=64" + ac_cv_libfuse_LIBADD="$pkg_cv_fuse3_LIBS"]) + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse], + [ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse_CFLAGS -D_FILE_OFFSET_BITS=64" + ac_cv_libfuse_LIBADD="$pkg_cv_fuse_LIBS"]) + ]) ]) + backup_CPPFLAGS="$CPPFLAGS" + + dnl Check for libfuse and libfuse3 AS_IF( - [test "x$ac_cv_libfuse" = xlibfuse], - [ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse_CFLAGS" - ac_cv_libfuse_LIBADD="$pkg_cv_fuse_LIBS"], + [test "x$ac_cv_libfuse" != xlibfuse && test "x$ac_cv_libfuse" != xlibfuse3], [dnl Check for headers - AC_CHECK_HEADERS( - [fuse.h], - [ac_cv_header_fuse_h=yes], - [ac_cv_header_fuse_h=no]) - dnl libfuse sometimes requires -D_FILE_OFFSET_BITS=64 to be set - dnl macFuse requires -DFUSE_USE_VERSION=26 to be set + CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=30" + AC_CHECK_HEADERS([fuse.h]) + AS_IF( - [test "x$ac_cv_header_fuse_h" = xno], - [AS_UNSET([ac_cv_header_fuse_h]) - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26" + [test "x$ac_cv_header_fuse_h" = xyes], + [ac_cv_libfuse=libfuse3], + [CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=26" AC_CHECK_HEADERS([fuse.h]) - ]) + + AS_IF( + [test "x$ac_cv_header_fuse_h" = xyes], + [ac_cv_libfuse=libfuse]) + ]) AS_IF( [test "x$ac_cv_header_fuse_h" = xno], [ac_cv_libfuse=no], [dnl Check for the individual functions - ac_cv_libfuse=libfuse + AC_CHECK_LIB( + fuse, + fuse_invalidate, + [ac_cv_libfuse=libfuse], + [ac_cv_libfuse=libfuse3]) AC_CHECK_LIB( fuse, @@ -75,24 +103,22 @@ AC_DEFUN([AX_LIBFUSE_CHECK_LIB], [ac_cv_libfuse_dummy=yes], [ac_cv_libfuse=no]) - ac_cv_libfuse_LIBADD="-lfuse"; + dnl libfuse and libfuse3 require -D_FILE_OFFSET_BITS=64 to be set + ac_cv_libfuse_CPPFLAGS="-D_FILE_OFFSET_BITS=64" + + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse3], + [ac_cv_libfuse_LIBADD="-lfuse3"], + [ac_cv_libfuse_LIBADD="-lfuse"]) ]) ]) dnl Check for libosxfuse AS_IF( [test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_header_fuse_h" = xno], - [CPPFLAGS="$CPPFLAGS -DFUSE_USE_VERSION=26" + [CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=26" AC_CHECK_HEADERS([osxfuse/fuse.h]) - dnl libosxfuse sometimes requires -D_FILE_OFFSET_BITS=64 to be set - AS_IF( - [test "x$ac_cv_header_osxfuse_fuse_h" = xno], - [AS_UNSET([ac_cv_header_osxfuse_fuse_h]) - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" - AC_CHECK_HEADERS([osxfuse/fuse.h]) - ]) - AS_IF( [test "x$ac_cv_header_osxfuse_fuse_h" = xno], [ac_cv_libfuse=no], @@ -120,9 +146,21 @@ AC_DEFUN([AX_LIBFUSE_CHECK_LIB], [ac_cv_libfuse_dummy=yes], [ac_cv_libfuse=no]) + dnl libosxfuse requires -D_FILE_OFFSET_BITS=64 to be set + ac_cv_libfuse_CPPFLAGS="-D_FILE_OFFSET_BITS=64" + ac_cv_libfuse_LIBADD="-losxfuse"; ]) ]) + + AS_IF( + [test "x$ac_cv_libfuse" != xyes && test "x$ac_cv_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xauto-detect && test "x$ac_cv_with_libfuse" != xyes], + [AC_MSG_FAILURE( + [unable to find supported libfuse in directory: $ac_cv_with_libfuse], + [1]) + ]) + + CPPFLAGS="$backup_CPPFLAGS" ]) AS_IF( @@ -132,6 +170,13 @@ AC_DEFUN([AX_LIBFUSE_CHECK_LIB], [1], [Define to 1 if you have the 'fuse' library (-lfuse).]) ]) + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse3], + [AC_DEFINE( + [HAVE_LIBFUSE3], + [1], + [Define to 1 if you have the 'fuse3' library (-lfuse3).]) + ]) AS_IF( [test "x$ac_cv_libfuse" = xlibosxfuse], [AC_DEFINE( @@ -182,6 +227,12 @@ AC_DEFUN([AX_LIBFUSE_CHECK_ENABLE], [ax_libfuse_pc_libs_private], [-lfuse]) ]) + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse3], + [AC_SUBST( + [ax_libfuse_pc_libs_private], + [-lfuse3]) + ]) AS_IF( [test "x$ac_cv_libfuse" = xlibosxfuse], [AC_SUBST( @@ -198,5 +249,14 @@ AC_DEFUN([AX_LIBFUSE_CHECK_ENABLE], [ax_libfuse_spec_build_requires], [fuse-devel]) ]) + AS_IF( + [test "x$ac_cv_libfuse" = xlibfuse3], + [AC_SUBST( + [ax_libfuse_spec_requires], + [fuse3-libs]) + AC_SUBST( + [ax_libfuse_spec_build_requires], + [fuse3-devel]) + ]) ]) diff --git a/m4/libuna.m4 b/m4/libuna.m4 index 4462a91..996ac60 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20230702 +dnl Version: 20240413 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]) @@ -973,7 +976,7 @@ dnl Function to detect if libuna dependencies are available AC_DEFUN([AX_LIBUNA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libuna_CPPFLAGS="-I../libuna"; + ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local diff --git a/m4/pthread.m4 b/m4/pthread.m4 index 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/python.m4 b/m4/python.m4 index d1f8067..87f89bd 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -1,6 +1,6 @@ dnl Functions for Python bindings dnl -dnl Version: 20231119 +dnl Version: 20240418 dnl Function to check if the python binary is available dnl "python${PYTHON_VERSION} python python# python#.#" @@ -76,10 +76,12 @@ AC_DEFUN([AX_PYTHON_CHECK], AC_MSG_RESULT( [$PYTHON_LDFLAGS]) - dnl For CygWin add the -no-undefined linker flag + dnl For CygWin and MinGW add the -no-undefined linker flag AS_CASE( - [$host_os], - [cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [$build], + [*-*-cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [*-*-mingw*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [*-*-msys*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], [*],[]) dnl Check for the existence of Python.h diff --git a/manuals/Makefile.am b/manuals/Makefile.am index 695c5ea..9ceb210 100644 --- a/manuals/Makefile.am +++ b/manuals/Makefile.am @@ -6,9 +6,7 @@ EXTRA_DIST = \ creginfo.1 \ libcreg.3 -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/msvscpp/Makefile.am b/msvscpp/Makefile.am index 5853c0f..b7d7889 100644 --- a/msvscpp/Makefile.am +++ b/msvscpp/Makefile.am @@ -38,9 +38,7 @@ MSVSCPP_FILES = \ EXTRA_DIST = \ $(MSVSCPP_FILES) -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/ossfuzz/Makefile.am b/ossfuzz/Makefile.am index d10431d..0aa4b2c 100644 --- a/ossfuzz/Makefile.am +++ b/ossfuzz/Makefile.am @@ -1,7 +1,7 @@ if HAVE_LIB_FUZZING_ENGINE AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -71,12 +71,10 @@ value_fuzzer_LDADD = \ @LIBINTL@ endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on file_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_fuzzer_SOURCES) diff --git a/pycreg/Makefile.am b/pycreg/Makefile.am index 5e1b29a..7173135 100644 --- a/pycreg/Makefile.am +++ b/pycreg/Makefile.am @@ -1,7 +1,7 @@ if HAVE_PYTHON AM_CFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -49,9 +49,7 @@ pycreg_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/synclibs.sh b/synclibs.sh index c6e03b1..701452c 100755 --- a/synclibs.sh +++ b/synclibs.sh @@ -1,7 +1,7 @@ #!/bin/sh # Script that synchronizes the local library dependencies # -# Version: 20231023 +# Version: 20240414 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -95,10 +95,11 @@ endif d } -/distclean: clean/ { +/DISTCLEANFILES = / { n - N - d + /${LOCAL_LIB}_definitions.h/ { + d + } }"; echo "${SED_SCRIPT}" >> ${LOCAL_LIB}-$$.sed; sed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM}; @@ -140,7 +141,7 @@ SED_SCRIPT="/^$/ { then if ! test -f "m4/libuna.m4"; then - sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; + sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I../libuna -I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; fi fi diff --git a/tests/Makefile.am b/tests/Makefile.am index 2626dda..812a62a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,8 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @@ -293,9 +293,8 @@ creg_test_value_entry_LDADD = \ ../libcreg/libcreg.la \ @LIBCERROR_LIBADD@ -MAINTAINERCLEANFILES = \ - Makefile.in - -distclean: clean - -rm -f Makefile +DISTCLEANFILES = \ + Makefile \ + Makefile.in \ + notify_stream.log diff --git a/tests/test_cregexport.sh b/tests/test_cregexport.sh index 313b9b0..3fa7817 100755 --- a/tests/test_cregexport.sh +++ b/tests/test_cregexport.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Export tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -32,12 +32,9 @@ then exit ${EXIT_FAILURE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_creginfo.sh b/tests/test_creginfo.sh index f916ebb..3b4c157 100755 --- a/tests/test_creginfo.sh +++ b/tests/test_creginfo.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Info tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -32,12 +32,9 @@ then exit ${EXIT_FAILURE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_library.sh b/tests/test_library.sh index dca0fb9..01bf95f 100755 --- a/tests/test_library.sh +++ b/tests/test_library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests library functions and types. # -# Version: 20231007 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -141,12 +141,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_manpage.sh b/tests/test_manpage.sh index 4abb656..b5fafd7 100755 --- a/tests/test_manpage.sh +++ b/tests/test_manpage.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests man pages. # -# Version: 20230410 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -45,12 +45,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_python_module.sh b/tests/test_python_module.sh index 6b33dbb..657a6b5 100755 --- a/tests/test_python_module.sh +++ b/tests/test_python_module.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests Python module functions and types. # -# Version: 20240120 +# Version: 20240417 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -15,12 +15,15 @@ OPTION_SETS=(); TEST_TOOL_DIRECTORY="."; INPUT_GLOB="*"; +LIBRARY_NAME="libcreg"; +PYTHON_MODULE="pycreg"; + test_python_function() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; - local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/pycreg_test_${TEST_FUNCTION}.py"; + local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py"; run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_SCRIPT}"; local RESULT=$?; @@ -33,7 +36,7 @@ test_python_function_with_input() local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; - local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/pycreg_test_${TEST_FUNCTION}.py"; + local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py"; if ! test -d "input"; then @@ -50,7 +53,7 @@ test_python_function_with_input() return ${EXIT_IGNORE}; fi - local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "pycreg"); + local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "${PYTHON_MODULE}"); local IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); @@ -125,12 +128,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then @@ -141,6 +141,14 @@ fi source ${TEST_RUNNER}; +PLATFORM=`uname -s | sed 's/-.*$//'`; + +if test "${PLATFORM}" = "MINGW64_NT" || test "${PLATFORM}" = "MSYS_NT"; +then + cp ../${LIBRARY_NAME}/.libs/*.dll ../${PYTHON_MODULE}/.libs/; + cp ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.dll ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.pyd; +fi + RESULT=${EXIT_IGNORE}; for TEST_FUNCTION in ${TEST_FUNCTIONS}; diff --git a/tests/test_tools.sh b/tests/test_tools.sh index c9eaa57..b2ebc01 100755 --- a/tests/test_tools.sh +++ b/tests/test_tools.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests tools functions and types. # -# Version: 20231007 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -141,12 +141,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then