libafssetpag-temp-fix-20051018
[openafs.git] / src / cf / osconf.m4
index 010f2fa..8e834de 100644 (file)
@@ -1,10 +1,11 @@
 
-AC_DEFUN(OPENAFS_OSCONF, [
+AC_DEFUN([OPENAFS_OSCONF], [
 
 dnl defaults, override in case below as needed
 XCFLAGS='${DBG} ${OPTMZ}'
 SHLIB_SUFFIX="so"
 CC="cc"
+CCOBJ="cc"
 MT_CC="cc"
 XLIBS="${LIB_AFSDB}"
 
@@ -72,21 +73,39 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
        alpha_linux_24)
+               CCOBJ="${CC} -fPIC"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+               YACC="bison -y"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       alpha_linux_26)
+               CCOBJ="${CC} -fPIC"
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -123,6 +142,7 @@ case $AFS_SYSNAME in
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
+               CCOBJ="/opt/ansic/bin/cc"
                DBM="/lib/libndbm.a"
                LD="/bin/ld   "
                LEX="/opt/langtools/bin/lex"
@@ -154,10 +174,11 @@ case $AFS_SYSNAME in
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
+               CCOBJ="/opt/ansic/bin/cc"
                DBM="/lib/hpux32/libndbm.so"
                LD="/bin/ld   "
                LEX="/opt/langtools/bin/lex"
-               LWP_OPTMZ="-O"
+               LWP_OPTMZ=""
                MT_CC="$CC"
                MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
@@ -181,41 +202,27 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="ld -b"
                ;;
 
-       i386_fbsd_4*)
-               LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-pthread"
-               #MT_CFLAGS='-DAFS_PTHREAD_ENV -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads ${XCFLAGS}'
-               #MT_LIBS="-L/usr/local/lib -llthread -llgcc_r"
-               PAM_CFLAGS="-O2 -pipe -fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
-               XCFLAGS="-O2 -pipe"
-               XLIBS="${LIB_AFSDB} -lcompat"
-               YACC="byacc"
-               ;;
-
-       *fbsd_5*)
+       *fbsd_*)
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-pthread"
                PAM_CFLAGS="-O2 -pipe -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               SHLIB_LINKER="${MT_CC} -shared"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -pipe"
-               XLIBS="${LIB_AFSDB} -lcompat"
                YACC="byacc"
                ;;
 
-       *nbsd20)
+       *nbsd2*|*nbsd3*)
                LEX="flex -l"
                MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
                MT_LIBS="-lpthread" # XXX -pthread soon
                PAM_CFLAGS="-O2 -pipe -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
+               SHLIB_LINKER="${MT_CC} -shared"
                TXLIBS="/usr/lib/libcurses.so"
                XCFLAGS="-O2 -pipe"
-               XLIBS="${LIB_AFSDB} -lcompat"
                YACC="yacc"
                ;;
 
@@ -225,41 +232,128 @@ case $AFS_SYSNAME in
                MT_LIBS=""
                PAM_CFLAGS="-O2 -pipe -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
+               SHLIB_LINKER="${MT_CC} -shared"
                TXLIBS="/usr/lib/libcurses.so"
                XCFLAGS="-O2 -pipe"
-               XLIBS="${LIB_AFSDB} -lcompat"
                YACC="bison -y"
                ;;
 
-       ia64_linux24)
+       ia64_linux24|ia64_linux26)
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
-       i386_linux22)
+       amd64_linux*)
+               CCOBJ="${CC} -fPIC"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       ppc64_linux24)
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               SHLIB_CFLAGS="-fPIC"
+               TXLIBS="/usr/lib64/libncurses.so"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       ppc64_linux26)
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               SHLIB_CFLAGS="-fPIC"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -fPIC"
+               YACC="bison -y"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       i386_umlinux22)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
-       i386_linux24)
+       i386_linux*)
+               CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
+               MT_CC="gcc -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               DBG=-g
+               KERN_DBG=-g
+               LWP_DBG=-g
+               LWP_OPTMZ=-O2
+               OPTMZ=-O2
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       i386_umlinux24)
+               CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
+               MT_CC="gcc -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               DBG=-g
+               KERN_DBG=-g
+               LWP_DBG=-g
+               LWP_OPTMZ=-O2
+               OPTMZ=-O2
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
+       i386_umlinux26)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -271,22 +365,25 @@ case $AFS_SYSNAME in
                LWP_OPTMZ=-O2
                OPTMZ=-O2
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
        *_obsd*)
+               KRB5CFLAGS="-I/usr/include/kerberosV"
+               KRB5LIBS="-lkrb5"
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-pthread"
                PAM_CFLAGS="-O2 -pipe -fpic"
                SHLIB_CFLAGS="-fpic"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
+               SHLIB_LINKER="${MT_CC} -shared"
                TXLIBS="/usr/lib/libcurses.a"
                XCFLAGS="-O2"
-               XLIBS="${LIB_AFSDB} -lcompat"
                YACC="yacc"
                ;;
 
@@ -296,63 +393,87 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
        ppc_darwin_12)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
                REGEX_OBJ="regex.o"
                XCFLAGS="-traditional-cpp"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
                ;;
 
        ppc_darwin_13)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
                LWP_OPTMZ="-O2"
                REGEX_OBJ="regex.o"
                XCFLAGS="-no-cpp-precomp"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
                ;;
 
        ppc_darwin_14)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
                LWP_OPTMZ="-O2"
                REGEX_OBJ="regex.o"
                XCFLAGS="-no-cpp-precomp"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
                ;;
 
        ppc_darwin_60)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
                LWP_OPTMZ="-O2"
                REGEX_OBJ="regex.o"
                XCFLAGS="-no-cpp-precomp"
                TXLIBS="-lncurses"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
                ;;
 
-       ppc_linux22)
-               INSTALL="install"
-               KERN_OPTMZ=-O2
-               LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
-               YACC="bison -y"
-               SHLIB_LINKER="${MT_CC} -shared"
+       ppc_darwin_70)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
+               LEX="lex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
+               KROOT=
+               KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
+               LWP_OPTMZ="-O2"
+               REGEX_OBJ="regex.o"
+               XCFLAGS="-no-cpp-precomp"
+               TXLIBS="-lncurses"
+               EXTRA_VLIBOBJS="fstab.o"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
+               ;;
+
+       *_darwin_80)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
+               LEX="lex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
+               KROOT=
+               KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
+               LWP_OPTMZ="-O2"
+               REGEX_OBJ="regex.o"
+               XCFLAGS="-no-cpp-precomp"
+               TXLIBS="-lncurses"
+               EXTRA_VLIBOBJS="fstab.o"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
                ;;
 
-       ppc_linux24)
+       ppc_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -370,8 +491,10 @@ case $AFS_SYSNAME in
                XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
                XLIBS="${LIB_AFSDB} -ldl"
                SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
+               AIX64="#"
                ;;
 
+
        rs_aix51)
                DBG=""
                LEX="lex"
@@ -384,40 +507,93 @@ case $AFS_SYSNAME in
                XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
                XLIBS="${LIB_AFSDB} -ldl"
                SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
+               AIX64=""
+               ;;
+
+       rs_aix52)       
+               DBG=""
+               LEX="lex"
+               LIBSYS_AIX_EXP="afsl.exp"
+               MT_CC="xlc_r"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthreads"
+               SHLIB_SUFFIX="o"
+               TXLIBS="-lcurses"
+               XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
+               XLIBS="${LIB_AFSDB} -ldl"
+               SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
+               AIX64=""
+               ;;
+
+       rs_aix53)       
+               DBG="-g"
+               LEX="lex"
+               LIBSYS_AIX_EXP="afsl.exp"
+               MT_CC="xlc_r"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthreads"
+               SHLIB_SUFFIX="o"
+               TXLIBS="-lcurses"
+               XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
+               XLIBS="${LIB_AFSDB} -ldl"
+               SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
+               AIX64=""
                ;;
 
        s390_linux22)
                CC="gcc"
-               LD="gcc"
+               CCOBJ="gcc"
+               LD="ld"
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CC="$CC"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
-       s390_linux24)
+       s390_linux24|s390_linux26)
                CC="gcc"
-               LD="gcc"
+               CCOBJ="gcc"
+               LD="ld"
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CC="$CC"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
+       s390x_linux24|s390x_linux26)
+               CC="gcc"
+               CCOBJ="gcc -fPIC"
+               LD="ld"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CC="$CC"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__"
+               YACC="bison -y"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
        sgi_62)
                PINSTALL_LIBS=-lmld
                AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
@@ -465,6 +641,7 @@ case $AFS_SYSNAME in
        sgi_65)
                AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
                CC="/usr/bin/cc"
+               CCOBJ="/usr/bin/cc"
                FSINCLUDES="-I/usr/include/sys/fs"
                LD="/usr/bin/ld"
                LEX="lex"
@@ -485,8 +662,9 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -499,7 +677,7 @@ case $AFS_SYSNAME in
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -512,7 +690,7 @@ case $AFS_SYSNAME in
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="/usr/lib/libncurses.so"
+               TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -521,6 +699,7 @@ case $AFS_SYSNAME in
        sun4_413)
                CCXPG2="/usr/xpg2bin/cc"
                CC="gcc"
+               CCOBJ="gcc"
                LEX="lex"
                SHLIB_CFLAGS="-PIC"
                TXLIBS="-lcurses -ltermcap"
@@ -533,6 +712,7 @@ case $AFS_SYSNAME in
 
        sun4x_55)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
                MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
@@ -549,6 +729,7 @@ case $AFS_SYSNAME in
 
        sun4x_56)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
                MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
@@ -568,6 +749,7 @@ case $AFS_SYSNAME in
 
        sun4x_57)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -588,6 +770,7 @@ case $AFS_SYSNAME in
 
        sun4x_58)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -608,6 +791,7 @@ case $AFS_SYSNAME in
 
        sun4x_59)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -626,8 +810,9 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
                ;;
 
-       sunx86_57)
+       sun4x_510)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -646,9 +831,30 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
                ;;
 
+       sunx86_57)
+               CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
+               LEX="lex"
+               LD="/usr/ccs/bin/ld"
+               MT_CC="/opt/SUNWspro/bin/cc"
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthread -lsocket"
+               PAM_CFLAGS="-KPIC"
+               PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
+               SHLIB_CFLAGS="-KPIC"
+               SHLIB_LDFLAGS="-G -Bsymbolic"
+               TXLIBS="-lcurses"
+               XCFLAGS64='${XCFLAGS} -xarch=amd64'
+               XCFLAGS="-dy -Bdynamic"
+               XLIBELFA="-lelf"
+               XLIBKVM="-lkvm"
+               XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
+               SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+               ;;
 
        sunx86_58)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -659,7 +865,7 @@ case $AFS_SYSNAME in
                SHLIB_CFLAGS="-KPIC"
                SHLIB_LDFLAGS="-G -Bsymbolic"
                TXLIBS="-lcurses"
-               XCFLAGS64='${XCFLAGS} -xarch=v9'
+               XCFLAGS64='${XCFLAGS} -xarch=amd64'
                XCFLAGS="-dy -Bdynamic"
                XLIBELFA="-lelf"
                XLIBKVM="-lkvm"
@@ -667,7 +873,47 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
                ;;
 
+       sunx86_59)
+               CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
+               LEX="lex"
+               LD="/usr/ccs/bin/ld"
+               MT_CC="/opt/SUNWspro/bin/cc"
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthread -lsocket"
+               PAM_CFLAGS="-KPIC"
+               PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
+               SHLIB_CFLAGS="-KPIC"
+               SHLIB_LDFLAGS="-G -Bsymbolic"
+               TXLIBS="-lcurses"
+               XCFLAGS64='${XCFLAGS} -xarch=amd64'
+               XCFLAGS="-dy -Bdynamic"
+               XLIBELFA="-lelf"
+               XLIBKVM="-lkvm"
+               XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
+               SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+               ;;
 
+       sunx86_510)
+               CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
+               LEX="lex"
+               LD="/usr/ccs/bin/ld"
+               MT_CC="/opt/SUNWspro/bin/cc"
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthread -lsocket"
+               PAM_CFLAGS="-KPIC"
+               PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
+               SHLIB_CFLAGS="-KPIC"
+               SHLIB_LDFLAGS="-G -Bsymbolic"
+               TXLIBS="-lcurses"
+               XCFLAGS64='${XCFLAGS} -xarch=amd64'
+               XCFLAGS="-dy -Bdynamic"
+               XLIBELFA="-lelf"
+               XLIBKVM="-lkvm"
+               XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
+               SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+               ;;
 esac
 
 #
@@ -675,6 +921,7 @@ esac
 #
 case $AFS_SYSNAME in
        sgi_6*)
+               IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
                XFS_SIZE_CHECK="xfs_size_check"
                install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
                dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
@@ -731,7 +978,10 @@ if test "x$enable_optimize_lwp" = "xno"; then
 fi
 
 AC_SUBST(CCXPG2)
+AC_SUBST(CCOBJ)
 AC_SUBST(AFSD_LIBS)
+AC_SUBST(AFSD_LDFLAGS)
+AC_SUBST(AIX64)
 AC_SUBST(AR)
 AC_SUBST(AS)
 AC_SUBST(CP)