summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-10-06 23:32:24 -0700
committerKeith Packard <keithp@keithp.com>2018-10-06 23:32:24 -0700
commit7b248524d4bd2c3ab64899b133230d131258396c (patch)
tree134464a1f8ad8b5ea50eb81d2a18c0a1bb492f29 /configure.ac
parent7eb475a9694327809b7ab5a9f419d00e0819a47d (diff)
altosdroid: Restore google maps key setting
Only for altosdroid, and use a key restricted to our app Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 741fa013..dae2499d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,12 +172,26 @@ AM_CONDITIONAL(FATINSTALL, [test "x$FATDIR" != "xnone"])
AC_SUBST(FATDIR)
+AC_ARG_WITH(google-key, AS_HELP_STRING([--with-google-key=PATH],
+ [Set the file to read the AltosDroid maps API key from (defaults to ~/altusmetrumllc/google-altosdroid-maps-api-key)]),
+ [GOOGLEKEYFILE=$withval], [GOOGLEKEYFILE=$HOME/altusmetrumllc/google-altosdroid-maps-api-key])
+
+if test -r "$GOOGLEKEYFILE" -a -s "$GOOGLEKEYFILE"; then
+ GOOGLEKEY=`cat "$GOOGLEKEYFILE"`
+ HAVE_GOOGLE_KEY="yes"
+else
+ GOOGLEKEY='null'
+ HAVE_GOOGLE_KEY="no"
+fi
+
AC_ARG_ENABLE(faketime, AS_HELP_STRING([--enable-faketime],
[Use faketime program to ensure pdf files are reproducible (default=no)]),
[FAKETIME=$enableval], [FAKETIME=no])
AM_CONDITIONAL(FAKETIME, [test x$FAKETIME = xyes])
+AC_SUBST(GOOGLEKEY)
+
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -586,7 +600,7 @@ echo " freetts.....................: ${FREETTS}"
echo " jfreechart..................: ${JFREECHART}"
echo " jcommon.....................: ${JCOMMON}"
echo " JVM include.................: ${JVM_INCLUDE}"
-echo " Google maps API key.........: ${HAVE_GOOGLE_KEY}"
+echo " AltosDroid maps API key.....: ${HAVE_GOOGLE_KEY}"
if test x${ANDROID_SDK} != "xno"; then
echo ""
echo " Android path"