Skip to content

Commit

Permalink
Add checks to enforce at least c11 semantics
Browse files Browse the repository at this point in the history
Add a BUILD.md file to start documenting build process and requirements

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Jul 24, 2022
1 parent e59cb3e commit 9f09474
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libnss3 libnss3-tools libnss3-dev
sudo apt-get install -y autoconf-archive libnss3 libnss3-tools libnss3-dev
- name: Setup
run: |
autoreconf -fiv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format
sudo apt-get install -y autoconf-archive clang-format
- name: Setup
if: ${{ github.event.pull_request.base.sha }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Files: **/Makefile.am
.gitignore
Makefile.am
README.md
BUILD.md
configure.ac
configure.ac
src/Makefile.am
Expand Down
13 changes: 13 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Build Prerequisites

This package requires the following:
- OpenSSL 3.0+ libraries and developement headers
- autoconf-archives packages for some m4 macros
- NSS softoken and development headers (for testing)
- a C compiler that supports at least C11 semantics

The usual command to build are:
- autorecofn -fi (if needed)
- ./configure
- make
- make check
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ AM_PROG_AR
LT_INIT
PKG_PROG_PKG_CONFIG

AX_CHECK_COMPILE_FLAG([-std=c11],
[CFLAGS="$CFLAGS -std=c11"],
AC_MSG_ERROR([C compiler must support at least C11 standard])
)

# Checks for libraries.
PKG_CHECK_MODULES(
[OPENSSL],
Expand Down

0 comments on commit 9f09474

Please sign in to comment.