diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 18:54:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 18:54:21 +0000 |
commit | 269bec93af238b6b506e37c8d020a0f33a69f49f (patch) | |
tree | 452ffd36be0539c3e303afc121c739eed16e76c5 /configure.ac | |
parent | fcce7189b13008007bf9aed261fff2706b421ba6 (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: http://svn.digium.com/svn/asterisk/trunk@28747 f38db490-d61c-443f-a65b-d21fe96a405b
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 |