[svn-commits] rizzo: trunk r89363 - in /trunk: ./ include/asterisk/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Nov 17 03:30:24 CST 2007
Author: rizzo
Date: Sat Nov 17 03:30:22 2007
New Revision: 89363
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89363
Log:
timersub is a macro not a function, so write the check in a way
that detects both formats.
Modified:
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=89363&r1=89362&r2=89363
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Sat Nov 17 03:30:22 2007
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 89357 .
+# From configure.ac Revision: 89361 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -12403,13 +12403,11 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -12449,13 +12447,11 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -15286,56 +15282,17 @@
fi
done
-
-for ac_func in timersub
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/time.h>
int
main ()
{
-return $ac_func ();
+struct timeval *a; timersub(a, a, a);
;
return 0;
}
@@ -15358,27 +15315,24 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIMERSUB 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
if test "${ac_cv_header_sys_poll_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for sys/poll.h" >&5
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=89363&r1=89362&r2=89363
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Nov 17 03:30:22 2007
@@ -287,7 +287,14 @@
AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday 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 strtol strtoq unsetenv utime vasprintf])
AC_CHECK_FUNCS([glob])
-AC_CHECK_FUNCS([timersub])
+AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include <sys/time.h>],
+ [struct timeval *a; timersub(a, a, a);]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system defines timersub.]),
+ AC_MSG_RESULT(no)
+)
+
AC_CHECK_HEADER([sys/poll.h],
[HAS_POLL=1]
AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=89363&r1=89362&r2=89363
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Sat Nov 17 03:30:22 2007
@@ -882,7 +882,7 @@
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
-/* Define to 1 if you have the `timersub' function. */
+/* Define to 1 if your system defines timersub. */
#undef HAVE_TIMERSUB
/* Define this to indicate the ${TINFO_DESCRIP} library */
More information about the svn-commits
mailing list