From 817797ca167b1ca43e1f2eace0d74b7eb2388f49 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Mon, 6 May 2024 06:26:24 +0200 Subject: [PATCH] Changes for deployment --- .github/workflows/build.yml | 91 +++++++++- .github/workflows/build_freebsd.yml | 2 +- .github/workflows/build_shared.yml | 4 +- .github/workflows/build_wheel.yml | 2 +- .gitignore | 1 + Makefile.am | 25 +-- appveyor.yml | 16 +- common/Makefile.am | 13 +- configure.ac | 2 +- ewf.net/Makefile.am | 6 +- ewftools/Makefile.am | 10 +- include/Makefile.am | 14 +- libewf/Makefile.am | 14 +- m4/libbfio.m4 | 6 +- m4/libcaes.m4 | 6 +- m4/libcdata.m4 | 6 +- m4/libcdatetime.m4 | 6 +- m4/libcerror.m4 | 6 +- m4/libcfile.m4 | 6 +- m4/libclocale.m4 | 6 +- m4/libcnotify.m4 | 6 +- m4/libcpath.m4 | 6 +- m4/libcsplit.m4 | 6 +- m4/libcthreads.m4 | 6 +- m4/libfcache.m4 | 6 +- m4/libfdata.m4 | 6 +- m4/libfdatetime.m4 | 6 +- m4/libfguid.m4 | 6 +- m4/libfuse.m4 | 236 +++++++++++++++---------- m4/libfvalue.m4 | 6 +- m4/libhmac.m4 | 6 +- m4/libodraw.m4 | 6 +- m4/libsmdev.m4 | 6 +- m4/libsmraw.m4 | 6 +- m4/libuna.m4 | 6 +- m4/python.m4 | 10 +- m4/zlib.m4 | 4 +- manuals/Makefile.am | 6 +- msvscpp/Makefile.am | 6 +- ossfuzz/Makefile.am | 10 +- pyewf/Makefile.am | 10 +- synclibs.sh | 11 +- synczlib.ps1 | 8 +- tests/Makefile.am | 13 +- tests/test_ewfacquire.sh | 9 +- tests/test_ewfacquire_optical.sh | 9 +- tests/test_ewfacquire_resume.sh | 9 +- tests/test_ewfacquirestream.sh | 9 +- tests/test_ewfexport.sh | 9 +- tests/test_ewfexport_logical.sh | 9 +- tests/test_ewfinfo.sh | 9 +- tests/test_ewfinfo_logical.sh | 9 +- tests/test_ewfinfo_logical_bodyfile.sh | 9 +- tests/test_ewfverify.sh | 9 +- tests/test_ewfverify_logical.sh | 9 +- tests/test_glob.sh | 9 +- tests/test_library.sh | 9 +- tests/test_manpage.sh | 9 +- tests/test_python_module.sh | 26 ++- tests/test_tools.sh | 9 +- tests/test_write_functions.sh | 9 +- 61 files changed, 438 insertions(+), 372 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b5d1b61..ba8817ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,10 +39,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 byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-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_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 byacc flex git libssl-dev libtool pkg-config zlib1g-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: | + 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 byacc flex git libssl-dev libtool pkg-config zlib1g-dev 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 byacc flex git libssl-dev libtool pkg-config zlib1g-dev libfuse3-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -64,12 +136,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 byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -93,7 +165,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: @@ -102,7 +174,7 @@ jobs: run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 - name: Building from source env: CC: ${{ matrix.compiler }} @@ -123,10 +195,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 byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -144,6 +216,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 0a4eafbf..538f8a03 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 43b59921..b8f39d1c 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 byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev - 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 15c13bf9..d98d681e 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 27384e63..f236b384 100644 --- a/.gitignore +++ b/.gitignore @@ -223,6 +223,7 @@ stamp-h[1-9] /tests/ewf_test_write_chunk /tests/ewf_test_write_io_handle /tests/input +/tests/notify_stream.log /tests/tmp* # Local library dependencies specific files diff --git a/Makefile.am b/Makefile.am index 178bcdec..c055549c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,8 +71,15 @@ EXTRA_DIST = \ $(SETUP_PY_FILES) \ $(SPEC_FILES) -MAINTAINERCLEANFILES = \ - Makefile.in +DISTCLEANFILES = \ + config.status \ + config.cache \ + config.log \ + libewf.pc \ + libewf.spec \ + Makefile \ + Makefile.in \ + po/Makevars pkgconfigdir = $(libdir)/pkgconfig @@ -106,17 +113,3 @@ library: (cd $(srcdir)/libewf && $(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 libewf.pc - -rm -f libewf.spec - -rm -f dpkg/changelog - -rm -f dpkg/shlibs.local.ex - @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 5cb47a28..268ca932 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -229,7 +229,7 @@ environment: - TARGET: cygwin64-gcc-static-executables BUILD_ENVIRONMENT: cygwin64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - CONFIGURE_OPTIONS: "--enable-static-executables" + CONFIGURE_OPTIONS: "--enable-static-executables --with-libfuse=no" - TARGET: mingw-w64-gcc BUILD_ENVIRONMENT: mingw-w64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -241,11 +241,19 @@ 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 CONFIGURE_OPTIONS: "--enable-static-executables" +matrix: + allow_failures: + - TARGET: mingw-w64-gcc-python + install: - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] ( git clone https://github.com/libyal/vstools.git ..\vstools ) @@ -304,13 +312,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 bison -P flex -P zlib-devel -P libbz2-devel -P libssl-devel -P python3-devel -P libuuid-devel ) + C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P bison -P cygfuse -P flex -P gettext-devel -P libbz2-devel -P libssl-devel -P libuuid-devel -P python3-devel -P wget -P zlib-devel ) - 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 msys/bison msys/flex msys/zlib-devel ) + C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex msys/zlib-devel 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/common/Makefile.am b/common/Makefile.am index 2433a75e..f7aa5243 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 ea87db0c..b8b5c8cd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libewf], - [20240308], + [20240506], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/ewf.net/Makefile.am b/ewf.net/Makefile.am index 8afa9c20..b8b01408 100644 --- a/ewf.net/Makefile.am +++ b/ewf.net/Makefile.am @@ -8,9 +8,7 @@ EXTRA_DIST = \ ewf.net.rc \ ewf.net.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/ewftools/Makefile.am b/ewftools/Makefile.am index 92428bfc..ef5bde15 100644 --- a/ewftools/Makefile.am +++ b/ewftools/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@ \ @@ -457,12 +457,10 @@ ewfverify_LDADD = \ @LIBINTL@ \ @PTHREAD_LIBADD@ -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on ewfacquire ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(ewfacquire_SOURCES) diff --git a/include/Makefile.am b/include/Makefile.am index 68c35a6b..78a9bfc1 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,13 +15,11 @@ EXTRA_DIST = \ libewf/features.h.in \ libewf/types.h.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libewf.h \ + libewf/definitions.h \ + libewf/features.h \ + libewf/types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f libewf.h - -rm -f libewf/definitions.h - -rm -f libewf/features.h - -rm -f libewf/types.h - -rm -f Makefile - diff --git a/libewf/Makefile.am b/libewf/Makefile.am index bc71586d..8feb22a6 100644 --- a/libewf/Makefile.am +++ b/libewf/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@ \ @@ -153,14 +153,12 @@ EXTRA_DIST = \ libewf.rc \ libewf.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libewf_definitions.h \ + libewf.rc \ + Makefile \ Makefile.in -distclean: clean - -rm -f libewf_definitions.h - -rm -f libewf.rc - -rm -f Makefile - sources-local: $(BUILT_SOURCES) splint-local: diff --git a/m4/libbfio.m4 b/m4/libbfio.m4 index 1e222595..112bac64 100644 --- a/m4/libbfio.m4 +++ b/m4/libbfio.m4 @@ -1,6 +1,6 @@ dnl Checks for libbfio required headers and functions dnl -dnl Version: 20240308 +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 @@ -324,7 +324,7 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_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]) @@ -354,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/libcaes.m4 b/m4/libcaes.m4 index 8db10155..b819d703 100644 --- a/m4/libcaes.m4 +++ b/m4/libcaes.m4 @@ -1,6 +1,6 @@ dnl Checks for libcaes required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcaes is available dnl ac_libcaes_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -115,7 +115,7 @@ AC_DEFUN([AX_LIBCAES_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect && test "x$ac_cv_with_libcaes" != xyes], + [test "x$ac_cv_libcaes" != xyes && test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect && test "x$ac_cv_with_libcaes" != xyes], [AC_MSG_FAILURE( [unable to find supported libcaes in directory: $ac_cv_with_libcaes], [1]) @@ -172,7 +172,7 @@ AC_DEFUN([AX_LIBCAES_CHECK_LOCAL], [ac_cv_libcaes_aes_xts=local], [ac_cv_libcaes_aes_xts=$ac_cv_libcrypto_aes_xts]) - ac_cv_libcaes_CPPFLAGS="-I../libcaes"; + ac_cv_libcaes_CPPFLAGS="-I../libcaes -I\$(top_srcdir)/libcaes"; ac_cv_libcaes_LIBADD="../libcaes/libcaes.la"; ac_cv_libcaes=local diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index 309ec517..aa01d932 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -501,7 +501,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], + [test "x$ac_cv_libcdata" != xyes && test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdata in directory: $ac_cv_with_libcdata], [1]) @@ -531,7 +531,7 @@ dnl Function to detect if libcdata dependencies are available AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcdata_CPPFLAGS="-I../libcdata"; + ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local diff --git a/m4/libcdatetime.m4 b/m4/libcdatetime.m4 index 39ed3887..8e66daab 100644 --- a/m4/libcdatetime.m4 +++ b/m4/libcdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdatetime required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcdatetime is available dnl ac_libcdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -221,7 +221,7 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect && test "x$ac_cv_with_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]) @@ -383,7 +383,7 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LOCAL], [1]) ]) - ac_cv_libcdatetime_CPPFLAGS="-I../libcdatetime"; + ac_cv_libcdatetime_CPPFLAGS="-I../libcdatetime -I\$(top_srcdir)/libcdatetime"; ac_cv_libcdatetime_LIBADD="../libcdatetime/libcdatetime.la"; ac_cv_libcdatetime=local diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index 7d7f40fb..e9abcdbc 100644 --- a/m4/libcerror.m4 +++ b/m4/libcerror.m4 @@ -1,6 +1,6 @@ dnl Checks for libcerror required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -103,7 +103,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_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]) @@ -169,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 5596e9c2..81ac5f14 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -207,7 +207,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], + [test "x$ac_cv_libcfile" != xyes && test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], [AC_MSG_FAILURE( [unable to find supported libcfile in directory: $ac_cv_with_libcfile], [1]) @@ -361,7 +361,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [1]) ]) - ac_cv_libcfile_CPPFLAGS="-I../libcfile"; + ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index d82d1fd2..bd5a10e5 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -130,7 +130,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], + [test "x$ac_cv_libclocale" != xyes && test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], [AC_MSG_FAILURE( [unable to find supported libclocale in directory: $ac_cv_with_libclocale], [1]) @@ -223,7 +223,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET - ac_cv_libclocale_CPPFLAGS="-I../libclocale"; + ac_cv_libclocale_CPPFLAGS="-I../libclocale -I\$(top_srcdir)/libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index 41cf9e80..e382bdb0 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -100,7 +100,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], + [test "x$ac_with_libcnotify" != xyes && test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], [AC_MSG_FAILURE( [unable to find supported libcnotify in directory: $ac_cv_with_libcnotify], [1]) @@ -141,7 +141,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) - ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; + ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local diff --git a/m4/libcpath.m4 b/m4/libcpath.m4 index 7001a053..bf44d46e 100644 --- a/m4/libcpath.m4 +++ b/m4/libcpath.m4 @@ -1,6 +1,6 @@ dnl Checks for libcpath required headers and functions dnl -dnl Version: 20240308 +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 @@ -156,7 +156,7 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_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]) @@ -276,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 765360fa..1ac7b9f2 100644 --- a/m4/libcsplit.m4 +++ b/m4/libcsplit.m4 @@ -1,6 +1,6 @@ dnl Checks for libcsplit required headers and functions dnl -dnl Version: 20240308 +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 @@ -151,7 +151,7 @@ AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_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]) @@ -181,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 6503ce53..c9c4e46a 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -250,7 +250,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], + [test "x$ac_cv_libcthreads" != xyes && test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], [AC_MSG_FAILURE( [unable to find supported libcthreads in directory: $ac_cv_with_libcthreads], [1]) @@ -292,7 +292,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL], AS_IF( [test "x$ac_cv_libcthreads_multi_threading" != xno], - [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; + [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local], diff --git a/m4/libfcache.m4 b/m4/libfcache.m4 index 9976fef5..f063bae2 100644 --- a/m4/libfcache.m4 +++ b/m4/libfcache.m4 @@ -1,6 +1,6 @@ dnl Checks for libfcache required headers and functions dnl -dnl Version: 20240308 +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 @@ -155,7 +155,7 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_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]) @@ -199,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 30d4acb7..50ffbb10 100644 --- a/m4/libfdata.m4 +++ b/m4/libfdata.m4 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20240308 +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 @@ -458,7 +458,7 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_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]) @@ -488,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/libfdatetime.m4 b/m4/libfdatetime.m4 index 13b8cf36..d8f1066e 100644 --- a/m4/libfdatetime.m4 +++ b/m4/libfdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libfdatetime required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfdatetime is available dnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -463,7 +463,7 @@ AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], + [test "x$ac_cv_libfdatetime" != xyes && test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], [AC_MSG_FAILURE( [unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime], [1]) @@ -493,7 +493,7 @@ dnl Function to detect if libfdatetime dependencies are available AC_DEFUN([AX_LIBFDATETIME_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; + ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime -I\$(top_srcdir)/libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local diff --git a/m4/libfguid.m4 b/m4/libfguid.m4 index 6d1cd724..5e44bb63 100644 --- a/m4/libfguid.m4 +++ b/m4/libfguid.m4 @@ -1,6 +1,6 @@ dnl Checks for libfguid required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfguid is available dnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -111,7 +111,7 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], + [test "x$ac_cv_libfguid" != xyes && test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], [AC_MSG_FAILURE( [unable to find supported libfguid in directory: $ac_cv_with_libfguid], [1]) @@ -141,7 +141,7 @@ dnl Function to detect if libfguid dependencies are available AC_DEFUN([AX_LIBFGUID_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfguid_CPPFLAGS="-I../libfguid"; + ac_cv_libfguid_CPPFLAGS="-I../libfguid -I\$(top_srcdir)/libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local diff --git a/m4/libfuse.m4 b/m4/libfuse.m4 index a32b054e..eec18d65 100644 --- a/m4/libfuse.m4 +++ b/m4/libfuse.m4 @@ -1,6 +1,6 @@ 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 @@ -8,8 +8,7 @@ AC_DEFUN([AX_LIBFUSE_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfuse" = xno], [ac_cv_libfuse=no], - [ac_cv_libfuse=check - dnl Check if parameters were provided + [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( @@ -18,124 +17,150 @@ AC_DEFUN([AX_LIBFUSE_CHECK_LIB], [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_libfuse" = xcheck], + [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( - [fuse], - [fuse >= 2.6], - [ac_cv_libfuse=libfuse], + [fuse3], + [fuse3 >= 3.0], + [ac_cv_libfuse=libfuse3], [ac_cv_libfuse=no]) - ]) - AS_IF( - [test "x$ac_cv_libfuse" = xlibfuse], - [ac_cv_libfuse_CPPFLAGS="$pkg_cv_fuse_CFLAGS" - ac_cv_libfuse_LIBADD="$pkg_cv_fuse_LIBS"], - [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 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" - AC_CHECK_HEADERS([fuse.h]) - ]) + [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_header_fuse_h" = xno], - [ac_cv_libfuse=no], - [dnl Check for the individual functions - ac_cv_libfuse=libfuse - - AC_CHECK_LIB( - fuse, - fuse_daemonize, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - fuse, - fuse_destroy, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - fuse, - fuse_mount, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - fuse, - fuse_new, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) + [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"]) - ac_cv_libfuse_LIBADD="-lfuse"; - ]) + 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 && test "x$ac_cv_libfuse" != xlibfuse3], + [dnl Check for headers + + CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=30" + AC_CHECK_HEADERS([fuse.h]) - 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" - AC_CHECK_HEADERS([osxfuse/fuse.h]) + [test "x$ac_cv_header_fuse_h" = xyes], + [ac_cv_libfuse=libfuse3], + [CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=26" + AC_CHECK_HEADERS([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]) + [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_CHECK_LIB( + fuse, + fuse_invalidate, + [ac_cv_libfuse=libfuse], + [ac_cv_libfuse=libfuse3]) + + AC_CHECK_LIB( + fuse, + fuse_daemonize, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_destroy, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_mount, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + fuse, + fuse_new, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + + 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_header_osxfuse_fuse_h" = xno], - [ac_cv_libfuse=no], - [dnl Check for the individual functions - ac_cv_libfuse=libosxfuse - - AC_CHECK_LIB( - osxfuse, - fuse_daemonize, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - osxfuse, - fuse_destroy, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - osxfuse, - fuse_mount, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) - AC_CHECK_LIB( - osxfuse, - fuse_new, - [ac_cv_libfuse_dummy=yes], - [ac_cv_libfuse=no]) + [test "x$ac_cv_libfuse" = xlibfuse3], + [ac_cv_libfuse_LIBADD="-lfuse3"], + [ac_cv_libfuse_LIBADD="-lfuse"]) + ]) + ]) - ac_cv_libfuse_LIBADD="-losxfuse"; - ]) + dnl Check for libosxfuse + AS_IF( + [test "x$ac_cv_with_libfuse" != xno && test "x$ac_cv_header_fuse_h" = xno], + [CPPFLAGS="$backup_CPPFLAGS -DFUSE_USE_VERSION=26" + AC_CHECK_HEADERS([osxfuse/fuse.h]) + + AS_IF( + [test "x$ac_cv_header_osxfuse_fuse_h" = xno], + [ac_cv_libfuse=no], + [dnl Check for the individual functions + ac_cv_libfuse=libosxfuse + + AC_CHECK_LIB( + osxfuse, + fuse_daemonize, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_destroy, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_mount, + [ac_cv_libfuse_dummy=yes], + [ac_cv_libfuse=no]) + AC_CHECK_LIB( + osxfuse, + fuse_new, + [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_with_libfuse" != x && test "x$ac_cv_with_libfuse" != xauto-detect && test "x$ac_cv_with_libfuse" != xyes], + [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( @@ -145,7 +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( @@ -196,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( @@ -212,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/libfvalue.m4 b/m4/libfvalue.m4 index 18228f25..2a79f7db 100644 --- a/m4/libfvalue.m4 +++ b/m4/libfvalue.m4 @@ -1,6 +1,6 @@ dnl Checks for libfvalue required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libfvalue is available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -593,7 +593,7 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], + [test "x$ac_cv_libfvalue" != xyes && test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AC_MSG_FAILURE( [unable to find supported libfvalue in directory: $ac_cv_with_libfvalue], [1]) @@ -623,7 +623,7 @@ dnl Function to detect if libfvalue dependencies are available AC_DEFUN([AX_LIBFVALUE_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; + ac_cv_libfvalue_CPPFLAGS="-I../libfvalue -I\$(top_srcdir)/libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local diff --git a/m4/libhmac.m4 b/m4/libhmac.m4 index 9f4b90b4..b902eb63 100644 --- a/m4/libhmac.m4 +++ b/m4/libhmac.m4 @@ -1,6 +1,6 @@ dnl Checks for libhmac required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libhmac is available dnl ac_libhmac_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -169,7 +169,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], + [test "x$ac_cv_libhmac" != xyes && test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], [AC_MSG_FAILURE( [unable to find supported libhmac in directory: $ac_cv_with_libhmac], [1]) @@ -247,7 +247,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LOCAL], [ac_cv_libhmac_sha512=local], [ac_cv_libhmac_sha512=$ac_cv_libcrypto_sha512]) - ac_cv_libhmac_CPPFLAGS="-I../libhmac"; + ac_cv_libhmac_CPPFLAGS="-I../libhmac -I\$(top_srcdir)/libhmac"; ac_cv_libhmac_LIBADD="../libhmac/libhmac.la"; ac_cv_libhmac=local diff --git a/m4/libodraw.m4 b/m4/libodraw.m4 index 152d9691..1bf8d2f8 100644 --- a/m4/libodraw.m4 +++ b/m4/libodraw.m4 @@ -1,6 +1,6 @@ dnl Checks for libodraw required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libodraw is available dnl ac_libodraw_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -172,7 +172,7 @@ AC_DEFUN([AX_LIBODRAW_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect && test "x$ac_cv_with_libodraw" != xyes], + [test "x$ac_cv_libodraw" != xyes && test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect && test "x$ac_cv_with_libodraw" != xyes], [AC_MSG_FAILURE( [unable to find supported libodraw in directory: $ac_cv_with_libodraw], [1]) @@ -203,7 +203,7 @@ AC_DEFUN([AX_LIBODRAW_CHECK_LOCAL], [AC_PROG_LEX(noyywrap) AC_PROG_YACC - ac_cv_libodraw_CPPFLAGS="-I../libodraw"; + ac_cv_libodraw_CPPFLAGS="-I../libodraw -I\$(top_srcdir)/libodraw"; ac_cv_libodraw_LIBADD="../libodraw/libodraw.la"; ac_cv_libodraw=local diff --git a/m4/libsmdev.m4 b/m4/libsmdev.m4 index b9c76ebd..462aa64c 100644 --- a/m4/libsmdev.m4 +++ b/m4/libsmdev.m4 @@ -1,6 +1,6 @@ dnl Checks for libsmdev required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libsmdev is available dnl ac_libsmdev_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -198,7 +198,7 @@ AC_DEFUN([AX_LIBSMDEV_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect && test "x$ac_cv_with_libsmdev" != xyes], + [test "x$ac_cv_libsmdev" != xyes && test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect && test "x$ac_cv_with_libsmdev" != xyes], [AC_MSG_FAILURE( [unable to find supported libsmdev in directory: $ac_cv_with_libsmdev], [1]) @@ -364,7 +364,7 @@ AC_DEFUN([AX_LIBSMDEV_CHECK_LOCAL], [test "x$ac_cv_enable_winapi" = xyes], [AX_LIBSMDEV_CHECK_HEADER_WINIOCTL_H_STORAGE_BUS_TYPE]) - ac_cv_libsmdev_CPPFLAGS="-I../libsmdev"; + ac_cv_libsmdev_CPPFLAGS="-I../libsmdev -I\$(top_srcdir)/libsmdev"; ac_cv_libsmdev_LIBADD="../libsmdev/libsmdev.la"; ac_cv_libsmdev=local diff --git a/m4/libsmraw.m4 b/m4/libsmraw.m4 index c39923bc..66e65d1e 100644 --- a/m4/libsmraw.m4 +++ b/m4/libsmraw.m4 @@ -1,6 +1,6 @@ dnl Checks for libsmraw required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if libsmraw is available dnl ac_libsmraw_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -152,7 +152,7 @@ AC_DEFUN([AX_LIBSMRAW_CHECK_LOCAL], ]) AS_IF( - [test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect && test "x$ac_cv_with_libsmraw" != xyes], + [test "x$ac_cv_libsmraw" != xyes && test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect && test "x$ac_cv_with_libsmraw" != xyes], [AC_MSG_FAILURE( [unable to find supported libsmraw in directory: $ac_cv_with_libsmraw], [1]) @@ -199,7 +199,7 @@ AC_DEFUN([AX_LIBSMRAW_CHECK_ENABLE], [HAVE_LOCAL_LIBSMRAW], [1]) - ac_cv_libsmraw_CPPFLAGS="-I../libsmraw"; + ac_cv_libsmraw_CPPFLAGS="-I../libsmraw -I\$(top_srcdir)/libsmraw"; ac_cv_libsmraw_LIBADD="../libsmraw/libsmraw.la"; ac_cv_libsmraw=local diff --git a/m4/libuna.m4 b/m4/libuna.m4 index b1301f41..996ac60d 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240413 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -946,7 +946,7 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], + [test "x$ac_cv_libuna" != xyes && test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], [AC_MSG_FAILURE( [unable to find supported libuna in directory: $ac_cv_with_libuna], [1]) @@ -976,7 +976,7 @@ dnl Function to detect if libuna dependencies are available AC_DEFUN([AX_LIBUNA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libuna_CPPFLAGS="-I../libuna"; + ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local diff --git a/m4/python.m4 b/m4/python.m4 index d1f8067b..87f89bd9 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/m4/zlib.m4 b/m4/zlib.m4 index a153320c..3490090c 100644 --- a/m4/zlib.m4 +++ b/m4/zlib.m4 @@ -1,6 +1,6 @@ dnl Checks for zlib required headers and functions dnl -dnl Version: 20240308 +dnl Version: 20240314 dnl Function to detect if zlib is available AC_DEFUN([AX_ZLIB_CHECK_LIB], @@ -66,7 +66,7 @@ AC_DEFUN([AX_ZLIB_CHECK_LIB], ]) AS_IF( - [test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], + [test "x$ac_cv_zlib" != xyes && test "x$ac_cv_with_zlib" != x && test "x$ac_cv_with_zlib" != xauto-detect && test "x$ac_cv_with_zlib" != xyes], [AC_MSG_FAILURE( [unable to find supported zlib in directory: $ac_cv_with_zlib], [1]) diff --git a/manuals/Makefile.am b/manuals/Makefile.am index a6fb12ed..4db495ae 100644 --- a/manuals/Makefile.am +++ b/manuals/Makefile.am @@ -18,9 +18,7 @@ EXTRA_DIST = \ ewfverify.1 \ libewf.3 -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/msvscpp/Makefile.am b/msvscpp/Makefile.am index 1f42f23b..ac73d709 100644 --- a/msvscpp/Makefile.am +++ b/msvscpp/Makefile.am @@ -121,9 +121,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 c45eb3a6..7e4c68c1 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@ \ @@ -33,12 +33,10 @@ handle_fuzzer_LDADD = \ @LIBINTL@ endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on handle_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(handle_fuzzer_SOURCES) diff --git a/pyewf/Makefile.am b/pyewf/Makefile.am index e30369cf..ebcfbc0e 100644 --- a/pyewf/Makefile.am +++ b/pyewf/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@ \ @@ -51,9 +51,7 @@ pyewf_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 5cfe43fc..75cf53f6 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/synczlib.ps1 b/synczlib.ps1 index a2a6f860..953d51c1 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/tests/Makefile.am b/tests/Makefile.am index bf1aa004..c15d9084 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@ \ @@ -1549,9 +1549,8 @@ ewf_test_write_io_handle_LDADD = \ ../libewf/libewf.la \ @LIBCERROR_LIBADD@ -MAINTAINERCLEANFILES = \ - Makefile.in - -distclean: clean - -rm -f Makefile +DISTCLEANFILES = \ + Makefile \ + Makefile.in \ + notify_stream.log diff --git a/tests/test_ewfacquire.sh b/tests/test_ewfacquire.sh index 42b1a137..e14c3641 100755 --- a/tests/test_ewfacquire.sh +++ b/tests/test_ewfacquire.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Acquire tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -86,12 +86,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_ewfacquire_optical.sh b/tests/test_ewfacquire_optical.sh index b6cbe56c..5c959a9f 100755 --- a/tests/test_ewfacquire_optical.sh +++ b/tests/test_ewfacquire_optical.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Acquire tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -89,12 +89,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_ewfacquire_resume.sh b/tests/test_ewfacquire_resume.sh index 50a3cd3b..c7463082 100755 --- a/tests/test_ewfacquire_resume.sh +++ b/tests/test_ewfacquire_resume.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Acquire tool testing script # -# Version: 20230410 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -117,12 +117,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_ewfacquirestream.sh b/tests/test_ewfacquirestream.sh index b7354369..e7a70784 100755 --- a/tests/test_ewfacquirestream.sh +++ b/tests/test_ewfacquirestream.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Acquirestream tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -86,12 +86,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_ewfexport.sh b/tests/test_ewfexport.sh index 854ea781..66d3cdbe 100755 --- a/tests/test_ewfexport.sh +++ b/tests/test_ewfexport.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Export tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -94,12 +94,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_ewfexport_logical.sh b/tests/test_ewfexport_logical.sh index 8d6b0ca8..c59df263 100755 --- a/tests/test_ewfexport_logical.sh +++ b/tests/test_ewfexport_logical.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Export tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -74,12 +74,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_ewfinfo.sh b/tests/test_ewfinfo.sh index be379829..e84f5429 100755 --- a/tests/test_ewfinfo.sh +++ b/tests/test_ewfinfo.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_ewfinfo_logical.sh b/tests/test_ewfinfo_logical.sh index 350baa45..48e423d6 100755 --- a/tests/test_ewfinfo_logical.sh +++ b/tests/test_ewfinfo_logical.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_ewfinfo_logical_bodyfile.sh b/tests/test_ewfinfo_logical_bodyfile.sh index 9bd033ef..7bf4c127 100755 --- a/tests/test_ewfinfo_logical_bodyfile.sh +++ b/tests/test_ewfinfo_logical_bodyfile.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Info tool testing script # -# Version: 20231005 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -68,12 +68,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_ewfverify.sh b/tests/test_ewfverify.sh index acbcb4c7..b39fe194 100755 --- a/tests/test_ewfverify.sh +++ b/tests/test_ewfverify.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Verify 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_ewfverify_logical.sh b/tests/test_ewfverify_logical.sh index 6b0605be..28d4b3db 100755 --- a/tests/test_ewfverify_logical.sh +++ b/tests/test_ewfverify_logical.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Verify 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_glob.sh b/tests/test_glob.sh index dc54c83e..20db12d0 100755 --- a/tests/test_glob.sh +++ b/tests/test_glob.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Library glob testing script # -# Version: 20230410 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -442,12 +442,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 736d1953..b2f09b8a 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 4abb656e..b5fafd79 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 c5be0cff..3016a70b 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="*.[Ees]*01"; +LIBRARY_NAME="libewf"; +PYTHON_MODULE="pyewf"; + test_python_function() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; - local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/pyewf_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}/pyewf_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" "pyewf"); + 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 d389b894..ccbf42fc 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 diff --git a/tests/test_write_functions.sh b/tests/test_write_functions.sh index b967a0ec..51da1c55 100755 --- a/tests/test_write_functions.sh +++ b/tests/test_write_functions.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Library API write functions testing script # -# Version: 20230410 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -106,12 +106,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