Skip to content

Commit

Permalink
[Template Merge] shared macro
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed May 9, 2022
1 parent 25b91f2 commit 2ff475f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions m4/giella-macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1022,12 +1022,40 @@ AS_IF([test x$enable_tts = xyes -a x$enable_transcriptors = xno],
[AC_MSG_ERROR([You need to enable transcriptors to build tts])])
AS_IF([test x$enable_tts = xyes -a x$enable_phonetic = xno],
[AC_MSG_ERROR([You need to enable phonetic to build tts])])
AS_IF([test x$enable_tts = xyes -a x$enable_tokenisers = xno],
[AC_MSG_ERROR([You need to enable phonetic to build tts])])
AM_CONDITIONAL([WANT_TTS], [test "x$enable_tts" != xno])
enableval=''
]) # gt_ENABLE_TARGETS
################################################################################
# Define function to enable optional shared targets
################################################################################
# Usage: gt_USE_SHARED([NAME], [SHARED REPONAME])
#
AC_DEFUN([gt_USE_SHARED],
[
THIS_TOP_SRC_DIR=$BUILD_DIR_PATH/$MYSRCDIR
AC_MSG_CHECKING([whether we can use shared $1])
# Check in the parent directory:
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 $1)"
],
[
gt_SHARED_$1=false
AC_MSG_WARN([Could not find $1 data dir to set $1])
])
])
AC_MSG_RESULT([$gt_SHARED_$1])
AC_ARG_VAR([gt_SHARED_$1])
]) # gt_USE_SHARED
################################################################################
# Define function to print the configure footer
################################################################################
Expand Down

0 comments on commit 2ff475f

Please sign in to comment.