Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Sep 12, 2024
1 parent 357666a commit 87ac632
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 12 deletions.
2 changes: 1 addition & 1 deletion acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for required headers and functions
dnl
dnl Version: 20240413
dnl Version: 20240514

dnl Function to detect if libcdata dependencies are available
AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL],
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libcdata],
[20240511],
[20240911],
[[email protected]])

AC_CONFIG_SRCDIR(
Expand Down
1 change: 1 addition & 0 deletions libcdata.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ year_of_creation: "2006"

[library]
description: "Library to support cross-platform C generic data functions"
features: ["pthread"]
public_types: ["array", "btree", "list", "list_element", "range_list", "tree_node"]

39 changes: 35 additions & 4 deletions m4/common.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for common headers and functions
dnl
dnl Version: 20240511
dnl Version: 20240513

dnl Function to test if a certain feature was disabled
AC_DEFUN([AX_COMMON_ARG_DISABLE],
Expand Down Expand Up @@ -564,11 +564,42 @@ AC_DEFUN([AX_COMMON_CHECK_LOCAL],
AX_COMMON_CHECK_FUNC_PRINTF_ZD
])

dnl Function to test if a library with a specific definition is available
AC_DEFUN([AX_CHECK_LIB_DEFINITION],
[AC_CACHE_CHECK(
[if `$2' is defined],
[ac_cv_$1_definition_$2],
[AC_LANG_PUSH(C)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <$1.h>]],
[[int test = $2;
return( 0 ); ]]
)],
[ac_cv_$1_definition_$2=yes],
[ac_cv_$1_definition_$2=no])
AC_LANG_POP(C)])
AS_IF(
[test "x$ac_cv_$1_definition_$2" != xyes],
[ac_cv_$1=no])
])

dnl Function to test if a library with specific definitions is available
AC_DEFUN([AX_CHECK_LIB_DEFINITIONS],
[m4_foreach(
[definition],
[$2],
[AX_CHECK_LIB_DEFINITION(
[$1],
[definition])
])
])

dnl Function to test if a library with specific functions is available
AC_DEFUN([AX_CHECK_LIB_FUNCTIONS],
[ac_cv_$1=yes
m4_foreach(
[m4_foreach(
[function],
[$3],
[AC_CHECK_LIB(
Expand Down
6 changes: 4 additions & 2 deletions m4/libcerror.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcerror required headers and functions
dnl
dnl Version: 20240511
dnl Version: 20240513

dnl Function to detect if libcerror is available
dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -38,7 +38,9 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB],
AS_IF(
[test "x$ac_cv_header_libcerror_h" = xno],
[ac_cv_libcerror=no],
[AX_CHECK_LIB_FUNCTIONS(
[ac_cv_libcerror=yes
AX_CHECK_LIB_FUNCTIONS(
[libcerror],
[cerror],
[[libcerror_get_version],
Expand Down
6 changes: 4 additions & 2 deletions m4/libcthreads.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcthreads required headers and functions
dnl
dnl Version: 20240511
dnl Version: 20240513

dnl Function to detect if libcthreads is available
dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -38,7 +38,9 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB],
AS_IF(
[test "x$ac_cv_header_libcthreads_h" = xno],
[ac_cv_libcthreads=no],
[AX_CHECK_LIB_FUNCTIONS(
[ac_cv_libcthreads=yes
AX_CHECK_LIB_FUNCTIONS(
[libcthreads],
[cthreads],
[[libcthreads_get_version],
Expand Down
6 changes: 4 additions & 2 deletions m4/pthread.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Functions for pthread
dnl
dnl Version: 20240511
dnl Version: 20240513

dnl Function to detect if pthread is available
AC_DEFUN([AX_PTHREAD_CHECK_LIB],
Expand All @@ -24,7 +24,9 @@ AC_DEFUN([AX_PTHREAD_CHECK_LIB],
AS_IF(
[test "x$ac_cv_header_pthread_h" = xno],
[ac_cv_pthread=no],
[AX_CHECK_LIB_FUNCTIONS(
[ac_cv_pthread=yes
AX_CHECK_LIB_FUNCTIONS(
[pthread],
[pthread],
[[pthread_create],
Expand Down

0 comments on commit 87ac632

Please sign in to comment.