diff --git a/configure.ac b/configure.ac index 37256518..cc328e15 100644 --- a/configure.ac +++ b/configure.ac @@ -910,6 +910,31 @@ AC_CHECK_DECLS([initgroups], [], [], [[ #include ]]) +have_netinet_udp_h_udp_segment=no +AC_CHECK_DECL([UDP_SEGMENT], [have_netinet_udp_h_udp_segment=yes], + [have_netinet_udp_h_udp_segment=no], [[ + #include +]]) + +if test "x$have_netinet_udp_h_udp_segment" = "xno"; then + have_linux_udp_h_udp_segment=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + ]], + [[ + #if UDP_SEGMENT != 103 + exit(1) + #endif + ]])], + [have_linux_udp_h_udp_segment=yes], + [have_linux_udp_h_udp_segment=no]) + + if test "x$have_linux_udp_h_udp_segment" = "xyes"; then + EXTRA_DEFS="$EXTRA_DEFS -DUDP_SEGMENT=103" + fi +fi + save_CFLAGS=$CFLAGS save_CXXFLAGS=$CXXFLAGS @@ -1077,6 +1102,8 @@ AC_MSG_NOTICE([summary of build options: CXX1XCXXFLAGS: ${CXX1XCXXFLAGS} EXTRACFLAG: ${EXTRACFLAG} LIBS: ${LIBS} + DEFS: ${DEFS} + EXTRA_DEFS: ${EXTRA_DEFS} Library: Shared: ${enable_shared} Static: ${enable_static}