From 1b598c2d7861a525616f095cf533579ba1a49f42 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 19 Jul 2021 11:09:41 -0700 Subject: [PATCH] Fix pkg-config check for inih and enable Ubuntu 18.04 builds --- .github/workflows/build.yml | 2 +- INSTALL.md | 4 ++-- configure.ac | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86c2582..1a361d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: strategy: matrix: - os: ['ubuntu-20.04', 'macos-latest'] + os: ['ubuntu-18.04', 'ubuntu-20.04', 'macos-latest'] cc: ['gcc', 'clang'] steps: diff --git a/INSTALL.md b/INSTALL.md index 6737ef5..6ac3844 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,12 +1,12 @@ Installation instructions for x52pro-linux ========================================== -[![Build Status](https://www.travis-ci.org/nirenjan/x52pro-linux.svg?branch=master)](https://www.travis-ci.org/nirenjan/x52pro-linux) +![Build Status](https://www.github.com/nirenjan/x52pro-linux/actions/workflows/build.yml/badge.svg) Build has been tested on the following operating systems (x86-64 only): -* Ubuntu 16.04 LTS * Ubuntu 18.04 LTS +* Ubuntu 20.04 LTS * OS X 10.13.6 # Prerequisites diff --git a/configure.ac b/configure.ac index 625745c..055be1c 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,12 @@ AC_SUBST([LIBUSB_LDFLAGS]) AC_SUBST([LIBUSB_LIBS]) # Check for libinih -PKG_CHECK_MODULES([INIH], [inih]) +PKG_CHECK_MODULES([INIH], [inih], [], + [ + # Older versions of Ubuntu don't provide a .pc file + AC_CHECK_HEADERS([ini.h]) + AC_SEARCH_LIBS([ini_parse], [inih]) + ]) AC_SUBST([INIH_CFLAGS]) AC_SUBST([INIH_LDFLAGS]) AC_SUBST([INIH_LIBS])