diff options
Diffstat (limited to 'Zend/aclocal.m4')
-rw-r--r-- | Zend/aclocal.m4 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Zend/aclocal.m4 b/Zend/aclocal.m4 new file mode 100644 index 0000000000..3bea7217f9 --- /dev/null +++ b/Zend/aclocal.m4 @@ -0,0 +1,52 @@ +dnl $Id$ +dnl +dnl This file contains local autoconf functions. + +dnl +dnl Check for broken sprintf() +dnl +AC_DEFUN(AC_BROKEN_SPRINTF,[ + AC_MSG_CHECKING([for broken sprintf]) + AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[ + AC_DEFINE(BROKEN_SPRINTF,0) + AC_MSG_RESULT(ok) + ],[ + AC_DEFINE(BROKEN_SPRINTF,1) + AC_MSG_RESULT(broken) + ],[ + AC_DEFINE(BROKEN_SPRINTF,0) + AC_MSG_RESULT(cannot check, guessing ok) + ]) +]) +# another one stolen from automake temporarily +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$@" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) |