[asterisk-commits] tilghman: trunk r219007 - in /trunk: ./ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 16 18:15:47 CDT 2009


Author: tilghman
Date: Wed Sep 16 18:15:43 2009
New Revision: 219007

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=219007
Log:
Detect whether we actually have the long double type, before looking for those functions.

Modified:
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in

Modified: trunk/configure.ac
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/configure.ac?view=diff&rev=219007&r1=219006&r2=219007
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Sep 16 18:15:43 2009
@@ -345,6 +345,7 @@
 AC_C_CONST
 AC_TYPE_UID_T
 AC_C_INLINE
+AC_TYPE_LONG_DOUBLE_WIDER
 AC_TYPE_MODE_T
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
@@ -380,9 +381,17 @@
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap 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.
+AC_CHECK_LIB([m], [sqrt])
 # BSD might not have exp2, and/or log2
-AC_CHECK_LIB([m], [sqrt])
-AC_CHECK_FUNCS([exp2l log2l exp10l log10l sinl cosl tanl asinl acosl atanl atan2l powl sqrtl rintl expl logl remainderl fmodl roundl truncl floorl ceill exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint exp log remainder fmod round trunc floor ceil])
+AC_CHECK_FUNCS([exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint exp log remainder fmod round trunc floor ceil])
+
+# Certain architectures don't really have long double, even though
+# AC_CHECK_FUNCS would otherwise find the following functions.
+if test "x${ac_cv_type_long_double_wider}" = "xyes" ; then
+	AC_CHECK_FUNCS([exp2l log2l exp10l log10l sinl cosl tanl asinl acosl atanl atan2l powl sqrtl rintl expl logl remainderl fmodl roundl truncl floorl ceill])
+fi
 
 AC_MSG_CHECKING(for timersub in time.h)
 AC_LINK_IFELSE(

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=219007&r1=219006&r2=219007
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Wed Sep 16 18:15:43 2009
@@ -472,6 +472,10 @@
 
 /* Define to 1 if you have the `logl' function. */
 #undef HAVE_LOGL
+
+/* Define to 1 if the type `long double' works and has more range or precision
+   than `double'. */
+#undef HAVE_LONG_DOUBLE_WIDER
 
 /* Define to 1 if you have the libtool library. */
 #undef HAVE_LTDL




More information about the asterisk-commits mailing list