AC_MSG_RESULT(no)
fi
+dnl Temporary directory
+AC_MSG_CHECKING(for tmpdir)
+AC_ARG_WITH(tmpdir,
+ [ --with-tmpdir=directory directory to put tmp socket files (/tmp)],
+ tmpdir="$withval", tmpdir="/tmp")
+AC_MSG_RESULT($tmpdir)
+AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
+
dnl Check for softfloat...
AC_MSG_CHECKING(for softfloat)
AC_ARG_WITH(softfloat,
struct timeval tv;
gettimeofday(&tv, NULL);
- snprintf(filename, size, "/tmp/alsa-dmix-%i-%li-%li", getpid(), tv.tv_sec, tv.tv_usec);
+ snprintf(filename, size, TMPDIR "/alsa-dmix-%i-%li-%li", getpid(), tv.tv_sec, tv.tv_usec);
filename[size-1] = '\0';
return 0;
}
if (server) {
if (bind(sock, (struct sockaddr *) addr, size) < 0) {
int result = -errno;
- SYSERR("bind failed");
+ SYSERR("bind failed: %s", filename);
return result;
} else {
if (chmod(filename, ipc_perm) < 0) {
int result = -errno;
- SYSERR("chmod failed");
+ SYSERR("chmod failed: %s", filename);
return result;
}
}
} else {
if (connect(sock, (struct sockaddr *) addr, size) < 0) {
- SYSERR("connect failed");
+ SYSERR("connect failed: %s", filename);
return -errno;
}
}