[2/2] build: Remove support for non-pkg-config Expat

Submitted by Daniel Stone on July 21, 2018, 11:13 a.m.

Details

Message ID 20180721111315.22172-3-daniels@collabora.com
State Accepted
Commit bd56f9e29f16ca956b3e4d9658e32f1125db9d2d
Headers show
Series "Build system detritus removal" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Daniel Stone July 21, 2018, 11:13 a.m.
The Expat XML library has shipped a pkg-config file for long enough to
be in Debian's oldstable (Jessie, April 2015) and Ubuntu's oldest
supported LTS (Trusty, 14.04). The pkg-config file was added in Expat
upstream's commit 352cfc8f59a7, in September 2007.

Drop build support for versions of Expat which do not ship a
pkg-config file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
---
 configure.ac | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 8c2fb822..0022dcda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,16 +111,7 @@  if test "x$enable_libraries" = "xyes"; then
 		      [[#include <time.h>]])
 fi
 
-PKG_CHECK_MODULES(EXPAT, [expat], [],
-	[AC_CHECK_HEADERS(expat.h, [],
-		[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
-	 SAVE_LIBS="$LIBS"
-	 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
-		[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
-	 EXPAT_LIBS="$LIBS"
-	 LIBS="$SAVE_LIBS"
-	 AC_SUBST(EXPAT_LIBS)
-	])
+PKG_CHECK_MODULES(EXPAT, [expat])
 
 AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
 if test "x$enable_dtd_validation" = "xyes"; then

Comments

On 2018-07-21 06:13 AM, Daniel Stone wrote:
> The Expat XML library has shipped a pkg-config file for long enough to
> be in Debian's oldstable (Jessie, April 2015) and Ubuntu's oldest
> supported LTS (Trusty, 14.04). The pkg-config file was added in Expat
> upstream's commit 352cfc8f59a7, in September 2007.
> 
> Drop build support for versions of Expat which do not ship a
> pkg-config file.
> 
> Signed-off-by: Daniel Stone <daniels@collabora.com>

Looks good to me
Reviewed-by: Derek Foreman <derek.foreman.samsung@gmail.com>

> ---
>  configure.ac | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8c2fb822..0022dcda 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -111,16 +111,7 @@ if test "x$enable_libraries" = "xyes"; then
>  		      [[#include <time.h>]])
>  fi
>  
> -PKG_CHECK_MODULES(EXPAT, [expat], [],
> -	[AC_CHECK_HEADERS(expat.h, [],
> -		[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
> -	 SAVE_LIBS="$LIBS"
> -	 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
> -		[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
> -	 EXPAT_LIBS="$LIBS"
> -	 LIBS="$SAVE_LIBS"
> -	 AC_SUBST(EXPAT_LIBS)
> -	])
> +PKG_CHECK_MODULES(EXPAT, [expat])
>  
>  AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
>  if test "x$enable_dtd_validation" = "xyes"; then
>