diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-28 18:18:43 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-28 18:18:43 +0000 |
commit | 945ccbb69099c3b9a4cd5cfdb679f4eb18f0b3d8 (patch) | |
tree | 297c8a9788fc502b35f3cb29edecfd4f49b924c2 /configure.ac | |
parent | c1992316ae7b98e191df106898b0ba26bbe1b56b (diff) |
Solaris compatibility fixes
Review: https://reviewboard.asterisk.org/r/942/
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@289104 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 2c70af742..b0bcd976c 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,35 @@ AC_SUBST(CONFIG_LDFLAGS) # specify output header file AC_CONFIG_HEADER(include/asterisk/autoconfig.h) -AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD +AC_USE_SYSTEM_EXTENSIONS dnl note- does not work on FreeBSD + +# System default paths +AC_SUBST([astsbindir], ['${sbindir}'])dnl +AC_SUBST([astetcdir], ['${sysconfdir}/asterisk'])dnl +AC_SUBST([astheaderdir], ['${includedir}/asterisk'])dnl +AC_SUBST([astlibdir], ['${libdir}/asterisk'])dnl +AC_SUBST([astmandir], ['${mandir}'])dnl +AC_SUBST([astvarlibdir], ['${localstatedir}/lib/asterisk'])dnl +AC_SUBST([astdatadir], ['${astvarlibdir}'])dnl +AC_SUBST([astdbdir], ['${astvarlibdir}'])dnl +AC_SUBST([astkeydir], ['${astvarlibdir}'])dnl +AC_SUBST([astspooldir], ['${localstatedir}/spool/asterisk'])dnl +AC_SUBST([astlogdir], ['${localstatedir}/log/asterisk'])dnl +AC_SUBST([astvarrundir], ['${localstatedir}/run/asterisk'])dnl + +case "${host_os}" in + *bsd*) + if test ${prefix} = 'NONE'; then + astvarlibdir='${prefix}/share/asterisk' + astdbdir='${localstatedir}/db/asterisk' + fi + ;; + darwin*) + if test ${prefix} = 'NONE'; then + astvarrundir='/Library/Application Support/Asterisk/Run' + fi + ;; +esac case "${host_os}" in freebsd*) @@ -49,10 +77,10 @@ case "${host_os}" in AC_PREFIX_DEFAULT([/usr/local]) if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then if test ${sysconfdir} = '${prefix}/etc'; then - sysconfdir=/etc + astetcdir=/etc/asterisk fi if test ${mandir} = '${prefix}/man'; then - mandir=/usr/share/man + astmandir=/usr/share/man fi fi CPPFLAGS=-I/usr/local/include @@ -62,6 +90,19 @@ case "${host_os}" in AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]) AC_DEFINE([_DARWIN_UNLIMITED_SELECT], 1, [Define to 1 if running on Darwin.]) ;; + solaris*) + if test ${prefix} = 'NONE'; then + astetcdir=/var/etc/asterisk + astsbindir=/opt/asterisk/sbin + astlibdir=/opt/asterisk/lib + astheaderdir=/opt/asterisk/include + astmandir=/opt/asterisk/man + astvarlibdir=/var/opt/asterisk + astspooldir=/var/spool/asterisk + astlogdir=/var/log/asterisk + astvarrundir=/var/run/asterisk + fi + ;; *) AC_PREFIX_DEFAULT([/usr]) if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then @@ -464,7 +505,7 @@ AC_FUNC_STRNLEN AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) +AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) # NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks, # so that AC_CHECK_FUNCS can detect functions in that library. |