rx-packet-version-not-all-kernels-have-snprintf-20010721
[openafs.git] / configure.in
index 5087e39..75efd02 100644 (file)
@@ -30,6 +30,9 @@ AC_ARG_WITH(linux-kernel-headers,
 AC_ARG_ENABLE(kernel-module,
 [  --disable-kernel-module                     disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
 )
+AC_ARG_ENABLE(redhat-buildsys,
+[  --enable-redhat-buildsys            enable compilation of the redhat build system kernel (defaults to disabled)],, enable_redhat_buildsys="no"
+)
 
 AC_PROG_CC
 
@@ -59,6 +62,9 @@ system=$host
 case $system in
         *-linux*)
                MKAFS_OSTYPE=LINUX
+               if test "x$enable_redhat_buildsys" = "xyes"; then
+                AC_DEFINE(ENABLE_REDHAT_BUILDSYS)
+               fi
                if test "x$enable_kernel_module" = "xyes"; then
                 if test "x$with_linux_kernel_headers" != "x"; then
                   LINUX_KERNEL_PATH="$with_linux_kernel_headers"
@@ -68,8 +74,19 @@ case $system in
                 if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
                  linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
                  if test "x$linux_kvers" = "x"; then
-                   AC_MSG_ERROR(Linux headers lack version definition)
-                   exit 1
+                   if test -f "$LINUX_KERNEL_PATH/include/linux/version-up.h"; then
+                     linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
+                     if test "x$linux_kvers" = "x"; then
+
+                       AC_MSG_ERROR(Linux headers lack version definition [2])
+                       exit 1
+                     else
+                       LINUX_VERSION="$linux_kvers"
+                      fi
+                    else
+                      AC_MSG_ERROR(Linux headers lack version definition)
+                     exit 1
+                   fi
                  else
                    LINUX_VERSION="$linux_kvers"
                  fi
@@ -110,6 +127,7 @@ case $system in
         *-solaris*)
                MKAFS_OSTYPE=SOLARIS
                 AC_MSG_RESULT(sun4)
+               SOLARIS_UFSVFS_HAS_DQRWLOCK
                 ;;
         *-hpux*)
                MKAFS_OSTYPE=HPUX
@@ -165,8 +183,11 @@ else
                hppa-hp-hpux10*)
                        AFS_SYSNAME="hp_ux102"
                        ;;
-               ppc-apple-darwin*)
-                       AFS_SYSNAME="ppc_darwin13"
+               powerpc-apple-darwin1.2*)
+                       AFS_SYSNAME="ppc_darwin_12"
+                       ;;
+               powerpc-apple-darwin1.3*)
+                       AFS_SYSNAME="ppc_darwin_13"
                        ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
@@ -210,7 +231,7 @@ else
                power*-ibm-aix4.3*)
                        AFS_SYSNAME="rs_aix42"
                        ;;
-               default)
+               *)
                        AC_MSG_ERROR(An AFS sysname is required)
                        exit 1
                        ;;
@@ -218,6 +239,9 @@ else
        case $AFS_SYSNAME in
                *_linux*)
                        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. Please use the --with-afs-sysname option to configure an AFS sysname.)
+                       fi
                        _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
                        AFS_SYSNAME="$_AFS_SYSNAME"
                        ;;
@@ -354,6 +378,9 @@ AC_SUBST(WITH_INSECURE)
 
 AC_OUTPUT(             \
 Makefile               \
+src/config/Makefile.version-NOCML \
 src/config/Makefile.${AFS_SYSNAME} \
 src/libafs/MakefileProto.${MKAFS_OSTYPE} \
+src/pam/Makefile \
+src/afsd/afs.ppc_darwin.plist \
 )