Fix several search path configure options
[ganeti-local] / src / AutoConf.hs.in
index 7545ac2..9c00056 100644 (file)
@@ -28,6 +28,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
 module AutoConf where
 
+split :: String -> [String]
+split str =
+  case span (/= ',') str of
+    (x, []) -> [x]
+    (x, _:xs) -> x:split xs
+
 packageVersion :: String
 packageVersion = "PACKAGE_VERSION"
 
@@ -46,6 +52,9 @@ versionSuffix = "VERSION_SUFFIX"
 versionFull :: String
 versionFull = "VERSION_FULL"
 
+dirVersion :: String
+dirVersion = "DIRVERSION"
+
 localstatedir :: String
 localstatedir = "LOCALSTATEDIR"
 
@@ -65,10 +74,10 @@ exportDir :: String
 exportDir = "EXPORT_DIR"
 
 osSearchPath :: [String]
-osSearchPath = OS_SEARCH_PATH[]
+osSearchPath = split OS_SEARCH_PATH
 
 esSearchPath :: [String]
-esSearchPath = ES_SEARCH_PATH[]
+esSearchPath = split ES_SEARCH_PATH
 
 xenBootloader :: String
 xenBootloader = "XEN_BOOTLOADER"
@@ -89,7 +98,7 @@ sharedFileStorageDir :: String
 sharedFileStorageDir = "SHARED_FILE_STORAGE_DIR"
 
 iallocatorSearchPath :: [String]
-iallocatorSearchPath = IALLOCATOR_SEARCH_PATH[]
+iallocatorSearchPath = split IALLOCATOR_SEARCH_PATH
 
 kvmPath :: String
 kvmPath = "KVM_PATH"
@@ -98,7 +107,7 @@ ipPath :: String
 ipPath = "IP_PATH"
 
 socatPath :: String
-socatPath = "SOCAT"
+socatPath = "SOCAT_PATH"
 
 socatUseEscape :: Bool
 socatUseEscape = SOCAT_USE_ESCAPE
@@ -121,6 +130,12 @@ htoolsProgs = HS_HTOOLS_PROGS[]
 pkglibdir :: String
 pkglibdir = "PKGLIBDIR"
 
+sharedir :: String
+sharedir = "SHAREDIR"
+
+versionedsharedir :: String
+versionedsharedir = "VERSIONEDSHAREDIR"
+
 drbdBarriers :: String
 drbdBarriers = "DRBD_BARRIERS"
 
@@ -196,6 +211,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)]