host-cpu-20060120
authorJim Rees <rees@umich.edu>
Fri, 20 Jan 2006 16:40:24 +0000 (16:40 +0000)
committerJim Rees <rees@umich.edu>
Fri, 20 Jan 2006 16:40:24 +0000 (16:40 +0000)
Introduce @HOST_CPU@ and use it to find correct headers for FreeBSD build.

acinclude.m4
src/libafs/MakefileProto.FBSD.in

index 69739b1..2474635 100644 (file)
@@ -892,6 +892,8 @@ if test "$enable_obsolete" = "yes"; then
        WITH_OBSOLETE=YES
 fi
 
+HOST_CPU="$host_cpu"
+
 if test "x$with_bsd_kernel_headers" != "x"; then
        BSD_KERNEL_PATH="$with_bsd_kernel_headers"
 else
@@ -902,11 +904,11 @@ if test "x$with_bsd_kernel_build" != "x"; then
        BSD_KERNEL_BUILD="$with_bsd_kernel_build"
 else
        case $AFS_SYSNAME in
-               i386_fbsd_4?)
+               *_fbsd_4?)
                        BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/compile/GENERIC"
                        ;;
-               i386_fbsd_*)
-                       BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/i386/compile/GENERIC"
+               *_fbsd_*)
+                       BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/${HOST_CPU}/compile/GENERIC"
                        ;;
        esac
 fi
@@ -1078,6 +1080,7 @@ AC_SUBST(AFS_PARAM_COMMON)
 AC_SUBST(ENABLE_KERNEL_MODULE)
 AC_SUBST(LIB_AFSDB)
 AC_SUBST(LINUX_KERNEL_PATH)
+AC_SUBST(HOST_CPU)
 AC_SUBST(BSD_KERNEL_PATH)
 AC_SUBST(BSD_KERNEL_BUILD)
 AC_SUBST(LINUX_VERSION)
index fd72bd2..928e8af 100644 (file)
@@ -67,7 +67,7 @@ setup:
        ln -fs ../Makefile.common $(KOBJ)/Makefile.common
        -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
        -ln -fs ${KSRC}/net net
-       -ln -fs ${KSRC}/i386/include machine
+       -ln -fs ${KSRC}/@HOST_CPU@/include machine
        -ln -fs ${KSRC}/netinet netinet
        -ln -fs ${KSRC}/nfs nfs
        -ln -fs /usr/include/rpc rpc