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])
SHLIB_LINKER="${CC} -shared"
;;
- ppc64_linux26)
+ ppc64_linux26|ppc64le_linux26)
MT_CFLAGS='-pthread -D_REENTRANT'
PAM_OPTMZ=-O2
PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
XLIBS="${LIB_AFSDB} -framework CoreFoundation"
;;
+ *_darwin_190)
+ 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'
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(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)
])