summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-05-28 00:42:24 -0700
committerKeith Packard <keithp@keithp.com>2014-05-28 00:42:24 -0700
commit3773e89c47d356c4df58edc5725c33bca89b9605 (patch)
treecd5dfe6f87cad5b5b58d6949e5776859d7aff7ab /configure.ac
parente6cfa25702b3dc1d492c5f1a4d0b4ba4831d30bd (diff)
altosuilib: Add google maps API key, configured with -with-google-key
This places the actual key outside of the repository, allowing the user to configure the name of the file containing the key. By default, this pulls the key from $HOME/altusmetrumllc/google-maps-api-key. With the key present, there are no longer any rate limits to loading map data. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d2d87754..dfbe59bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,20 @@ 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 google maps API key from (defaults to ~/altusmetrumllc/google-maps-api-key)]),
+ [GOOGLEKEYFILE=$withval], [GOOGLEKEYFILE=$HOME/altusmetrumllc/google-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_SUBST(GOOGLEKEY)
+
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -537,11 +551,12 @@ echo " STlink support..............: ${HAVE_STLINK}"
echo " Local pdclib................: ${HAVE_PDCLIB}"
echo " i386 and amd64 libaltos.....: ${MULTI_ARCH}"
echo ""
-echo " Java paths"
+echo " Java"
echo " freetts.....................: ${FREETTS}"
echo " jfreechart..................: ${JFREECHART}"
echo " jcommon.....................: ${JCOMMON}"
echo " JVM include.................: ${JVM_INCLUDE}"
+echo " Google maps API key.........: ${HAVE_GOOGLE_KEY}"
if test x${ANDROID_SDK} != "xno"; then
echo ""
echo " Android path"