Browse Source

Worked on tests

tags/20180714
Joachim Metz 2 years ago
parent
commit
a0d674d19d
28 changed files with 5978 additions and 5706 deletions
  1. +18
    -16
      .gitignore
  2. +25
    -8
      .travis.yml
  3. +14
    -0
      acinclude.m4
  4. +19
    -24
      appveyor.yml
  5. +61
    -60
      configure.ac
  6. +1
    -1
      libpff.ini
  7. +2
    -2
      m4/common.m4
  8. +343
    -311
      m4/libbfio.m4
  9. +500
    -490
      m4/libcdata.m4
  10. +195
    -192
      m4/libcerror.m4
  11. +366
    -341
      m4/libcfile.m4
  12. +242
    -217
      m4/libclocale.m4
  13. +172
    -169
      m4/libcnotify.m4
  14. +289
    -264
      m4/libcpath.m4
  15. +214
    -182
      m4/libcsplit.m4
  16. +334
    -331
      m4/libcthreads.m4
  17. +206
    -206
      m4/libfcache.m4
  18. +447
    -440
      m4/libfdata.m4
  19. +512
    -505
      m4/libfdatetime.m4
  20. +171
    -164
      m4/libfguid.m4
  21. +124
    -115
      m4/libfmapi.m4
  22. +653
    -646
      m4/libfvalue.m4
  23. +262
    -255
      m4/libfwnt.m4
  24. +676
    -669
      m4/libuna.m4
  25. +29
    -7
      setup.py
  26. +34
    -0
      syncsharedlibs.sh
  27. +40
    -46
      tests/test_library.ps1
  28. +29
    -45
      tests/test_pffinfo.ps1

+ 18
- 16
.gitignore View File

@@ -1,6 +1,6 @@
# Files to ignore by git
#
# Version: 20161030
# Version: 20170916

# Generic auto-generated build files
*~
@@ -15,16 +15,16 @@
*.lo
*.log
*.loT
*.Plo
*.Po
*.o
*.obj
*.Plo
*.Po
*.so
*.so.[0-9][0-9]*
*.so.[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*
*.swp
*.trs
*.Tpo
*.trs
.deps
.libs
INSTALL
@@ -53,9 +53,6 @@ stamp-h[1-9]
/install-sh
/libtool
/ltmain.sh
/missing
/test-driver
/ylwrap
/m4/codeset.m4
/m4/extern-inline.m4
/m4/fcntl-o.m4
@@ -68,8 +65,8 @@ stamp-h[1-9]
/m4/intldir.m4
/m4/intlmacosx.m4
/m4/intmax.m4
/m4/inttypes-pri.m4
/m4/inttypes_h.m4
/m4/inttypes-pri.m4
/m4/lcmessage.m4
/m4/lib-ld.m4
/m4/lib-link.m4
@@ -77,14 +74,14 @@ stamp-h[1-9]
/m4/libtool.m4
/m4/lock.m4
/m4/longlong.m4
/m4/lt~obsolete.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/m4/nls.m4
/m4/po.m4
/m4/progtest.m4
/m4/printf-posix.m4
/m4/progtest.m4
/m4/size_max.m4
/m4/stdint_h.m4
/m4/threadlib.m4
@@ -93,6 +90,7 @@ stamp-h[1-9]
/m4/wchar_t.m4
/m4/wint_t.m4
/m4/xsize.m4
/missing
/po/boldquot.sed
/po/en@boldquot.header
/po/en@quot.header
@@ -100,15 +98,15 @@ stamp-h[1-9]
/po/Makefile.in.in
/po/Makevars
/po/Makevars.template
/po/Rules-quot
/po/POTFILES
/po/quot.sed
/po/remove-potcdate.sed
/po/remove-potcdate.sin
/po/Rules-quot
/test-driver
/ylwrap

# Project specific files
/libpff.pc
/libpff.spec
/common/config.h
/common/config.h.in
/common/types.h
@@ -117,12 +115,16 @@ stamp-h[1-9]
/include/libpff/definitions.h
/include/libpff/features.h
/include/libpff/types.h
/jpff/classnoinst.stamp
/libpff.pc
/libpff.spec
/libpff/libpff.rc
/libpff/libpff_definitions.h
/pypff-python[23]/*.[ch]
/pfftools/*.exe
/pfftools/pffexport
/pfftools/pffinfo
/jpff/classnoinst.stamp
/tests/*.exe
/tests/input
/tests/pff_test_attached_file_io_handle
/tests/pff_test_attachment
@@ -143,8 +145,8 @@ stamp-h[1-9]
/tests/pff_test_item_descriptor
/tests/pff_test_item_values
/tests/pff_test_local_descriptor_node
/tests/pff_test_local_descriptors
/tests/pff_test_local_descriptor_value
/tests/pff_test_local_descriptors
/tests/pff_test_message
/tests/pff_test_multi_value
/tests/pff_test_name_to_id_map_entry
@@ -152,6 +154,7 @@ stamp-h[1-9]
/tests/pff_test_offsets_index
/tests/pff_test_read_items
/tests/pff_test_record_entry
/tests/pff_test_record_entry_identifier
/tests/pff_test_record_set
/tests/pff_test_reference_descriptor
/tests/pff_test_support
@@ -169,7 +172,6 @@ stamp-h[1-9]
/libcnotify
/libcpath
/libcsplit
/libcsystem
/libcthreads
/libfcache
/libfdata


+ 25
- 8
.travis.yml View File

@@ -5,7 +5,8 @@ env:
- secure: "p17X8wFVnUeU3oGAUeUpOJknniwIkliHaLLeHWNHrX1Op794acHEz8wVyuVHLxf5B1Irm8R4UXslzM4y/qAPIB03uaeiam9JJXLVXvKtalMxn856hx9+4TWie/HWQjoKQp4zEgUbLrvSkSW2NYUkFjnY3BvotoqyRW3BlYPonw0="
matrix:
include:
- compiler: clang
- env: TARGET="coverity"
compiler: clang
os: linux
dist: trusty
sudo: required
@@ -19,27 +20,43 @@ matrix:
build_command_prepend: "./synclibs.sh && ./autogen.sh && ./configure"
build_command: "make -j4"
branch_pattern: master
- compiler: gcc
- env: TARGET="linux-clang"
compiler: clang
os: linux
dist: trusty
sudo: required
group: edge
- compiler: clang
- env: TARGET="linux-gcc"
compiler: gcc
os: linux
dist: trusty
sudo: required
group: edge
- env: TARGET="macos-clang"
compiler: clang
os: osx
osx_image: xcode8.1
- compiler: gcc
- env: TARGET="macos-gcc"
compiler: gcc
os: osx
osx_image: xcode8.1
- env: TARGET="shared"
compiler: gcc
os: linux
dist: trusty
sudo: required
group: edge
before_install:
- if test ${TRAVIS_OS_NAME} = "linux"; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-; fi
- if test ${TRAVIS_OS_NAME} = "linux"; then sudo apt-get update && sudo apt-mark hold oracle-java9-installer postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5 postgresql-9.6 postgresql-client postgresql-client-common postgresql-common postgresql-contrib-9.2 postgresql-contrib-9.3 postgresql-contrib-9.4 postgresql-contrib-9.5 postgresql-contrib-9.6 postgresql-doc && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y && sudo apt-get install -y autopoint; fi
- if test ${TRAVIS_OS_NAME} = "linux"; then sudo apt-get update && sudo apt-mark hold oracle-java9-installer postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5 postgresql-9.6 postgresql-client postgresql-client-common postgresql-common postgresql-contrib-9.2 postgresql-contrib-9.3 postgresql-contrib-9.4 postgresql-contrib-9.5 postgresql-contrib-9.6 postgresql-doc && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y && sudo apt-get install -y autopoint zlib1g-dev; fi
- if test ${TRAVIS_OS_NAME} = "osx"; then brew update && brew install gettext gnu-sed && brew link --force gettext; fi
- if test ${TARGET} = "coverity"; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-; fi
install:
- if test ${TRAVIS_OS_NAME} = "osx"; then export SED="/usr/local/bin/gsed"; fi
- if test ${TARGET} = "shared"; then ./syncsharedlibs.sh; fi
- ./synclibs.sh && ./autogen.sh
- if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
script:
- if test ${TRAVIS_OS_NAME} = "linux"; then export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g"); fi
- ./runtests.sh
- if test ${TARGET} != "coverity"; then ./runtests.sh; fi
after_success:
- if test ${TRAVIS_OS_NAME} = "linux" && test ${CC} = "gcc"; then curl -o codecov.sh -s https://codecov.io/bash && /bin/bash ./codecov.sh; fi
- if test ${TARGET} = "linux-gcc"; then curl -o codecov.sh -s https://codecov.io/bash && /bin/bash ./codecov.sh; fi

+ 14
- 0
acinclude.m4 View File

@@ -1,3 +1,7 @@
dnl Checks for required headers and functions
dnl
dnl Version: 20170917

dnl Function to detect if libpff dependencies are available
AC_DEFUN([AX_LIBPFF_CHECK_LOCAL],
[dnl Check for internationalization functions in libpff/libpff_i18n.c
@@ -39,6 +43,16 @@ AC_DEFUN([AX_PFFTOOLS_CHECK_LOCAL],
[1])
])

dnl Headers included in pfftools/log_handle.c
AC_CHECK_HEADERS([stdarg.h varargs.h])

AS_IF(
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
[AC_MSG_FAILURE(
[Missing headers: stdarg.h and varargs.h],
[1])
])

dnl Check if tools should be build as static executables
AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES



+ 19
- 24
appveyor.yml View File

@@ -28,7 +28,6 @@ environment:
- TARGET: vs2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VisualStudioVersion: 15.0
platform: Win32
configuration: Release
- TARGET: python27
- TARGET: python36
@@ -38,12 +37,12 @@ environment:
- TARGET: mingw-w64

install:
- cmd: git clone https://github.com/libyal/vstools.git && move vstools ..\
- cmd: git clone https://github.com/libyal/vstools.git ..\vstools
- ps: .\synczlib.ps1
- cmd: if [%TARGET%]==[cygwin] (
C:\cygwin\setup-x86.exe -qgnNdO -l C:\cygwin\var\cache\setup -R c:\cygwin -s http://cygwin.mirror.constant.com -P python2-devel -P python3-devel )
C:\cygwin\setup-x86.exe -qgnNdO -l C:\cygwin\var\cache\setup -R c:\cygwin -s http://cygwin.mirror.constant.com -P zlib-devel -P python2-devel -P python3-devel )
- cmd: if [%TARGET%]==[cygwin64] (
C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P python2-devel -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 zlib-devel -P python2-devel -P python3-devel )

build_script:
- ps: .\synclibs.ps1
@@ -56,7 +55,7 @@ build_script:
msbuild vs2010\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2012] (
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2012 --extend-with-x64 --python-path "C:\\Python27-x64" msvscpp\libpff.sln &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --output-format 2012 --python-path "C:\\Python27-x64" msvscpp\libpff.sln &&
msbuild vs2012\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2013] (
set PYTHONPATH=..\vstools &&
@@ -68,29 +67,25 @@ build_script:
msbuild vs2015\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2017] (
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2017 msvscpp\libpff.sln &&
msbuild vs2017\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --no-python-dll --output-format 2017 msvscpp\libpff.sln &&
msbuild vs2017\libpff.sln /property:Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
msbuild vs2017\libpff.sln /property:Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[python27] (
C:\Python27\python.exe setup.py bdist_msi )
- cmd: if [%TARGET%]==[python36] (
C:\Python36\python.exe setup.py bdist_msi )
- cmd: if [%TARGET%]==[cygwin] (
xcopy /q /s C:\projects\libpff C:\cygwin\home\appveyor\ &&
C:\cygwin\bin\bash -e -l -c "cd libpff" &&
C:\cygwin\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" )
xcopy /i /q /s C:\projects\libpff C:\cygwin\home\appveyor\libpff &&
C:\cygwin\bin\bash -e -l -c "cd libpff && ./synclibs.sh && ./autogen.sh" )
- cmd: if [%TARGET%]==[cygwin64] (
xcopy /q /s C:\projects\libpff C:\cygwin64\home\appveyor\ &&
C:\cygwin64\bin\bash -e -l -c "cd libpff" &&
C:\cygwin64\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" )
xcopy /i /q /s C:\projects\libpff C:\cygwin64\home\appveyor\libpff &&
C:\cygwin64\bin\bash -e -l -c "cd libpff && ./synclibs.sh && ./autogen.sh" )
- cmd: if [%TARGET%]==[mingw] (
xcopy /q /s C:\projects\libpff C:\MinGW\msys\1.0\home\appveyor\ &&
C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff" &&
C:\MinGW\msys\1.0\bin\bash -e -l -c "sed 's/@VERSION@/0.29/g' m4/pkg.m4.in > m4/pkg.m4" &&
C:\MinGW\msys\1.0\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" )
xcopy /i /q /s C:\projects\libpff C:\MinGW\msys\1.0\home\appveyor\libpff &&
C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && sed 's/@VERSION@/0.29/g' m4/pkg.m4.in > m4/pkg.m4 && ./synclibs.sh && ./autogen.sh" )
- cmd: if [%TARGET%]==[mingw-w64] (
xcopy /q /s C:\projects\libpff C:\msys64\home\appveyor\ &&
C:\msys64\usr\bin\bash -e -l -c "cd libpff" &&
C:\msys64\usr\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" )
xcopy /i /q /s C:\projects\libpff C:\msys64\home\appveyor\libpff &&
C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./synclibs.sh && ./autogen.sh" )

test_script:
- cmd: rem Run tests
@@ -107,11 +102,11 @@ test_script:
- ps: if ($env:TARGET -eq "vs2017") {
.\runtests.ps1 }
- cmd: if [%TARGET%]==[cygwin] (
C:\cygwin\bin\bash -e -l -c "./runtests.sh" )
C:\cygwin\bin\bash -e -l -c "cd libpff && ./runtests.sh" )
- cmd: if [%TARGET%]==[cygwin64] (
C:\cygwin64\bin\bash -e -l -c "./runtests.sh" )
C:\cygwin64\bin\bash -e -l -c "cd libpff && ./runtests.sh" )
- cmd: if [%TARGET%]==[mingw] (
C:\MinGW\msys\1.0\bin\bash -e -l -c "./runtests.sh" )
C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && ./runtests.sh" )
- cmd: if [%TARGET%]==[mingw-w64] (
C:\msys64\usr\bin\bash -e -l -c "./runtests.sh" )
C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./runtests.sh" )


+ 61
- 60
configure.ac View File

@@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )

AC_INIT(
[libpff],
[20170901],
[20170917],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
@@ -15,9 +15,6 @@ AC_CONFIG_MACRO_DIR([m4])
dnl Check for host type
AC_CANONICAL_HOST

dnl Check for large file support
AC_SYS_LARGEFILE

dnl Check for libtool DLL support
AC_LIBTOOL_WIN32_DLL

@@ -42,6 +39,9 @@ dnl Check for compiler language support
AC_C_CONST
AC_C_VOLATILE

dnl Check for large file support
AC_SYS_LARGEFILE

dnl Check if WINAPI support should be enabled
AX_COMMON_CHECK_ENABLE_WINAPI

@@ -51,94 +51,103 @@ AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE
dnl Check for type definitions
AX_TYPES_CHECK_LOCAL

dnl Checks for libraries and library functions
dnl Check if common required headers and functions are available
AX_COMMON_CHECK_LOCAL

dnl Check for enabling libcerror for cross-platform C error functions
dnl Check if libcerror or required headers and functions are available
AX_LIBCERROR_CHECK_ENABLE

dnl Check for enabling libcthreads for cross-platform C threads functions
dnl Check if libcthreads or required headers and functions are available
AX_LIBCTHREADS_CHECK_ENABLE

dnl Check for enabling libcdata for cross-platform C generic data functions
dnl Check if libcdata or required headers and functions are available
AX_LIBCDATA_CHECK_ENABLE

dnl Check for enabling libclocale for cross-platform C locale functions
dnl Check if libclocale or required headers and functions are available
AX_LIBCLOCALE_CHECK_ENABLE

dnl Check for enabling libcnotify for cross-platform C notification functions
dnl Check if libcnotify or required headers and functions are available
AX_LIBCNOTIFY_CHECK_ENABLE

dnl Check for enabling libcsplit for cross-platform C split string functions
dnl Check if libcsplit or required headers and functions are available
AX_LIBCSPLIT_CHECK_ENABLE

dnl Check for enabling libuna for Unicode string support
dnl Check if libuna or required headers and functions are available
AX_LIBUNA_CHECK_ENABLE

dnl Check for enabling libcfile for cross-platform C file functions
dnl Check if libcfile or required headers and functions are available
AX_LIBCFILE_CHECK_ENABLE

dnl Check for enabling libcpath for cross-platform C path functions
dnl Check if libcpath or required headers and functions are available
AX_LIBCPATH_CHECK_ENABLE

dnl Check for enabling libbfio for basic file IO support
dnl Check if libbfio or required headers and functions are available
AX_LIBBFIO_CHECK_ENABLE

dnl Check for enabling libfcache for file value cache support
dnl Check if libfcache or required headers and functions are available
AX_LIBFCACHE_CHECK_ENABLE

dnl Check for enabling libfdata for file data types support
dnl Check if libfdata or required headers and functions are available
AX_LIBFDATA_CHECK_ENABLE

dnl Check for enabling libfdatetime for date and time formats support
dnl Check if libfdatetime or required headers and functions are available
AX_LIBFDATETIME_CHECK_ENABLE

dnl Check for enabling libfguid for GUID/UUID format support
dnl Check if libfguid or required headers and functions are available
AX_LIBFGUID_CHECK_ENABLE

dnl Check for enabling libfvalue for file value support
dnl Check if libfvalue or required headers and functions are available
AX_LIBFVALUE_CHECK_ENABLE

dnl Check for enabling libfwnt for file Windows NT type support
dnl Check if libfwnt or required headers and functions are available
AX_LIBFWNT_CHECK_ENABLE

dnl Check for enabling libfmapi for file MAPI types support
dnl Check if libfmapi or required headers and functions are available
AX_LIBFMAPI_CHECK_ENABLE

dnl Check for zlib compression support
AX_ZLIB_CHECK_ENABLE
AX_ZLIB_CHECK_UNCOMPRESS

dnl Check for library function support
dnl Check if libpff required headers and functions are available
AX_LIBPFF_CHECK_LOCAL

dnl Check for pfftools function support
AX_PFFTOOLS_CHECK_LOCAL

dnl Check if libpff java bindings (jpff) should be build
AX_JAVA_CHECK_ENABLE

dnl Check if libpff python bindings (pypff) should be build
dnl Check if libpff Python bindings (pypff) required headers and functions are available
AX_PYTHON_CHECK_PYPREFIX
AX_PYTHON_CHECK_ENABLE
AX_PYTHON2_CHECK_ENABLE
AX_PYTHON3_CHECK_ENABLE

AS_IF(
[test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno],
[dnl Headers included in pypff/pypff_error.c
AC_CHECK_HEADERS([stdarg.h varargs.h])

AS_IF(
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
[AC_MSG_FAILURE(
[Missing headers: stdarg.h and varargs.h],
[1])
])
])

AM_CONDITIONAL(
HAVE_PYTHON_TESTS,
[test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno])
HAVE_PYTHON_TESTS,
[test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno])

dnl Check if libpff java bindings (jpff) should be build
AX_JAVA_CHECK_ENABLE

dnl Headers included in various places
AC_CHECK_HEADERS([stdarg.h varargs.h])
dnl Check if pfftools required headers and functions are available
AX_PFFTOOLS_CHECK_LOCAL

AS_IF(
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
[AC_MSG_FAILURE(
[Missing headers: stdarg.h and varargs.h],
[1])
])
dnl Check if libpff should be build with verbose output
AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT

dnl Check for test function support
dnl Check if libpff should be build with debug output
AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT

dnl Check if tests required headers and functions are available
AX_TESTS_CHECK_LOCAL

dnl Check if DLL support is needed
@@ -155,12 +164,10 @@ AS_IF(
[HAVE_DLLMAIN],
[1])

AS_IF(
[test "x$ac_cv_enable_static_executables" = xno],
[AC_SUBST(
[LIBPFF_DLL_IMPORT],
["-DLIBPFF_DLL_IMPORT"])
])
dnl Used in tests
AC_SUBST(
[LIBPFF_DLL_IMPORT],
["-DLIBPFF_DLL_IMPORT"])
])
])

@@ -188,12 +195,7 @@ AC_SUBST(
[SPEC_DATE],
[`date +"%a %b %e %Y" 2> /dev/null`])

dnl Set the current working directory for PackageMaker files
AC_SUBST(
[PWD],
[`pwd`])

dnl Have configure make the Makefiles
dnl Generate Makefiles
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([include/Makefile])
AC_CONFIG_FILES([common/Makefile])
@@ -215,29 +217,29 @@ AC_CONFIG_FILES([libfvalue/Makefile])
AC_CONFIG_FILES([libfwnt/Makefile])
AC_CONFIG_FILES([libfmapi/Makefile])
AC_CONFIG_FILES([libpff/Makefile])
AC_CONFIG_FILES([pfftools/Makefile])
AC_CONFIG_FILES([jpff/Makefile])
AC_CONFIG_FILES([pypff/Makefile])
AC_CONFIG_FILES([pypff-python2/Makefile])
AC_CONFIG_FILES([pypff-python3/Makefile])
AC_CONFIG_FILES([jpff/Makefile])
AC_CONFIG_FILES([pfftools/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([po/Makevars])
AC_CONFIG_FILES([manuals/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([msvscpp/Makefile])
dnl Have configure make the include files
dnl Generate header files
AC_CONFIG_FILES([include/libpff.h])
AC_CONFIG_FILES([include/libpff/definitions.h])
AC_CONFIG_FILES([include/libpff/features.h])
AC_CONFIG_FILES([include/libpff/types.h])
AC_CONFIG_FILES([libpff/libpff_definitions.h])
dnl Have configure make distribution specific files
dnl Generate distribution specific files
AC_CONFIG_FILES([common/types.h])
AC_CONFIG_FILES([dpkg/changelog])
AC_CONFIG_FILES([libpff/libpff.rc])
AC_CONFIG_FILES([libpff.pc])
AC_CONFIG_FILES([libpff.spec])
dnl Have configure write its configuration
dnl Generate a source configuration file
AC_CONFIG_HEADERS([common/config.h])

AC_OUTPUT
@@ -268,12 +270,11 @@ Features:
Multi-threading support: $ac_cv_libcthreads_multi_threading
Wide character type support: $ac_cv_enable_wide_character_type
pfftools are build as static executables: $ac_cv_enable_static_executables
Java (jpff) support: $ac_cv_enable_java
Python (pypff) support: $ac_cv_enable_python
Python version 2 (pypff) support: $ac_cv_enable_python2
Python version 3 (pypff) support: $ac_cv_enable_python3
Java (jpff) support: $ac_cv_enable_java
Verbose output: $ac_cv_enable_verbose_output
Debug output: $ac_cv_enable_debug_output
]);



+ 1
- 1
libpff.ini View File

@@ -4,7 +4,7 @@ status: "alpha"
authors: ["Joachim Metz <joachim.metz@gmail.com>"]
year_of_creation: "2008"
documentation_url: "https://github.com/libyal/libpff/tree/master/documentation"
download_url: "https://github.com/libyal/libpff/releases"
downloads_url: "https://github.com/libyal/libpff/releases"
git_url: "https://github.com/libyal/libpff.git"
features: ["debug_output", "python"]



+ 2
- 2
m4/common.m4 View File

@@ -1,6 +1,6 @@
dnl Functions for common
dnl Checks for common headers and functions
dnl
dnl Version: 20161106
dnl Version: 20170903

dnl Function to test if a certain feature was enabled
AC_DEFUN([AX_COMMON_ARG_ENABLE],


+ 343
- 311
m4/libbfio.m4 View File

@@ -1,306 +1,312 @@
dnl Functions for libbfio
dnl Checks for libbfio or required headers and functions
dnl
dnl Version: 20160108
dnl Version: 20170912

dnl Function to detect if libbfio is available
AC_DEFUN([AX_LIBBFIO_CHECK_LIB],
[dnl Check if parameters were provided
AS_IF(
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libbfio"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libbfio])
])
])

AS_IF(
[test "x$ac_cv_with_libbfio" = xno],
[ac_cv_libbfio=no],
[dnl Check for a pkg-config file
[dnl Check if parameters were provided
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libbfio],
[libbfio >= 20160108],
[ac_cv_libbfio=yes],
[ac_cv_libbfio=no])
])
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libbfio"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libbfio])
])
])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS"
ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS"],
[dnl Check for headers
AC_CHECK_HEADERS([libbfio.h])

AS_IF(
[test "x$ac_cv_header_libbfio_h" = xno],
[test "x$ac_cv_with_libbfio" = xno],
[ac_cv_libbfio=no],
[dnl Check for the individual functions
ac_cv_libbfio=yes

AC_CHECK_LIB(
bfio,
libbfio_get_version,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
[dnl Check for a pkg-config file
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libbfio],
[libbfio >= 20160108],
[ac_cv_libbfio=yes],
[ac_cv_libbfio=check])
])

dnl Handle functions
AC_CHECK_LIB(
bfio,
libbfio_handle_free,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_close,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_exists,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_read_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_write_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_seek_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AS_IF(
[test "x$ac_cv_libbfio" = xyes && test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CACHE_CHECK(
[whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1],
[ac_cv_header_libbfio_features_h_have_wide_character_type],
[AC_LANG_PUSH(C)
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <libbfio/features.h>]],
[[#if !defined( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE != 1 )
#error LIBBFIO_HAVE_WIDE_CHARACTER_TYPE not defined
##endif]] )],
[ac_cv_header_libbfio_features_h_have_wide_character_type=yes],
[ac_cv_header_libbfio_features_h_have_wide_character_type=no])
AC_LANG_POP(C)],
[ac_cv_header_libbfio_features_h_have_wide_character_type=no])

AC_CHECK_LIB(
bfio,
libbfio_handle_is_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_set_track_offsets_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_number_of_offsets_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_offset_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AS_IF(
[test "x$ac_cv_header_libbfio_features_h_have_wide_character_type" = xno],
[ac_cv_libbfio=no])
])

dnl File functions
AC_CHECK_LIB(
bfio,
libbfio_file_initialize,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_set_name,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS"
ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS"])

AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
bfio,
libbfio_file_get_name_size_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_set_name_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
])
[test "x$ac_cv_libbfio" = xcheck],
[dnl Check for headers
AC_CHECK_HEADERS([libbfio.h])

dnl Pool functions
AC_CHECK_LIB(
bfio,
libbfio_pool_initialize,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_free,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_clone,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AS_IF(
[test "x$ac_cv_header_libbfio_h" = xno],
[ac_cv_libbfio=no],
[dnl Check for the individual functions
ac_cv_libbfio=yes

AC_CHECK_LIB(
bfio,
libbfio_pool_get_number_of_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_set_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_append_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_remove_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_maximum_number_of_open_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_set_maximum_number_of_open_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_get_version,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

AC_CHECK_LIB(
bfio,
libbfio_pool_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_reopen,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_close,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_close_all,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_read_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_write_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_seek_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
dnl Handle functions
AC_CHECK_LIB(
bfio,
libbfio_handle_free,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_close,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_exists,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_read_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_write_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_seek_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

ac_cv_libbfio_LIBADD="-lbfio"
])
])
])
AC_CHECK_LIB(
bfio,
libbfio_handle_is_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_set_track_offsets_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_number_of_offsets_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_handle_get_offset_read,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_DEFINE(
[HAVE_LIBBFIO],
[1],
[Define to 1 if you have the `bfio' library (-lbfio).])
])
dnl File functions
AC_CHECK_LIB(
bfio,
libbfio_file_initialize,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_set_name,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[HAVE_LIBBFIO],
[1]) ],
[AC_SUBST(
[HAVE_LIBBFIO],
[0])
])
])
AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
bfio,
libbfio_file_get_name_size_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_get_name_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_file_set_name_wide,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
])

dnl Function to detect how to enable libbfio
AC_DEFUN([AX_LIBBFIO_CHECK_ENABLE],
[AX_COMMON_ARG_WITH(
[libbfio],
[libbfio],
[search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version],
[auto-detect],
[DIR])
dnl Pool functions
AC_CHECK_LIB(
bfio,
libbfio_pool_initialize,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_free,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_clone,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

AC_CHECK_LIB(
bfio,
libbfio_pool_get_number_of_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_set_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_append_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_remove_handle,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_maximum_number_of_open_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_set_maximum_number_of_open_handles,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

AC_CHECK_LIB(
bfio,
libbfio_pool_open,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_reopen,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_close,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_close_all,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_read_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_write_buffer,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_seek_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_offset,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])
AC_CHECK_LIB(
bfio,
libbfio_pool_get_size,
[ac_cv_libbfio_dummy=yes],
[ac_cv_libbfio=no])

dnl Check for a shared library version
AX_LIBBFIO_CHECK_LIB
ac_cv_libbfio_LIBADD="-lbfio"
])
])
])

dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libbfio" != xyes],
[AC_DEFINE(
[HAVE_LOCAL_LIBBFIO],
[1],
[Define to 1 if the local version of libbfio is used.])
AC_SUBST(
[HAVE_LOCAL_LIBBFIO],
[1])
AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_DEFINE(
[HAVE_LIBBFIO],
[1],
[Define to 1 if you have the `bfio' library (-lbfio).])
])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[HAVE_LIBBFIO],
[1]) ],
[AC_SUBST(
[HAVE_LIBBFIO],
[0])
])
])

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_LIBADD="../libbfio/libbfio.la";
@@ -308,37 +314,63 @@ AC_DEFUN([AX_LIBBFIO_CHECK_ENABLE],
ac_cv_libbfio=local
])

AM_CONDITIONAL(
[HAVE_LOCAL_LIBBFIO],
[test "x$ac_cv_libbfio" = xlocal])
AS_IF(
[test "x$ac_cv_libbfio_CPPFLAGS" != "x"],
[AC_SUBST(
[LIBBFIO_CPPFLAGS],
[$ac_cv_libbfio_CPPFLAGS])
])
AS_IF(
[test "x$ac_cv_libbfio_LIBADD" != "x"],
[AC_SUBST(
[LIBBFIO_LIBADD],
[$ac_cv_libbfio_LIBADD])
])
dnl Function to detect how to enable libbfio
AC_DEFUN([AX_LIBBFIO_CHECK_ENABLE],
[AX_COMMON_ARG_WITH(
[libbfio],
[libbfio],
[search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version],
[auto-detect],
[DIR])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[ax_libbfio_pc_libs_private],
[-lbfio])
])
dnl Check for a shared library version
AX_LIBBFIO_CHECK_LIB

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[ax_libbfio_spec_requires],
[libbfio])
AC_SUBST(
[ax_libbfio_spec_build_requires],
[libbfio-devel])
dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libbfio" != xyes],
[AX_LIBBFIO_CHECK_LOCAL

AC_DEFINE(
[HAVE_LOCAL_LIBBFIO],
[1],
[Define to 1 if the local version of libbfio is used.])
AC_SUBST(
[HAVE_LOCAL_LIBBFIO],
[1])
])

AM_CONDITIONAL(
[HAVE_LOCAL_LIBBFIO],
[test "x$ac_cv_libbfio" = xlocal])
AS_IF(
[test "x$ac_cv_libbfio_CPPFLAGS" != "x"],
[AC_SUBST(
[LIBBFIO_CPPFLAGS],
[$ac_cv_libbfio_CPPFLAGS])
])
AS_IF(
[test "x$ac_cv_libbfio_LIBADD" != "x"],
[AC_SUBST(
[LIBBFIO_LIBADD],
[$ac_cv_libbfio_LIBADD])
])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[ax_libbfio_pc_libs_private],
[-lbfio])
])

AS_IF(
[test "x$ac_cv_libbfio" = xyes],
[AC_SUBST(
[ax_libbfio_spec_requires],
[libbfio])
AC_SUBST(
[ax_libbfio_spec_build_requires],
[libbfio-devel])
])
])
])


+ 500
- 490
m4/libcdata.m4
File diff suppressed because it is too large
View File


+ 195
- 192
m4/libcerror.m4 View File

@@ -1,224 +1,227 @@
dnl Functions for libcerror
dnl Checks for libcerror or required headers and functions
dnl
dnl Version: 20130503
dnl Version: 20170904

dnl Function to detect if libcerror is available
dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
AC_DEFUN([AX_LIBCERROR_CHECK_LIB],
[dnl Check if parameters were provided
AS_IF(
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libcerror"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libcerror])
])
])

AS_IF(
[test "x$ac_cv_with_libcerror" = xno],
[ac_cv_libcerror=no],
[dnl Check for a pkg-config file
[dnl Check if parameters were provided
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcerror],
[libcerror >= 20120425],
[ac_cv_libcerror=yes],
[ac_cv_libcerror=no])
])
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libcerror"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libcerror])
])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS"
ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS"],
[dnl Check for headers
AC_CHECK_HEADERS([libcerror.h])

AS_IF(
[test "x$ac_cv_header_libcerror_h" = xno],
[test "x$ac_cv_with_libcerror" = xno],
[ac_cv_libcerror=no],
[dnl Check for the individual functions
ac_cv_libcerror=yes

AC_CHECK_LIB(
cerror,
libcerror_get_version,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

dnl Error functions
AC_CHECK_LIB(
cerror,
libcerror_error_free,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_set,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_matches,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_fprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_sprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_backtrace_fprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_backtrace_sprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

dnl System error functions
AC_CHECK_LIB(
cerror,
libcerror_system_set_error,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

ac_cv_libcerror_LIBADD="-lcerror"
[dnl Check for a pkg-config file
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcerror],
[libcerror >= 20120425],
[ac_cv_libcerror=yes],
[ac_cv_libcerror=check])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS"
ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS"])

AS_IF(
[test "x$ac_cv_libcerror" = xcheck],
[dnl Check for headers
AC_CHECK_HEADERS([libcerror.h])

AS_IF(
[test "x$ac_cv_header_libcerror_h" = xno],
[ac_cv_libcerror=no],
[dnl Check for the individual functions
ac_cv_libcerror=yes

AC_CHECK_LIB(
cerror,
libcerror_get_version,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

dnl Error functions
AC_CHECK_LIB(
cerror,
libcerror_error_free,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_set,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_matches,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_fprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_sprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_backtrace_fprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])
AC_CHECK_LIB(
cerror,
libcerror_error_backtrace_sprint,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

dnl System error functions
AC_CHECK_LIB(
cerror,
libcerror_system_set_error,
[ac_cv_libcerror_dummy=yes],
[ac_cv_libcerror=no])

ac_cv_libcerror_LIBADD="-lcerror"
])
])
])
])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_DEFINE(
[HAVE_LIBCERROR],
[1],
[Define to 1 if you have the `cerror' library (-lcerror).])
])
AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_DEFINE(
[HAVE_LIBCERROR],
[1],
[Define to 1 if you have the `cerror' library (-lcerror).])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[HAVE_LIBCERROR],
[1]) ],
[AC_SUBST(
[HAVE_LIBCERROR],
[0])
AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[HAVE_LIBCERROR],
[1]) ],
[AC_SUBST(
[HAVE_LIBCERROR],
[0])
])
])
])

dnl Function to detect if libcerror dependencies are available
AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL],
[dnl Headers included in libcerror/libcerror_error.c
AC_CHECK_HEADERS([stdarg.h varargs.h])

AS_IF(
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
[AC_MSG_FAILURE(
[Missing headers: stdarg.h and varargs.h],
[1])
])

dnl Wide character string functions used in libcerror/libcerror_error.c
AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_FUNCS([wcstombs])
[dnl Headers included in libcerror/libcerror_error.c
AC_CHECK_HEADERS([stdarg.h varargs.h])

AS_IF(
[test "x$ac_cv_func_wcstombs" != xyes],
[AC_MSG_FAILURE(
[Missing function: wcstombs],
[1])
])
])
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
[AC_MSG_FAILURE(
[Missing headers: stdarg.h and varargs.h],
[1])
])

dnl Check for error string functions used in libcerror/libcerror_system.c
AC_FUNC_STRERROR_R()
dnl Wide character string functions used in libcerror/libcerror_error.c
AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_FUNCS([wcstombs])

AS_IF(
[test "x$ac_cv_func_wcstombs" != xyes],
[AC_MSG_FAILURE(
[Missing function: wcstombs],
[1])
])
])

AS_IF(
[test "x$ac_cv_have_decl_strerror_r" != xyes],
[AC_CHECK_FUNCS([strerror])
dnl Check for error string functions used in libcerror/libcerror_system.c
AC_FUNC_STRERROR_R()

AS_IF(
[test "x$ac_cv_func_strerror" != xyes],
[AC_MSG_FAILURE(
[Missing functions: strerror_r and strerror],
[1])
])
])
[test "x$ac_cv_have_decl_strerror_r" != xyes],
[AC_CHECK_FUNCS([strerror])

AS_IF(
[test "x$ac_cv_func_strerror" != xyes],
[AC_MSG_FAILURE(
[Missing functions: strerror_r and strerror],
[1])
])
])

ac_cv_libcerror_CPPFLAGS="-I../libcerror";
ac_cv_libcerror_LIBADD="../libcerror/libcerror.la";
ac_cv_libcerror_CPPFLAGS="-I../libcerror";
ac_cv_libcerror_LIBADD="../libcerror/libcerror.la";

ac_cv_libcerror=local
])
ac_cv_libcerror=local
])

dnl Function to detect how to enable libcerror
AC_DEFUN([AX_LIBCERROR_CHECK_ENABLE],
[AX_COMMON_ARG_WITH(
[libcerror],
[libcerror],
[search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version],
[auto-detect],
[DIR])

dnl Check for a shared library version
AX_LIBCERROR_CHECK_LIB

dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libcerror" != xyes],
[AX_LIBCERROR_CHECK_LOCAL

AC_DEFINE(
[HAVE_LOCAL_LIBCERROR],
[1],
[Define to 1 if the local version of libcerror is used.])
AC_SUBST(
[HAVE_LOCAL_LIBCERROR],
[1])
])
[AX_COMMON_ARG_WITH(
[libcerror],
[libcerror],
[search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version],
[auto-detect],
[DIR])

AM_CONDITIONAL(
[HAVE_LOCAL_LIBCERROR],
[test "x$ac_cv_libcerror" = xlocal])
AS_IF(
[test "x$ac_cv_libcerror_CPPFLAGS" != "x"],
[AC_SUBST(
[LIBCERROR_CPPFLAGS],
[$ac_cv_libcerror_CPPFLAGS])
])
AS_IF(
[test "x$ac_cv_libcerror_LIBADD" != "x"],
[AC_SUBST(
[LIBCERROR_LIBADD],
[$ac_cv_libcerror_LIBADD])
])
dnl Check for a shared library version
AX_LIBCERROR_CHECK_LIB

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[ax_libcerror_pc_libs_private],
[-lcerror])
])
dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libcerror" != xyes],
[AX_LIBCERROR_CHECK_LOCAL

AC_DEFINE(
[HAVE_LOCAL_LIBCERROR],
[1],
[Define to 1 if the local version of libcerror is used.])
AC_SUBST(
[HAVE_LOCAL_LIBCERROR],
[1])
])

AM_CONDITIONAL(
[HAVE_LOCAL_LIBCERROR],
[test "x$ac_cv_libcerror" = xlocal])
AS_IF(
[test "x$ac_cv_libcerror_CPPFLAGS" != "x"],
[AC_SUBST(
[LIBCERROR_CPPFLAGS],
[$ac_cv_libcerror_CPPFLAGS])
])
AS_IF(
[test "x$ac_cv_libcerror_LIBADD" != "x"],
[AC_SUBST(
[LIBCERROR_LIBADD],
[$ac_cv_libcerror_LIBADD])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[ax_libcerror_spec_requires],
[libcerror])
AC_SUBST(
[ax_libcerror_spec_build_requires],
[libcerror-devel])
AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[ax_libcerror_pc_libs_private],
[-lcerror])
])

AS_IF(
[test "x$ac_cv_libcerror" = xyes],
[AC_SUBST(
[ax_libcerror_spec_requires],
[libcerror])
AC_SUBST(
[ax_libcerror_spec_build_requires],
[libcerror-devel])
])
])
])


+ 366
- 341
m4/libcfile.m4 View File

@@ -1,395 +1,420 @@
dnl Functions for libcfile
dnl Checks for libcfile or required headers and functions
dnl
dnl Version: 20160409
dnl Version: 20170904

dnl Function to detect if libcfile is available
dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
AC_DEFUN([AX_LIBCFILE_CHECK_LIB],
[dnl Check if parameters were provided
AS_IF(
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libcfile"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libcfile])
])
])

AS_IF(
[test "x$ac_cv_with_libcfile" = xno],
[ac_cv_libcfile=no],
[dnl Check for a pkg-config file
[dnl Check if parameters were provided
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcfile],
[libcfile >= 20160409],
[ac_cv_libcfile=yes],
[ac_cv_libcfile=no])
])
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect],
[AS_IF(
[test -d "$ac_cv_with_libcfile"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include"
LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib"],
[AC_MSG_WARN([no such directory: $ac_cv_with_libcfile])
])
])

AS_IF(
[test "x$ac_cv_libcfile" = xyes],
[ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS"
ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS"],
[dnl Check for headers
AC_CHECK_HEADERS([libcfile.h])

AS_IF(
[test "x$ac_cv_header_libcfile_h" = xno],
[test "x$ac_cv_with_libcfile" = xno],
[ac_cv_libcfile=no],
[dnl Check for the individual functions
ac_cv_libcfile=yes

AC_CHECK_LIB(
cfile,
libcfile_get_version,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])

dnl File functions
AC_CHECK_LIB(
cfile,
libcfile_file_initialize,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_free,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_close,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_read_buffer,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_read_buffer_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_write_buffer,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_write_buffer_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_seek_offset,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_resize,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_is_open,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_get_offset,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_get_size,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_is_device,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_io_control_read,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_io_control_read_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
[dnl Check for a pkg-config file
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcfile],
[libcfile >= 20160409],
[ac_cv_libcfile=yes],
[ac_cv_libcfile=check])
])

AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
cfile,
libcfile_file_open_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open_wide_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
])

dnl Support functions
AC_CHECK_LIB(
cfile,
libcfile_file_exists,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_remove,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
[test "x$ac_cv_libcfile" = xyes && test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CACHE_CHECK(
[whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1],
[ac_cv_header_libcfile_features_h_have_wide_character_type],
[AC_LANG_PUSH(C)
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <libcfile/features.h>]],
[[#if !defined( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE != 1 )
#error LIBCFILE_HAVE_WIDE_CHARACTER_TYPE not defined
##endif]] )],
[ac_cv_header_libcfile_features_h_have_wide_character_type=yes],
[ac_cv_header_libcfile_features_h_have_wide_character_type=no])
AC_LANG_POP(C)],
[ac_cv_header_libcfile_features_h_have_wide_character_type=no])

AS_IF(
[test "x$ac_cv_header_libcfile_features_h_have_wide_character_type" = xno],
[ac_cv_libcfile=no])
])

AS_IF(
[test "x$ac_cv_libcfile" = xyes],
[ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS"
ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS"])

AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
cfile,
libcfile_file_exists_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_remove_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
])

ac_cv_libcfile_LIBADD="-lcfile"
[test "x$ac_cv_libcfile" = xcheck],
[dnl Check for headers
AC_CHECK_HEADERS([libcfile.h])

AS_IF(
[test "x$ac_cv_header_libcfile_h" = xno],
[ac_cv_libcfile=no],
[dnl Check for the individual functions
ac_cv_libcfile=yes

AC_CHECK_LIB(
cfile,
libcfile_get_version,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])

dnl File functions
AC_CHECK_LIB(
cfile,
libcfile_file_initialize,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_free,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_close,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_read_buffer,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_read_buffer_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_write_buffer,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_write_buffer_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_seek_offset,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_resize,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_is_open,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_get_offset,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_get_size,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_is_device,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_io_control_read,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_io_control_read_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])

AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
cfile,
libcfile_file_open_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_open_wide_with_error_code,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
])

dnl Support functions
AC_CHECK_LIB(
cfile,
libcfile_file_exists,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_remove,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])

AS_IF(
[test "x$ac_cv_enable_wide_character_type" != xno],
[AC_CHECK_LIB(
cfile,
libcfile_file_exists_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
AC_CHECK_LIB(
cfile,
libcfile_file_remove_wide,
[ac_cv_libcfile_dummy=yes],
[ac_cv_libcfile=no])
])

ac_cv_libcfile_LIBADD="-lcfile"
])
])
])
])
])

AS_IF(
[test "x$ac_cv_libcfile" = xyes],
[AC_DEFINE(
[HAVE_LIBCFILE],
[1],
[Define to 1 if you have the `cfile' library (-lcfile).])
])
AS_IF(
[test "x$ac_cv_libcfile"