mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 01:17:04 +00:00
Add checks for libjson-c to configure.ac
This commit is contained in:
parent
317d843a58
commit
f2d6e10b4f
3 changed files with 23 additions and 2 deletions
2
.github/workflows/clang.yml
vendored
2
.github/workflows/clang.yml
vendored
|
@ -19,6 +19,6 @@ jobs:
|
|||
- name: autogen
|
||||
run: ./autogen.sh
|
||||
- name: configure
|
||||
run: ./configure CC=/usr/bin/clang LDFLAGS="-ljson-c"
|
||||
run: ./configure CC=/usr/bin/clang
|
||||
- name: make
|
||||
run: make
|
||||
|
|
2
.github/workflows/gcc.yml
vendored
2
.github/workflows/gcc.yml
vendored
|
@ -19,6 +19,6 @@ jobs:
|
|||
- name: autogen
|
||||
run: ./autogen.sh
|
||||
- name: configure
|
||||
run: ./configure CC=/usr/bin/gcc LDFLAGS="-ljson-c"
|
||||
run: ./configure CC=/usr/bin/gcc
|
||||
- name: make
|
||||
run: make
|
||||
|
|
21
configure.ac
21
configure.ac
|
@ -94,6 +94,27 @@ files with
|
|||
])
|
||||
fi
|
||||
|
||||
have_libjson_c=no
|
||||
AC_SEARCH_LIBS([json_object_new_object], [json-c], [have_libjson_c=yes])
|
||||
|
||||
if test "x${have_libjson_c}" = xyes; then
|
||||
AC_CHECK_HEADERS([json-c/json.h], [], [have_libjson_c=no])
|
||||
fi
|
||||
|
||||
if test "x${have_libjson_c}" = xno; then
|
||||
AC_MSG_ERROR([
|
||||
---------------------------------------
|
||||
Unable to find libjson-c on this system
|
||||
Check 'config.log' for more information
|
||||
|
||||
On Debian and Ubuntu systems you can
|
||||
install the required library and header
|
||||
files with
|
||||
apt install libjson-c-dev
|
||||
---------------------------------------
|
||||
])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([optimization],
|
||||
[ --disable-optimization disable compiler optimizations],
|
||||
[optimization=${enableval}], [optimization=yes])
|
||||
|
|
Loading…
Reference in a new issue