Make information about GNU ln available to programs
authorKlaus Aehlig <aehlig@google.com>
Tue, 8 Oct 2013 15:10:09 +0000 (17:10 +0200)
committerKlaus Aehlig <aehlig@google.com>
Wed, 9 Oct 2013 09:02:02 +0000 (11:02 +0200)
Propagate the information on whether we have the GNU version of ln
to all programs by making it available as a constant.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

Makefile.am
lib/constants.py
src/AutoConf.hs.in
src/Ganeti/HsConstants.hs

index 32dcdcf..375ec52 100644 (file)
@@ -1839,6 +1839,7 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in | stamp-directories
            -DENABLE_SPLIT_QUERY="$(ENABLE_SPLIT_QUERY)" \
            -DENABLE_RESTRICTED_COMMANDS="$(ENABLE_RESTRICTED_COMMANDS)" \
            -DENABLE_MOND="$(ENABLE_MOND)" \
+           -DHAS_GNU_LN="$(HAS_GNU_LN)" \
            -DMAN_PAGES="$$(for i in $(notdir $(man_MANS)); do \
                            echo -n "$$i" | sed -re 's/^(.*)\.([0-9]+)$$/("\1",\2):/g'; \
                            done)" \
index 196e7e8..023f059 100644 (file)
@@ -1573,6 +1573,10 @@ MOND_LATEST_API_VERSION = 1
 UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT
 UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL
 
+# other constants
+
+HAS_GNU_LN = _constants.HAS_GNU_LN
+
 # Do not re-export imported modules
 del re, _vcsversion, _constants, socket, pathutils, compat
 
index b7aaee2..eb7f0da 100644 (file)
@@ -205,6 +205,9 @@ enableRestrictedCommands = ENABLE_RESTRICTED_COMMANDS
 enableMond :: Bool
 enableMond = ENABLE_MOND
 
+hasGnuLn :: Bool
+hasGnuLn = HAS_GNU_LN
+
 -- Write dictionary with man page name as the key and the section
 -- number as the value
 manPages :: [(String, Int)]
index b26df9e..8c687c1 100644 (file)
@@ -78,6 +78,9 @@ drbdNoMetaFlush = AutoConf.drbdNoMetaFlush
 lvmStripecount :: Int
 lvmStripecount = AutoConf.lvmStripecount
 
+hasGnuLn :: Bool
+hasGnuLn = AutoConf.hasGnuLn
+
 -- * 'autoconf' constants for Python only ('lib/pathutils.py')
 
 -- ** Build-time constants