AC_DEFUN(AC_LBL_C_INIT,
[
AC_BEFORE([$0], [AC_LBL_DEVEL])
- #
- # Changes to copt that are required even for compilers that appear
- # to be GCC (note that not all compilers that apper to be GCC
- # are, in fact, GCC; Clang, for example, looks enough like GCC
- # that the autoconf tests for the C compiler set GCC to yes).
- #
- case "$host_os" in
-
- haiku*)
- #
- # On Haiku, all executables are built as shared objects,
- # and must have their code build as PIC.
- #
- # At least some versions of Haiku's GCC default to PIC,
- # with a -fno-pic option for cases where that's not desired.
- #
- # Clang hasn't been modified in that fashion, so Clang
- # builds of tcpdump fail.
- #
- # Force the use of -fPIC (even for GCC; adding -fPIC for GCC
- # won't break anything).
- #
- $1="$$1 -fPIC"
- ;;
- esac
-
if test "$GCC" = yes ; then
#
# -Werror forces warnings to be errors.
AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h)
+#
+# Assorted platform checks.
+#
case "$host_os" in
darwin*)
esac
fi
;;
-esac
+haiku*)
+ #
+ # On Haiku, all executables are built as shared objects,
+ # and must have their code build as PIC.
+ #
+ # At least some versions of Haiku's GCC default to PIC,
+ # with a -fno-pic option for cases where that's not desired.
+ #
+ # Clang hasn't been modified in that fashion, so Clang
+ # builds of tcpdump fail.
+ #
+ # Force the use of -fPIC (even for GCC; adding -fPIC for GCC
+ # won't break anything).
+ #
+ CFLAGS="$CFLAGS -fPIC"
+ ;;
+esac
AC_ARG_WITH([smi],
[AS_HELP_STRING([--with-smi],