-SUBDIRS = src
+SUBDIRS = share src
 
+++ /dev/null
-<Graph>
-  Host "/any/"
-  Plugin "cpu"
-  PluginInstance "/any/"
-  Type "cpu"
-  TypeInstance "/all/"
-
-  Title "CPU utilization"
-  VerticalLabel "Jiffies"
-
-  <DEF>
-    TypeInstance "idle"
-    DSName "value"
-    Legend "Idle   "
-    Color "e8e8e8"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "nice"
-    DSName "value"
-    Legend "Nice   "
-    Color "00e000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "user"
-    DSName "value"
-    Legend "User   "
-    Color "0000ff"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "wait"
-    DSName "value"
-    Legend "Wait-IO"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "system"
-    DSName "value"
-    Legend "System "
-    Color "ff0000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "softirq"
-    DSName "value"
-    Legend "SoftIRQ"
-    Color "ff00ff"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "interrupt"
-    DSName "value"
-    Legend "IRQ    "
-    Color "a000a0"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "steal"
-    DSName "value"
-    Legend "Steal  "
-    Color "000000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance "/any/"
-  Type "df_complex"
-  TypeInstance "/all/"
-
-  Title "Diskspace"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    #Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "reserved"
-    DSName "value"
-    Legend "Reserved"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00bf00"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance "/any/"
-  Type "df_inodes"
-  TypeInstance "/all/"
-
-  Title "Diskspace (Inodes)"
-  VerticalLabel "Inodes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    #Stack true
-  </DEF>
-  <DEF>
-    TypeInstance "reserved"
-    DSName "value"
-    Legend "Reserved"
-    Color "ffb000"
-    Area true
-    Stack true
-  </DEF>
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00bf00"
-    Area true
-    Stack true
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance ""
-  Type "df"
-  TypeInstance "/any/"
-
-  Title "Diskspace (legacy)"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    DSName "used"
-    Legend "Used"
-    Color "ff0000"
-    Area true
-    #Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    DSName "free"
-    Legend "Free"
-    Color "00bf00"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_merged"
-  TypeInstance ""
-
-  Title "Disk merged operations"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_octets"
-  TypeInstance ""
-
-  Title "Disk octets"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_ops"
-  TypeInstance ""
-
-  Title "Disk operations"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_time"
-  TypeInstance ""
-
-  Title "Disk time per op"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "memory"
-  PluginInstance ""
-  Type "memory"
-  TypeInstance "/all/"
-
-  Title "Memory utilization"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00e000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "cached"
-    DSName "value"
-    Legend "Cached  "
-    Color "0000ff"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "buffered"
-    DSName "value"
-    Legend "Buffered"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "locked"
-    DSName "value"
-    Legend "Locked  "
-    Color "ff00ff"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "processes"
-  PluginInstance ""
-  Type "ps_state"
-  TypeInstance "/all/"
-
-  Title "Processes"
-  VerticalLabel "Processes"
-
-  <DEF>
-    TypeInstance "paging"
-    DSName "value"
-    Legend "Paging  "
-    Color "ffb000"
-  </DEF>
-  <DEF>
-    TypeInstance "blocked"
-    DSName "value"
-    Legend "Blocked "
-    Color "ff00ff"
-  </DEF>
-  <DEF>
-    TypeInstance "zombies"
-    DSName "value"
-    Legend "Zombies "
-    Color "ff0000"
-  </DEF>
-  <DEF>
-    TypeInstance "stopped"
-    DSName "value"
-    Legend "Stopped "
-    Color "a000a0"
-  </DEF>
-  <DEF>
-    TypeInstance "running"
-    DSName "value"
-    Legend "Running "
-    Color "00e000"
-  </DEF>
-  <DEF>
-    TypeInstance "sleeping"
-    DSName "value"
-    Legend "Sleeping"
-    Color "0000ff"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "swap"
-  PluginInstance ""
-  Type "swap"
-  TypeInstance "/all/"
-
-  Title "Swap utilization"
-  VerticalLabel "Bytes"
-</Graph>
-
 
 AC_CHECK_LIB(rrd_th, rrd_graph_v, [],
             [AC_MSG_ERROR(cannot find librrd_th.)], [-lm])
 
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile share/Makefile src/Makefile)
 
--- /dev/null
+dist_sysconf_DATA = collection.conf
+
 
--- /dev/null
+<Graph>
+  Host "/any/"
+  Plugin "cpu"
+  PluginInstance "/any/"
+  Type "cpu"
+  TypeInstance "/all/"
+
+  Title "CPU utilization"
+  VerticalLabel "Jiffies"
+
+  <DEF>
+    TypeInstance "idle"
+    DSName "value"
+    Legend "Idle   "
+    Color "e8e8e8"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "nice"
+    DSName "value"
+    Legend "Nice   "
+    Color "00e000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "user"
+    DSName "value"
+    Legend "User   "
+    Color "0000ff"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "wait"
+    DSName "value"
+    Legend "Wait-IO"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "system"
+    DSName "value"
+    Legend "System "
+    Color "ff0000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "softirq"
+    DSName "value"
+    Legend "SoftIRQ"
+    Color "ff00ff"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "interrupt"
+    DSName "value"
+    Legend "IRQ    "
+    Color "a000a0"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "steal"
+    DSName "value"
+    Legend "Steal  "
+    Color "000000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance "/any/"
+  Type "df_complex"
+  TypeInstance "/all/"
+
+  Title "Diskspace"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    #Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "reserved"
+    DSName "value"
+    Legend "Reserved"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00bf00"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance "/any/"
+  Type "df_inodes"
+  TypeInstance "/all/"
+
+  Title "Diskspace (Inodes)"
+  VerticalLabel "Inodes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    #Stack true
+  </DEF>
+  <DEF>
+    TypeInstance "reserved"
+    DSName "value"
+    Legend "Reserved"
+    Color "ffb000"
+    Area true
+    Stack true
+  </DEF>
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00bf00"
+    Area true
+    Stack true
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance ""
+  Type "df"
+  TypeInstance "/any/"
+
+  Title "Diskspace (legacy)"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    DSName "used"
+    Legend "Used"
+    Color "ff0000"
+    Area true
+    #Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    DSName "free"
+    Legend "Free"
+    Color "00bf00"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_merged"
+  TypeInstance ""
+
+  Title "Disk merged operations"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_octets"
+  TypeInstance ""
+
+  Title "Disk octets"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_ops"
+  TypeInstance ""
+
+  Title "Disk operations"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_time"
+  TypeInstance ""
+
+  Title "Disk time per op"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "memory"
+  PluginInstance ""
+  Type "memory"
+  TypeInstance "/all/"
+
+  Title "Memory utilization"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00e000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "cached"
+    DSName "value"
+    Legend "Cached  "
+    Color "0000ff"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "buffered"
+    DSName "value"
+    Legend "Buffered"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "locked"
+    DSName "value"
+    Legend "Locked  "
+    Color "ff00ff"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "processes"
+  PluginInstance ""
+  Type "ps_state"
+  TypeInstance "/all/"
+
+  Title "Processes"
+  VerticalLabel "Processes"
+
+  <DEF>
+    TypeInstance "paging"
+    DSName "value"
+    Legend "Paging  "
+    Color "ffb000"
+  </DEF>
+  <DEF>
+    TypeInstance "blocked"
+    DSName "value"
+    Legend "Blocked "
+    Color "ff00ff"
+  </DEF>
+  <DEF>
+    TypeInstance "zombies"
+    DSName "value"
+    Legend "Zombies "
+    Color "ff0000"
+  </DEF>
+  <DEF>
+    TypeInstance "stopped"
+    DSName "value"
+    Legend "Stopped "
+    Color "a000a0"
+  </DEF>
+  <DEF>
+    TypeInstance "running"
+    DSName "value"
+    Legend "Running "
+    Color "00e000"
+  </DEF>
+  <DEF>
+    TypeInstance "sleeping"
+    DSName "value"
+    Legend "Sleeping"
+    Color "0000ff"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "swap"
+  PluginInstance ""
+  Type "swap"
+  TypeInstance "/all/"
+
+  Title "Swap utilization"
+  VerticalLabel "Bytes"
+</Graph>
+
 
 AUTOMAKE_OPTIONS = foreign no-dependencies
 
+AM_CPPFLAGS = -DPREFIX='"${prefix}"'
+AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/collection.conf"'
+
 if COMPILER_IS_GCC
 AM_CFLAGS = -Wall -Wextra
 endif
+
 AM_YFLAGS = -d
 
 BUILT_SOURCES = parser.h