From 095b720ab5dc1dab860da62826c227fc31630859 Mon Sep 17 00:00:00 2001 From: William Brown Date: Nov 02 2016 00:55:28 +0000 Subject: Ticket 49026 - Support nunc-stans pkgconfig Bug Description: Without pkgconfig we would have to provide a with path to the our tools incase nunc-stans was in a weird location. This avoids that issue Fix Description: Add the support to use pkgconfig for nunc-stans. https://fedorahosted.org/389/ticket/49026 Author: wibrown Review by: mreynolds (Thanks) --- diff --git a/m4/nunc-stans.m4 b/m4/nunc-stans.m4 index 6c3a360..442a0df 100644 --- a/m4/nunc-stans.m4 +++ b/m4/nunc-stans.m4 @@ -61,3 +61,16 @@ AC_ARG_WITH(nunc-stans-lib, AS_HELP_STRING([--with-nunc-stans-lib=PATH],[nunc-st fi ], AC_MSG_RESULT(no)) + +if test -z "$nunc_stans_inc" -o -z "$nunc_stans_lib"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config) + AC_MSG_CHECKING(for nunc-stans with pkg-config) + if test -n "$PKG_CONFIG"; then + if $PKG_CONFIG --exists nunc-stans; then + nunc_stans_inc=`$PKG_CONFIG --cflags-only-I nunc-stans` + nunc_stans_lib=`$PKG_CONFIG --libs-only-L nunc-stans` + AC_MSG_RESULT([using system nunc-stans]) + fi + fi +fi +