`${#CFG_PREFIX}` counts the number of characters and the `${CFG_LIBDIR:n}` syntax creates a substring starting at `n`. I used this syntax so that someone can set `--libdir` only without having to change `--libdir-relative`. The reason is that `--libdir` is a standard command option for configure AFAIK and packaging people might use it. So using 

```
./configure --prefix=/opt/foo --libdir=/opt/foo/lib64
```

will be the same as 

```
./configure --prefix=/opt/foo --libdir=/opt/foo/lib64 --libdir-relative=lib64
```