fi
AC_MSG_RESULT(linux)
if test "x$enable_kernel_module" = "xyes"; then
- AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
- if test "x${AFS_SYSKVERS}" = "x"; then
- AC_MSG_ERROR(Couldn't guess your Linux version [2])
- fi
+ case "$LINUX_VERSION" in
+ 2.2.*) AFS_SYSKVERS=22 ;;
+ 2.4.*) AFS_SYSKVERS=24 ;;
+ 2.6.* | 3.*) AFS_SYSKVERS=26 ;;
+ *) AC_MSG_ERROR(Couldn't guess your Linux version [2]) ;;
+ esac
fi
;;
*-solaris*)
AFS_SYSNAME="x86_darwin_110"
OSXSDK="macosx10.7"
;;
- sparc-sun-solaris2.5*)
- AFS_SYSNAME="sun4x_55"
- enable_login="yes"
- ;;
- sparc-sun-solaris2.6)
- AFS_SYSNAME="sun4x_56"
- ;;
- sparc-sun-solaris2.7)
- AFS_SYSNAME="sun4x_57"
- ;;
sparc-sun-solaris2.8)
AFS_SYSNAME="sun4x_58"
;;
AFS_SYSNAME="sun4_413"
enable_login="yes"
;;
- i386-pc-solaris2.7)
- AFS_SYSNAME="sunx86_57"
- ;;
i386-pc-solaris2.8)
AFS_SYSNAME="sunx86_58"
;;
ncurses.h \
netdb.h \
netinet/in.h \
+ pthread_np.h \
pwd.h \
regex.h \
resolv.h \
AC_MSG_RESULT(no)
fi
+dnl Look for "non-portable" pthreads functions.
+save_LIBS="$LIBS"
+LIBS="$LIBS $PTHREAD_LIBS"
+AC_CHECK_FUNCS([ \
+ pthread_set_name_np \
+ pthread_setname_np \
+])
+
+dnl Sadly, there are three different versions of pthread_setname_np.
+dnl Try to cater for all of them.
+if test "$ac_cv_func_pthread_setname_np" = "yes" ; then
+ AC_MSG_CHECKING([for signature of pthread_setname_np])
+ AC_TRY_COMPILE([
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+], [pthread_setname_np(pthread_self(), "test", (void *)0)], [
+ AC_MSG_RESULT([three arguments])
+ pthread_setname_np_args=3], [
+ AC_TRY_COMPILE([
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+], [pthread_setname_np(pthread_self(), "test")], [
+ AC_MSG_RESULT([two arguments])
+ pthread_setname_np_args=2], [
+ AC_TRY_COMPILE([
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+], [pthread_setname_np("test")], [
+ AC_MSG_RESULT([one argument])
+ pthread_setname_np_args=1], [pthread_setname_np_args=0])
+])
+])
+AC_DEFINE_UNQUOTED([PTHREAD_SETNAME_NP_ARGS], $pthread_setname_np_args, [Number of arguments required by pthread_setname_np() function])
+fi
+LIBS="$save_LIBS"
+
AC_TYPE_SIGNAL
OPENAFS_RETSIGTYPE
AC_CHECK_SIZEOF(void *)
OPENAFS_OSCONF
OPENAFS_FUSE
+OPENAFS_SWIG
TOP_SRCDIR="${srcdir}/src"
dnl