Skip to content

Commit

Permalink
build: add terastation build hacks
Browse files Browse the repository at this point in the history
This configure option disables known nroken support on the
terastation pro.

Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
  • Loading branch information
ntfreak committed Apr 23, 2014
1 parent 0797c02 commit 42ff2bd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion configure.ac
Expand Up @@ -68,7 +68,15 @@ AC_C_BIGENDIAN
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select sendfile setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])

AC_MSG_CHECKING([whether to enable terastation hacks])
AC_ARG_ENABLE([terastation-hacks],
AS_HELP_STRING([--enable-terastation-hacks], [Enable terastation hacks]),
[enable_terastation_hacks=$enableval], [enable_terastation_hacks=no])
AC_MSG_RESULT([$enable_terastation_hacks])

if test $enable_terastation_hacks = no; then

#
# Check for struct ip_mreqn
Expand Down Expand Up @@ -98,6 +106,8 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [
])
])

fi

################################################################################################################
# Special include directories
case $host in
Expand Down Expand Up @@ -302,6 +312,10 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT([yes])
])

if test $enable_terastation_hacks = no; then

AC_CHECK_FUNCS([sendfile])

AC_MSG_CHECKING([for linux sendfile support])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
Expand Down Expand Up @@ -382,6 +396,8 @@ AC_COMPILE_IFELSE(
[
AC_MSG_RESULT([no])
])
fi

CFLAGS="$CFLAGS_SAVE"

LDFLAGS_SAVE="$LDFLAGS"
Expand Down

0 comments on commit 42ff2bd

Please sign in to comment.