diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-05-19 18:54:21 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-05-19 18:54:21 +0000 |
commit | 9993d14f8689b272542c435848e7e7d2aa398d5f (patch) | |
tree | 452ffd36be0539c3e303afc121c739eed16e76c5 /configure.ac | |
parent | d0c36296d29df95c68f219cc21baee6b5fa90e73 (diff) |
add support for more refined ability to set install paths using the standard
options to configure such as --libdir, --sbindir, etc. All of the default paths
are still the same. (issue #7057, jcollie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 32a37e4aa..832e7ec41 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,26 @@ AC_CONFIG_HEADER(include/autoconfig.h) AC_COPYRIGHT("Asterisk") AC_REVISION($Revision$) -AC_PREFIX_DEFAULT() +case "${host}" in + *freebsd*) + ac_default_prefix=/usr/local + ;; + *) + ac_default_prefix=/usr + ;; +esac + +if test ${sysconfdir} = '${prefix}/etc'; then + sysconfdir=/etc +fi + +if test ${localstatedir} = '${prefix}/var'; then + localstatedir=/var +fi + +if test ${mandir} = '${prefix}/man'; then + mandir=/usr/share/man +fi ### ** Platform. AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host}", @@ -251,16 +270,16 @@ PBX_LIBgsm=0 if test "${USE_GSM}" != "no"; then if test "${GSM_SYSTEM}" = "yes"; then - libdir="" + gsmlibdir="" if test "x${GSM_DIR}" != "x"; then - libdir="-L${GSM_DIR}/lib" + gsmlibdir="-L${GSM_DIR}/lib" fi AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1, - [Define to indicate the GSM library]), [], ${libdir}) + [Define to indicate the GSM library]), [], ${gsmlibdir}) if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then gsm_LIB="-lgsm" if test "x${GSM_DIR}" != "x"; then - gsm_LIB="${libdir} ${gsm_LIB}" + gsm_LIB="${gsmlibdir} ${gsm_LIB}" gsm_INCLUDE="-I${GSM_DIR}/include" fi PBX_LIBgsm=1 |