Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 15, 2024
1 parent 79796d9 commit 87b3613
Show file tree
Hide file tree
Showing 15 changed files with 267 additions and 222 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ install:
- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] (
"%PYTHON%" -m pip install -U tox twine )
- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential flex git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
(New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") }
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
Expand Down
45 changes: 24 additions & 21 deletions autogen.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script to generate the necessary files for a msvscpp build
#
# Version: 20230118
# Version: 20240306

$WinFlex = "..\win_flex_bison\win_flex.exe"
$WinBison = "..\win_flex_bison\win_bison.exe"
Expand Down Expand Up @@ -29,33 +29,36 @@ If (Test-Path "${Prefix}.net")

$NamePrefix = ""

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
ForEach (${Library} in Get-ChildItem -Directory -Path "lib*")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"

$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"

Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}

# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}
# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"

Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
}
}

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(
[libsigscan],
[20240219],
[20240315],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
6 changes: 3 additions & 3 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: 20181117
dnl Version: 20240308

dnl Function to test if a certain feature was disabled
AC_DEFUN([AX_COMMON_ARG_DISABLE],
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions m4/libbfio.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libbfio required headers and functions
dnl
dnl Version: 20201125
dnl Version: 20240314

dnl Function to detect if libbfio is available
dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcdata.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcdata required headers and functions
dnl
dnl Version: 20230108
dnl Version: 20240314

dnl Function to detect if libcdata is available
dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 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: 20190308
dnl Version: 20240314

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 All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcfile.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcfile required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240314

dnl Function to detect if libcfile is available
dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libclocale.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libclocale required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240314

dnl Function to detect if libclocale is available
dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcnotify.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcnotify required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240314

dnl Function to detect if libcnotify is available
dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcpath.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcpath required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240314

dnl Function to detect if libcpath is available
dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcsplit.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcsplit required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240314

dnl Function to detect if libcsplit is available
dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
8 changes: 5 additions & 3 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: 20190308
dnl Version: 20240314

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 All @@ -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"
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit 87b3613

Please sign in to comment.