Mercurial > octave
changeset 22103:9811e7875d52
build: allow pkg-config name to differ from library name
* acinclude.m4 (OCTAVE_CHECK_LIB): Add optional argument for pkg-config
project name when it differs from the common name used for the library.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 13 Jul 2016 17:03:50 -0700 |
parents | 3b2198c3013b |
children | cfc260765ddf |
files | m4/acinclude.m4 |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/acinclude.m4 Wed Jul 13 15:43:28 2016 -0700 +++ b/m4/acinclude.m4 Wed Jul 13 17:03:50 2016 -0700 @@ -628,7 +628,7 @@ dnl dnl Usage: dnl OCTAVE_CHECK_LIB(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, -dnl LANG, DOC-STRING, EXTRA-CHECK) +dnl LANG, DOC-STRING, EXTRA-CHECK, PKG-CONFIG-NAME) dnl AC_DEFUN([OCTAVE_CHECK_LIB], [ AC_ARG_WITH([$1-includedir], @@ -670,14 +670,14 @@ esac if test $ac_octave_$1_pkg_check = yes; then - PKG_CHECK_EXISTS([$1], [ + PKG_CHECK_EXISTS(m4_default([$9], [$1]), [ if test -z "$m4_toupper([$1])_CPPFLAGS"; then - m4_toupper([$1])_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $1)" + m4_toupper([$1])_CPPFLAGS="$($PKG_CONFIG --cflags-only-I m4_default([$9], [$1]))" fi if test -z "$m4_toupper([$1])_LDFLAGS"; then - m4_toupper([$1])_LDFLAGS="$($PKG_CONFIG --libs-only-L $1)" + m4_toupper([$1])_LDFLAGS="$($PKG_CONFIG --libs-only-L m4_default([$9], [$1]))" fi - m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l $1)" + m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l m4_default([$9], [$1]))" ]) fi