X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3fa64fd0080caf4b44ac069f3b6172b68f274e6f..26ef00bd3c6c66240a4640aa54db1106d8b901fc:/configure.in diff --git a/configure.in b/configure.in index 18ff3d21..d1f439eb 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(byteorder.h) AC_CONFIG_HEADER(config.h) +AC_PREREQ(2.12) LDFLAGS=${LDFLAGS-""} @@ -53,7 +54,7 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h unistd.h utime.h grp.h) AC_CHECK_HEADERS(compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h) -AC_CHECK_HEADERS(glob.h) +AC_CHECK_HEADERS(glob.h alloca.h mcheck.h) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) @@ -127,7 +128,7 @@ AC_FUNC_UTIME_NULL AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod) AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime) AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf setsid glob strpbrk) -AC_CHECK_FUNCS(strlcat strlcpy) +AC_CHECK_FUNCS(strlcat strlcpy mtrace) AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[ AC_TRY_RUN([#include @@ -160,7 +161,7 @@ if test x"$with_included_popt" = x"yes" then AC_MSG_RESULT("$srcdir/popt") BUILD_POPT='$(popt_OBJS)' - CFLAGS="$CFLAGS -I $srcdir/popt" + CFLAGS="$CFLAGS -I$srcdir/popt" else AC_MSG_RESULT(no) fi @@ -230,6 +231,28 @@ if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then AC_DEFINE(HAVE_GETTIMEOFDAY_TZ) fi +AC_CACHE_CHECK([for secure mkstemp],rsync_cv_HAVE_SECURE_MKSTEMP,[ +AC_TRY_RUN([#include +#include +#include +#include +main() { + struct stat st; + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); + if (fd == -1) exit(1); + unlink(tpl); + if (fstat(fd, &st) != 0) exit(1); + if ((st.st_mode & 0777) != 0600) exit(1); + exit(0); +}], +rsync_cv_HAVE_SECURE_MKSTEMP=yes, +rsync_cv_HAVE_SECURE_MKSTEMP=no, +rsync_cv_HAVE_SECURE_MKSTEMP=cross)]) +if test x"$rsync_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then + AC_DEFINE(HAVE_SECURE_MKSTEMP) +fi + AC_CACHE_CHECK([for broken inet_ntoa],rsync_cv_REPLACE_INET_NTOA,[ AC_TRY_RUN([