Skip to content

Commit

Permalink
[Template merge] separate repo and pc dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed May 13, 2022
1 parent 5117312 commit 2a55471
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions m4/giella-macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,10 @@ enableval=''
################################################################################
# Define function to enable optional shared targets
################################################################################
# Usage: gt_USE_SHARED([NAME], [SHARED REPONAME])
# Usage: gt_USE_SHARED(NAME, SHARED REPONAME, [PKG-CONFIG NAME])
# where, NAME is used as the variable name: gt_SHARED_$NAME, and
# REPONAME is used as directory name and pkg-config name
# PKG-CONFIG NAME is pkg-config name of dependency if different from $2
AC_DEFUN([gt_USE_SHARED],
[
THIS_TOP_SRC_DIR=$BUILD_DIR_PATH/$MYSRCDIR
Expand All @@ -1052,8 +1053,9 @@ AS_IF([test x$with_shared_$1 != xfalse], [
AS_IF([test -d "$THIS_TOP_SRC_DIR"/../$2 ], [
gt_SHARED_$1="$THIS_TOP_SRC_DIR"/../$2
], [
AS_IF([pkg-config --exists $2], [
gt_SHARED_$1="$(pkg-config --variable=dir $2)"
_gt_pkg_name=m4_default([$3], [$2])
AS_IF([pkg-config --exists $_gt_pkg_name], [
gt_SHARED_$1="$(pkg-config --variable=dir $_gt_pkg_name)"
],
[
gt_SHARED_$1=false
Expand Down

0 comments on commit 2a55471

Please sign in to comment.