Skip to content

Commit

Permalink
autotools: support using a custom gradle command
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Oct 28, 2014
1 parent bc5e919 commit 1c78ef7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Expand Up @@ -41,7 +41,7 @@ install-data-hook: uninstall-hook

clean-local:
cd src && rm -f *.o *~ && cd ..
cd android && gradle clean
cd android && $(GRADLE) clean

distclean-local:
rm -rf espeak-data/phondata-manifest
Expand Down Expand Up @@ -285,13 +285,13 @@ jni:
cd android && ndk-build

apk-release:
cd android && gradle assembleRelease
cd android && $(GRADLE) assembleRelease

apk-debug:
cd android && gradle assembleDebug
cd android && $(GRADLE) assembleDebug

apk-check:
cd android && gradle connectedCheck
cd android && $(GRADLE) connectedCheck

android/res/raw/espeakdata.zip: espeak-data/phontab dictionaries
mkdir -pv android/res/raw
Expand Down
21 changes: 21 additions & 0 deletions configure.ac
Expand Up @@ -22,6 +22,25 @@ if test x"$NDKBUILD_CHECK" != xyes ; then
AC_MSG_ERROR([Please ensure that the Android NDK is installed and ndk-build is usable from the command line.])
fi

dnl ================================================================
dnl gradle checks.
dnl ================================================================

AC_ARG_WITH([gradle],
[AS_HELP_STRING([--with-gradle], [specify the gradle program to use @<:@default=gradle@:>@])],
[GRADLE=$with_gradle],
[GRADLE=gradle])

AC_MSG_CHECKING([for gradle])
if test -e ${GRADLE} ; then
AC_MSG_RESULT([${GRADLE}])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([The gradle command '${GRADLE}' is not found.])
fi

AC_SUBST(GRADLE)

dnl ================================================================
dnl getopt checks.
dnl ================================================================
Expand Down Expand Up @@ -261,6 +280,8 @@ AC_MSG_NOTICE([
sada: ${have_sada}
audio configuration: ${AUDIO}
gradle: ${GRADLE}
Klatt: ${have_klatt}
MBROLA: ${have_mbrola}
Sonic: ${have_sonic}
Expand Down

0 comments on commit 1c78ef7

Please sign in to comment.