--enable-gfio)
gfio="yes"
;;
+ --disable-numa) disable_numa="yes"
+ ;;
--help)
show_help="yes"
;;
echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
echo "--build-32bit-win Enable 32-bit build on Windows"
echo "--enable-gfio Enable building of gtk gfio"
+ echo "--disable-numa Disable libnuma even if found"
exit $exit_val
fi
targetos='OpenBSD'
elif check_define __sun__ ; then
targetos='SunOS'
+ CFLAGS="$CFLAGS -D_REENTRANT"
else
targetos=`uname -s`
fi
output_sym "CONFIG_CLOCK_GETTIME"
output_sym "CONFIG_SCHED_IDLE"
output_sym "CONFIG_TCP_NODELAY"
+ output_sym "CONFIG_TLS_THREAD"
+ output_sym "CONFIG_IPV6"
echo "CC=$CC" >> $config_host_mak
echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
exit 0
linux_fallocate="no"
cat > $TMPC << EOF
#include <stdio.h>
+#include <fcntl.h>
#include <linux/falloc.h>
int main(int argc, char **argv)
{
return numa_available();
}
EOF
-if compile_prog "" "-lnuma" "libnuma"; then
+if test "$disable_numa" != "yes" && compile_prog "" "-lnuma" "libnuma"; then
libnuma="yes"
LIBS="-lnuma $LIBS"
fi
#include <string.h>
int main(int argc, char **argv)
{
- strcasestr(NULL, NULL);
- return 0;
+ return strcasestr(argv[0], argv[1]) != NULL;
}
EOF
if compile_prog "" "" "strcasestr"; then
cat > $TMPC << EOF
#include <unistd.h>
#include <stdio.h>
+#include <getopt.h>
int main(int argc, char **argv)
{
int c = getopt_long_only(argc, argv, NULL, NULL, NULL);
tls_thread="no"
cat > $TMPC << EOF
#include <stdio.h>
-static int __thread ret;
+static __thread int ret;
int main(int argc, char **argv)
{
return ret;
fi
echo "pwritev/preadv $pwritev"
+##########################################
+# Check whether we have the required functions for ipv6
+ipv6="no"
+cat > $TMPC << EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ struct addrinfo hints;
+ struct in6_addr addr;
+ int ret;
+
+ ret = getaddrinfo(NULL, NULL, &hints, NULL);
+ freeaddrinfo(NULL);
+ printf("%s\n", gai_strerror(ret));
+ addr = in6addr_any;
+ return 0;
+}
+EOF
+if compile_prog "" "" "ipv6"; then
+ ipv6="yes"
+fi
+echo "IPv6 helpers $ipv6"
#############################################################################
if test "$pwritev" = "yes" ; then
output_sym "CONFIG_PWRITEV"
fi
+if test "$ipv6" = "yes" ; then
+ output_sym "CONFIG_IPV6"
+fi
echo "LIBS+=$LIBS" >> $config_host_mak
echo "CFLAGS+=$CFLAGS" >> $config_host_mak