diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56f9b15..c4542b3 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 byacc flex git libfuse-dev libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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 byacc flex 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 byacc flex 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 byacc flex 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 byacc flex git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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 byacc flex git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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 byacc flex git libfuse-dev libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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 a2d96fb..32e6024 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 5ace000..39629fc 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 libtool pkg-config + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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 b768af5..27f3934 100644 --- a/.gitignore +++ b/.gitignore @@ -137,6 +137,7 @@ stamp-h[1-9] /phditools/phdimount /tests/*.exe /tests/input +/tests/notify_stream.log /tests/phdi_test_block_descriptor /tests/phdi_test_block_tree /tests/phdi_test_block_tree_node diff --git a/Makefile.am b/Makefile.am index ee834e3..7830233 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,16 +64,22 @@ EXTRA_DIST = \ $(SETUP_PY_FILES) \ $(SPEC_FILES) -MAINTAINERCLEANFILES = \ - Makefile.in +DISTCLEANFILES = \ + config.status \ + config.cache \ + config.log \ + libphdi.pc \ + libphdi.spec \ + Makefile \ + Makefile.in \ + po/Makevars pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libphdi.pc -libtool: - @LIBTOOL_DEPS@ +libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck lib: library @@ -98,15 +104,3 @@ library: (cd $(srcdir)/libphdi && $(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 libphdi.pc - -rm -f libphdi.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 ffd1d30..07edb0b 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,9 +312,9 @@ install: - 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 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 bison -P cygfuse -P flex -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 msys/bison msys/flex ) + C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex 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 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 8cccfb3..b927f5b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libphdi], - [20240307], + [20240508], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/include/Makefile.am b/include/Makefile.am index 4e082f1..dd331c9 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,13 +15,11 @@ EXTRA_DIST = \ libphdi/features.h.in \ libphdi/types.h.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libphdi.h \ + libphdi/definitions.h \ + libphdi/features.h \ + libphdi/types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f libphdi.h - -rm -f libphdi/definitions.h - -rm -f libphdi/features.h - -rm -f libphdi/types.h - -rm -f Makefile - diff --git a/libphdi/Makefile.am b/libphdi/Makefile.am index 8601734..4edfe4c 100644 --- a/libphdi/Makefile.am +++ b/libphdi/Makefile.am @@ -3,8 +3,8 @@ AM_YFLAGS = -d -v -l -p libphdi_xml_scanner_ AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ - -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@ \ @@ -107,18 +107,16 @@ EXTRA_DIST = \ libphdi.rc \ libphdi.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libphdi_definitions.h \ + libphdi.rc \ + libphdi_xml_parser.c \ + libphdi_xml_parser.h \ + libphdi_xml_parser.output \ + libphdi_xml_scanner.c \ + Makefile \ Makefile.in -distclean: clean - -rm -f libphdi_definitions.h - -rm -f libphdi.rc - -rm -f libphdi_xml_parser.c - -rm -f libphdi_xml_parser.h - -rm -f libphdi_xml_parser.output - -rm -f libphdi_xml_scanner.c - -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/libcdirectory.m4 b/m4/libcdirectory.m4 index b7194e6..9b6bf81 100644 --- a/m4/libcdirectory.m4 +++ b/m4/libcdirectory.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdirectory required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libcdirectory is available dnl ac_libcdirectory_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCDIRECTORY_CHECK_LIB], [ac_cv_libcdirectory=no], [ac_cv_libcdirectory=check dnl Check if the directory provided as parameter exists + dnl For both --with-libcdirectory which returns "yes" and --with-libcdirectory= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xauto-detect], + [test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xauto-detect && test "x$ac_cv_with_libcdirectory" != xyes], [AS_IF( [test -d "$ac_cv_with_libcdirectory"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcdirectory}/include" @@ -156,8 +158,9 @@ AC_DEFUN([AX_LIBCDIRECTORY_CHECK_LIB], ac_cv_libcdirectory_LIBADD="-lcdirectory"]) ]) + AS_IF( - [test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xauto-detect && test "x$ac_cv_libcdirectory" != xyes], + [test "x$ac_cv_libcdirectory" != xyes && test "x$ac_cv_with_libcdirectory" != x && test "x$ac_cv_with_libcdirectory" != xauto-detect && test "x$ac_cv_with_libcdirectory" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdirectory in directory: $ac_cv_with_libcdirectory], [1]) @@ -215,7 +218,7 @@ AC_DEFUN([AX_LIBCDIRECTORY_CHECK_LOCAL], ]) ]) - ac_cv_libcdirectory_CPPFLAGS="-I../libcdirectory"; + ac_cv_libcdirectory_CPPFLAGS="-I../libcdirectory -I\$(top_srcdir)/libcdirectory"; ac_cv_libcdirectory_LIBADD="../libcdirectory/libcdirectory.la"; ac_cv_libcdirectory=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/libfguid.m4 b/m4/libfguid.m4 index fba4ce0..5e44bb6 100644 --- a/m4/libfguid.m4 +++ b/m4/libfguid.m4 @@ -1,6 +1,6 @@ dnl Checks for libfguid required headers and functions dnl -dnl Version: 20190308 +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 @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], [ac_cv_libfguid=no], [ac_cv_libfguid=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfguid which returns "yes" and --with-libfguid= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect], + [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], [AS_IF( [test -d "$ac_cv_with_libfguid"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" @@ -107,8 +109,9 @@ AC_DEFUN([AX_LIBFGUID_CHECK_LIB], ac_cv_libfguid_LIBADD="-lfguid"]) ]) + AS_IF( - [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_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]) @@ -138,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 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/libfvalue.m4 b/m4/libfvalue.m4 index 0c1bbaa..2a79f7d 100644 --- a/m4/libfvalue.m4 +++ b/m4/libfvalue.m4 @@ -1,6 +1,6 @@ dnl Checks for libfvalue required headers and functions dnl -dnl Version: 20200711 +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 @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [ac_cv_libfvalue=no], [ac_cv_libfvalue=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfvalue which returns "yes" and --with-libfvalue= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect], + [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AS_IF( [test -d "$ac_cv_with_libfvalue"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" @@ -589,8 +591,9 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], ac_cv_libfvalue_LIBADD="-lfvalue"]) ]) + AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_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]) @@ -620,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/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 57ea165..9256c00 100644 --- a/manuals/Makefile.am +++ b/manuals/Makefile.am @@ -6,9 +6,7 @@ EXTRA_DIST = \ phdiinfo.1 \ libphdi.3 -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/msvscpp/Makefile.am b/msvscpp/Makefile.am index d550ee9..eb37e85 100644 --- a/msvscpp/Makefile.am +++ b/msvscpp/Makefile.am @@ -42,9 +42,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 a713812..7312df7 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/phditools/Makefile.am b/phditools/Makefile.am index 3f50327..e77a516 100644 --- a/phditools/Makefile.am +++ b/phditools/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@ \ @@ -81,12 +81,10 @@ phdimount_LDADD = \ @LIBCERROR_LIBADD@ \ @LIBINTL@ -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on phdiinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(phdiinfo_SOURCES) diff --git a/pyphdi/Makefile.am b/pyphdi/Makefile.am index 5972b98..c9b3aad 100644 --- a/pyphdi/Makefile.am +++ b/pyphdi/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@ \ @@ -48,9 +48,7 @@ pyphdi_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 dfeac43..c920d59 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 f1f418f..138e791 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@ \ @@ -329,9 +329,8 @@ phdi_test_xml_tag_LDADD = \ ../libphdi/libphdi.la \ @LIBCERROR_LIBADD@ -MAINTAINERCLEANFILES = \ - Makefile.in - -distclean: clean - -rm -f Makefile +DISTCLEANFILES = \ + Makefile \ + Makefile.in \ + notify_stream.log diff --git a/tests/test_library.sh b/tests/test_library.sh index da914e3..ef7ec95 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_phdiinfo.sh b/tests/test_phdiinfo.sh index a64c55b..46dc2eb 100755 --- a/tests/test_phdiinfo.sh +++ b/tests/test_phdiinfo.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_python_module.sh b/tests/test_python_module.sh index 7a15a70..508b866 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="libphdi"; +PYTHON_MODULE="pyphdi"; + test_python_function() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; - local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/pyphdi_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}/pyphdi_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" "pyphdi"); + 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};