Browse Source

autotools: support using a custom gradle command

master
Reece H. Dunn 10 years ago
parent
commit
1c78ef70ba
2 changed files with 25 additions and 4 deletions
  1. 4
    4
      Makefile.am
  2. 21
    0
      configure.ac

+ 4
- 4
Makefile.am View File

@@ -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
@@ -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

+ 21
- 0
configure.ac View File

@@ -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 ================================================================
@@ -261,6 +280,8 @@ AC_MSG_NOTICE([
sada: ${have_sada}
audio configuration: ${AUDIO}

gradle: ${GRADLE}

Klatt: ${have_klatt}
MBROLA: ${have_mbrola}
Sonic: ${have_sonic}

Loading…
Cancel
Save