ClusterLabs/resource-agents — pull request #138 by grueni (2012-09-26 15:48:30+00:00)
Title: repair wrong path for ocf_root when prefix ne default

I compile resource-agents after ClusterLabs-resource-agents.
With ClusterLabs-resource-agents I use
```shell
export PREFIX=/opt/ha
./configure --prefix=$PREFIX --enable-fatal-warnings=no --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP} --with-ocf-root=$PREFIX/lib/ocf.
```
/opt/ha/include/heartbeat/glue_config.h contains now the definition of OCF_ROOT_DIR.

See below the values constructed in configure.ac when the options --prefix and/or --with-ocf-root are used.
OCF_RA_DIR_PREFIX is used in Makefile.am and the value is obviously wrong.

When the patch is used the values are "/opt/ha/lib/ocf/resource.d/" and "/opt/ha/lib/ocf/lib/".

I checked with Solaris 11U6 and openSuse 12.2.

I added some "rm .." to Makefile.am because "gmake install" produces errors with ${LN_S} when used more than once

The patch was reviewed from Fabio Di Nitto, see here http://lists.corosync.org/pipermail/discuss/2012-September/002027.html.
```shell
# ./configure --enable-fatal-warnings=no
...
Prefix = /usr
...
OCF_ROOT_DIR = /opt/ha/lib/ocf
OCF_RA_DIR = /opt/ha/lib/ocf/resource.d/
OCF_RA_DIR_PREFIX = /opt/ha/lib/ocf/resource.d/
OCF_LIB_DIR = /opt/ha/lib/ocf/lib/
OCF_LIB_DIR_PREFIX = /opt/ha/lib/ocf/lib/
....

# ./configure --enable-fatal-warnings=no --prefix=/opt/ha
...
Prefix = /opt/ha
...
OCF_ROOT_DIR = /opt/ha/lib/ocf
OCF_RA_DIR = /opt/ha/lib/ocf/resource.d/
OCF_RA_DIR_PREFIX = /opt/ha//opt/ha/lib/ocf/resource.d/
OCF_LIB_DIR = /opt/ha/lib/ocf/lib/
OCF_LIB_DIR_PREFIX = /opt/ha//opt/ha/lib/ocf/lib/
...

# ./configure --enable-fatal-warnings=no --prefix=/opt/ha --with-ocf-root=/opt/ha/lib/ocf
...
Prefix = /opt/ha
...
OCF_ROOT_DIR = /opt/ha/lib/ocf
OCF_RA_DIR = /opt/ha/lib/ocf/resource.d/
OCF_RA_DIR_PREFIX = /opt/ha//opt/ha/lib/ocf/resource.d/
OCF_LIB_DIR = /opt/ha/lib/ocf/lib/
OCF_LIB_DIR_PREFIX = /opt/ha//opt/ha/lib/ocf/lib/
...
```