dnl standard programs
AC_PROG_RANLIB
-AC_CHECK_PROGS(AS, as, [false])
+AC_CHECK_TOOL(AS, as, [false])
AC_CHECK_PROGS(MV, mv, [false])
AC_CHECK_PROGS(RM, rm, [false])
-AC_CHECK_PROGS(LD, ld, [false])
+AC_CHECK_TOOL(LD, ld, [false])
AC_CHECK_PROGS(CP, cp, [false])
AC_CHECK_PROGS(GENCAT, gencat, [false])
-dnl if ar is not present, libtool.m4 (provided by libtool) sets AR to false
-dnl if strip is not present, libtool.m4 (provided by libtool) sets STRIP to :
-AS_IF([test "x$AR" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'ar'])])
-AS_IF([test "x$AS" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'as'])])
-AS_IF([test "x$MV" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'mv'])])
-AS_IF([test "x$RM" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'rm'])])
-AS_IF([test "x$LD" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'ld'])])
-AS_IF([test "x$CP" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'cp'])])
-AS_IF([test "x$GENCAT" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'gencat'])])
-
-dnl TODO - need to disable STRIP if we are doing debugging in any user space code
-
case $AFS_SYSNAME in
alpha_linux_22 | alpha_linux_24 | alpha_linux_26)
CCOBJ="\$(CC) -fPIC"
XLIBS="${LIB_AFSDB} -framework CoreFoundation"
;;
+ *_darwin_190 | *_darwin_200)
+ AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
+ MT_CFLAGS="-D_REENTRANT"
+ MT_LIBS='${XLIBS}'
+ KROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
+ KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
+ LD="cc"
+ KERN_OPTMZ="-Os"
+ LWP_OPTMZ="-Os"
+ OPTMZ="-Os"
+ PAM_LIBS="-lpam"
+ REGEX_OBJ="regex.lo"
+ EXTRA_VLIBOBJS="fstab.o"
+ SHLIB_LINKER="${CC} \${ARCHFLAGS} -dynamiclib"
+ SHLIB_SUFFIX="dylib"
+ RANLIB="ranlib"
+ XLIBS="${LIB_AFSDB} -framework CoreFoundation"
+ ;;
+
ppc_linux*)
KERN_OPTMZ=-O2
MT_CFLAGS='-pthread -D_REENTRANT'
SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
AIX32="yes"
AIX64="no"
+ TSM_IMPORTS="-bI:/lib/aio.exp -bI:/lib/netinet.exp -bI:/lib/sockets.exp -bI:/lib/statcmd.exp"
+ TSM_LIBS="-lsys -lcsys -lc"
;;
rs_aix51 | rs_aix52 | rs_aix53)
SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
AIX32="yes"
AIX64="yes"
+ TSM_IMPORTS="-bI:/lib/aio.exp -bI:/lib/netinet.exp -bI:/lib/sockets.exp -bI:/lib/statcmd.exp"
+ TSM_LIBS="-lsys -lcsys -lc"
;;
rs_aix61)
SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
AIX32="no"
AIX64="yes"
+ TSM_IMPORTS="-bI:/lib/aio.exp -bI:/lib/netinet.exp -bI:/lib/sockets.exp -bI:/lib/statcmd.exp"
+ TSM_LIBS="-lsys -lcsys -lc"
+ ;;
+
+ rs_aix72)
+ TSM_IMPORTS="-bI:/lib/aio.exp"
+ TSM_LIBS="-lsys -lc"
;;
s390_linux26)
MT_CFLAGS="${MT_CFLAGS} -DAFS_PTHREAD_ENV"
+AFS_LT_INIT
+
+dnl if ar is not present, libtool.m4 (provided by libtool) sets AR to false
+dnl if strip is not present, libtool.m4 (provided by libtool) sets STRIP to :
+AS_IF([test "x$AR" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'ar'])])
+AS_IF([test "x$AS" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'as'])])
+AS_IF([test "x$MV" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'mv'])])
+AS_IF([test "x$RM" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'rm'])])
+AS_IF([test "x$LD" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'ld'])])
+AS_IF([test "x$CP" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'cp'])])
+AS_IF([test "x$GENCAT" = "xfalse"], [AC_MSG_ERROR([cannot find required command 'gencat'])])
+
+dnl TODO - need to disable STRIP if we are doing debugging in any user space code
+
#
# Defaults for --enable-optimize-kernel
#
CFLAGS_NOSTRICT=-fno-strict-aliasing
CFLAGS_NOUNUSED=
CFLAGS_NOOLDSTYLE=
+CFLAGS_NOIMPLICIT_FALLTHROUGH=
XCFLAGS_NOCHECKING="$XCFLAGS"
if test "x$GCC" = "xyes"; then
XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith"
fi
if test "x$enable_checking" != "xno"; then
- XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith"
+ XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith -fno-common"
CFLAGS_WERROR="-Werror"
if test "x$enable_checking" != "xall"; then
CFLAGS_NOERROR="-Wno-error"
CFLAGS_NOUNUSED="-Wno-unused"
CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
+ AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough],
+ [CFLAGS_NOIMPLICIT_FALLTHROUGH])
AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
else
CFLAGS_NOSTRICT=
esac
fi
+dnl add additional checks if compilers support the flags
+AS_IF([test "x$enable_checking" != "xno"],
+ [AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [XCFLAGS])
+])
+
dnl horribly cheating, assuming double / is ok.
case $INSTALL in
./* )
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_LINKER)
AC_SUBST(SHLIB_SUFFIX)
+AC_SUBST(TSM_IMPORTS)
+AC_SUBST(TSM_LIBS)
AC_SUBST(VFSCK_CFLAGS)
AC_SUBST(XCFLAGS)
AC_SUBST(CFLAGS_NOERROR)
AC_SUBST(CFLAGS_NOSTRICT)
AC_SUBST(CFLAGS_NOUNUSED)
AC_SUBST(CFLAGS_NOOLDSTYLE)
+AC_SUBST(CFLAGS_NOIMPLICIT_FALLTHROUGH)
AC_SUBST(CFLAGS_WERROR)
AC_SUBST(XCFLAGS64)
AC_SUBST(XLDFLAGS)
AC_SUBST(XLIBKVM)
AC_SUBST(XLIBS)
AC_SUBST(YACC)
+AC_SUBST(KROOT)
+AC_SUBST(KINCLUDES)
])