Added simple "good enough" configure variable expansion.
[jben2_gui.git] / jben / configure.py.in
blob3db7993a709338efe0875f0bb9242571f607fb4e
1 """Script for accessing variables from configure."""
3 package_name = """@PACKAGE_NAME@"""
4 package_version = """@PACKAGE_VERSION@"""
5 package_string = """@PACKAGE_STRING@"""
6 package_bugreport = """@PACKAGE_BUGREPORT@"""
7 package_url = """@PACKAGE_URL@"""
9 # Installation path variables
10 # WANTED: A simple way to fully expand these variables automatically.
11 prefix = """@prefix@""" # Default: /usr/local
12 datarootdir = """@datarootdir@""" # Default: $(prefix)/share
13 datadir = """@datadir@""" # Default: $(datarootdir)
15 # If defaults are not overridden, we need to merge the variables here
16 # appropriately.
17 def shell_replace(s, name, value):
18 """Naive shell replacement."""
19 key = "${%s}" % name
20 if key in s:
21 return s.replace(key, value)
22 return s
24 datarootdir = shell_replace(datarootdir, "prefix", prefix)
25 datadir = shell_replace(datadir, "datarootdir", datarootdir)
27 # REMINDER: kpengine data will be stored in @datadir@/jben/kpengine/.