Asterisk 1.6.2.13 config file not found

I just compiled Asterisk 1.6.2.13 in arm linux, and I use:

make DESTDIR=/opt install
to install the binaries. When I start up Asterisk with the following command line:

/opt/usr/sbin/asterisk -C /opt/etc/asterisk/asterisk.conf
and I have all the Asterisk directory paths specified in /opt/etc/asterisk/asterisk.conf:

[quote]directories ; remove the (!) to enable this
astetcdir => /opt/etc/asterisk
astmoddir => /opt/usr/lib/asterisk/modules
astvarlibdir => /opt/var/lib/asterisk
astdbdir => /opt/var/lib/asterisk
astkeydir => /opt/var/lib/asterisk
astdatadir => /opt/var/lib/asterisk
astagidir => /opt/var/lib/asterisk/agi-bin
astspooldir => /opt/var/spool/asterisk
astrundir => /opt/var/run/asterisk
astlogdir => /opt/var/log/asterisk[/quote]

Asterisk report the following errors upon startup:

[quote]/opt/usr/sbin/asterisk -C /opt/etc/asterisk/asterisk.conf -vvvgc
u-Law coding table test complete.
u-Law tandem transcoding test complete.
a-Law coding tables test complete.
a-Law tandem transcoding test complete.
Asterisk 1.6.2.13, Copyright © 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

== Parsing ‘/opt/etc/asterisk/asterisk.conf’: == Found
Started Asterisk Event Logger
[color=#FF0000]No ‘modules.conf’ found, no modules will be loaded.[/color]
Asterisk Event Logger Started /var/log/asterisk/event_log
Asterisk Dynamic Loader Starting:
== Manager registered action Ping
== Manager registered action Events

[color=#FF0000]Can’t find indications config file indications.conf.[/color]

[color=#FF0000]Could not load features.conf[/color]


[color=#FF0000]Unable to open Asterisk database ‘/var/lib/asterisk/astdb’: No such file or directory
No ‘modules.conf’ found, no modules will be loaded.[/color]
Asterisk PBX Core Initializing
Registering builtin applications:
== Registered custom function ‘EXCEPTION’


[color=#FF0000]Unable to open AMI configuration manager.conf, or configuration is invalid. Asterisk management interface (AMI) disabled.[/color]

…[/quote]

Log files still created in /var/log/asterisk instead of /opt/var/log/asterisk:

[quote]/var/log/asterisk# ls -l
total 12
-rw-r–r-- 1 root root 0 Sep 17 15:13 event_log
-rw-r–r-- 1 root root 6757 Sep 17 15:40 messages
-rw-r–r-- 1 root root 190 Sep 17 17:08 queue_log[/quote]
if I make symlink of /opt/etc/asterisk in /etc it will fix the errors and Asterisk able to locate the configuration files. Is this a bug? Why Asterisk unable to follow directories mentioned in /opt/etc/asterisk/asteriks.conf?

DESTDIR results in a false install point, e.g. if you want to build a package without overwriting your current installation.

If you want to actually change the install location, you need to provide parameters on the ./configure step.

Could you kindly advice what parameters should passed to ./configure? Thanks in advanced.

–help