Skip to content

Commit

Permalink
Add FreeBSD CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
rodarima committed Dec 27, 2023
1 parent 3783bad commit 182abd6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,25 @@ jobs:
run: make check
- name: make distcheck
run: make distcheck
freebsd-openssl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: FreeBSD VM build
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
set -x
pkg install -y automake fltk
run: |
set -x
pwd
freebsd-version
./autogen.sh
./configure
cat config.log
make
make check
make distcheck
27 changes: 12 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,6 @@ dnl -----------------------------------------------------------------
dnl
BASE_CUR_WORKING_DIR=`pwd`

dnl --------------------------------------
dnl Check whether to add /usr/local or not
dnl (this is somewhat a religious problem)
dnl --------------------------------------
dnl
if test "`$CPP -v < /dev/null 2>&1 | grep '/usr/local/include' 2>&1`" = ""; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi

dnl ------------------------------------
dnl Check for socket libs (AIX, Solaris)
dnl ------------------------------------
Expand Down Expand Up @@ -437,13 +427,20 @@ fi
AM_CONDITIONAL([USE_OPENSSL], [test "x$openssl_ok" = "xyes"])
AM_CONDITIONAL([USE_MBEDTLS], [test "x$mbedtls_ok" = "xyes"])

dnl --------------------------------------------------------------
dnl Test for iconv functionality in libc or for libiconv usability
dnl --------------------------------------------------------------
dnl ----------------------------------------------------------------
dnl Test for iconv implementation first in libiconv and then in libc
dnl ----------------------------------------------------------------
AC_CHECK_HEADER(iconv.h, iconv_ok=yes, iconv_ok=no)
if test "x$iconv_ok" = "xyes"; then
AC_CHECK_LIB(c, iconv_open, LIBICONV_LIBS="",
AC_CHECK_LIB(iconv, iconv_open, LIBICONV_LIBS="-liconv", iconv_ok=no))
dnl First try to link with the libiconv library if available, otherwise
dnl fall back to the implementation of libc. It is required to be done
dnl in this order because FreeBSD distributes libiconv headers in
dnl /usr/include/local/iconv.h, in the same place the headers for FLTK
dnl are placed. If we select to link with libc, the headers provided by
dnl libiconv will be used while linking with libc. This causes a linkage
dnl error.
AC_CHECK_LIB(iconv, iconv_open, LIBICONV_LIBS="-liconv",
AC_CHECK_LIB(c, iconv_open, LIBICONV_LIBS="", iconv_ok=no))
fi
if test "x$iconv_ok" = "xno"; then
dnl Test for OpenBSD
Expand Down

0 comments on commit 182abd6

Please sign in to comment.